/* ═════════════════════════════════════════════════════════════════════════
   GILDED TOAST · Adult Cocktail Birthday — Card (the invitation)
   Mood: gilded ivory card on a dark, moody backdrop. Classic cocktail glam.

   House UX: natural scrolling. Sections are full-viewport "scenes" stacked
   in normal document flow — no app shell, no wheel/touch/key hijacking. A
   fixed header (desktop section pills · mobile burger sheet), a floating
   dock and a scroll-spy are added by main.js; all of that chrome is sized
   from the --header-h / --dock-h tokens so nothing ever drifts.
   Conventions:
     · Geometry flows from tokens: --header-h locks the header height, the
       cover cap and every anchor offset derive from it.
     · Without JS the document reads as a plain stacked page; the dock,
       burger, pills and progress bar simply don't appear.
     · prefers-reduced-motion and @media print are supported. Print restores
       everything the empty-state audit / cover-fit trim visually hid.
   ═════════════════════════════════════════════════════════════════════════ */

/* ── 1 · Design tokens ─────────────────────────────────────────────────── */
:root {
  --espresso:     #14100c;
  --espresso-2:   #1e1812;
  --espresso-3:   #2a2118;
  --ivory:        #f6efdd;
  --ivory-2:      #fcf7ea;
  --ivory-3:      #efe6cf;
  --ink:          #2b2216;
  --ink-soft:     #4d3f27;
  --muted-ink:    #6d5a3c;
  --gold:         #b08d2e;
  --gold-soft:    #cdae63;
  --gold-deep:    #7c6018;
  --blush:        #c07d5c;
  --line:         rgba(176, 141, 46, .38);
  --line-soft:    rgba(176, 141, 46, .2);
  --danger:       #a4342e;
  --ok:           #3f7a4a;

  --font-serif:   "Playfair Display", "Georgia", "Times New Roman", serif;
  --font-script:  "Great Vibes", "Segoe Script", "Brush Script MT", cursive;
  --font-body:    "Jost", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  /* Geometry tokens — the header height is LOCKED here and enforced on the
     real header below; the cover cap and anchor offsets derive from it. */
  --header-h: calc(54px + env(safe-area-inset-top, 0px));
  --dock-h: 58px;

  /* Cover sizing unit: fluid with the viewport's smaller edge but FROZEN
     once that edge passes ~650px, so mid-size phones stop scaling and
     never lose cover content. */
  --su: min(1vmin, 6.5px);

  --radius-outer: 18px;
  --radius-inner: 11px;
  --ease-out: cubic-bezier(.22, .8, .24, 1);
  --ease-out-expo: cubic-bezier(.16, 1, .3, 1);
  --shadow-card: 0 34px 90px rgba(0, 0, 0, .6), 0 8px 24px rgba(0, 0, 0, .4);

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
}

/* ── 2 · Reset & base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;            /* anchor jumps glide; reduced-motion turns it off */
  /* Anchor/deep-link jumps land their target just below the fixed header. */
  scroll-padding-top: calc(var(--header-h) + 10px);
}

body {
  margin: 0;
  padding-top: var(--header-h);       /* clear the fixed header */
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--ink);
  background:
    radial-gradient(120% 70% at 50% -8%, rgba(42, 33, 24, .9), transparent 55%),
    var(--espresso);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, p, dl, dd, figure { margin: 0; }

button { font-family: inherit; }
[hidden] { display: none !important; }   /* keep the attr reliable */

::selection { background: rgba(176, 141, 46, .3); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Empty-state audit utility: visually hidden only — kept in the DOM and
   restored in print (see the @media print block at the end). */
.is-empty { display: none !important; }

/* Cover-fit trim utility: decorations hidden by initCoverFit() so the invite
   card always fits one screen. Nothing is removed from the DOM; print
   restores every trimmed layer. */
.fit-hidden { display: none !important; }

.skip-link {
  position: fixed;
  top: calc(-60px + var(--safe-t));
  left: 12px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--gold-deep);
  color: var(--ivory-2);
  font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  border-radius: 0 0 10px 10px;
  text-decoration: none;
  transition: top .2s var(--ease-out);
}
.skip-link:focus { top: var(--safe-t); }

/* Custom scrollbars wherever a region may internally scroll — on-palette:
   a slim gold-on-espresso bar. (Firefox uses scrollbar-color.) */
.panel-cover, .mobile-menu__scroller, .guestbook-wrap {
  scrollbar-width: thin;
  scrollbar-color: var(--gold-deep) transparent;
}
.panel-cover::-webkit-scrollbar,
.mobile-menu__scroller::-webkit-scrollbar,
.guestbook-wrap::-webkit-scrollbar { width: 8px; height: 8px; }
.panel-cover::-webkit-scrollbar-track,
.mobile-menu__scroller::-webkit-scrollbar-track,
.guestbook-wrap::-webkit-scrollbar-track { background: transparent; }
.panel-cover::-webkit-scrollbar-thumb,
.mobile-menu__scroller::-webkit-scrollbar-thumb,
.guestbook-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep));
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

/* ── 3 · Site & pinned backdrop ────────────────────────────────────────── */
.site {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(180deg, var(--espresso-2) 0%, var(--espresso) 60%);
}

/* the moody backdrop stays pinned to the viewport while the cards scroll
   up over it, so the invitation never loses its atmosphere */
.backdrop { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

/* optional photo backdrop — a dimmed party photo behind the card.
   Delete the .backdrop-photo element in index.html to remove it;
   swap assets/img/backdrop.jpg for a photo of your own party. */
.backdrop-photo { position: absolute; inset: 0; overflow: hidden; }
.backdrop-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: .34;
  filter: saturate(.8) brightness(.55) blur(2px);
  transform: scale(1.04);           /* hide the blur's edge fringe */
}
.backdrop-photo::after {           /* scrim: keep the card readable */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 16, 12, .58), rgba(20, 16, 12, .4));
}
html.js:not(.lb-off) .backdrop-photo img {
  pointer-events: auto;             /* clicking the dark area opens the viewer */
  cursor: zoom-in;
}

.backdrop-halo {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(56% 50% at 50% 46%, rgba(205, 174, 99, .16) 0%, transparent 66%),
    radial-gradient(120% 90% at 50% 108%, rgba(192, 125, 92, .10) 0%, transparent 55%);
  animation: halo-breathe 8s ease-in-out infinite;
}

.backdrop-fan {
  position: absolute;
  inset: -20%;
  background: repeating-conic-gradient(
    from 0deg at 50% 46%,
    rgba(205, 174, 99, .07) 0deg 3deg,
    transparent 3deg 17deg
  );
  -webkit-mask-image: radial-gradient(circle at 50% 46%, #000 0%, transparent 58%);
          mask-image: radial-gradient(circle at 50% 46%, #000 0%, transparent 58%);
  animation: fan-rotate 180s linear infinite;
}

.backdrop-martini {
  position: absolute;
  right: clamp(6px, 4vw, 60px);
  bottom: clamp(6px, 3vh, 34px);
  width: clamp(90px, 13vw, 170px);
  color: rgba(205, 174, 99, .20);
  filter: blur(.3px);
  animation: martini-bob 8s ease-in-out infinite;
}
.backdrop-martini svg { display: block; width: 100%; height: auto; }

/* twinkling gold sparkles */
.sparkle { position: absolute; width: 8px; height: 8px; animation: twinkle 3.8s ease-in-out infinite; }
.sparkle::before, .sparkle::after {
  content: ""; position: absolute; inset: 0; margin: auto; background: var(--gold-soft);
}
.sparkle::before { width: 100%; height: 1.6px; }
.sparkle::after  { width: 1.6px; height: 100%; }
.sparkle--1 { top: 18%; left: 14%; animation-delay: .5s; }
.sparkle--2 { top: 70%; right: 12%; animation-delay: 1.4s; }
.sparkle--3 { bottom: 16%; left: 46%; animation-delay: 2.2s; }
.sparkle--4 { top: 40%; right: 24%; width: 6px; height: 6px; animation-delay: .9s; }
.sparkle--5 { bottom: 26%; left: 7%; width: 5px; height: 5px; animation-delay: 1.8s; }
@keyframes twinkle { 0%, 100% { opacity: .12; transform: scale(.7); } 50% { opacity: .8; transform: scale(1); } }

/* ambient motion — GPU-cheap, transform-only */
@keyframes fan-rotate { to { transform: rotate(360deg); } }
@keyframes halo-breathe {
  0%, 100% { opacity: .78; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.04); }
}
@keyframes martini-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-9px) rotate(2deg); }
}

/* ═════════════════════════════════════════════════════════════════════════
   SCENES — every section is its own full-viewport "scene" in normal flow.
   Tall content simply grows; the whole page scrolls natively.
   ═════════════════════════════════════════════════════════════════════════ */
.deck { position: static; width: 100%; }

.panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Every section is a full-viewport "scene": taller ones simply grow;
     shorter ones breathe across the whole viewport, and late sections can
     always scroll far enough to land exactly below the header. Anchor /
     deep-link offsets come ONLY from html's scroll-padding-top (derived
     from --header-h); no scroll-margin here, or the two would add up. */
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  padding: clamp(26px, 5vmin, 56px) clamp(14px, 4vw, 40px);
}

/* ── COVER = exactly one screen ──────────────────────────────────────────
   Capped below the header, vertically centred, fully visible at load.
   Internal scroll is a last-resort safety valve for extreme viewports. */
.panel-cover {
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  max-height: calc(100vh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;                  /* safety valve … */
  overflow-x: hidden;
}
.panel-cover .card-frame { margin-top: auto; margin-bottom: auto; }  /* … and centring */

/* Continue cue pinned to the bottom of the one-screen cover */
.scroll-cue {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  margin-top: clamp(10px, 2vmin, 20px);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold-soft);
  background: rgba(20, 16, 12, .62);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: cue-bob 2.8s ease-in-out infinite;
  transition: background-color .25s var(--ease-out), color .25s var(--ease-out);
}
.scroll-cue svg { width: 20px; height: 20px; }
.scroll-cue:hover { background: var(--gold-deep); color: var(--ivory-2); }
@keyframes cue-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(5px); }
}

/* Last-resort squeeze when even the trimmed cover spills a few pixels:
   shave breathing room instead of letting content clip. */
.cover-squeeze .panel-cover { padding-top: 10px; padding-bottom: 10px; }
.cover-squeeze .card-body { padding-top: clamp(24px, 4vmin, 40px); padding-bottom: clamp(22px, 4vmin, 38px); }

/* ── in-view choreography (fires once as a card scrolls into view) ───────
   The card frame glows, a soft light sweeps the face, the art-deco
   corners snap open and the content rises in a staggered sequence.
   main.js stamps a --stagger counter on each element at load and adds
   .is-active via an IntersectionObserver — no scroll hijacking. */

/* golden halo pulses around the frame as the card settles */
.panel.is-active .card-frame { animation: gilded-glow 1.15s var(--ease-out) .1s both; }
@keyframes gilded-glow {
  0%   { box-shadow: 0 0 0 rgba(205, 174, 99, 0), 0 34px 90px rgba(0, 0, 0, .6), 0 8px 24px rgba(0, 0, 0, .4); }
  45%  { box-shadow: 0 0 54px rgba(205, 174, 99, .55), 0 34px 90px rgba(0, 0, 0, .6), 0 8px 24px rgba(0, 0, 0, .4); }
  100% { box-shadow: 0 0 0 rgba(205, 174, 99, 0), 0 34px 90px rgba(0, 0, 0, .6), 0 8px 24px rgba(0, 0, 0, .4); }
}

/* a soft light sweeps across the card face as it lands */
.panel.is-active .card-face::after { animation: sheen-sweep 1.15s var(--ease-out) .16s both; }
@keyframes sheen-sweep {
  0%   { transform: translateX(-36%); opacity: 0; }
  45%  { transform: translateX(4%);  opacity: .5; }
  100% { transform: translateX(0);   opacity: .35; }
}

/* staggered entrance choreography for card content: every direct child of
   the card body rises into place in sequence (particular rows keep
   counting). main.js stamps the --stagger counters at load. */
.panel.is-active .card-body > *:not(.particulars) {
  animation: rise-in .6s var(--ease-out-expo) both;
  animation-delay: calc(.12s + var(--stagger, 0) * 55ms);
}
.panel.is-active .particular > * {
  animation: rise-in .55s var(--ease-out-expo) both;
  animation-delay: calc(.3s + var(--stagger, 0) * 55ms);
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* the monogram gets its own quiet rise-and-settle, in keeping with the
   script letter (declared after the stagger rules so it wins) */
.panel.is-active .card-body > .monogram {
  animation: monogram-in .7s var(--ease-out-expo) .26s both;
}
@keyframes monogram-in {
  0%   { opacity: 0; transform: translateY(10px) scale(.94); }
  70%  { opacity: 1; transform: translateY(-1px) scale(1.02); }
  100% { opacity: 1; transform: none; }
}

/* art-deco corners snap open, one after another */
.panel.is-active .corner { animation: corner-in .55s var(--ease-out-expo) both; }
.panel.is-active .corner--tl { animation-delay: .2s;  transform-origin: top left; }
.panel.is-active .corner--tr { animation-delay: .26s; transform-origin: top right; }
.panel.is-active .corner--bl { animation-delay: .32s; transform-origin: bottom left; }
.panel.is-active .corner--br { animation-delay: .38s; transform-origin: bottom right; }
@keyframes corner-in {
  from { opacity: 0; transform: scale(.4) rotate(-16deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}

/* No-JS: every card must read fully — kill the entrance choreography. */
html:not(.js) .panel .card-body > *,
html:not(.js) .panel .particular > *,
html:not(.js) .corner { animation: none !important; opacity: 1 !important; transform: none !important; }

/* ── 5 · The card ──────────────────────────────────────────────────────── */
.card-frame {
  width: min(92vw, 600px);
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-outer);
  background: linear-gradient(160deg, rgba(205, 174, 99, .5), rgba(176, 141, 46, .16) 40%, rgba(138, 109, 31, .45));
  box-shadow: var(--shadow-card);
}

.card-face {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  background:
    radial-gradient(120% 90% at 50% 0%, var(--ivory-2) 0%, var(--ivory) 58%),
    var(--ivory);
  overflow: hidden;
}

/* soft foil sheen */
.card-face::after {
  content: "";
  position: absolute;
  inset: 0 -45%;                      /* wider than the face so the sweep can travel */
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, .5) 46%, transparent 60%);
  opacity: .35;
  pointer-events: none;
  mix-blend-mode: soft-light;
}

/* art-deco corner flourishes */
.corner {
  position: absolute;
  width: 36px;
  height: 36px;
  z-index: 2;
  pointer-events: none;
}
.corner::before {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--gold);
  transform: rotate(45deg);
  background: var(--ivory-2);
}
.corner--tl { top: 12px; left: 12px; border-top: 2px solid var(--gold); border-left: 2px solid var(--gold); }
.corner--tl::before { top: -5px; left: -5px; }
.corner--tr { top: 12px; right: 12px; border-top: 2px solid var(--gold); border-right: 2px solid var(--gold); }
.corner--tr::before { top: -5px; right: -5px; }
.corner--bl { bottom: 12px; left: 12px; border-bottom: 2px solid var(--gold); border-left: 2px solid var(--gold); }
.corner--bl::before { bottom: -5px; left: -5px; }
.corner--br { bottom: 12px; right: 12px; border-bottom: 2px solid var(--gold); border-right: 2px solid var(--gold); }
.corner--br::before { bottom: -5px; right: -5px; }

.card-body {
  position: relative;
  z-index: 1;
  padding: clamp(34px, 6vmin, 64px) clamp(22px, 7vw, 52px);
  text-align: center;
}

/* eyebrow + titles */
.eyebrow {
  font-size: 10.5px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 14px;
}

.card-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(26px, 5.4vw, 36px);
  line-height: 1.18;
  color: var(--ink);
  margin-bottom: 6px;
}
.card-title .honoree-name { font-family: var(--font-script); font-weight: 400; font-size: 1.22em; color: var(--gold-deep); }

.card-sub { font-size: 14.5px; color: var(--muted-ink); margin-bottom: 20px; }

/* optional honoree portrait — gold-ringed circle on the cover.
   Delete the .card-photo figure in index.html to remove it;
   swap assets/img/photos/honoree.jpg for your own photo. */
.card-photo {
  width: clamp(104px, 22vw, 132px);
  margin: 0 auto 18px;
  padding: 4px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  background: linear-gradient(160deg, rgba(205, 174, 99, .4), rgba(176, 141, 46, .1));
  box-shadow: inset 0 0 0 3px var(--ivory-2), inset 0 0 0 4px var(--line-soft), 0 12px 30px rgba(43, 34, 22, .25);
}
.card-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  background: var(--ivory-3);       /* graceful while loading / if missing */
}

/* honoree monogram — the initial + age read as an open horizontal lockup.
   The two spans are the host-editable morph fields; main.js hides the
   divider rule when either side is empty, and the whole lockup when both
   are (no orphaned chrome). */
.monogram {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: clamp(10px, 2.4vw, 18px);
  margin: 4px auto 18px;
  min-height: clamp(48px, 8.5vw, 62px);  /* stable rhythm when one side is empty */
}
.monogram-initial {
  font-family: var(--font-script);
  font-size: clamp(46px, 8.5vw, 62px);
  line-height: .9;
  color: var(--gold-deep);
  text-shadow: 0 2px 0 rgba(255, 255, 255, .6), 0 6px 18px rgba(176, 141, 46, .22);
}
.monogram-rule {
  align-self: center;
  flex: 0 0 auto;
  width: clamp(26px, 6vw, 46px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 35%, var(--gold) 65%, transparent);
}
.monogram-age {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1;
  letter-spacing: .05em;
  font-variant-numeric: lining-nums;
  color: var(--ink-soft);
}

/* invitation face */
.invite-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(17px, 3.4vw, 21px);
  line-height: 1.5;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.honoree-script {
  font-family: var(--font-script);
  font-size: clamp(58px, 13vw, 96px);
  line-height: 1.02;
  color: var(--gold-deep);
  text-shadow: 0 2px 0 rgba(255, 255, 255, .6), 0 6px 18px rgba(176, 141, 46, .22);
  margin-bottom: 2px;
}
.honoree-names { display: inline-flex; align-items: baseline; gap: .4em; flex-wrap: wrap; justify-content: center; }
.honoree-names .honoree-name--alt:not(:empty)::before { content: "& "; color: var(--gold); font-size: .6em; }

.honoree-caption {
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted-ink);
  margin-bottom: 16px;
}

.flourish {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(280px, 64vw);
  margin: 0 auto 16px;
  color: var(--gold);
}
.flourish-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line)); }
.flourish-line:last-child { background: linear-gradient(90deg, var(--line), transparent); }
.flourish-star { font-size: 12px; }

.event-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(20px, 4.2vw, 26px);
  letter-spacing: .04em;
  color: var(--ink);
}
.event-line { font-size: 14px; font-style: italic; color: var(--muted-ink); margin: 4px 0 14px; }

.date-line {
  font-family: var(--font-serif);
  font-size: clamp(14.5px, 3vw, 17px);
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.venue-line {
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 22px;
}

/* ── 6 · Buttons (card palette) ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 11px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: transform .2s var(--ease-out), box-shadow .2s, background .2s, color .2s, border-color .2s;
}
.btn:active { transform: scale(.97); }

.btn--ink {
  background: linear-gradient(160deg, #3a2e1d, var(--ink));
  color: var(--ivory-2);
  box-shadow: 0 10px 26px rgba(43, 34, 22, .35);
}
.btn--ink:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(43, 34, 22, .45); }

.btn--outline {
  background: var(--ivory-2);
  border-color: var(--line);
  color: var(--ink-soft);
}
.btn--outline:hover { border-color: var(--gold); color: var(--ink); }

.btn-arrow { font-size: 14px; line-height: 1; }

.card-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 22px;
}
.card-cta--split { justify-content: space-between; }

/* ── 7 · Particulars (details card) ────────────────────────────────────── */
.particulars {
  border-top: 1px solid var(--line-soft);
  text-align: left;
  margin-top: 20px;
}
.particular {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 15px 2px;
  border-bottom: 1px solid var(--line-soft);
}
.particular dt {
  font-size: 10.5px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold-deep);
  padding-top: 3px;
}
.particular dd {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.particular dd small { display: block; color: var(--muted-ink); font-size: 12.5px; letter-spacing: .05em; }
.venue-name { font-weight: 500; color: var(--ink); }
.venue-addresses { display: block; }
.venue-address { display: block; }
.venue-address-text { display: block; }

.map-link {
  display: inline-block;
  margin-top: 7px;
  color: var(--gold-deep);
  font-size: 11.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
}
.map-link:hover { border-color: var(--gold); }

.note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: rgba(176, 141, 46, .06);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted-ink);
}
.note-icon { color: var(--gold); font-size: 13px; line-height: 1.7; }

/* ── 7a · Add to Calendar (.ics export lives in main.js) ──────────────── */
.calendar-cta {
  margin: clamp(20px, 4vmin, 28px) auto 0;
  text-align: center;
}
.cal-btn {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 46px;
  padding: 11px 24px;
  font: 500 12px/1 var(--font-body);
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--ivory-2);
  border: 1px solid var(--gold);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 26px -14px rgba(124, 96, 24, .55);
  transition: transform .2s var(--ease-out), background-color .2s var(--ease-out), color .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.cal-btn svg { width: 16px; height: 16px; }
.cal-btn:hover {
  background: var(--ink); color: var(--ivory-2);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -14px rgba(43, 34, 22, .6);
}
.cal-btn:active { transform: scale(.97); }
.cal-hint {
  margin: 8px 0 0;
  font-size: 11px; letter-spacing: .08em;
  color: var(--muted-ink);
}

/* ── 7b · Moments gallery (optional panel) ───────────────────────────────
   Six framed photo slots; each <figure class="moment"> is one photo.
   Delete the whole .moments-section panel in index.html to remove the
   gallery — the navigation adapts automatically. */
.moments {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 6px;
  text-align: left;
}
.moment {
  margin: 0;
  padding: 5px;                     /* the gold frame around the photo */
  background: linear-gradient(160deg, rgba(205, 174, 99, .4), rgba(176, 141, 46, .12));
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: transform .3s var(--ease-out), box-shadow .3s;
}
.moment:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .4);
}
.moment img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 7px;
  background: var(--espresso-2);    /* shows behind broken / missing images */
  transition: transform .45s var(--ease-out);
}
.moment:hover img { transform: scale(1.05); }
.moment figcaption {
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  text-align: center;
}

/* every clickable photo hints at it: zoom cursor + a small magnifier
   badge on hover / keyboard focus — ONLY while the lightbox feature is ON.
   html.lb-off (window.MEDIA_LIGHTBOX = false) removes every trace. */
html.js:not(.lb-off) .card-photo img,
html.js:not(.lb-off) .moment img,
html.js:not(.lb-off) .banner-flyer img,
html.js:not(.lb-off) .free-media img { cursor: zoom-in; }
html.js:not(.lb-off) .card-photo,
html.js:not(.lb-off) .moment,
html.js:not(.lb-off) .banner-flyer,
html.js:not(.lb-off) .free-media { position: relative; }
html.js:not(.lb-off) .card-photo::after,
html.js:not(.lb-off) .moment::after,
html.js:not(.lb-off) .banner-flyer::after,
html.js:not(.lb-off) .free-media::after {
  content: "";
  position: absolute;
  top: 10px; right: 10px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(252, 247, 234, .94)
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b08d2e' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L21 21'/%3E%3C/svg%3E")
    center / 16px no-repeat;
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px -4px rgba(43, 34, 22, .45);
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity .2s var(--ease-out), transform .2s;
  pointer-events: none;
  z-index: 2;
}
html.js:not(.lb-off) .card-photo:hover::after,
html.js:not(.lb-off) .card-photo:focus-within::after,
html.js:not(.lb-off) .moment:hover::after,
html.js:not(.lb-off) .moment:focus-within::after,
html.js:not(.lb-off) .banner-flyer:hover::after,
html.js:not(.lb-off) .banner-flyer:focus-within::after,
html.js:not(.lb-off) .free-media:hover::after,
html.js:not(.lb-off) .free-media:focus-within::after { opacity: 1; transform: none; }

/* ── 7c · Party flyer / banner (optional, in the Details card) ──────────
   A wide framed slot for hosts who already have a designed flyer or
   poster — guests can confirm they're in the right place. Clicking it
   opens the same full-screen viewer as the photos. */
.banner-flyer {
  margin: clamp(24px, 5vh, 36px) auto 0;
  max-width: 560px;
  text-align: center;
}
.banner-flyer img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 3;
  object-fit: cover;
  padding: 5px;
  background: linear-gradient(160deg, rgba(205, 174, 99, .4), rgba(176, 141, 46, .12));
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 30px -22px rgba(0, 0, 0, .5);
}
.banner-flyer figcaption {
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

/* ── 7d · Film feature (optional, in the Moments card) ──────────────────
   A poster + play button. Tapping play opens the video full-size in the
   zoomable lightbox (main.js) — an embed for YouTube/Vimeo links, a native
   player for direct files like the shipped placeholder.mp4. Nothing loads
   until the guest taps. With MEDIA_LIGHTBOX = false the video plays inline
   in the frame instead. An empty URL hides the whole feature (main.js sets
   .is-hidden). */
.gallery-label {
  font-size: 10.5px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 14px;
}
.film-card {
  margin-top: clamp(26px, 5vh, 38px);
  text-align: center;
}
.film-card.is-hidden { display: none; }
.film-frame {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: var(--espresso-2);   /* mat behind the poster / while loading */
  border: 1px solid var(--line);
  box-shadow: 0 16px 34px -24px rgba(0, 0, 0, .5);
}
.film-open {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.film-open img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.film-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(56px, 12vmin, 72px);
  height: clamp(56px, 12vmin, 72px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ivory-2);
  background: radial-gradient(circle at 32% 28%, #8a6d23, var(--gold-deep) 60%, #57420f);
  border: 1px solid var(--gold-soft);
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, .65);
  animation: film-pulse 2.6s ease-in-out infinite;
  transition: transform .25s var(--ease-out);
}
.film-play svg { width: 26px; height: 26px; margin-left: 3px; }
.film-open:hover .film-play { transform: translate(-50%, -50%) scale(1.08); }
.film-open:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.film-hint {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(20, 16, 12, .66);
  color: var(--ivory-2);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  pointer-events: none;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.film-frame iframe,
.film-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #14100c;
}
.film-note {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 18px;
  color: var(--ivory-3);
  font-size: 13.5px;
  font-style: italic;
  text-align: center;
  background: var(--espresso-2);
}
.film-external {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color .2s, border-color .2s;
}
.film-external:hover { color: var(--gold); border-color: var(--gold); }
.film-external[hidden] { display: none; }
@keyframes film-pulse {
  0%, 100% { box-shadow: 0 12px 28px -12px rgba(0, 0, 0, .65), 0 0 0 0 rgba(205, 174, 99, .4); }
  50%      { box-shadow: 0 12px 28px -12px rgba(0, 0, 0, .65), 0 0 0 14px rgba(205, 174, 99, 0); }
}

/* ── 7e · Free page (optional "In Our Words" panel, host-filled) ────────
   One repeatable block per entry: title + free text + OPTIONAL photo. The
   render engine clones rows the host adds and removes the whole section
   when there are none (or when the host toggles the Free Page section
   off) — the navigation entries built from it disappear with it.
   The .free-media figure collapses via .is-empty when its photo is empty,
   so a text-only block still reads cleanly. */
.free-blocks {
  display: grid;
  gap: clamp(28px, 5vh, 42px);
  margin-top: 4px;
}
.free-block { margin: 0; text-align: center; }
.free-title {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(22px, 4.6vw, 30px);
  line-height: 1.2;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.free-title:focus { outline: none; }
.free-media {
  margin: 0 auto clamp(14px, 3vmin, 20px);
  max-width: 520px;
}
.free-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  padding: 5px;
  background: linear-gradient(160deg, rgba(205, 174, 99, .4), rgba(176, 141, 46, .12));
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 30px -22px rgba(0, 0, 0, .5);
}
.free-content {
  margin: 0 auto;
  max-width: 32em;
  text-align: left;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* ── 8 · RSVP form (reply card) ────────────────────────────────────────── */
.rsvp-form {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-inner);
  padding: clamp(18px, 4vw, 28px);
  background: rgba(255, 253, 246, .55);
  text-align: left;
  margin-top: 6px;
}

.rsvp-form-display {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; grid-column: 1 / -1; }
.form-group--half { grid-column: span 1; }

.form-group label {
  font-size: 10.5px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.form-control {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: var(--ivory-2);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 300;
  box-shadow: inset 0 1px 2px rgba(85, 70, 47, .08);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.form-control::placeholder { color: rgba(125, 107, 77, .65); }
.form-control:hover { border-color: var(--line); }
.form-control:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176, 141, 46, .16);
  background: #fff;
}
textarea.form-control { resize: vertical; min-height: 70px; }
select.form-control { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold-deep) 50%), linear-gradient(135deg, var(--gold-deep) 50%, transparent 50%);
  background-position: calc(100% - 19px) 55%, calc(100% - 13px) 55%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat; }

.error {
  display: block;
  min-height: 1em;
  font-size: 12px;
  color: var(--danger);
  letter-spacing: .03em;
}
.error:not(:empty) { animation: err-pop .25s var(--ease-out); }
@keyframes err-pop { from { transform: translateY(-3px); opacity: 0; } to { transform: none; opacity: 1; } }

.field-hint {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--muted-ink);
  line-height: 1.55;
}

.attend-extras { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.attend-extras[hidden] { display: none; }
.rsvp-form.is-declining .attend-extras,
.rsvp-form.is-declining .field-hint { display: none; }

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}
.btn--submit { min-width: 200px; }

.loading { font-size: 12.5px; letter-spacing: .14em; color: var(--gold-deep); text-transform: uppercase; }
.loading::before { content: "✦ "; animation: spin 1.4s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 9 · Guestbook — platform injects the real UI; style its hooks ───── */
.guestbook-body { margin-top: 6px; }

.guestbook-body #guestbookForm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-inner);
  background: rgba(255, 253, 246, .55);
  text-align: left;
}
.guestbook-body #guestbookForm .form-group { grid-column: 1 / -1; }
.guestbook-body #guestbookForm .form-group:has(input#name) { grid-column: span 1; }
.guestbook-body #guestbookForm .form-group:has(input#email) { grid-column: span 1; }
.guestbook-body #guestbookForm label {
  display: block; font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 6px;
}
.guestbook-body #guestbookForm .form-control { margin-bottom: 4px; }
.guestbook-body #guestbookForm .error { color: var(--danger); font-size: 12px; display: block; min-height: 1em; }
.guestbook-body #guestbookForm .d-flex {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
}
.guestbook-body #guestbookForm button[type="submit"] {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(160deg, #3a2e1d, var(--ink));
  color: var(--ivory-2);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: pointer;
}
.guestbook-chapta { grid-column: 1 / -1; }
.guestbook-chapta > div { margin-inline: auto; }
.loading-guestbook { grid-column: 1 / -1; text-align: center; color: var(--gold-deep); font-size: 12.5px; letter-spacing: .14em; }

.guestbook-wrap {
  margin-top: 18px;
  max-height: 55vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid var(--line-soft);
  text-align: left;
}
.guestbook-entry { padding: 14px 2px; border-bottom: 1px solid var(--line-soft); }
.guestbook-entry h5 { margin: 0 0 3px; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.guestbook-entry p { margin: 0 0 5px; font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); }
.guestbook-entry small { font-size: 11.5px; color: var(--muted-ink); letter-spacing: .05em; }

.more-guestbook-wrap { text-align: center; margin-top: 16px; }
.more-guestbook-wrap #load-more {
  min-height: 40px;
  padding: 9px 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--ivory-2);
  color: var(--ink-soft);
  font: inherit;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: pointer;
}
.more-guestbook-wrap #load-more:hover { border-color: var(--gold); color: var(--ink); }

/* Style A mount: the platform injects a .guestbook-form wrapper around the
   form + list. Give the wrapper the same vertical rhythm as the rest of
   the card. */
.guestbook-body .guestbook-form { width: 100%; }
.guestbook-body #comments-container {
  display: block;
  text-align: left;
}
.guestbook-body #comments-container.guestbook-wrap { margin-top: 18px; }

/* RSVP success / closed states injected by the platform (content of #rsvp-form) */
#rsvp-form .thank-you-message {
  text-align: center;
  padding: 24px 10px;
  color: var(--ok);
  letter-spacing: .03em;
  font-size: 15px;
}
#rsvp-form .thank-you-message h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(22px, 4.4vw, 30px);
  color: var(--ink);
  margin-bottom: 8px;
}
#rsvp-form .thank-you-message p { color: var(--ink-soft); font-size: 14.5px; line-height: 1.6; }
#rsvp-form .thank-you-message small { color: var(--muted-ink); line-height: 1.5; display: block; margin-top: 10px; }

/* RSVP deadline countdown (populated by the platform only when the host sets a deadline) */
.rsvp-countdown {
  display: none;
  text-align: center;
  margin: 0 auto 20px;
  padding: 13px 16px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: rgba(176, 141, 46, .06);
}
.rsvp-countdown:has(.count-day:not(:empty)) { display: block; }
.rsvp-countdown-label {
  display: block;
  font-size: 10px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 9px;
}
.rsvp-countdown-units {
  display: flex;
  justify-content: center;
  gap: 16px;
}
.rsvp-unit { display: flex; flex-direction: column; align-items: center; min-width: 52px; }
.rsvp-unit:has(.count-day:empty),
.rsvp-unit:has(.count-hour:empty),
.rsvp-unit:has(.count-minute:empty),
.rsvp-unit:has(.count-second:empty) { display: none; }
.rsvp-unit .count-day,
.rsvp-unit .count-hour,
.rsvp-unit .count-minute,
.rsvp-unit .count-second {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 26px;
  line-height: 1;
  color: var(--ink);
}
.rsvp-unit em {
  font-style: normal;
  font-size: 9.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted-ink);
  margin-top: 4px;
}

/* ── 9c · Brand footer + powered-by (end of the document, plain flow) ── */
.app-footer {
  position: relative;
  z-index: 1;
  padding: clamp(24px, 5vmin, 44px) 18px 0;
  text-align: center;
}
.footer-brand {
  margin: 0;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(246, 239, 221, .62);
}
.footer-brand-name {
  font-family: var(--font-script);
  font-size: 1.35em;
  text-transform: none;
  letter-spacing: .02em;
  color: var(--gold-soft);
}
.powered-by {
  position: relative;
  z-index: 1;
  width: 100%;
  text-align: center;
  padding: 14px 16px 26px;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(246, 239, 221, .5);
}
.powered-by .link-footer { color: var(--gold-soft); }
/* Reserve room for the floating dock, so end-of-page content is never
   covered by fixed chrome. */
body.has-dock .powered-by { padding-bottom: calc(var(--dock-h) + 44px + var(--safe-b)); }

/* ═════════════════════════════════════════════════════════════════════════
   FIXED HEADER — locked to --header-h; espresso glass once scrolled.
   ═════════════════════════════════════════════════════════════════════════ */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--header-h);            /* LOCKED to the token … */
  padding: var(--safe-t) clamp(14px, 3vw, 28px) 0;  /* … safe area included */
  border-bottom: 1px solid transparent;
  transition: background-color .3s var(--ease-out), border-color .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.app-header.is-scrolled {
  background: rgba(20, 16, 12, .88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom-color: rgba(176, 141, 46, .28);
  box-shadow: 0 12px 30px -22px rgba(0, 0, 0, .8);
}

.head-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
  text-decoration: none;
  color: var(--gold-soft);
}
.head-mark {
  width: 19px; height: 19px;
  flex: none;
  align-self: center;
}
.head-title {
  font-size: 10.5px; font-weight: 500; letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(246, 239, 221, .82);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Desktop section pills — built by main.js from the live DOM */
.topnav { display: none; }

.head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.head-btn {
  display: none;
  align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--gold-soft);
  font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  padding: 7px 13px; cursor: pointer;
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out), border-color .2s var(--ease-out);
}
html.js .head-btn { display: inline-flex; }
.head-btn svg { width: 15px; height: 15px; }
.head-btn:hover { background: var(--gold-deep); border-color: var(--gold); color: var(--ivory-2); }

/* Burger — mobile JS chrome only (hidden without JS, hidden on desktop) */
.nav-burger {
  display: none;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 4px;
  width: 40px; height: 38px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(20, 16, 12, .62);
  color: var(--gold-soft);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.burger-bar {
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .3s var(--ease-out), opacity .3s var(--ease-out);
}
html.js .nav-burger { display: inline-flex; }
.nav-burger[aria-expanded="true"] .burger-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger[aria-expanded="true"] .burger-bar:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] .burger-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Scroll progress — a whisper-thin gold line filling along the header's
   bottom edge as guests read. JS chrome: never shown without JS. */
.scroll-progress {
  display: none;
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--gold-deep), var(--gold) 55%, var(--gold-soft));
  pointer-events: none;
}
html.js .scroll-progress { display: block; }

/* Desktop nav pills (≥820px): labelled buttons, active follows the spy */
@media (min-width: 820px) {
  .topnav {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    margin-left: auto;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav ~ .head-actions { margin-left: 0; }
  .nav-burger, html.js .nav-burger { display: none; }
}
.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(246, 239, 221, .62);
  font: 500 11px/1 var(--font-body);
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out);
}
.nav-pill svg { width: 14px; height: 14px; flex: none; }
.nav-pill:hover { color: var(--ivory-2); background: rgba(176, 141, 46, .18); }
.nav-pill.is-active {
  background: linear-gradient(135deg, #a9893f, var(--gold-deep));
  color: var(--ivory-2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}
.nav-pill:focus-visible { outline-offset: 2px; }

/* ── Mobile menu: slide-down sheet over a dimmed backdrop (<820px) ─────── */
.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(8, 6, 4, .6);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s var(--ease-out);
}
.menu-backdrop.is-open { opacity: 1; pointer-events: auto; }

.mobile-menu {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  z-index: 96;
  background: rgba(30, 24, 18, .97);
  border-bottom: 1px solid rgba(176, 141, 46, .3);
  box-shadow: 0 30px 50px -28px rgba(0, 0, 0, .8);
  transform: translateY(-12px);
  opacity: 0;
  transition: transform .28s var(--ease-out), opacity .28s var(--ease-out);
}
.mobile-menu.is-open { transform: translateY(0); opacity: 1; }
.mobile-menu__scroller {
  max-height: min(62vh, 420px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px clamp(14px, 4vw, 24px) calc(12px + var(--safe-b));
}
.mobile-menu__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.menu-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: rgba(246, 239, 221, .85);
  font: 400 14px/1.2 var(--font-body);
  letter-spacing: .06em;
  text-align: left;
  cursor: pointer;
  transition: background-color .18s var(--ease-out), border-color .18s var(--ease-out), color .18s var(--ease-out);
}
.menu-row svg { width: 17px; height: 17px; flex: none; color: var(--gold-soft); }
.menu-row .menu-num {
  margin-left: auto;
  font-size: 10px; font-weight: 500; letter-spacing: .18em;
  color: rgba(246, 239, 221, .45);
}
.menu-row:hover { background: rgba(176, 141, 46, .16); border-color: var(--line-soft); }
.menu-row.is-current {
  background: linear-gradient(135deg, #a9893f, var(--gold-deep));
  color: var(--ivory-2);
}
.menu-row.is-current svg { color: var(--ivory-2); }
.menu-row.is-current .menu-num { color: rgba(252, 247, 234, .75); }

/* ═════════════════════════════════════════════════════════════════════════
   DOCK — floating espresso-glass pill with icon shortcuts; built by main.js
   from the sections that exist, so deleted sections lose their entry.
   Horizontally scrollable (hidden scrollbar) if there are many pages.
   ═════════════════════════════════════════════════════════════════════════ */
.dock {
  position: fixed;
  left: 50%;
  bottom: calc(12px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 85;
  display: flex;
  align-items: stretch;
  gap: 2px;
  max-width: calc(100vw - 20px);
  padding: 6px 8px;
  background: rgba(20, 16, 12, .88);
  border: 1px solid rgba(176, 141, 46, .35);
  border-radius: 18px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow:
    0 22px 44px -22px rgba(0, 0, 0, .75),
    inset 0 1px 0 rgba(205, 174, 99, .18);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.dock::-webkit-scrollbar { display: none; }
body.has-dock .dock { display: flex; }
.dock button {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 52px;
  height: 46px;
  padding: 5px 7px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(246, 239, 221, .6);
  cursor: pointer;
  transition: color .22s var(--ease-out), background-color .22s var(--ease-out), transform .22s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.dock button svg { width: 19px; height: 19px; flex: none; }
.dock button:hover { color: var(--ivory-2); background: rgba(176, 141, 46, .2); }
.dock button:active { transform: scale(0.94); }
.dock button.is-current {
  color: var(--ivory-2);
  background: linear-gradient(135deg, #a9893f, var(--gold-deep));
}
.dock__label {
  font-family: var(--font-body);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ═════════════════════════════════════════════════════════════════════════
   TOAST — quiet confirmations (Add to Calendar, …)
   ═════════════════════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + var(--safe-b));
  transform: translateX(-50%) translateY(14px);
  z-index: 150;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--gold-deep);
  color: var(--ivory-2);
  font-size: 12px; font-weight: 500; letter-spacing: .1em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease-out), transform .25s var(--ease-out);
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ═════════════════════════════════════════════════════════════════════════
   LIGHTBOX — click-to-open originals with zoom & pan.
   Every content photo AND the film open here: images zoom (wheel, pinch,
   double-tap, ± buttons) and pan while zoomed; videos play as an embed with
   an "open original" link. Closes via Escape / backdrop / ×.
   Markup is built by main.js only when clickable media exists.
   ═════════════════════════════════════════════════════════════════════════ */

.lightbox {
  position: fixed; inset: 0;
  z-index: 200;
  display: flex;
  align-items: center; justify-content: center;
  padding: calc(16px + var(--safe-t)) 16px calc(16px + var(--safe-b));
  background: rgba(10, 7, 4, .93);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.lightbox[hidden] { display: none; }
body.lb-open { overflow: hidden; }   /* lock the document behind the open lightbox */

.lightbox-stage {
  position: relative;
  width: 100%;
  max-width: 960px;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: lb-zoom-in .28s var(--ease-out);
}
@keyframes lb-zoom-in {
  from { transform: scale(.94); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.lightbox-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  touch-action: none;
  overflow: hidden;
  border-radius: 10px;
}
.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 72vh; max-height: 72dvh;
  width: auto; height: auto;
  border: 1px solid rgba(205, 174, 99, .5);
  border-radius: 14px;
  background: var(--espresso-2);   /* mat while loading / if the file is missing */
  box-shadow: 0 40px 110px rgba(0, 0, 0, .75);
  cursor: zoom-in;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
  transition: transform .18s var(--ease-out);
}
.lightbox-frame.is-zoomed .lightbox-img { cursor: grab; }
.lightbox-frame.is-zoomed .lightbox-img:active { cursor: grabbing; }
.lightbox-frame.is-panning .lightbox-img { transition: none; }
.lightbox-video {
  width: min(880px, 92vw);
  aspect-ratio: 16 / 9;
  max-height: 72vh; max-height: 72dvh;
}
.lightbox-video iframe,
.lightbox-video video {
  width: 100%; height: 100%;
  border: 0;
  border-radius: 14px;
  border: 1px solid rgba(205, 174, 99, .5);
  background: #000;
  box-shadow: 0 40px 110px rgba(0, 0, 0, .85);
}
.lightbox-caption {
  margin: 0;
  font-size: 11px; font-weight: 500;
  letter-spacing: .24em; text-transform: uppercase;
  color: var(--gold-soft);
  text-align: center;
  overflow-wrap: anywhere;
}
.lightbox-counter {
  margin: 0;
  font-size: 10px; font-weight: 500; letter-spacing: .26em;
  color: rgba(246, 239, 221, .55);
}
.lightbox-unavailable {
  display: flex; align-items: center; justify-content: center;
  width: min(72vw, 520px); height: min(46vh, 360px);
  border: 1px solid rgba(205, 174, 99, .5); border-radius: 14px;
  background: var(--espresso-2);
  color: var(--ivory-3);
  font-size: 14px; font-style: italic;
  text-align: center;
  padding: 16px;
}

.lb-btn {
  position: absolute;
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(205, 174, 99, .5);
  background: rgba(20, 16, 12, .88);
  color: var(--gold-soft);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .6);
  transition: transform .2s var(--ease-out), color .2s var(--ease-out), background-color .2s var(--ease-out);
}
.lb-btn svg { width: 20px; height: 20px; }
.lb-btn:hover { transform: scale(1.06); color: var(--ivory-2); background: rgba(43, 34, 22, .92); }
.lb-close { top: calc(12px + var(--safe-t)); right: calc(12px + var(--safe-r)); }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
.lb-prev:hover, .lb-next:hover { transform: translateY(-50%) scale(1.06); }

/* Zoom tools + "open original" link */
.lightbox-tools {
  position: absolute;
  left: calc(12px + var(--safe-l));
  bottom: calc(12px + var(--safe-b));
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lightbox-tools[hidden] { display: none; }
.lb-tool {
  min-width: 42px; height: 42px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(205, 174, 99, .45);
  background: rgba(20, 16, 12, .88);
  color: var(--gold-soft);
  font: 500 12px/1 var(--font-body);
  letter-spacing: .08em;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  transition: transform .2s var(--ease-out), color .2s var(--ease-out), background-color .2s var(--ease-out);
}
.lb-tool svg { width: 17px; height: 17px; }
.lb-tool:hover { transform: scale(1.05); color: var(--ivory-2); background: rgba(43, 34, 22, .92); }
.lb-tool[disabled] { opacity: .4; cursor: default; }
.lb-original {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(205, 174, 99, .45);
  background: rgba(20, 16, 12, .88);
  color: var(--gold-soft);
  font: 500 11px/1 var(--font-body);
  letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none;
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out);
}
.lb-original:hover { background: rgba(43, 34, 22, .92); color: var(--ivory-2); }
.lightbox-original-row {
  position: absolute;
  right: calc(12px + var(--safe-r));
  bottom: calc(12px + var(--safe-b));
  z-index: 3;
}
.lightbox-original-row[hidden] { display: none; }

.lightbox :focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Narrow screens: prev/next drop below the photo so they never cover it. */
@media (max-width: 520px) {
  .lightbox { padding-left: 10px; padding-right: 10px; }
  .lightbox-img { max-height: 60vh; max-height: 60dvh; }
  .lightbox-video { width: 94vw; max-height: 60vh; max-height: 60dvh; }
  .lb-prev, .lb-next { position: static; transform: none; width: 42px; height: 42px; }
  .lb-prev:hover, .lb-next:hover { transform: scale(1.06); }
  .lightbox-stage { gap: 10px; justify-content: center; }
  .lightbox-tools { left: 8px; bottom: calc(8px + var(--safe-b)); }
  .lightbox-original-row { right: 8px; bottom: calc(8px + var(--safe-b)); }
}

/* ── 11 · Responsive polish ────────────────────────────────────────────── */
@media (max-width: 640px) {
  .particular { grid-template-columns: 1fr; gap: 5px; }
  .particular dt { padding-top: 0; }
  .rsvp-form-display { grid-template-columns: 1fr; }
  .form-group--half { grid-column: 1 / -1; }
  .attend-extras { grid-template-columns: 1fr; }
  .guestbook-body #guestbookForm { grid-template-columns: 1fr; }
  .guestbook-body #guestbookForm .form-group:has(input#name),
  .guestbook-body #guestbookForm .form-group:has(input#email) { grid-column: 1 / -1; }
  .card-body { padding: clamp(30px, 6vh, 44px) 20px; }
  .card-cta--split { flex-direction: column; align-items: stretch; }
  .card-cta--split .btn { width: 100%; }
  .moments { gap: 10px; }
  .cal-btn { width: 100%; }
}

@media (max-width: 520px) {
  .head-btn span { display: none; }   /* icon-only print button on phones */
  .head-title { display: none; }      /* the martini mark carries the brand */
  .head-brand { gap: 0; }
}

/* ── 12 · Reduced motion ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
  .film-play { animation: none; }
  .scroll-cue { animation: none; }
}

/* ── 13 · Print — each card prints as its own page, everything restored ── */
@media print {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  @page { margin: 12mm; }
  html { scroll-padding-top: 0; }
  body { padding-top: 0; background: #fff; color: #222; }
  .site { min-height: 0; background: #fff; }
  .app-header, .dock, .mobile-menu, .menu-backdrop, .scroll-progress,
  .js-print, .powered-by, .toast, .skip-link, .scroll-cue, .lightbox { display: none !important; }
  .backdrop { display: none !important; }
  .panel {
    min-height: 0;
    padding: 0 0 24px;
    break-after: page;
    page-break-after: always;
  }
  .panel-cover { max-height: none; overflow: visible; }
  .card-face, .card-frame, .moment, .banner-flyer img, .free-media img {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .film-frame iframe, .film-frame video { display: none; } /* playing media can't print — the poster prints instead */
  .guestbook-wrap { max-height: none; overflow: visible; }
  /* The empty-state audit and the cover-fit trim only ever VISUALLY hid
     things: print restores everything. */
  .is-empty, .fit-hidden { display: revert !important; }
  a { color: inherit; }
}
