/* =========================================================
   THEME — change these to restyle the whole site
   ========================================================= */
:root {
  --bg:        #f4efe6;   /* page background (ivory)            */
  --paper:     #ffffff;   /* cards                              */
  --ink:       #1f1b17;   /* main text                          */
  --muted:     #564e46;   /* secondary text                     */
  --accent:    #56654d;   /* sage (small labels)                */
  --gold:      #b89b6a;   /* champagne gold (lines, decoration) */
  --gold-text: #8a6a36;   /* deeper gold, for gold WORDS        */
  --blush:     #e8dccf;   /* soft neutral                       */
  --line:      rgba(31, 27, 23, .2);

  --serif:  "Cormorant Garamond", Georgia, serif;
  --sans:   "Jost", system-ui, sans-serif;
  --script: "Pinyon Script", cursive;

  /* FONT SET: option 1 (Cormorant Garamond). See design-options/font-options.html */
  --display:          var(--serif);   /* names + headings */
  --display-weight:   500;
  --display-tracking: 0;
  --display-scale:    1;
  --amp-font:         var(--serif);
  --amp-style:        italic;
  --amp-size:         .45em;
  --tagline-font:     var(--script);  /* "are getting married" */
  --tagline-style:    normal;
  --tagline-scale:    1;

  --header-h: 76px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---- Alternative themes (preview with ?theme=coastal or ?theme=golden) ---- */
:root[data-theme="coastal"] {          /* Cabo Coast */
  --bg:        #fbf9f5;
  --paper:     #ffffff;
  --ink:       #0e2433;   /* deep ocean navy   */
  --muted:     #43566a;
  --accent:    #1d6475;   /* sea teal          */
  --gold:      #d4a27a;   /* warm sand         */
  --gold-text: #a8552e;   /* terracotta sunset */
  --blush:     #e3edf0;
  --line:      rgba(14, 36, 51, .16);
}
:root[data-theme="golden"] {           /* Golden Hour */
  --bg:        #f5ede2;
  --paper:     #fffaf3;
  --ink:       #2b1810;   /* espresso          */
  --muted:     #5e4638;
  --accent:    #8c4a2f;   /* terracotta        */
  --gold:      #c9974f;   /* deep gold         */
  --gold-text: #94561b;
  --blush:     #ecd9c6;
  --line:      rgba(43, 24, 16, .18);
}

/* ---- Font option 5 (Cinzel capitals). Preview with ?font=cinzel, or make it the default by
        copying these values into :root above ---- */
:root[data-font="cinzel"] {
  --display:          "Cinzel", Georgia, serif;
  --display-weight:   400;
  --display-tracking: .08em;
  --display-scale:    .78;        /* Cinzel is wide, so headings are drawn a bit smaller */
  --amp-font:         "Great Vibes", cursive;
  --amp-style:        normal;
  --amp-size:         .9em;
  --tagline-font:     var(--serif);
  --tagline-style:    italic;
  --tagline-scale:    .8;
}

/* ---- Dark mode: off by default. Guests can switch it on with the moon button
        in the top bar (or preview with ?mode=dark) ---- */
:root[data-mode="dark"]:not([data-theme]) {
  --bg:        #120f0c;   /* deep warm night      */
  --paper:     #1c1713;   /* cards                */
  --ink:       #f3ebdf;   /* cream text           */
  --muted:     #c6baab;
  --accent:    #a3b597;   /* soft sage            */
  --gold:      #c7a56c;
  --gold-text: #d8b77f;
  --blush:     #2b251f;
  --line:      rgba(241, 233, 220, .14);
  color-scheme: dark;     /* dark form controls and scrollbars */
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;           /* no long scrolling — tabs instead */
}
h1, h2, h3 { font-family: var(--display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); margin: 0; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }

/* subtle paper texture + botanical corners */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 0% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 45%),
    radial-gradient(ellipse at 100% 100%, color-mix(in srgb, var(--gold) 14%, transparent), transparent 45%);
}

/* =========================================================
   HEADER + TABS
   ========================================================= */
.site-header {
  position: fixed; inset: 0 0 auto 0;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px);
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.monogram {
  font: 400 26px/1 var(--serif);
  letter-spacing: .08em;
  text-decoration: none;
}
.monogram span { font-style: italic; color: var(--gold-text); }

.tabs { display: flex; gap: clamp(14px, 2vw, 30px); align-items: center; margin-left: auto; }
.tabs a {
  position: relative;
  font: 500 12.5px/1 var(--sans);
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding: 8px 0;
  transition: color .3s;
}
.tabs a::after {
  content: "";
  position: absolute; left: 50%; bottom: 0;
  width: 0; height: 1px; background: var(--gold);
  transition: width .35s var(--ease), left .35s var(--ease);
}
.tabs a:hover, .tabs a.active { color: var(--ink); }
.tabs a.active::after { width: 100%; left: 0; }
.tabs a.tab-cta {
  border: 1px solid var(--ink);
  padding: 10px 18px;
  color: var(--ink);
}
.tabs a.tab-cta::after { display: none; }
.tabs a.tab-cta:hover, .tabs a.tab-cta.active { background: var(--ink); color: var(--bg); }

.menu-toggle { display: none; }

/* Light / dark switch in the top bar */
.mode-toggle {
  margin-left: clamp(12px, 1.6vw, 22px);
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: none; border: 1px solid var(--line); color: var(--ink);
  cursor: pointer; transition: border-color .3s, background .3s;
}
.mode-toggle:hover { border-color: var(--gold); }
.mode-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.mode-toggle .sun { display: none; }
:root[data-mode="dark"] .mode-toggle .sun { display: block; }
:root[data-mode="dark"] .mode-toggle .moon { display: none; }

/* =========================================================
   PAGES (one visible at a time)
   ========================================================= */
.stage {
  position: fixed;
  inset: var(--header-h) 0 0 0;
}
.page {
  position: absolute; inset: 0;
  padding: clamp(24px, 5vh, 56px) clamp(16px, 5vw, 64px);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: clamp(20px, 4vh, 40px);
  overflow-y: auto;           /* only if a page is taller than the screen (phones) */
  opacity: 0; visibility: hidden;
  transform: translateY(14px);
  transition: opacity .6s var(--ease), transform .6s var(--ease), visibility 0s .6s;
}
.page.active {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .6s var(--ease), transform .6s var(--ease), visibility 0s;
}

/* staggered reveal of a page's children */
.page > * { opacity: 0; transform: translateY(10px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.page.active > * { opacity: 1; transform: none; }
.page.active > *:nth-child(2) { transition-delay: .12s; }
.page.active > *:nth-child(3) { transition-delay: .24s; }

.page:focus { outline: none; }
.page > :first-child { margin-top: auto; }
.page > :last-child  { margin-bottom: auto; }
.page-head { text-align: center; max-width: 640px; }
.page-head h2 { font-size: calc(clamp(40px, 6vw, 64px) * var(--display-scale)); line-height: 1.05; }
.eyebrow {
  font: 500 12px/1 var(--sans);
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: 14px;
}
.lede { color: var(--muted); margin-top: 14px; }
.label {
  display: block;
  font: 500 11px/1 var(--sans);
  letter-spacing: .24em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.script { font: var(--tagline-style) 400 calc(clamp(28px, 4vw, 40px) * var(--tagline-scale))/1.2 var(--tagline-font); color: var(--gold-text); }

.btn {
  display: inline-block;
  padding: 15px 38px;
  border: 1px solid var(--ink);
  background: var(--ink); color: var(--bg);
  font: 400 12px/1 var(--sans);
  letter-spacing: .24em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background .3s, color .3s;
}
.btn:hover { background: transparent; color: var(--ink); }

.link {
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; color: var(--ink);
  border-bottom: 1px solid var(--gold); padding-bottom: 3px;
}

/* Placeholder image blocks — replace with real <img> later */
.ph {
  position: relative;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--gold) 18%, transparent)),
    var(--blush);
}
.ph[data-label]::after {
  content: attr(data-label);
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font: italic 300 18px var(--serif); color: color-mix(in srgb, var(--ink) 35%, transparent);
}
.ph img, .photo img, .g-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* =========================================================
   HOME
   ========================================================= */
.page-home { text-align: center; }
.home-split {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: center; gap: clamp(24px, 5vw, 80px);
  width: 100%; max-width: 1280px;
}
.page-home .names { font-size: calc(clamp(48px, 6.4vw, 100px) * var(--display-scale)); flex-direction: column; align-items: center; gap: 0; }
.page-home .names .amp { font-size: var(--amp-size); line-height: 1; margin: .02em 0 .08em; }

/* Arch-shaped photo frame (used on Home and RSVP) */
.arch, .rsvp-photo {
  margin: 0; justify-self: center;
  height: min(70vh, 660px); aspect-ratio: 3 / 4.3; max-width: 100%;
  border-radius: 999px 999px 0 0; overflow: hidden;
  box-shadow: 0 0 0 10px var(--bg), 0 0 0 11px color-mix(in srgb, var(--gold) 60%, transparent);
}
.arch img, .rsvp-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block; }

/* Home slideshow: stacked photos that crossfade, each with a slow gentle zoom */
.arch.slideshow { position: relative; }
.arch.slideshow img {
  position: absolute; inset: 0;
  opacity: 0; transform: scale(1);
  transition: opacity 1.4s ease, transform 0s linear 1.4s;   /* reset zoom after fading out */
}
.arch.slideshow img.active {
  opacity: 1; transform: scale(1.07);
  transition: opacity 1.4s ease, transform 7s linear;
}
@media (prefers-reduced-motion: reduce) {
  .arch.slideshow img.active { transform: none; }
}
.home-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(14px, 2.6vh, 24px);
}
.names {
  font-size: clamp(56px, 11vw, 132px);
  line-height: .95; font-weight: var(--display-weight);
  display: flex; align-items: baseline; gap: .25em; flex-wrap: wrap; justify-content: center;
}
.names .amp { font-family: var(--amp-font); font-style: var(--amp-style); letter-spacing: 0; color: var(--gold-text); font-size: .6em; }
.home-meta {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center;
  font-size: 13.5px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
}
.dot { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }

.countdown { display: flex; gap: clamp(14px, 4vw, 44px); margin: 8px 0 10px; }
.countdown div { display: flex; flex-direction: column; align-items: center; min-width: 64px; }
.countdown b { font: 500 clamp(32px, 5vw, 48px)/1 var(--serif); font-variant-numeric: tabular-nums; }
.countdown small { font-size: 11px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }

.emblem { width: clamp(150px, 18vw, 210px); height: auto; margin-bottom: -4px; }
.emblem path, .emblem circle { fill: none; stroke: var(--gold); stroke-width: 1.1; stroke-linejoin: round; stroke-linecap: round; }
.emblem .lily path { stroke: var(--accent); }
.emblem circle { fill: var(--gold); stroke: none; }
.emblem .wave { stroke: color-mix(in srgb, var(--accent) 55%, transparent); }
.emblem .diamond { fill: var(--gold); stroke: none; }

/* =========================================================
   STORY
   ========================================================= */
.story {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 3vw, 40px);
  width: 100%; max-width: 1100px;
}
.story-card { text-align: center; }
.story-card .photo { height: clamp(110px, 30vh, 280px); margin-bottom: 18px; overflow: hidden; }
.story-year { font: italic 400 20px var(--serif); color: var(--gold-text); }
.story-card h3 { font-size: calc(28px * var(--display-scale)); margin: 2px 0 8px; }
.story-card p { color: var(--muted); font-size: 15px; }

.origins {
  display: flex; align-items: center; justify-content: center; gap: clamp(12px, 3vw, 28px);
  margin-top: 16px; font: italic 400 22px var(--serif);
}
.origins span { display: flex; flex-direction: column; align-items: center; }
.origins small {
  font: 400 9.5px/1 var(--sans); font-style: normal; letter-spacing: .26em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px;
}
.origins i { width: clamp(24px, 5vw, 56px); height: 1px; background: var(--gold); opacity: .6; margin-top: 14px; }

/* =========================================================
   SCHEDULE
   ========================================================= */
.timeline {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  width: 100%; max-width: 1100px;
  position: relative;
}
.timeline::before {
  content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 34px;
  height: 1px; background: var(--line);
}
.timeline li {
  text-align: center; padding: 0 12px; position: relative;
  display: flex; flex-direction: column;
}
.timeline time {
  order: 0;
  font: 400 12px/1 var(--sans); letter-spacing: .22em; color: var(--muted);
  margin-bottom: 14px;
}
.timeline li::before {       /* diamond marker, sits between time and title */
  order: 1;
  content: ""; display: block; width: 9px; height: 9px; margin: 0 auto 18px;
  border: 1px solid var(--gold); background: var(--bg); transform: rotate(45deg);
  position: relative; z-index: 1;
}
.timeline h3 { order: 2; font-size: calc(30px * var(--display-scale)); margin-bottom: 6px; }
.timeline p { order: 3; color: var(--muted); font-size: 15px; }

.note-strip {
  display: flex; flex-wrap: wrap; justify-content: center;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  width: 100%; max-width: 1100px;
}
.note-strip > div {
  flex: 1 1 220px; padding: 18px 20px; text-align: center; font-family: var(--serif); font-size: 20px;
}
.note-strip > div + div { border-left: 1px solid var(--line); }
.swatch {
  display: inline-block; width: 18px; height: 18px; border-radius: 50%;
  background: var(--c); margin: 0 3px; border: 1px solid var(--line); vertical-align: middle;
}

/* =========================================================
   CARDS (Travel / Gifts)
   ========================================================= */
.cards { display: grid; gap: clamp(16px, 2.5vw, 28px); width: 100%; max-width: 1100px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.card {
  /* warm linen panel, a touch deeper than the page (no white) */
  background: color-mix(in srgb, var(--blush) 30%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
  box-shadow: 0 22px 44px -32px rgba(60, 45, 25, .35);
  padding: clamp(24px, 4vh, 40px) 28px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  position: relative;
}
.card::before {       /* inner hairline frame */
  content: ""; position: absolute; inset: 8px; border: 1px solid color-mix(in srgb, var(--gold) 28%, transparent); pointer-events: none;
}
.card h3 { font-size: calc(30px * var(--display-scale)); }
.card p { color: var(--muted); font-size: 15px; }
.card .link { margin-top: auto; padding-top: 10px; }
.card.gift { min-height: 250px; justify-content: flex-start; border-top: 2px solid var(--brand); }
.card.gift::before { inset: 8px 8px 8px 8px; }
.gift.cashapp { --brand: #00c244; }
.gift.zelle   { --brand: #6d1ed4; }
.gift.venmo   { --brand: #008cff; }
.brand-logo {
  width: 58px; height: 58px; border-radius: 15px; background: var(--brand);
  display: grid; place-items: center; margin-bottom: 4px;
  box-shadow: 0 10px 22px -12px var(--brand);
}
.brand-logo svg { width: 30px; height: 30px; fill: #fff; }
.gift.cashapp .brand-logo { background: none; }
.gift.cashapp .brand-logo svg { width: 58px; height: 58px; fill: var(--brand); }
.gift.venmo .brand-logo svg { width: 48px; height: 48px; }
.gift .label { color: var(--ink); font-size: 12px; margin: 0; }
.card.gift h3 { font: 500 clamp(22px, 2.2vw, 28px) var(--serif); letter-spacing: 0; word-break: break-word; }
.gift-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 8px; position: relative; z-index: 1; }
.pay-btn {
  background: var(--brand); color: #fff; text-decoration: none;
  font: 500 13px/1 var(--sans); letter-spacing: .04em;
  padding: 12px 20px; border-radius: 999px;
  transition: filter .2s, transform .2s;
}
.pay-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.hint { font-size: 13px; color: var(--muted); padding: 12px 0; }
.copy {
  font: 500 12px/1 var(--sans); letter-spacing: .04em;
  background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 999px;
  padding: 11px 18px; cursor: pointer; transition: border-color .3s, background .3s;
}
.copy:hover { border-color: var(--ink); }
.copy.done { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.gift-note { font: italic 400 20px var(--serif); color: var(--muted); text-align: center; }

/* =========================================================
   GALLERY
   ========================================================= */
.gallery-wrap { position: relative; width: 100%; max-width: 1280px; }
.gallery {
  display: flex; gap: 12px;
  height: min(62vh, 600px);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.g-item {
  flex: 0 0 auto; height: 100%; aspect-ratio: 2 / 3;
  border: 0; padding: 0; cursor: zoom-in; overflow: hidden; scroll-snap-align: start;
  background: var(--blush);
}
.g-item img { transition: transform .8s var(--ease); }
.g-item:hover img { transform: scale(1.04); }
.g-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--line);
  font: 300 26px/1 var(--serif); cursor: pointer;
  box-shadow: 0 8px 24px -12px rgba(47,43,39,.35);
  transition: background .3s, color .3s;
}
.g-nav:hover { background: var(--ink); color: var(--bg); }
.g-nav.prev { left: -23px; }
.g-nav.next { right: -23px; }

.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(30,27,24,.9);
  display: grid; place-items: center; padding: 40px;
}
.lightbox[hidden] { display: none; }
.lb-content { width: min(1100px, 84vw); height: 86vh; }
.lb-content > * { width: 100%; height: 100%; object-fit: contain; }
.lb-prev, .lb-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: #fff; font: 300 54px/1 var(--serif); cursor: pointer; padding: 20px; opacity: .8;
}
.lb-prev:hover, .lb-next:hover { opacity: 1; }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
.lb-close {
  position: absolute; top: 18px; right: 26px; background: none; border: 0;
  color: #fff; font-size: 40px; cursor: pointer; line-height: 1;
}

/* =========================================================
   FAQ
   ========================================================= */
.faq { width: 100%; max-width: 720px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  padding: 18px 0; font: 400 22px var(--serif);
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 300 22px var(--sans); color: var(--gold-text); transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding: 0 0 18px; }
.credit { font-size: 11.5px; color: var(--muted); text-align: center; }
.credit a { color: inherit; }

/* =========================================================
   RSVP
   ========================================================= */
.rsvp {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px;
  width: 100%; max-width: 640px;
}
.field { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field.full, .btn.full, .field.choice { grid-column: 1 / -1; }
.field label, .field legend {
  font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); padding: 0;
}
.field input:not([type=radio]), .field select, .field textarea {
  font: 400 19px var(--serif); color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--line);
  padding: 6px 0; outline: none; resize: none; border-radius: 0;
  transition: border-color .3s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold-text); }
.field.choice { flex-direction: row; flex-wrap: wrap; gap: 10px 28px; align-items: center; }
.field.choice legend { width: 100%; margin-bottom: 6px; }
.field.choice label { font: 400 19px var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink); display: flex; gap: 8px; align-items: center; cursor: pointer; }
input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; }
.btn.full { margin-top: 6px; }

/* Extra questions that appear when a guest accepts */
.attend-details {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1fr 1fr; gap: inherit;
  animation: reveal .5s var(--ease);
}
.attend-details[hidden] { display: none; }
@keyframes reveal { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.rsvp-thanks { text-align: center; max-width: 440px; }
.rsvp-split {
  display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
  align-items: center; gap: clamp(24px, 5vw, 72px);
  width: 100%; max-width: 1180px;
}
.rsvp-col { display: flex; flex-direction: column; align-items: center; gap: clamp(18px, 3vh, 32px); }
.rsvp-thanks .script { font-size: 56px; }
.rsvp-thanks p:last-child { color: var(--muted); }

/* =========================================================
   MUSIC BUTTON
   ========================================================= */
.music-toggle {
  position: fixed; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 28px); z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px 11px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(8px);
  color: var(--ink); border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  box-shadow: 0 12px 30px -16px rgba(31,27,23,.45);
  font: 500 11px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  cursor: pointer; transition: background .3s, color .3s;
}
.music-toggle:hover { border-color: var(--gold); }
.music-toggle.playing { background: var(--ink); color: var(--bg); }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.bars i { width: 2px; height: 4px; background: currentColor; border-radius: 1px; transition: height .3s; }
.music-toggle.playing .bars i { animation: eq 1s ease-in-out infinite; }
.music-toggle.playing .bars i:nth-child(2) { animation-delay: -.3s; }
.music-toggle.playing .bars i:nth-child(3) { animation-delay: -.6s; }
.music-toggle.playing .bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }

/* =========================================================
   NIGHT MODE EXTRAS (only when a guest switches to dark mode)
   ========================================================= */
/* Candle glow behind the content and a soft vignette */
:root[data-mode="dark"] body::before {
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(216, 183, 127, .10), transparent 70%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(199, 165, 108, .08), transparent 70%),
    radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0, 0, 0, .45) 100%);
}
/* Faint twinkling starfield */
:root[data-mode="dark"] .stage::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 8% 12%,  rgba(255, 240, 215, .8), transparent 60%),
    radial-gradient(1px 1px at 23% 68%, rgba(255, 240, 215, .6), transparent 60%),
    radial-gradient(1.5px 1.5px at 37% 28%, rgba(255, 230, 190, .7), transparent 60%),
    radial-gradient(1px 1px at 52% 84%, rgba(255, 240, 215, .5), transparent 60%),
    radial-gradient(1px 1px at 64% 18%, rgba(255, 240, 215, .7), transparent 60%),
    radial-gradient(1.5px 1.5px at 78% 52%, rgba(255, 230, 190, .6), transparent 60%),
    radial-gradient(1px 1px at 91% 8%,  rgba(255, 240, 215, .8), transparent 60%),
    radial-gradient(1px 1px at 86% 88%, rgba(255, 240, 215, .5), transparent 60%),
    radial-gradient(1px 1px at 14% 92%, rgba(255, 240, 215, .6), transparent 60%),
    radial-gradient(1px 1px at 45% 50%, rgba(255, 240, 215, .35), transparent 60%);
  background-size: 520px 520px;
  opacity: .55;
  animation: twinkle 7s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .35; } to { opacity: .7; } }

/* Soft glow on the big serif titles */
:root[data-mode="dark"] .names,
:root[data-mode="dark"] .page-head h2 { text-shadow: 0 0 38px rgba(216, 183, 127, .22); }
:root[data-mode="dark"] .script { text-shadow: 0 0 24px rgba(216, 183, 127, .3); }

/* Gold buttons instead of cream */
:root[data-mode="dark"] .btn { background: var(--gold); border-color: var(--gold); color: #1a140e; }
:root[data-mode="dark"] .btn:hover { background: transparent; color: var(--gold-text); }
:root[data-mode="dark"] .tabs a.tab-cta { border-color: var(--gold); color: var(--gold-text); }
:root[data-mode="dark"] .tabs a.tab-cta:hover,
:root[data-mode="dark"] .tabs a.tab-cta.active { background: var(--gold); color: #1a140e; }

/* Photos: gold halo around the arches, slightly dimmed so they don't glare */
:root[data-mode="dark"] .arch,
:root[data-mode="dark"] .rsvp-photo {
  box-shadow: 0 0 0 10px var(--bg), 0 0 0 11px color-mix(in srgb, var(--gold) 70%, transparent),
              0 0 70px 6px rgba(199, 165, 108, .16);
}
:root[data-mode="dark"] .arch img,
:root[data-mode="dark"] .rsvp-photo img,
:root[data-mode="dark"] .story-card .photo img,
:root[data-mode="dark"] .g-item img { filter: brightness(.9) contrast(1.03); }

/* Cards and lines pick up a faint gold sheen */
:root[data-mode="dark"] .card {
  background: linear-gradient(180deg, rgba(199, 165, 108, .08), rgba(199, 165, 108, .02));
  border-color: color-mix(in srgb, var(--gold) 38%, transparent);
  box-shadow: 0 24px 50px -30px rgba(0, 0, 0, .8);
}
:root[data-mode="dark"] .faq details,
:root[data-mode="dark"] .note-strip,
:root[data-mode="dark"] .note-strip > div + div { border-color: color-mix(in srgb, var(--gold) 22%, transparent); }
:root[data-mode="dark"] .site-header { border-bottom-color: color-mix(in srgb, var(--gold) 20%, transparent); }
:root[data-mode="dark"] input[type=radio] { accent-color: var(--gold); }
:root[data-mode="dark"] .field input:focus, :root[data-mode="dark"] .field select:focus, :root[data-mode="dark"] .field textarea:focus { border-color: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  :root[data-mode="dark"] .stage::before { animation: none; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1080px) {
  .mode-toggle { margin-left: auto; margin-right: 6px; }
  .menu-toggle {
    display: grid; gap: 7px; background: none; border: 0; padding: 10px; cursor: pointer; z-index: 30;
  }
  .menu-toggle span { display: block; width: 26px; height: 1px; background: var(--ink); transition: transform .35s var(--ease); }
  .menu-open .menu-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-open .menu-toggle span:last-child  { transform: translateY(-4px) rotate(-45deg); }

  /* The blur on the header would trap the full-screen menu inside the header bar,
     so on smaller screens the header uses a solid background instead */
  .site-header { backdrop-filter: none; background: var(--bg); }
  .monogram, .mode-toggle, .menu-toggle { position: relative; z-index: 30; }

  /* Full-screen menu */
  .tabs {
    position: fixed; inset: 0; z-index: 25; margin: 0;
    flex-direction: column; justify-content: center; align-items: center; gap: clamp(10px, 2.4vh, 20px);
    padding: calc(var(--header-h) + 12px) 24px 40px;
    background: var(--bg);
    overflow-y: auto;
    opacity: 0; visibility: hidden; transition: opacity .45s var(--ease), visibility 0s .45s;
  }
  .tabs::before {                      /* small gold diamond above the links */
    content: ""; width: 7px; height: 7px; transform: rotate(45deg);
    background: var(--gold); margin-bottom: clamp(6px, 2vh, 16px);
  }
  .tabs::after {                       /* date line below the links */
    content: "June 5, 2027 · Cabo San Lucas";
    font: 500 11px/1 var(--sans); letter-spacing: .28em; text-transform: uppercase;
    color: var(--gold-text); margin-top: clamp(10px, 3vh, 24px);
  }
  .menu-open .tabs { opacity: 1; visibility: visible; transition: opacity .45s var(--ease); }

  .tabs a {
    font: 500 clamp(26px, 4.6vh, 34px)/1.15 var(--serif);
    letter-spacing: .01em; text-transform: none; color: var(--ink);
    padding: 2px 0;
    opacity: 0; transform: translateY(10px);
    transition: opacity .5s var(--ease), transform .5s var(--ease), color .3s;
  }
  .tabs a::after { display: none; }
  .tabs a.active { font-style: italic; color: var(--gold-text); }
  .tabs a.tab-cta {
    font: 500 12.5px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase;
    padding: 15px 34px; margin-top: clamp(6px, 1.6vh, 14px);
  }
  .menu-open .tabs a { opacity: 1; transform: none; }
  .menu-open .tabs a:nth-child(1) { transition-delay: .05s; }
  .menu-open .tabs a:nth-child(2) { transition-delay: .09s; }
  .menu-open .tabs a:nth-child(3) { transition-delay: .13s; }
  .menu-open .tabs a:nth-child(4) { transition-delay: .17s; }
  .menu-open .tabs a:nth-child(5) { transition-delay: .21s; }
  .menu-open .tabs a:nth-child(6) { transition-delay: .25s; }
  .menu-open .tabs a:nth-child(7) { transition-delay: .29s; }
  .menu-open .tabs a:nth-child(8) { transition-delay: .33s; }

  .menu-open .music-toggle { opacity: 0; pointer-events: none; }
}

@media (max-width: 820px) {
  .story, .cards.three { grid-template-columns: 1fr; max-width: 440px; }
  .story-card .photo { height: auto; aspect-ratio: 16 / 9; }
  .timeline { grid-template-columns: 1fr 1fr; gap: 28px 0; }
  .timeline::before { display: none; }
  .home-split, .rsvp-split { grid-template-columns: 1fr; gap: 28px; }
  .home-meta { flex-direction: column; gap: 8px; }
  .home-meta .dot { display: none; }
  .arch { height: 36vh; }
  .rsvp-photo { display: none; }
  .gallery { height: 58vh; }
  .g-nav { display: none; }
  .music-label { display: none; }
  .music-toggle { padding: 13px; }
  .rsvp { grid-template-columns: 1fr; }
  .attend-details { grid-template-columns: 1fr; }
  .note-strip > div + div { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-height: 760px) and (min-width: 821px) {
  :root { --header-h: 64px; }
  .page { gap: 18px; padding-top: 20px; padding-bottom: 20px; }
  .page-head h2 { font-size: calc(clamp(34px, 7vh, 52px) * var(--display-scale)); }
  .eyebrow { margin-bottom: 8px; }
  .origins { margin-top: 10px; font-size: 19px; }
  .story-card .photo { height: clamp(90px, 24vh, 220px); margin-bottom: 12px; }
  .story-card h3 { font-size: calc(24px * var(--display-scale)); }
  .story-card p, .card p, .timeline p { font-size: 14px; line-height: 1.5; }
  .names, .page-home .names { font-size: calc(clamp(40px, 11vh, 100px) * var(--display-scale)); }
  .emblem { width: clamp(100px, 20vh, 190px); }
  .home-inner { gap: 10px; }
  .countdown { margin: 0; }
  .countdown b { font-size: clamp(28px, 7vh, 44px); }
  .btn { padding: 12px 32px; }
  .rsvp { gap: 8px 28px; }
  .field input:not([type=radio]), .field select, .field textarea, .field.choice label { font-size: 17px; }
  .field textarea { height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; transition-delay: 0s !important; }
}

/* Hide the "Powered by Netlify" badge Netlify injects on the live site
   (it covered the music button) */
#nl-badge-frame { display: none !important; }
