/* =============================================================================
   Bliss & Bone-style wedding site — "olive on cream"
   Single, production-quality stylesheet. Mobile-first, editorial, restrained.

   Contents
     1.  Design tokens (:root)
     2.  Base / reset / body / selection / focus / skip-link
     3.  Layout primitives (.section, .container, .section-head, helpers)
     4.  Buttons & text links (.btn, .link, .link-btn)
     5.  Site header / nav / hamburger / mobile drawer
     6.  Hero + countdown + scroll cue
     7.  Schedule (banner + timeline) — incl. JS-generated markup
     8.  Travel cards
     9.  FAQ (details/summary)
     10. RSVP card / forms / fields / status / done — incl. JS-generated guests
     11. Footer
     12. Reveal animation
     13. Responsive (>=720px) + reduced motion
   ============================================================================= */

/* ----------------------------------------------------------------------------
   1. DESIGN TOKENS
   ---------------------------------------------------------------------------- */
:root {
  /* Palette — never pure white/black */
  --bg: #F6F1EA;
  --surface: #F3EDE3;
  --ink: #1F1B17;
  --accent: #4A5239;
  --accent-ink: #F6F1EA;
  --stone: #C9C2B6;
  --muted: #6E685E;

  /* Derived tints */
  --accent-soft: rgba(74, 82, 57, 0.08);
  --accent-tint: rgba(74, 82, 57, 0.12);
  --ink-soft: rgba(31, 27, 23, 0.08);
  --hairline: rgba(31, 27, 23, 0.12);

  /* Schedule accents — deep-olive "crown" heading + antique-brass gold */
  --olive-deep: #3B4230;
  --brass: #7A5C1E;
  --brass-hairline: rgba(122, 92, 30, 0.28);
  --gold: #E7BE61; /* the monogram gold (shiny) */

  /* Type families */
  --font-display: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-script: "Pinyon Script", "Cormorant Garamond", cursive;
  /* Calligraphic script for section-heading "crowns" + warm serif for names */
  --font-script-heading: "Great Vibes", "Pinyon Script", cursive;
  --font-event: "Fraunces", "Cormorant Garamond", Georgia, serif;

  /* Fluid type scale */
  --fs-eyebrow: 0.78rem;
  --fs-body: 1.0625rem;
  --fs-lead: clamp(1.125rem, 0.95rem + 0.7vw, 1.375rem);
  --fs-card-title: clamp(1.35rem, 1.2rem + 0.6vw, 1.65rem);
  --fs-section-title: clamp(2.25rem, 1.7rem + 2.4vw, 3.5rem);
  --fs-names: clamp(3rem, 1.4rem + 7vw, 6rem);

  /* Spacing scale */
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4.5rem;
  --section-pad: clamp(64px, 8vw, 160px);

  /* Containers */
  --container: 1100px;
  --container-narrow: 760px;
  --gutter: clamp(20px, 5vw, 48px);

  /* Radius & elevation */
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(31, 27, 23, 0.04), 0 6px 18px rgba(31, 27, 23, 0.05);
  --shadow-md: 0 10px 40px rgba(31, 27, 23, 0.08);
  --shadow-header: 0 1px 0 var(--hairline), 0 8px 24px rgba(31, 27, 23, 0.06);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.45s;
  /* Hyperlink ink: a muted lapis so links read instantly as links (the
     learned "blue = clickable" affordance) without clashing with the
     cream/olive/brass palette. */
  --link: #3d5c90;
  --link-strong: #2c4772;
}

/* ----------------------------------------------------------------------------
   2. BASE / RESET
   ---------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

/* scroll-padding so anchor jumps clear the fixed header */
html {
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 500;
  line-height: 1.1;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

strong {
  font-weight: 600;
  color: var(--ink);
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

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

/* Accessible focus rings in the accent color */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Skip link — hidden until focused */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 0.7em 1.2em;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 16px;
}

[hidden] {
  display: none !important;
}

/* ----------------------------------------------------------------------------
   3. LAYOUT PRIMITIVES
   ---------------------------------------------------------------------------- */
.section {
  padding-top: var(--section-pad);
  padding-bottom: var(--section-pad);
}

.section--alt {
  background-color: var(--surface);
}

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

.container--narrow {
  max-width: var(--container-narrow);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin: 0 0 var(--space-3);
}

.eyebrow--light {
  color: rgba(246, 241, 234, 0.92);
}

/* Every section heading is a calligraphic script "crown" — the site's
   unifying flourish (see the schedule for the fuller treatment). */
.section-title {
  font-family: var(--font-script-heading);
  font-weight: 400;
  font-size: clamp(2.8rem, 2.2rem + 3.4vw, 4.6rem);
  line-height: 1.14;
  letter-spacing: 0;
  word-spacing: 0.06em;
  padding-block: 0.14em;
  color: var(--olive-deep);
  margin: 0;
}

/* Harden the thin script strokes when headings shrink on phones. */
@media (max-width: 719.98px) {
  .section-title {
    -webkit-text-stroke: 0.3px currentColor;
  }
}

.section-sub {
  margin: var(--space-4) auto 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: var(--fs-lead);
  line-height: 1.6;
}

.section-sub a {
  color: var(--link);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(61, 92, 144, 0.4);
  transition: text-decoration-color 0.2s var(--ease), color 0.2s var(--ease);
}

.section-sub a:hover {
  color: var(--link-strong);
  text-decoration-color: var(--link-strong);
}

.muted {
  color: var(--muted);
  font-weight: 400;
}

/* Inline editorial text link — lapis ink so it's unmistakably clickable. */
.link {
  color: var(--link);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1.5px solid rgba(61, 92, 144, 0.4);
  padding-bottom: 1px;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.link:hover {
  color: var(--link-strong);
  border-bottom-color: var(--link-strong);
}

/* Text-only "button" (reset, start over, etc.) */
.link-btn {
  appearance: none;
  background: none;
  border: 0;
  padding: 0.2em 0;
  color: var(--accent);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  border-bottom: 1px solid var(--stone);
  border-radius: 0;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.link-btn:hover {
  border-bottom-color: var(--accent);
}

/* ----------------------------------------------------------------------------
   4. BUTTONS
   ---------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.95em 2em;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  text-align: center;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease),
              color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn:hover {
  background: #3c4430;
  border-color: #3c4430;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
}

/* Light variant — for the dark hero */
.btn--light {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--bg);
}

.btn--light:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--accent);
}

/* Outline variant */
.btn--outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

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

/* ----------------------------------------------------------------------------
   5. SITE HEADER / NAV
   ---------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              backdrop-filter var(--dur) var(--ease);
}

.nav-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: clamp(14px, 2vw, 22px) var(--gutter);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-4);
}

/* Monogram */
.monogram {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: 0.18em;
  line-height: 1;
  color: var(--ink);
  transition: color var(--dur) var(--ease);
}

/* Nav links — uppercase, letter-spaced Inter */
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.4vw, 2.5rem);
}

.nav-links a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink);
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s var(--ease);
}

.nav-links a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav-links a:not(.nav-cta):hover::after {
  transform: scaleX(1);
}

/* CTA pill in the nav */
.nav-cta {
  padding: 0.6em 1.4em;
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  color: var(--accent) !important;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease);
}

.nav-cta:hover {
  background: var(--accent);
  color: var(--accent-ink) !important;
}

/* Hamburger toggle — hidden on desktop, shown on mobile (sec.13) */
.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  padding: 10px;
  z-index: 110;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease),
              background-color var(--dur) var(--ease);
}

/* Animate to an X when expanded */
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- Header state: transparent over hero (data-state="top") ---- */
.site-header[data-state="top"] .monogram,
.site-header[data-state="top"] .nav-links a,
.site-header[data-state="top"] .nav-toggle span {
  color: rgba(246, 241, 234, 0.96);
}

.site-header[data-state="top"] .nav-toggle span {
  background: rgba(246, 241, 234, 0.96);
}

.site-header[data-state="top"] .nav-cta {
  color: var(--bg) !important;
  border-color: rgba(246, 241, 234, 0.6);
}

.site-header[data-state="top"] .nav-cta:hover {
  background: var(--bg);
  color: var(--ink) !important;
  border-color: var(--bg);
}

/* ---- Header state: solid cream when scrolled ---- */
.site-header[data-state="scrolled"] {
  /* Solid-ish cream. Intentionally NO backdrop-filter: a filtered ancestor
     creates a containing block that traps the position:fixed mobile drawer,
     which caused a first-open "snap/squish" once the page was scrolled. */
  background: rgba(246, 241, 234, 0.97);
  box-shadow: var(--shadow-header);
}

/* ----------------------------------------------------------------------------
   NAME GATE — hide everything past the hero until a guest verifies their name.
   The page ships gated (body.gated); script.js removes it once verified.
   ---------------------------------------------------------------------------- */
body.gated #story,
body.gated #schedule,
body.gated #travel,
body.gated #faq,
body.gated #rsvp {
  display: none;
}

#gate {
  display: none;
}

body.gated #gate {
  display: block;
}

/* ----------------------------------------------------------------------------
   OUR STORY — centered editorial prose with an italic pull-quote
   ---------------------------------------------------------------------------- */
.story {
  max-width: 60ch;
  margin-inline: auto;
  text-align: center;
  color: var(--muted);
  /* Body size, not --fs-lead: the lead size suits a one-line section intro,
     but reads oversized across the story's several paragraphs. */
  font-size: var(--fs-body);
  line-height: 1.75;
}

.story p {
  margin: 0 0 1.4em;
}

.story p:last-child {
  margin-bottom: 0;
}

/* ----------------------------------------------------------------------------
   5b. THE DRIFTING REEL — full-bleed film strip of photos in #story.
   script.js drives a rAF marquee over a duplicated track: it drifts a few
   px/s, eases to rest under hover/focus/drag, and any photo expands into a
   FLIP lightbox. Under prefers-reduced-motion it is a static filmstrip.
   ---------------------------------------------------------------------------- */
.story-reel {
  --reel-h: clamp(200px, 26vw, 340px);
  --reel-gap: clamp(10px, 1.6vw, 18px);
  position: relative;
  margin-top: clamp(0.4rem, 1.6vw, 1.2rem);
  margin-bottom: clamp(1.2rem, 2.6vw, 2.2rem);
}

.reel-stage { position: relative; }

/* Brass hairlines frame the strip and "draw" outward once revealed. */
.reel-stage::before,
.reel-stage::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  z-index: 4;
  background: var(--brass-hairline);
  transform: scaleX(0);
  transition: transform 0.9s var(--ease) 0.2s;
}
.reel-stage::before { top: 0; }
.reel-stage::after { bottom: 0; }
.story-reel.is-visible .reel-stage::before,
.story-reel.is-visible .reel-stage::after { transform: scaleX(1); }

/* The strip itself only fades; the cards below carry the entrance motion. */
.story-reel.reveal { transform: none; }

/* Staggered bloom: each card rises on its own beat (--card-delay from JS). */
.story-reel.reveal .reel-card {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease) var(--card-delay, 0s),
    transform 0.7s var(--ease) var(--card-delay, 0s);
}
.story-reel.reveal.is-visible .reel-card {
  opacity: 1;
  transform: none;
}

/* Photos dissolve into the cream at both edges instead of hard-clipping. */
.reel-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(36px, 8vw, 120px);
  z-index: 2;
  pointer-events: none;
}
.reel-fade--left {
  left: 0;
  background: linear-gradient(to right, var(--bg) 10%, rgba(246, 241, 234, 0));
}
.reel-fade--right {
  right: 0;
  background: linear-gradient(to left, var(--bg) 10%, rgba(246, 241, 234, 0));
}

/* A soft gold light sweep crosses the strip every so often — the same
   shimmer language as the hero monogram. */
.reel-sheen {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}
.reel-sheen::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 34%;
  background: linear-gradient(
    100deg,
    rgba(231, 190, 97, 0) 0%,
    rgba(231, 190, 97, 0.09) 42%,
    rgba(255, 244, 214, 0.16) 50%,
    rgba(231, 190, 97, 0.09) 58%,
    rgba(231, 190, 97, 0) 100%
  );
  transform: translateX(-140%) skewX(-8deg);
  animation: reel-sheen 11s var(--ease) 3s infinite;
}
@keyframes reel-sheen {
  0% { transform: translateX(-140%) skewX(-8deg); }
  22% { transform: translateX(440%) skewX(-8deg); }
  100% { transform: translateX(440%) skewX(-8deg); }
}

/* Each card floats on its own slow phase (delays staggered from JS). */
@keyframes reel-float {
  from { transform: translateY(2.5px); }
  to { transform: translateY(-2.5px); }
}

.reel-viewport {
  overflow: hidden;
  padding-block: 14px;
  cursor: grab;
  touch-action: pan-y; /* the page keeps vertical scroll; we take horizontal */
  user-select: none;
  -webkit-user-select: none;
}
.reel-viewport.is-dragging { cursor: grabbing; }
.reel-viewport:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: -2px;
}

.reel-track {
  display: flex;
  align-items: center;
  gap: var(--reel-gap);
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  will-change: transform;
}

.reel-card { flex: none; }

.reel-card-btn {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 10px;
  animation: reel-float 6.8s ease-in-out infinite alternate;
}
.reel-card-btn:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 4px;
}

.reel-card img {
  display: block;
  height: var(--reel-h);
  width: auto;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  filter: grayscale(0.35);
  transition: filter 0.45s var(--ease), transform 0.45s var(--ease),
    box-shadow 0.45s var(--ease);
  -webkit-user-drag: none;
}
.reel-card-btn:hover img,
.reel-card-btn:focus-visible img,
.reel-card.is-awake img {
  filter: none;
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}

/* Center stage: the photo crossing the strip's midpoint blooms to full
   color inside a faint gold aura, then hands the light to the next. */
.reel-card.is-centered img {
  filter: none;
  transform: scale(1.045);
  box-shadow:
    0 16px 44px rgba(31, 27, 23, 0.14),
    0 0 0 1px rgba(231, 190, 97, 0.32),
    0 8px 30px rgba(231, 190, 97, 0.16);
}

/* The whisper: a caption line that names the centered moment. */
.reel-whisper {
  min-height: 1.7em;
  margin: clamp(10px, 1.6vw, 16px) auto 0;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  opacity: 0.85;
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease);
}
.reel-whisper.is-swapping {
  opacity: 0;
  transform: translateY(6px);
}

/* The gold P|D seal that rides the loop seam — once per revolution. */
.reel-seal {
  flex: none;
  width: clamp(34px, 4vw, 44px);
  margin-inline: calc(var(--reel-gap) * 0.5);
  opacity: 0.9;
}
.reel-seal img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---- Lightbox ---- */
.reel-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200; /* above the site header (100) and its hamburger (110) */
  background: radial-gradient(
    120% 120% at 50% 42%,
    rgba(246, 241, 234, 0.985) 0%,
    rgba(243, 237, 227, 0.955) 100%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.reel-lightbox[hidden] { display: none; }
.reel-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.reel-lightbox img {
  position: fixed;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  will-change: transform;
  transition: transform 0.45s var(--ease);
}

.reel-lightbox-caption {
  position: fixed;
  left: 50%;
  bottom: clamp(20px, 5vh, 44px);
  transform: translateX(-50%);
  margin: 0;
}
.reel-lightbox-caption::before {
  content: "";
  display: block;
  width: 44px;
  height: 1px;
  margin: 0 auto 10px;
  background: var(--brass-hairline);
}
.reel-lightbox-caption {
  max-width: 90vw;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-lead);
  color: var(--olive-deep);
}

.reel-lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--brass-hairline);
  border-radius: 50%;
  background: var(--bg);
  color: var(--olive-deep);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.reel-lightbox-close:hover {
  border-color: var(--brass);
  transform: scale(1.06);
}

@media (prefers-reduced-motion: reduce) {
  .reel-card img {
    filter: none;
    transition: none;
  }
  .reel-stage::before,
  .reel-stage::after {
    transform: scaleX(1);
    transition: none;
  }
  .reel-card-btn { animation: none; }
  .reel-sheen { display: none; }
  .story-reel.reveal .reel-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .reel-lightbox img { transition: none; }
}

/* ----------------------------------------------------------------------------
   6. HERO
   ---------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(88px, 12vh, 120px) var(--gutter) clamp(52px, 8vh, 88px);
  overflow: hidden;
  isolation: isolate;
}

/* Hero background photo (download4 — B&W of the couple). */
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url('assets/img/hero.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--accent);
}

/* Subtle dark gradient for text legibility */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      to bottom,
      rgba(31, 27, 23, 0.45) 0%,
      rgba(31, 27, 23, 0.25) 35%,
      rgba(31, 27, 23, 0.45) 100%
    );
}

.hero-content {
  position: relative;
  max-width: 880px;
  color: var(--accent-ink);
}

.hero-content .eyebrow--light {
  margin-bottom: var(--space-2);
  font-size: 0.69rem;
}

/* Couple names — large Cormorant */
.hero-names {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.1em 0.35em;
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-names);
  line-height: 1.02;
  color: #fff;
  text-shadow: 0 2px 30px rgba(31, 27, 23, 0.35);
}

.hero-names .name {
  display: inline-block;
}

/* Pinyon script ampersand accent */
.hero-names .amp {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: 0.92em;
  line-height: 1;
  color: rgba(246, 241, 234, 0.92);
  margin-top: 0.12em;
}

/* Hero monogram — the gold P|D mark (vector). */
.hero-monogram {
  margin: 0 0 0.25rem;
}

/* Monogram sized ~15% down from the earlier +20%, and capped by viewport
   height so short (15") screens still fit the countdown + scroll cue. */
.hero-monogram-img {
  display: block;
  width: min(clamp(16.3rem, 51vw, 32.6rem), 46vh);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 6px 22px rgba(31, 27, 23, 0.4));
}

/* Shiny-gold shimmer: a soft light band sweeps across the mark periodically,
   masked to the monogram strokes so only the gold catches the light. */
.hero-monogram-wrap {
  position: relative;
  display: inline-block;
  line-height: 0;
}

.hero-monogram-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask: url('assets/img/monogram.svg') center / contain no-repeat;
          mask: url('assets/img/monogram.svg') center / contain no-repeat;
  background-image: linear-gradient(105deg,
      rgba(255, 245, 214, 0) 45%,
      rgba(255, 249, 228, 0.92) 50%,
      rgba(255, 245, 214, 0) 55%);
  background-repeat: no-repeat;
  background-size: 300% 100%;
  background-position: 100% 0;
  animation: monogram-shine 6s ease-in-out infinite;
}

@keyframes monogram-shine {
  0%   { background-position: 100% 0; }
  22%  { background-position: 0% 0; }
  100% { background-position: 0% 0; }
}

/* Hovering the monogram also plays the shimmer — a livelier repeating sweep. */
.hero-monogram-wrap:hover .hero-monogram-shine {
  animation: monogram-shine-hover 2s ease-in-out infinite;
}

@keyframes monogram-shine-hover {
  0%   { background-position: 100% 0; }
  60%  { background-position: 0% 0; }
  100% { background-position: 0% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-monogram-shine,
  .hero-monogram-wrap:hover .hero-monogram-shine { animation: none; }
}

/* Honeypot field — visually removed but reachable by bots (CSP-safe, no inline style). */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Date · location row */
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.35em;
  margin: 0 0 var(--space-4);
  font-family: var(--font-body);
  font-size: 0.69rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(246, 241, 234, 0.92);
}

.hero-meta .dot {
  color: rgba(246, 241, 234, 0.6);
}

/* Countdown */
.countdown {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(1.25rem, 4vw, 3rem);
  margin-top: clamp(1.5rem, 4vw, 2.25rem);
}

.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35em;
  min-width: 54px;
}

.cd-num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.85rem);
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.cd-label {
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(246, 241, 234, 0.82);
}

/* Scroll cue — animated down indicator */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 1.5px solid rgba(246, 241, 234, 0.65);
  border-radius: var(--radius-pill);
  z-index: 1;
}

.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  background: rgba(246, 241, 234, 0.9);
  border-radius: var(--radius-pill);
  animation: scroll-cue 1.8s var(--ease) infinite;
}

@keyframes scroll-cue {
  0%   { opacity: 0; transform: translateY(0); }
  35%  { opacity: 1; }
  75%  { opacity: 1; transform: translateY(14px); }
  100% { opacity: 0; transform: translateY(16px); }
}

/* ----------------------------------------------------------------------------
   7. SCHEDULE
   ---------------------------------------------------------------------------- */
/* Timeline list */
.schedule-list {
  margin: 0 auto;
  max-width: 640px;
}

.schedule-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem 2.5rem;
  padding: clamp(1.75rem, 3vw, 2.5rem) 0;
  border-top: 1px solid var(--hairline);
}

.schedule-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.schedule-item:last-child {
  padding-bottom: 0;
}

/* Time column */
.schedule-time {
  display: flex;
  flex-direction: column;
  gap: 0.1em;
}

.schedule-day {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ink);
}

/* Times are DATA — crisp Inter tabular lining figures, one line, never wrapping. */
.schedule-hour {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 0.98rem + 0.45vw, 1.2rem);
  font-weight: 500;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: var(--ink);
  line-height: 1.2;
}

/* Detail column */
.schedule-detail {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Event names share the section-heading script voice (sized down). */
.schedule-event {
  font-family: var(--font-script-heading);
  font-weight: 400;
  font-size: clamp(1.9rem, 1.5rem + 1.5vw, 2.7rem);
  letter-spacing: 0;
  line-height: 1.1;
  color: var(--accent);
}

/* Detail text (day, hour, venue, blurb) all share the body font. */
.schedule-venue {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
}

.schedule-blurb {
  margin: 0.2rem 0 0;
  font-family: var(--font-body);
  color: var(--muted);
  line-height: 1.6;
}

/* Sub-schedule inside a single card (the wedding morning): small brass
   labels against tabular times, framed by hairlines. */
.schedule-sub {
  margin: var(--space-3) 0 0.2rem;
  padding: 0;
  list-style: none;
  max-width: 340px;
}

.schedule-sub li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0.45em 0;
  border-top: 1px solid var(--brass-hairline);
}

.schedule-sub li:last-child {
  border-bottom: 1px solid var(--brass-hairline);
}

.schedule-sub-label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
}

.schedule-sub-time {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
  color: var(--muted);
}

.schedule-map {
  align-self: flex-start;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* Warm the row separators toward the brass palette. */
#schedule .schedule-item {
  border-top-color: var(--brass-hairline);
}

/* ----------------------------------------------------------------------------
   8. TRAVEL CARDS
   ---------------------------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.card {
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.section--alt .card {
  background: var(--bg);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card-title {
  font-family: var(--font-script-heading);
  font-size: clamp(1.75rem, 1.4rem + 1.1vw, 2.2rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 0.4rem;
}

.card p {
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.card p:last-child {
  margin-bottom: 0;
}

/* ----------------------------------------------------------------------------
   9. FAQ
   ---------------------------------------------------------------------------- */
.faq {
  max-width: 680px;
  margin-inline: auto;
}

.faq-item {
  border-bottom: 1px solid var(--hairline);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.1rem, 2.4vw, 1.5rem) 0;
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 0.95rem + 0.45vw, 1.25rem);
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  transition: color 0.2s var(--ease);
}

/* Remove the native disclosure triangle */
.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  color: var(--accent);
}

/* Custom +/- marker that rotates when open */
.faq-item summary::after {
  content: "";
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  position: relative;
  background:
    linear-gradient(var(--accent), var(--accent)) center / 100% 1.5px no-repeat,
    linear-gradient(var(--accent), var(--accent)) center / 1.5px 100% no-repeat;
  transition: transform 0.35s var(--ease);
}

.faq-item[open] summary::after {
  transform: rotate(135deg);
}

.faq-body {
  padding: 0 0 clamp(1.1rem, 2.4vw, 1.5rem);
  font-family: var(--font-body); /* same font as the question above it */
  color: var(--muted);
  line-height: 1.7;
  max-width: 60ch;
}

.faq-body p {
  margin: 0;
}

/* ----------------------------------------------------------------------------
   10. RSVP
   ---------------------------------------------------------------------------- */
.rsvp-card {
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(1.75rem, 5vw, 3.5rem);
  max-width: 640px;
  margin-inline: auto;
}

/* Forms */
.rsvp-finder,
.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.rsvp-greeting {
  font-family: var(--font-script-heading);
  font-size: clamp(1.9rem, 1.5rem + 1.2vw, 2.5rem);
  font-weight: 400;
  color: var(--ink);
  margin: 0;
  line-height: 1.15;
}

/* Generic field wrapper (label or fieldset) */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.field-label {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  padding: 0;
}

.field-hint {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Inputs — cream fields, stone border, accent focus */
.field input[type="text"],
.field select,
.field textarea,
.guest-name-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--stone);
  border-radius: var(--radius-sm);
  padding: 0.8em 1em;
  line-height: 1.5;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease),
              background-color 0.2s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

.field textarea {
  resize: vertical;
  min-height: 3.5em;
}

.field input::placeholder,
.field textarea::placeholder,
.guest-name-input::placeholder {
  color: var(--muted);
  opacity: 0.75;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.guest-name-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
  box-shadow: 0 0 0 3px var(--accent-tint);
}

/* Custom select chevron */
.field select {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234A5239' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1em center;
  padding-right: 2.75em;
}

/* Radio row */
.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.radio {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  flex: 1 1 200px;
  padding: 0.85em 1.2em;
  background: var(--surface);
  border: 1px solid var(--stone);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.radio:hover {
  border-color: var(--accent);
}

.radio input[type="radio"] {
  accent-color: var(--accent);
  width: 1.1em;
  height: 1.1em;
  margin: 0;
  flex: 0 0 auto;
}

/* Selected (checked) radio gets an accent tint */
.radio:has(input[type="radio"]:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Attending-only block */
.attending-only {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Per-guest names (JS-generated) */
.guest-names {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.guest-name-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.guest-name-field .field-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* Actions row */
.rsvp-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 0.5rem;
}

/* Status message + modifiers */
.rsvp-status {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--muted);
  min-height: 0;
}

.rsvp-status:empty {
  display: none;
}

/* Small reassurance line under the gate form. */
.gate-note {
  margin: var(--space-3) 0 0;
  padding-top: var(--space-3);
  border-top: 1px solid var(--brass-hairline);
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.rsvp-status.is-error {
  color: #8a3a2e;
  font-weight: 500;
}

.rsvp-status.is-ok {
  color: var(--accent);
  font-weight: 500;
}

/* Done / confirmation state */
.rsvp-done {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
}

.check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1.9rem;
  line-height: 1;
  box-shadow: 0 6px 20px var(--accent-tint);
}

.rsvp-done-title {
  font-family: var(--font-script-heading);
  font-size: clamp(2.1rem, 1.6rem + 1.4vw, 2.9rem);
  font-weight: 400;
  color: var(--ink);
  margin: 0;
  line-height: 1.1;
}

.rsvp-done-body {
  color: var(--muted);
  margin: 0;
  max-width: 48ch;
}

.rsvp-done .rsvp-actions {
  justify-content: center;
  margin-top: var(--space-3);
}

/* ----------------------------------------------------------------------------
   11. FOOTER
   ---------------------------------------------------------------------------- */
.site-footer {
  background: var(--accent);
  color: var(--accent-ink);
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  text-align: center;
}

.footer-monogram {
  margin: 0 0 0.9rem;
}

.footer-monogram-img {
  display: block;
  width: clamp(72px, 14vw, 104px);
  height: auto;
  margin: 0 auto;
}

.footer-meta {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(246, 241, 234, 0.8);
  margin: 0 0 var(--space-5);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem clamp(1.25rem, 3vw, 2rem);
  margin-bottom: var(--space-5);
}

.footer-links a {
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(246, 241, 234, 0.85);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.footer-links a:hover {
  color: #fff;
  border-bottom-color: rgba(246, 241, 234, 0.6);
}

.footer-credit {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(246, 241, 234, 0.78);
  margin: 0;
}

/* ----------------------------------------------------------------------------
   12. REVEAL ANIMATION
   ---------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Stagger cards/faq items a touch for an editorial feel */
.cards .reveal:nth-child(2),
.faq .reveal:nth-child(2) { transition-delay: 0.05s; }
.cards .reveal:nth-child(3),
.faq .reveal:nth-child(3) { transition-delay: 0.1s; }
.cards .reveal:nth-child(4),
.faq .reveal:nth-child(4) { transition-delay: 0.15s; }

/* ----------------------------------------------------------------------------
   13. RESPONSIVE — desktop layout at >=720px
   ---------------------------------------------------------------------------- */
@media (min-width: 720px) {
  /* Schedule becomes a two-column timeline: date/time rail | name + details.
     (Event name is a direct child, so it stacks first on mobile.) */
  .schedule-item {
    grid-template-columns: 200px 1fr;
    grid-template-areas:
      "time name"
      "time detail";
    align-items: baseline;
  }
  .schedule-item .schedule-event { grid-area: name; }
  .schedule-item .schedule-time { grid-area: time; }
  .schedule-item .schedule-detail { grid-area: detail; }

  .schedule-time {
    text-align: right;
  }

  /* Travel cards: two-up */
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop: push the right-aligned menu all the way toward the right edge,
   ending at the page's standard gutter (~15% further right than before). */
@media (min-width: 720px) {
  .nav-inner {
    max-width: none;
    padding-right: var(--gutter);
  }
}

/* ---- Mobile nav drawer + hamburger (below 720px) ---- */
@media (max-width: 719.98px) {
  .nav-toggle {
    display: block;
  }

  /* Off-canvas drawer */
  .nav-links {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(45vw, 300px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: var(--space-5);
    padding: var(--space-7) var(--space-5);
    background: var(--bg);
    box-shadow: -12px 0 40px rgba(31, 27, 23, 0.18);
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    z-index: 105;
  }

  /* Opened by script.js toggling aria-expanded on the button */
  .nav-toggle[aria-expanded="true"] + .nav-links,
  .nav-links.is-open {
    transform: translateX(0);
  }

  /* Lock the page behind the open drawer. */
  body.nav-open {
    overflow: hidden;
  }

  /* While open, drop the header's backdrop-filter: it creates a containing
     block that otherwise traps the position:fixed drawer (the scroll bug),
     and clear the bar so only the drawer + scrim show. */
  .site-header.nav-open {
    background: transparent;
    box-shadow: none;
  }

  /* Force the hamburger/X dark so the close affordance is always visible on
     the cream drawer (over the hero the bars are otherwise light = invisible). */
  .site-header.nav-open .nav-toggle span {
    background: var(--ink);
  }

  /* Tap-anywhere-outside scrim that closes the menu. Sits BELOW the header
     (z-100) so the X stays visible + clickable, but above page content. */
  .nav-scrim {
    position: fixed;
    inset: 0;
    background: rgba(31, 27, 23, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
    z-index: 90;
  }

  body.nav-open .nav-scrim {
    opacity: 1;
    visibility: visible;
  }

  /* Inside the drawer, links read as ink regardless of header state */
  .site-header .nav-links a,
  .site-header[data-state="top"] .nav-links a {
    color: var(--ink);
    font-size: 0.95rem;
  }

  .site-header[data-state="top"] .nav-links .nav-cta {
    color: var(--accent) !important;
    border-color: var(--accent);
  }

  .nav-links .nav-cta {
    width: 100%;
  }
}

/* The drawer markup places <nav> between the toggle and (visually) the links.
   The structure is button -> nav.nav > ul.nav-links, so the adjacent-sibling
   selector above won't always reach; script.js also adds .is-open to #navLinks. */

/* ----------------------------------------------------------------------------
   14. REDUCED MOTION — disable transforms/opacity transitions
   ---------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  /* Everything visible; no transforms */
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .scroll-cue span {
    animation: none;
    opacity: 1;
  }
}
