/* ============================================================
   BASE — reset, typography primitives, layout, the rhythm system,
   and the reveal primitive. STRUCTURAL — content-free; copy as-is.
   (Per-section styling lives in sections.css; the swap surface in tokens.css.)
   ============================================================ */

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: var(--leading-body);
  color: var(--text-on-dark);
  background: var(--ink-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, picture, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; }
::selection { background: var(--terracotta); color: #fff; }

/* ---- Lenis smooth-scroll hooks ---- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---- Typography primitives ---- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-optical-sizing: auto;
  line-height: var(--leading-display);
  letter-spacing: 0;
}
.eyebrow {
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  font-weight: 500;
  color: var(--text-on-dark-muted);
}
.em { font-style: italic; color: var(--terracotta); } /* the single accent emphasis */
.measure { max-width: var(--measure); }

/* ---- Layout ---- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
/* --wide is used both WITH .wrap and STANDALONE (nav__inner / footer__inner carry
   only .wrap--wide), so it must be self-sufficient: same centering + gutter, wider cap. */
.wrap--wide { width: 100%; max-width: var(--maxw-wide); margin-inline: auto; padding-inline: var(--gutter); }
.stack > * + * { margin-top: var(--space-m); }

/* ---- The rhythm system: one dominant base, breaths, regrips ----
   Each section declares its family via data-bg. Same-family neighbours share
   the exact canvas, so dark runs read as one continuous surface (seamless).
   This is the COLOR-RHYTHM engine — set each section's data-bg per client. */
.section { position: relative; padding-block: var(--section-pad-y); }
.section[data-bg="ink"]        { background: var(--ink-900); color: var(--text-on-dark); }
.section[data-bg="ink-2"]      { background: var(--ink-850); color: var(--text-on-dark); }
.section[data-bg="marble"]     { background: var(--marble-50); color: var(--text-on-light); }
.section[data-bg="cream"]      { background: var(--cream); color: var(--text-on-light); }
.section[data-bg="terracotta"] { background: var(--terracotta); color: #fff; }

/* ---- Reveal primitive ----
   .js is set inline in <head> (no flash). Elements hide, then the motion
   layer animates them in on scroll. No JS / reduced-motion => fully visible. */
.js [data-reveal] { opacity: 0; transform: translateY(30px); will-change: opacity, transform; }
[data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; will-change: auto; }
  html { scroll-behavior: auto; }
}


/* ============================================================
   SITE CHROME — shared surfaces (B-opus reconcile).
   The setup sub built the nav/footer/button MARKUP in index.html +
   _page-shell.html but the presentational chrome lived in a sections.css
   that was deliberately not copied. This block styles ONLY those existing
   classes (no rename, no restructure): buttons, the invitation-band nav
   (desktop / scrolled / mobile sheet), the Meadow-Ink footer, and the
   shared section-head primitives. Token-driven, radius 16px.
   NOTE: the .btn hover/paint TRANSITION is owned by motion.css (.motion-ready
   .btn). Here we set only the button's static appearance + a hover-scale
   gated to hover:hover — no duplicate transition declaration.
   ============================================================ */

/* ─────────────────────────────────────────────────────────────
   1 · BUTTONS — clay pill system (tile: BUTTONS ON LIGHT / ON DARK)
   ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.9em 1.65em;
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 600;                       /* CTA text = Body Sans / semibold */
  line-height: 1;
  letter-spacing: 0.005em;
  text-align: center;
  border-radius: 999px;                   /* stadium pill (tile) */
  border: 1.5px solid transparent;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  /* no transition here — motion.css owns .btn timing (transform/shadow/border/bg) */
}
.btn--sm { padding: 0.62em 1.15em; font-size: var(--step--1); }

/* Primary = clay-filled pill, warm-paper text (tile: filled "Check your date") */
.btn--primary {
  background: var(--terracotta);
  color: #FFF8F1;                         /* warm paper on clay (tile) */
  box-shadow:
    0 12px 26px -14px rgba(140, 79, 57, 0.5),
    0 1px 0 0 rgba(255, 255, 255, 0.06) inset;
}

/* Ghost = clay outline on paper (tile: "See the venue" / "See the weekend flow") */
.btn--ghost {
  background: transparent;
  color: var(--terracotta);
  border-color: var(--terracotta);
}
/* Ghost on a dark Meadow-Ink field (tile: BUTTONS ON DARK secondary) —
   translucent warm-paper outline so it reads on green. */
[data-bg="ink"] .btn--ghost,
[data-bg="ink-2"] .btn--ghost,
.footer .btn--ghost {
  color: var(--text-on-dark);
  border-color: rgba(245, 239, 229, 0.42);
}

/* Text-link + arrow (tile: "Ask about lodging →" / "See more real weddings →") */
.link-arrow,
.btn__arrow {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step-0);
  letter-spacing: 0.005em;
  color: var(--terracotta);
}
.link-arrow::after,
.btn__arrow::after {
  content: "\2192";                        /* → */
  display: inline-block;
  transform: translateX(0);
  transition: transform 320ms var(--ease-out);
}
[data-bg="ink"] .link-arrow,
[data-bg="ink"] .btn__arrow,
.footer .link-arrow { color: var(--clay-soft); }

/* Hover = scale-not-shift, gated to real hover pointers (no jump on touch). */
@media (hover: hover) {
  .btn:hover { transform: translateY(-0.14rem) scale(1.02); }
  .btn--primary:hover {
    background: var(--terracotta-deep);
    box-shadow:
      0 18px 34px -16px rgba(140, 79, 57, 0.58),
      0 1px 0 0 rgba(255, 255, 255, 0.08) inset;
  }
  .btn--ghost:hover { background: var(--terracotta-tint); border-color: var(--terracotta-deep); }
  [data-bg="ink"] .btn--ghost:hover,
  .footer .btn--ghost:hover {
    background: rgba(245, 239, 229, 0.10);
    border-color: rgba(245, 239, 229, 0.7);
  }
  .link-arrow:hover::after,
  .btn__arrow:hover::after { transform: translateX(0.3em); }
}
/* Visible focus ring on every button (base :focus-visible sets the clay outline;
   primary gets a paper-gap glow so the ring reads on the clay fill). */
.btn--primary:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px var(--base),
    0 0 0 5.5px var(--terracotta),
    0 12px 26px -14px rgba(140, 79, 57, 0.5);
}

/* ─────────────────────────────────────────────────────────────
   2 · NAV — invitation-band masthead
   Layout: slim left support links · centered LIKAZOO wordmark ·
   right clay "Check your date" pill. Fixed, translucent Hearth-Paper
   band + bottom hairline; .is-scrolled = more solid + condensed + shadow.
   ───────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  /* translucent lifted Hearth-Paper band (tile: near-white invitation bar) */
  background: rgba(251, 247, 241, 0.72);
  -webkit-backdrop-filter: saturate(1.1) blur(12px);
  backdrop-filter: saturate(1.1) blur(12px);
  border-bottom: 1px solid var(--hairline-dark);
  transition:
    background 360ms var(--ease-out),
    box-shadow 360ms var(--ease-out),
    min-height 360ms var(--ease-out),
    border-color 360ms var(--ease-out),
    transform 420ms var(--ease-out);
}
.nav__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;   /* links | wordmark | actions, wordmark centered */
  align-items: center;
  gap: var(--space-m);
  width: 100%;
}

/* Support links — Body Sans / semibold, tracked, Meadow-Ink (tile) */
.nav__links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 0.5rem + 1.4vw, 2rem);
  margin: 0;
  padding: 0;
}
.nav__links--left { justify-self: start; }
.nav__links a {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--support);
  white-space: nowrap;
  transition: color 260ms var(--ease-out);
}
@media (hover: hover) {
  .nav__links a:hover { color: var(--terracotta); }   /* gentle clay tint */
}

/* Centered wordmark — Mini Serif A (Libre Caslon Display) */
.nav__wordmark {
  justify-self: center;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.1rem + 0.7vw, 1.7rem);
  line-height: 1;
  letter-spacing: 0.14em;
  color: var(--support);
  padding-inline: 0.1em;
  transition: color 260ms var(--ease-out), transform 300ms var(--ease-out);
}
@media (hover: hover) {
  /* Gentle warm TINT, not a full recolor into the accent: the wordmark stays
     Meadow-Ink-anchored (C1) and just leans ~22% toward clay on hover — scale-not-
     shift contract forbids the jarring full green→clay token swap. Older engines
     without color-mix simply keep the base green (safe no-op). */
  .nav__wordmark:hover {
    color: color-mix(in oklab, var(--support) 78%, var(--terracotta) 22%);
  }
}

/* Right actions — the clay pill (scale-not-shift on hover via .btn rules) */
.nav__actions { justify-self: end; display: flex; align-items: center; gap: var(--space-s); }
.nav__cta { white-space: nowrap; }

/* Scrolled state — more solid paper + condensed + soft shadow (main.js .is-scrolled) */
.nav.is-scrolled {
  background: rgba(251, 247, 241, 0.94);
  min-height: calc(var(--nav-h) - 0.6rem);
  box-shadow: 0 10px 30px -18px rgba(51, 65, 58, 0.42);
  border-bottom-color: var(--stone-200);
}

/* Mobile controls — hidden on desktop, shown < 760px */
.nav__toggle,
.nav__sheet { display: none; }

/* ── Mobile nav (< 760px): wordmark + compact date pill + hamburger sheet ── */
@media (max-width: 760px) {
  .nav__inner {
    grid-template-columns: auto 1fr auto;  /* toggle | wordmark | pill */
    gap: var(--space-s);
  }
  /* left support links collapse into the sheet */
  .nav__links--left { display: none; }
  .nav__wordmark { justify-self: center; }
  .nav__actions { justify-self: end; }
  .nav__cta { padding: 0.62em 1.05em; font-size: var(--step--1); }   /* compact pill */

  /* hamburger toggle (CSS-drawn bars, no icon file) */
  .nav__toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 2.4rem;
    height: 2.4rem;
    justify-self: start;
    border-radius: 10px;
    color: var(--support);
  }
  .nav__toggle-bar {
    display: block;
    width: 1.35rem;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 280ms var(--ease-out), opacity 200ms var(--ease-out);
  }
  /* open state: bars morph to an X */
  .nav.is-menu-open .nav__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.is-menu-open .nav__toggle-bar:nth-child(2) { opacity: 0; }
  .nav.is-menu-open .nav__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* paper sheet — links + pill, slides under the band */
  .nav__sheet {
    display: block;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    padding: var(--space-m) var(--gutter) var(--space-l);
    background: var(--paper-100);
    border-bottom: 1px solid var(--stone-200);
    box-shadow: 0 18px 34px -22px rgba(51, 65, 58, 0.4);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 320ms var(--ease-out), opacity 260ms var(--ease-out), visibility 0s linear 320ms;
  }
  .nav.is-menu-open .nav__sheet {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform 320ms var(--ease-out), opacity 260ms var(--ease-out), visibility 0s;
  }
  .nav__sheet-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin: 0 0 var(--space-m);
    padding: 0;
  }
  .nav__sheet-links a {
    display: block;
    padding: 0.7rem 0.2rem;
    font-family: var(--font-display);
    font-size: 1.35rem;
    letter-spacing: 0.01em;
    color: var(--support);
    border-bottom: 1px solid var(--hairline-dark);
  }
  .nav__sheet .btn { width: 100%; }
}

/* Hide-on-scroll-down / reveal-on-scroll-up is a MOBILE-ONLY law — width-gated so
   it can NEVER apply on desktop (the invitation masthead must persist there and
   only solidify via .is-scrolled). main.js also only attaches the handler <760px. */
@media (max-width: 760px) {
  .nav.nav--hidden { transform: translateY(-110%); }
  /* never hide the bar while the sheet is open (choreography also disabled in main.js) */
  .nav.is-menu-open.nav--hidden { transform: translateY(0); }
}

/* Reduced motion: no hide/reveal choreography, nav stays put. */
@media (prefers-reduced-motion: reduce) {
  .nav, .nav.nav--hidden { transform: none; transition: background 360ms var(--ease-out), box-shadow 360ms var(--ease-out); }
}

/* ─────────────────────────────────────────────────────────────
   3 · FOOTER — Meadow-Ink anchor field (data-bg="ink")
   Statement line + brand/descriptor + nav columns + real contact + legal.
   The <footer> is NOT a .section, so the rhythm engine's .section[data-bg]
   rule does not reach it — paint the Meadow-Ink field + on-dark text here so
   the footer is a solid green anchor regardless of the body base.
   ───────────────────────────────────────────────────────────── */
.footer {
  position: relative;
  background: var(--ink-900);
  color: var(--text-on-dark);
}
.footer__inner {
  padding-block: clamp(3.5rem, 2.5rem + 4vw, 6rem) clamp(2rem, 1.5rem + 2vw, 3rem);
}
.footer__statement {
  font-size: var(--step-3);
  line-height: 1.12;
  color: var(--text-on-dark);
  max-width: 22ch;
  margin-bottom: clamp(2.25rem, 1.5rem + 3vw, 4rem);
  text-wrap: balance;
}
.footer__statement .em { color: var(--clay-soft); }   /* clay reads warmer on green */

/* columns: brand · nav · contact */
.footer__columns {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.3fr;
  gap: clamp(2rem, 1rem + 3vw, 4rem);
  padding-bottom: clamp(2rem, 1.5rem + 2vw, 3rem);
  border-bottom: 1px solid var(--hairline);
}
.footer__wordmark {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.2rem + 0.9vw, 1.95rem);
  letter-spacing: 0.14em;
  color: var(--text-on-dark);
  margin-bottom: var(--space-s);
  transition: color 260ms var(--ease-out);
}
@media (hover: hover) { .footer__wordmark:hover { color: var(--clay-soft); } }
.footer__descriptor {
  font-size: var(--step--1);
  line-height: 1.55;
  color: var(--text-on-dark-muted);
  max-width: 32ch;
}
.footer__nav ul { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; margin: 0; padding: 0; }
.footer__nav a {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-on-dark-muted);
  transition: color 240ms var(--ease-out);
}
@media (hover: hover) { .footer__nav a:hover { color: var(--text-on-dark); } }
.footer__contact {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--text-on-dark-muted);
}
.footer__contact a { color: var(--text-on-dark-muted); transition: color 240ms var(--ease-out); }
@media (hover: hover) { .footer__contact a:hover { color: var(--clay-soft); } }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem var(--space-m);
  justify-content: space-between;
  align-items: center;
  padding-top: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  font-size: var(--step--1);
  color: var(--text-on-dark-muted);
}

@media (max-width: 760px) {
  .footer__columns { grid-template-columns: 1fr; gap: var(--space-l); }
  .footer__statement { font-size: var(--step-2); max-width: none; }
}

/* ─────────────────────────────────────────────────────────────
   4 · SHARED PRIMITIVES — section heads (Text-Style System: 3 sizes only)
   (.display / .eyebrow / .em already live above; add sec-head + wide wrap.)
   ───────────────────────────────────────────────────────────── */
.sec-head { max-width: var(--maxw); }
.sec-head--center { text-align: center; margin-inline: auto; }
.sec-head .eyebrow,
.sec-head__eyebrow { color: var(--terracotta); margin-bottom: var(--space-s); }
.sec-head__title,
.sec-head .display {
  font-family: var(--font-display);
  font-size: var(--step-section);        /* the ONE "section" size bucket */
  line-height: 1.06;
  color: currentColor;
  text-wrap: balance;
}
.sec-head__lede {
  margin-top: var(--space-s);
  font-size: var(--step-1);
  line-height: 1.55;
  max-width: 52ch;
  color: currentColor;
  opacity: 0.86;
}
.sec-head--center .sec-head__lede { margin-inline: auto; }
