/* ==========================================================================
   Lucky Devil Barbershop — styles.css
   Design source: Lucky Devil Barbershop Brand Kit v1.0 (Claude Design project)

   RESKIN GUIDE
   Every color, font, spacing, and component value lives in the :root block
   below. To reskin the site, edit :root here and the Google Fonts <link> in
   index.html — nothing else. Component rules only ever consume the semantic
   tokens (layer 2+), never the raw brand values directly.

   The ONLY value not expressed as a token is the single responsive breakpoint
   (CSS custom properties cannot be used inside @media queries):
     - 768px : nav collapses to hamburger below this; grids widen above it
   One HTML caveat: <meta name="theme-color"> in index.html duplicates --ink,
   because meta tags cannot read CSS variables — update it when reskinning.
   ========================================================================== */

/* Metric-matched fallback faces: while Oswald/Inter load, text renders in a
   system font adjusted to occupy the same space, so the swap causes near-zero
   layout shift (CLS). Overrides were measured against the real fonts in
   Chrome. These belong to the font imports — retune or remove them if the
   brand fonts ever change. */
@font-face {
  font-family: 'Oswald Fallback';
  src: local('Arial Narrow'), local('Arial');
  size-adjust: 100.74%;
  ascent-override: 118.13%;
  descent-override: 28.79%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Libre Franklin Fallback';
  src: local('Arial'), local('Helvetica');
  size-adjust: 89.12%;
  ascent-override: 108.85%;
  descent-override: 28.05%;
  line-gap-override: 0%;
}

:root {
  /* ----- 1. RAW BRAND TOKENS (verbatim from the brand kit — do not consume
     directly in component rules; map them through layer 2) ----- */
  --ink: #171310;
  --charcoal: #2A2521;
  --bone: #F1EAE0;
  --steel: #8D8479;
  --red: #A31F1F;
  --gold: #C97A2B;
  --mint: #9FCBB8;
  --red-hover: #8a1a1a;        /* primary button hover, from kit applied examples */
  --stripe-dark: #1e1a17;      /* photo-placeholder stripe, from kit */
  --border-on-dark: #3A342D;   /* card/footer borders on ink, from kit */
  --border-on-light: #d9d2c4;  /* borders on bone, from kit */
  --steel-dark: #5F584E;       /* darkened steel: raw steel on bone is 3.1:1 and
                                  fails WCAG AA — this passes at ~5.9:1 */

  --font-hero: 'Rye', serif;               /* hero/wordmark moments ONLY — never body/UI sizes */
  --font-heading: 'Oswald', 'Oswald Fallback', sans-serif; /* structural headings, 700, uppercase */
  --font-body: 'Libre Franklin', 'Libre Franklin Fallback', sans-serif; /* Franklin Gothic revival — period-correct American gothic */
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; /* caption bars — system stack, no webfont cost */

  /* ----- 2. SEMANTIC TOKENS (the reskin surface — components consume these) ----- */
  --color-bg: var(--ink);
  --color-surface: var(--charcoal);              /* cards, embed surround */
  --color-bg-light: var(--bone);                 /* light sections */
  --color-text: var(--bone);                     /* text on dark */
  --color-text-muted: var(--steel);              /* on ink only: 4.9:1, passes AA */
  --color-text-on-light: var(--ink);
  --color-text-muted-on-light: var(--steel-dark);/* never raw steel on bone */
  --color-accent: var(--red);                    /* CTAs + emphasis only (<10% of layout) */
  --color-accent-hover: var(--red-hover);
  --color-accent-contrast: var(--bone);          /* text on red: 6.3:1 */
  --color-price: var(--gold);                    /* prices, hovers, highlights */
  --color-accent-rare: var(--mint);              /* sparingly — sampled from the shop sign */
  --color-border: var(--border-on-dark);
  --color-border-light: var(--border-on-light);
  --color-focus: var(--gold);                    /* focus ring on dark: 5.4:1 vs ink */
  --color-disabled-bg: var(--ink);               /* placeholder "Coming Soon" chip */
  --color-disabled-text: var(--steel);           /* steel on ink: 4.9:1, passes AA */

  /* ----- 3. TYPE SCALE ----- */
  --text-hero: clamp(2.25rem, 1.25rem + 4.5vw, 4rem); /* Rye, fluid 36px @360 -> 64px cap */
  --text-h2-hero: clamp(1.75rem, 1.2rem + 2.5vw, 2.5rem); /* Rye moments below the hero (booking) */
  --text-h2: 2rem;             /* Oswald 700 uppercase */
  --text-h3: 1.25rem;          /* Oswald 700 uppercase */
  --text-body: 1rem;
  --text-small: 0.9375rem;     /* 15px */
  --text-caption: 0.8125rem;   /* 13px, Inter 500 */
  --text-eyebrow: 0.75rem;     /* 12px, Inter 700 uppercase */
  --text-nav: 0.6875rem;       /* 11px, Inter 600 uppercase */
  --text-wordmark: 1.0625rem;     /* wordmark shop name in nav + footer */
  --text-wordmark-sub: 0.5625rem; /* 9px, letterspaced BARBERSHOP subline */
  --text-quote: 1.125rem;         /* about pull quote */
  --leading-body: 1.65;
  --leading-heading: 1.08;
  --leading-hero: 1.15;
  --leading-tight: 1.2;           /* wordmark name, card titles */
  --leading-quote: 1.5;
  --tracking-heading: -0.01em;    /* section titles, hero heading */
  --tracking-title: 0.02em;       /* card titles, about tagline */
  --tracking-eyebrow: 0.25em;
  --tracking-button: 0.06em;
  --tracking-nav: 0.08em;
  --tracking-wordmark: 0.2em;
  --tracking-mono: 0.05em;        /* gallery caption bars */

  /* ----- 4. SPACING & LAYOUT (kit scale 4->64 + one desktop extension) ----- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 96px;
  --container-max: 1080px;
  --container-pad: var(--space-3);
  --section-pad-y: clamp(var(--space-6), 10vw, var(--space-8));
  --header-height: 64px;
  --anchor-offset: calc(var(--header-height) + var(--space-3));
  --hero-min-h: min(85svh, 720px);

  /* ----- 5. COMPONENT TOKENS ----- */
  --radius: 0px;                       /* corners are CUT, never rounded */
  --cut: 16px;
  --clip-cut: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  --border-w: 1.5px;                   /* secondary buttons: plain rectangles */
  --hairline: 1px;                     /* dividers, card borders, footer rules */
  --rule-w: 2px;                       /* hamburger bars */
  --underline-offset: 3px;
  --tap-min: 44px;                     /* minimum touch-target size */
  --toggle-gap: 5px;                   /* hamburger bar spacing */
  --toggle-pad: 10px;
  --mark-size: 36px;                   /* logo mark diameter — keep the img
                                          width/height attributes in index.html
                                          in sync when changing */
  --booking-max-w: 720px;
  --shop-card-img-ratio: 1 / 1;        /* product shots are square (gallery is 4/5) */
  --shop-embed-min-h: 320px;           /* card floor when the Shopify embed mounts —
                                          prevents layout shift on SDK load */
  --btn-pad: var(--space-3) var(--space-5);
  --focus-ring-w: 2px;
  --focus-ring-offset: 3px;
  --card-pad: var(--space-4);
  --gallery-tile-ratio: 4 / 5;
  --booking-min-h: 720px;              /* Resurva embeds are tall forms; container must not collapse */
  /* Mid-stop + light top veil keep hero text legible over the real photo */
  --gradient-hero: linear-gradient(to top, rgba(23, 19, 16, 0.95) 25%, rgba(23, 19, 16, 0.55) 60%, rgba(23, 19, 16, 0.2));
  --pattern-stripe: repeating-linear-gradient(
    135deg,
    var(--charcoal), var(--charcoal) 9px,
    var(--stripe-dark) 9px, var(--stripe-dark) 18px
  );

  /* ----- 6. MOTION TOKENS ----- */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);   /* entrances: confident, decisive */
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1); /* state changes */
  --dur-press: 100ms;
  --dur-state: 220ms;
  --dur-entrance: 650ms;
  --dur-settle: 1200ms;   /* hero photo one-time settle on load */
  --stagger: 70ms;
  --drift-period: 2.8s;    /* hero stripe drift: time for exactly one pattern repeat */
  --rise-distance: 18px;   /* entrance travel */
}

/* ==========================================================================
   Motion
   Entrances are pure CSS keyframes with `backwards` fill: if animations never
   run (old browser, print, reduced motion) every element is simply visible —
   content is never gated on a reveal firing.
   ========================================================================== */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(var(--rise-distance));
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* One stripe period of --pattern-stripe (18px along the 135deg gradient axis
   is a (12.73px, 12.73px) shift), so the loop is seamless. */
@keyframes drift {
  to {
    transform: translate(-12.73px, -12.73px);
  }
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* One-time zoom-out settle for the hero photo, riding the load choreography.
   `backwards` fill + no visibility gating: photo is always visible at rest. */
@keyframes settle {
  from {
    transform: scale(1.045);
  }
  to {
    transform: scale(1);
  }
}

/* ==========================================================================
   Reset / baseline
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

iframe {
  border: 0;
}

a {
  color: inherit;
}

ul[role='list'] {
  list-style: none;
  padding: 0;
}

.hero__heading,
.section-title,
.card__title {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* Visible focus everywhere. Gold passes non-text contrast on ink (5.4:1);
   light sections override --color-focus below (gold on bone is ~2.8:1, fails). */
:focus-visible {
  outline: var(--focus-ring-w) solid var(--color-focus);
  outline-offset: var(--focus-ring-offset);
}

::selection {
  background: var(--color-accent-rare);
  color: var(--ink);
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 200;
  background: var(--color-focus);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-caption);
  text-transform: uppercase;
  letter-spacing: var(--tracking-nav);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  transform: translateY(-300%);
}

.skip-link:focus-visible {
  transform: none;
  outline-color: var(--color-text);
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--color-price);
  margin-bottom: var(--space-2);
}

/* ==========================================================================
   Buttons
   Kit rule: cut corner on PRIMARY buttons and feature cards only;
   secondary buttons stay plain rectangles.
   ========================================================================== */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-caption);
  letter-spacing: var(--tracking-button);
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  padding: var(--btn-pad);
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    background-color var(--dur-press) ease,
    color var(--dur-press) ease,
    border-color var(--dur-press) ease,
    transform var(--dur-press) var(--ease-out-quint);
}

.btn:hover {
  transform: translateY(-1px); /* rise on hover… */
}

.btn:active {
  transform: translateY(1px); /* …press-down on click: full tactile cycle, no bounce */
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  clip-path: var(--clip-cut);
}

.btn--primary:hover {
  background: var(--color-accent-hover);
}

/* clip-path clips outlines drawn outside the box, so cut-corner elements get
   an INNER focus ring instead. Do not "simplify" this back to the global
   ring — it would be invisible on these buttons. */
.btn--primary:focus-visible {
  outline: var(--focus-ring-w) solid var(--color-accent-contrast);
  outline-offset: calc((var(--focus-ring-w) + var(--focus-ring-offset)) * -1);
}

.btn--secondary {
  background: transparent;
  color: var(--color-text);
  border: var(--border-w) solid var(--color-text);
}

.btn--secondary:hover {
  color: var(--color-price);
  border-color: var(--color-price);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: var(--hairline) solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: var(--header-height);
  position: relative;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  padding-block: var(--space-2);
}

.wordmark__mark {
  width: var(--mark-size);
  height: var(--mark-size);
  border-radius: 50%; /* the round badge is the one sanctioned circle; --radius:0 applies to boxes */
  flex-shrink: 0;
}

.wordmark__text {
  display: flex;
  flex-direction: column;
}

.wordmark__name {
  font-family: var(--font-hero);
  font-weight: 400;
  font-size: var(--text-wordmark);
  line-height: var(--leading-tight);
  text-transform: uppercase;
  color: var(--color-text);
}

.wordmark__sub {
  font-family: var(--font-body);
  font-size: var(--text-wordmark-sub);
  letter-spacing: var(--tracking-wordmark);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Hidden by default: without JavaScript the menu renders as a static row, so
   showing a do-nothing hamburger would be a lying, inoperative control. main.js
   adds .js to <html>, which reveals the toggle on small screens below. */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: var(--toggle-gap);
  width: var(--tap-min);
  height: var(--tap-min);
  padding: var(--toggle-pad);
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: var(--rule-w);
  background: var(--color-text);
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
}

/* Compact button inside the 64px header bar — the default --btn-pad reads
   oversized at nav scale. Section CTAs keep the full padding. */
.nav-menu .btn {
  padding: var(--space-2) var(--space-4);
}

.nav-menu a:not(.btn) {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-nav);
  letter-spacing: var(--tracking-nav);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-text);
  padding: var(--space-3);
}

.nav-menu a:not(.btn) {
  position: relative;
  transition: color var(--dur-state) ease;
}

/* Gold rule drawn left-to-right under nav links — feedback, not decoration. */
.nav-menu a:not(.btn)::after {
  content: '';
  position: absolute;
  inset-inline: var(--space-3);
  bottom: var(--space-2);
  height: var(--rule-w);
  background: var(--color-price);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-state) var(--ease-out-quint);
}

.nav-menu a:not(.btn):hover,
.nav-menu a:not(.btn):focus-visible {
  color: var(--color-price);
}

.nav-menu a:not(.btn):hover::after,
.nav-menu a:not(.btn):focus-visible::after {
  transform: scaleX(1);
}

/* Mobile menu behavior only applies when JS is running (main.js adds .js to
   <html>). Without JS the menu renders as a plain visible row — degraded but
   fully functional anchor navigation. */
@media (max-width: 767px) {
  .js .nav-toggle {
    display: flex;
  }

  .js .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--color-bg);
    border-bottom: var(--hairline) solid var(--color-border);
    padding: var(--space-2) var(--container-pad) var(--space-4);
  }

  .js .nav-menu.is-open {
    display: flex;
    animation: menu-in var(--dur-state) var(--ease-out-quint);
  }

  .nav-menu a:not(.btn) {
    padding: var(--space-3) var(--space-2);
  }

  .nav-menu a:not(.btn)::after {
    inset-inline: var(--space-2); /* match the tighter mobile padding */
  }

  .nav-menu .btn {
    margin-top: var(--space-2);
  }
}

@media (min-width: 768px) {
  .nav-menu {
    gap: var(--space-3);
  }
}

/* ==========================================================================
   Sections (shared)
   ========================================================================== */

.section {
  padding-block: var(--section-pad-y);
  scroll-margin-top: var(--anchor-offset);
}

.section--light {
  background: var(--color-bg-light);
  color: var(--color-text-on-light);
  /* Gold fails non-text contrast on bone; ink ring instead. Same pattern for
     any future light section. */
  --color-focus: var(--color-text-on-light);
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-h2);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.section-title--rye {
  font-family: var(--font-hero); /* sanctioned Rye moment (kit booking precedent) */
  font-weight: 400;
  font-size: var(--text-h2-hero);
  letter-spacing: 0;
}

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

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: var(--hero-min-h);
  border-bottom: var(--hairline) solid var(--color-border);
  scroll-margin-top: var(--anchor-offset);
}

.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* Oversized stripe layer drifting along its own diagonal — a quiet barber-pole
   nod. Transform-only (compositor), never background-position (repaints). */
.hero__bg::before {
  content: '';
  position: absolute;
  inset: calc(var(--space-4) * -1);
  background: var(--pattern-stripe);
  animation: drift var(--drift-period) linear infinite;
  will-change: transform;
}

/* Real shop photo over the stripe layer (stripes remain the loading fallback);
   the ::after gradient below paints on top of it for text legibility. */
.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
}

.hero .container {
  position: relative;
  width: 100%;
  padding-block: var(--space-7) var(--space-6);
}

.hero__heading {
  font-family: var(--font-hero);
  font-weight: 400;
  font-size: var(--text-hero);
  line-height: var(--leading-hero);
  letter-spacing: var(--tracking-heading);
  text-transform: uppercase;
  max-width: 14ch;
  margin-bottom: var(--space-3);
}

.hero__tagline {
  font-size: var(--text-small);
  color: var(--color-text-muted);
  max-width: 44ch;
  margin-bottom: var(--space-5);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* Load choreography: eyebrow -> headline -> tagline -> CTAs, one tight beat.
   Wrapped in no-preference so motion is pure progressive enhancement — any
   UA that skips the query renders everything at rest and fully visible. */
@media (prefers-reduced-motion: no-preference) {
  .hero__photo {
    animation: settle var(--dur-settle) var(--ease-out-expo) backwards;
  }

  .hero .eyebrow {
    animation: rise var(--dur-entrance) var(--ease-out-expo) backwards;
  }

  .hero__heading {
    animation: rise var(--dur-entrance) var(--ease-out-expo) var(--stagger) backwards;
  }

  .hero__tagline {
    animation: rise var(--dur-entrance) var(--ease-out-expo) calc(var(--stagger) * 2) backwards;
  }

  .hero__actions {
    animation: rise var(--dur-entrance) var(--ease-out-expo) calc(var(--stagger) * 3) backwards;
  }
}

/* ==========================================================================
   Services
   ========================================================================== */

/* Flex, not grid: both card lists (services, shop) hold 5 items, so the last
   row runs short. Centering the short row reads as intentional instead of a
   dead gap, and each li is a flex parent so the card article stretches to the
   full row height (equal bottoms within a row). */
.card-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.card-grid > li {
  display: flex;
  flex: 0 1 100%;
}

.card-grid .card {
  width: 100%;
}

@media (min-width: 768px) {
  .card-grid {
    gap: var(--space-4);
  }

  .card-grid > li {
    flex-basis: calc((100% - 2 * var(--space-4)) / 3);
  }
}

.card {
  background: var(--color-surface);
  border: var(--hairline) solid var(--color-border);
  padding: var(--card-pad);
  clip-path: var(--clip-cut); /* feature cards get the cut corner (kit rule) */
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.card__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-h3);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-title);
  text-transform: uppercase;
}

/* Meta stays bone, not steel: steel on charcoal is ~4.1:1 and fails AA for
   normal-size text. Hierarchy comes from size/case instead of color. */
.card__meta {
  font-size: var(--text-eyebrow);
  font-weight: 600;
  letter-spacing: var(--tracking-nav);
  text-transform: uppercase;
  color: var(--color-text);
}

.card__price {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-h3);
  color: var(--color-price); /* gold on charcoal: 4.6:1 */
}

.card__desc {
  font-size: var(--text-caption);
  color: var(--color-text); /* not --color-text-muted: steel on charcoal is
                               ~4.1:1, below AA for normal-size text */
}

.services__note {
  margin-top: var(--space-4);
  font-size: var(--text-caption);
  color: var(--color-text-muted);
  max-width: 60ch;
}

/* ==========================================================================
   Gallery
   ========================================================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr; /* 3 tiles: full-width on phones, one row of 3 on desktop */
  gap: var(--space-3);
  margin-top: var(--space-5);
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
  }
}

/* The proof wall earns the page's one scroll reveal: tiles stagger in on
   first approach (main.js adds .is-inview). Without JS the grid is simply
   visible — the reveal only ever enhances. */
.gallery-grid li:nth-child(1) { --i: 0; }
.gallery-grid li:nth-child(2) { --i: 1; }
.gallery-grid li:nth-child(3) { --i: 2; }
.gallery-grid li:nth-child(4) { --i: 3; }
.gallery-grid li:nth-child(5) { --i: 4; }
.gallery-grid li:nth-child(6) { --i: 5; }

@media (prefers-reduced-motion: no-preference) {
  .js .gallery-grid.is-inview li {
    animation: rise var(--dur-entrance) var(--ease-out-expo) calc(var(--i, 0) * var(--stagger)) backwards;
  }
}

/* Quiet "look closer" affordance on the proof wall: slow photo zoom inside a
   clipped tile, caption brightens in step. */
.gallery-tile {
  overflow: hidden;
}

.gallery-tile img {
  width: 100%;
  height: auto; /* beat the HTML height attribute so aspect-ratio controls the crop */
  aspect-ratio: var(--gallery-tile-ratio);
  object-fit: cover;
  transition: transform var(--dur-entrance) var(--ease-out-quint);
}

.gallery-tile:hover img {
  transform: scale(1.035);
}

.gallery-tile__caption {
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  letter-spacing: var(--tracking-mono);
  color: var(--color-text-muted); /* steel on ink: 4.9:1 */
  background: var(--color-bg);
  border: var(--hairline) solid var(--color-border);
  border-top: 0;
  padding: var(--space-2) var(--space-3);
  transition: color var(--dur-state) ease;
}

.gallery-tile:hover .gallery-tile__caption {
  color: var(--color-text);
}

.gallery__note {
  margin-top: var(--space-4);
  font-size: var(--text-caption);
  color: var(--color-text-muted);
}

/* ==========================================================================
   Shop (Shopify Buy Button — see assets/js/shop.js)
   ========================================================================== */

.shop__sub {
  font-size: var(--text-small);
  color: var(--color-text-muted);
  max-width: 46ch;
  margin-bottom: var(--space-5);
}

.shop-card__media {
  aspect-ratio: var(--shop-card-img-ratio);
  background: var(--pattern-stripe); /* fallback while the product photo loads */
  border: var(--hairline) solid var(--color-border);
  margin-bottom: var(--space-2);
}

.shop-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Overrides .btn--primary by source order (equal specificity). Decorative
   stand-in, not a control — the markup carries aria-hidden. */
.btn--placeholder {
  background: var(--color-disabled-bg);
  color: var(--color-disabled-text);
  border: var(--hairline) solid var(--color-border);
  pointer-events: none;
  align-self: flex-start;
  margin-top: var(--space-2);
}

.shop__fallback {
  margin-top: var(--space-4);
  font-size: var(--text-caption);
  color: var(--color-text-muted);
}

.shop__fallback a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: var(--underline-offset);
}

.shop__fallback a:hover {
  color: var(--color-price);
}

/* Live mode: shop.js adds .is-live when a Shopify embed mounts into the card;
   the static placeholder internals yield to the embed. */
[data-shop-product].is-live {
  min-height: var(--shop-embed-min-h);
}

[data-shop-product].is-live .shop-card__media,
[data-shop-product].is-live .card__title,
[data-shop-product].is-live .card__meta,
[data-shop-product].is-live .card__price,
[data-shop-product].is-live .btn--placeholder {
  display: none;
}

/* ==========================================================================
   About (light section)
   ========================================================================== */

/* Pull-quote treatment straight from the brand kit's voice section: hairline
   rules above and below, not a side stripe. */
.about__quote {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-quote);
  line-height: var(--leading-quote);
  max-width: 56ch;
  border-block: var(--hairline) solid var(--color-text-on-light);
  padding-block: var(--space-4);
  margin-block: var(--space-4);
}

.about__body {
  max-width: 62ch;
  margin-bottom: var(--space-3);
}

.about__tagline {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-h3);
  text-transform: uppercase;
  letter-spacing: var(--tracking-title);
  color: var(--color-accent);
}

/* ==========================================================================
   Booking
   ========================================================================== */

.booking {
  text-align: center;
  border-top: var(--hairline) solid var(--color-border);
}

.booking__sub {
  font-size: var(--text-small);
  color: var(--color-text-muted);
  max-width: 46ch;
  margin-inline: auto;
  margin-bottom: var(--space-5);
}

.booking__direct {
  margin-bottom: var(--space-5);
}

.booking-embed {
  max-width: var(--booking-max-w);
  margin-inline: auto;
  background: var(--color-surface);
  border: var(--hairline) solid var(--color-border);
  /* No clip-path here: cutting a corner off a third-party form would hide UI. */
}

.booking-embed__frame {
  display: block;
  width: 100%;
  min-height: var(--booking-min-h); /* fixed min-height so the section never
                                       collapses before the real embed lands */
}

.booking__fineprint {
  margin-top: var(--space-3);
  font-size: var(--text-caption);
  color: var(--color-text-muted);
  max-width: 52ch; /* accepted via live mode: short measure, policy/consequence split */
  margin-inline: auto;
}

.booking__fineprint strong {
  display: block;
  color: var(--color-text);
  margin-top: var(--space-1);
}

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

.site-footer {
  border-top: var(--hairline) solid var(--color-border);
  padding-block: var(--space-6);
  scroll-margin-top: var(--anchor-offset);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
  }
}

.site-footer__motto {
  margin-top: var(--space-3);
  font-size: var(--text-caption);
  color: var(--color-text-muted);
}

.site-footer h2,
.site-footer .footer-heading {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-caption);
  letter-spacing: var(--tracking-nav);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.site-footer address {
  font-style: normal;
  font-size: var(--text-small);
}

.site-footer a:not(.wordmark) {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: var(--underline-offset);
}

.site-footer a:not(.wordmark):hover {
  color: var(--color-price);
}

.site-footer address a,
.footer-social a {
  display: inline-block;
  padding-block: var(--space-1); /* nudge tap targets */
}

.hours {
  font-size: var(--text-small);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-1) var(--space-3);
}

.hours dt {
  font-weight: 600;
}

.hours dd {
  margin: 0;
  color: var(--color-text-muted);
}

.hours + .footer-heading {
  margin-top: var(--space-4);
}

.site-footer__legal {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: var(--hairline) solid var(--color-border);
  font-size: var(--text-eyebrow);
  color: var(--color-text-muted);
}

/* ==========================================================================
   Reduced motion — every animation collapses to its resting (visible) state;
   the ambient hero drift stops entirely.
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero__bg::before {
    animation: none;
  }
}
