/*
Theme Name: Ironside
Theme URI: https://example.com/ironside
Author: Your Studio
Author URI: https://example.com
Description: Ironside — a bold, vintage one-page block theme for barbershops. Charcoal and amber-gold, built for Full Site Editing. Rebrand the logo, colors, fonts, photos and booking link entirely from the Site Editor, no code required. Ships with three one-click style variations.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ironside
Tags: full-site-editing, block-patterns, one-column, custom-colors, custom-menu, editor-style, block-styles, footer-widgets
*/

/* ==========================================================================
   Base
   ========================================================================== */

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wp-site-blocks > footer {
  margin-block-start: 0;
}

/* Warm grain overlay for a vintage, analog feel */
.wp-site-blocks::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Section rhythm & dividers
   ========================================================================== */

.section-pad {
  padding-top: var(--wp--preset--spacing--60);
  padding-bottom: var(--wp--preset--spacing--60);
}

/* Heavy vintage rule under section eyebrows */
.rule-top {
  border-top: 2px solid color-mix(in srgb, var(--wp--preset--color--accent) 55%, transparent);
}

/* Decorative eyebrow badge: — TEXT — with flanking rules */
.eyebrow {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--wp--preset--font-family--display);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--wp--preset--color--accent);
  font-size: 0.95rem;
}
.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 42px;
  height: 2px;
  background: var(--wp--preset--color--accent);
  opacity: 0.7;
}
.eyebrow.eyebrow--left { justify-content: flex-start; }
.eyebrow.eyebrow--left::before { display: none; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(6px);
  border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 12%, transparent);
}

.site-header .wp-block-navigation {
  font-family: var(--wp--preset--font-family--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 1.0625rem;
}

.site-header .wp-block-navigation a {
  color: var(--wp--preset--color--contrast);
}
.site-header .wp-block-navigation a:hover {
  color: var(--wp--preset--color--accent);
}

.header-phone a {
  color: var(--wp--preset--color--accent-light);
  text-decoration: none;
  font-family: var(--wp--preset--font-family--display);
  letter-spacing: 0.08em;
  font-size: 1.25rem;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  background-color: var(--wp--preset--color--ink);
  background-image:
    radial-gradient(ellipse at 50% -10%, color-mix(in srgb, var(--wp--preset--color--accent) 22%, transparent), transparent 55%),
    repeating-linear-gradient(45deg, color-mix(in srgb, var(--wp--preset--color--contrast) 3%, transparent) 0 2px, transparent 2px 22px);
}

.hero-title {
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 0.92;
}

.hero-title .amber { color: var(--wp--preset--color--accent); }

.pinstripe-band {
  background-color: var(--wp--preset--color--accent);
  background-image: repeating-linear-gradient(
    90deg,
    var(--wp--preset--color--ink) 0 2px,
    transparent 2px 14px
  );
}

/* ==========================================================================
   Emblem / badge motif
   ========================================================================== */

.emblem {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  width: 128px;
  height: 128px;
  border: 3px double var(--wp--preset--color--accent);
  border-radius: 50%;
  color: var(--wp--preset--color--accent-light);
  font-family: var(--wp--preset--font-family--display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  line-height: 1.1;
  text-align: center;
}
.emblem .emblem-year { font-size: 1.9rem; color: var(--wp--preset--color--contrast); }
.emblem .emblem-label { font-size: 0.7rem; }

/* ==========================================================================
   Cards (services, team, testimonials)
   ========================================================================== */

.equal-cards > .wp-block-column {
  display: flex;
  flex-direction: column;
  flex-grow: 0;
}
.equal-cards > .wp-block-column > .wp-block-group {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.equal-cards .cta-bottom {
  margin-top: auto;
  justify-content: center;
}

.card {
  border: 1px solid color-mix(in srgb, var(--wp--preset--color--accent) 28%, transparent);
  background: linear-gradient(180deg, var(--wp--preset--color--surface), color-mix(in srgb, var(--wp--preset--color--surface) 70%, var(--wp--preset--color--ink)));
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--wp--preset--color--accent);
  box-shadow: 0 16px 34px rgba(0,0,0,0.45);
}

/* Service price list rows */
.price-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}
.price-row .price-name { flex: 0 0 auto; }
.price-row .price-lead {
  flex: 1 1 auto;
  border-bottom: 2px dotted color-mix(in srgb, var(--wp--preset--color--muted) 60%, transparent);
  transform: translateY(-4px);
}
.price-row .price-amt {
  flex: 0 0 auto;
  font-family: var(--wp--preset--font-family--display);
  color: var(--wp--preset--color--accent-light);
  font-size: 1.4rem;
  letter-spacing: 0.03em;
}

/* Team member portrait placeholder (no stock imagery) */
.portrait {
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(circle at 50% 34%, color-mix(in srgb, var(--wp--preset--color--muted) 45%, transparent), transparent 60%),
    linear-gradient(160deg, var(--wp--preset--color--surface), var(--wp--preset--color--ink));
  border: 1px solid color-mix(in srgb, var(--wp--preset--color--accent) 30%, transparent);
  position: relative;
  overflow: hidden;
}
.portrait::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 8px;
  background: var(--wp--preset--color--accent);
  background-image: repeating-linear-gradient(90deg, var(--wp--preset--color--ink) 0 2px, transparent 2px 12px);
}

/* Gallery placeholder tiles (fallback when no photo is set) */
.gallery-tile {
  aspect-ratio: 1 / 1;
  border: 1px solid color-mix(in srgb, var(--wp--preset--color--accent) 22%, transparent);
  background:
    conic-gradient(from 210deg at 50% 50%, color-mix(in srgb, var(--wp--preset--color--surface) 90%, var(--wp--preset--color--accent)), var(--wp--preset--color--ink), var(--wp--preset--color--surface));
  transition: filter 0.3s ease, transform 0.3s ease;
}
.gallery-tile:hover { filter: saturate(1.3) brightness(1.1); transform: scale(1.02); }

/* Gallery photos — uniform square crop with the vintage frame */
.gallery-photo {
  margin: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--wp--preset--color--accent) 24%, transparent);
}
.gallery-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: filter 0.35s ease, transform 0.35s ease;
}
.gallery-photo:hover img {
  filter: saturate(1.15) brightness(1.06);
  transform: scale(1.03);
}

/* Location map */
.map-photo {
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--wp--preset--color--accent) 30%, transparent);
  box-shadow: 0 16px 34px rgba(0,0,0,0.4);
}
.map-photo img {
  display: block;
  width: 100%;
}

/* Hero cover: keep the amber word glowing over the darkened storefront */
.hero-cover .hero-title { text-shadow: 0 2px 18px rgba(0,0,0,0.55); }

/* Testimonial quotes */
.quote-card p { font-style: italic; }
.quote-mark {
  font-family: var(--wp--preset--font-family--display);
  color: var(--wp--preset--color--accent);
  font-size: 3.5rem;
  line-height: 0.5;
}

/* Stat / trust strip numbers */
.stat-num {
  font-family: var(--wp--preset--font-family--display);
  color: var(--wp--preset--color--accent);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  line-height: 1;
}

/* Hours table rows */
.hours-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 10%, transparent);
}
.hours-row .hours-day { font-family: var(--wp--preset--font-family--display); letter-spacing: 0.08em; }
.hours-row .hours-time { color: var(--wp--preset--color--muted); }

/* Book CTA band */
.cta-band {
  background-color: var(--wp--preset--color--surface);
  background-image:
    radial-gradient(circle at 15% 30%, color-mix(in srgb, var(--wp--preset--color--accent) 18%, transparent), transparent 45%),
    radial-gradient(circle at 85% 70%, color-mix(in srgb, var(--wp--preset--color--accent) 12%, transparent), transparent 45%);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 2px solid color-mix(in srgb, var(--wp--preset--color--accent) 45%, transparent);
}
.site-footer .wp-block-social-links a { color: var(--wp--preset--color--contrast); }

/* ==========================================================================
   Animation & motion
   ========================================================================== */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up {
  opacity: 0;
  transform: translateY(28px);
  animation: fadeUp 0.7s ease forwards;
}
.fade-up.delay-1 { animation-delay: 0.15s; }
.fade-up.delay-2 { animation-delay: 0.3s; }
.fade-up.delay-3 { animation-delay: 0.45s; }

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

.stagger-children > * {
  opacity: 0;
  transform: translateY(22px);
  animation: fadeUp 0.6s ease forwards;
}
.stagger-children > *:nth-child(1) { animation-delay: 0.08s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.18s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.28s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.38s; }

.hover-lift { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.hover-lift:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,0.4); }

/* The barber-pole accent slowly drifts */
.pole-spin {
  background-image: repeating-linear-gradient(45deg,
    var(--wp--preset--color--accent) 0 10px,
    var(--wp--preset--color--contrast) 10px 20px,
    var(--wp--preset--color--base) 20px 30px);
  background-size: 200% 200%;
  animation: poleDrift 6s linear infinite;
}
@keyframes poleDrift { to { background-position: 42px 42px; } }

/* ==========================================================================
   Editor visibility — keep animated blocks visible while editing
   ========================================================================== */

.editor-styles-wrapper .animate-on-scroll,
.editor-styles-wrapper .fade-up,
.editor-styles-wrapper .stagger-children > * {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .animate-on-scroll,
  .fade-up,
  .stagger-children > * {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ==========================================================================
   Responsive / mobile
   ========================================================================== */

/* Tighten vertical rhythm on phones. Sections reference these spacing presets
   inline, so overriding the CSS variables reflows every section at once. */
@media (max-width: 600px) {
  :root {
    --wp--preset--spacing--50: 2.25rem;
    --wp--preset--spacing--60: 3rem;
    --wp--preset--spacing--70: 4rem;
  }
}

/* Header — keep it to one clean row: logo + hamburger + Book button.
   The phone number moves out of the way (it still lives in the footer). */
@media (max-width: 782px) {
  .site-header .header-phone > p { display: none; }
  .site-header .wp-block-site-title,
  .site-header .wp-block-site-title a { font-size: 1.3rem; }
  .site-header .wp-block-button__link {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    padding-left: 1.1rem;
    padding-right: 1.1rem;
    font-size: 1rem;
  }
}
@media (max-width: 420px) {
  .site-header > .wp-block-group {
    flex-wrap: wrap;
    row-gap: 0.6rem;
    justify-content: space-between;
  }
  .site-header .wp-block-site-title,
  .site-header .wp-block-site-title a { font-size: 1.1rem; }
}

/* Give the mobile nav overlay some brand polish */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
  padding-top: 3rem;
}
.wp-block-navigation__responsive-container.is-menu-open a {
  font-family: var(--wp--preset--font-family--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 1.5rem;
}

/* Hero — trim the minimum height so there's less dead space on small screens */
@media (max-width: 600px) {
  .hero-cover { min-height: 60vh !important; }
  .hero-title { font-size: clamp(2.25rem, 11vw, 3rem) !important; }
}

/* Gallery — override WordPress's fixed 3-column grid responsively */
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr !important; }
  .gallery-photo img { aspect-ratio: 4 / 3; }
}

/* Stats — 2×2 on phones instead of one tall stack */
@media (max-width: 781px) {
  .wp-block-columns.stat-row:not(.is-not-stacked-on-mobile) > .wp-block-column {
    flex-basis: calc(50% - 0.75rem) !important;
    flex-grow: 1;
  }
  .stat-num { font-size: clamp(2.25rem, 12vw, 3rem); }
}

/* Long service names shouldn't collide with the price on narrow screens */
@media (max-width: 400px) {
  .price-row { flex-wrap: wrap; row-gap: 0.15rem; }
  .price-row .price-amt { margin-left: 0; }
}
