/* ═══════════════════════════════════════════════════════════
   Jennifer & Anthony — guest experience styles
   Palette and type are fixed brand tokens; do not add colours.
   ═══════════════════════════════════════════════════════════ */

:root {
  --burgundy: #6E1423;
  --burgundy-deep: #4E0D19;
  --burgundy-lift: #93233A;
  --cream: #FBF7F2;
  --cerise: #DB3E8C;
  --cerise-text: #B02566;
  --blue: #66A5ED;
  --moss: #4B5B34;
  --moss-soft: #C9D3B4;
  --apricot: #FC8A2D;
  --sand: #F3D9C4;
  --ink: #2A1518;
  --ink-soft: #574347;
  --ink-muted: #775F63; /* 5.5:1 on cream, 5.8:1 on white */
  --serif: "Canela", "Fraunces", Georgia, serif;
  --sans: "Neue Haas Grotesk", "Inter", system-ui, sans-serif;
  /* the invitation calligraphy: Edwardian Script ITC on the printed card,
     Pinyon Script as the loaded web fallback until a licensed woff2 drops in */
  --script: "Edwardian Script ITC", "Pinyon Script", cursive;
  --ease: cubic-bezier(0.32, 0.72, 0.24, 1);
  --card-shadow: 0 10px 28px rgba(75, 91, 52, 0.07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; }
button { font-family: var(--sans); }
input, textarea { outline: none; font-family: var(--sans); }
input:focus, textarea:focus { border-color: var(--burgundy) !important; }

:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible, .screen-dark :focus-visible { outline-color: var(--sand); }

/* visually hidden but available to assistive tech */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── shared atoms ─────────────────────────────────────────── */
.eyebrow {
  font-size: 11px; letter-spacing: 3.5px; text-transform: uppercase;
  color: var(--moss); margin-bottom: 10px;
}
.section-title {
  font-family: var(--script); font-weight: 400; font-size: clamp(46px, 10vw, 60px);
  color: var(--burgundy); line-height: 1.05; margin: 0;
}
.btn {
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px; border: none; cursor: pointer; text-decoration: none;
  font-size: 11.5px; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.25s ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.985); }
.btn-primary { background: var(--burgundy); color: var(--cream); }
.btn-primary:hover { box-shadow: 0 12px 26px rgba(78, 13, 25, 0.28); }
.btn-outline { background: transparent; border: 1px solid rgba(110, 20, 35, 0.35); color: var(--burgundy); }
.btn-outline:hover { background: rgba(110, 20, 35, 0.05); }
.btn-cream { background: var(--cream); color: var(--burgundy); font-size: 13px; letter-spacing: 2.5px; }
.btn-cream:hover { box-shadow: 0 12px 26px rgba(0, 0, 0, 0.3); }

.hairline-texture {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(115deg, rgba(251, 247, 242, 0.028) 0 1px, transparent 1px 9px);
}

.monogram-ring {
  border-radius: 50%; border: 1px solid rgba(243, 217, 196, 0.45);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); color: var(--sand); letter-spacing: 1px;
}

/* ── scroll reveals (opacity + transform only) ────────────── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
.reveal-scale { transform: translateY(18px) scale(0.97); }
.reveal-scale.in { transform: none; }

/* ── botanical flourishes ─────────────────────────────────── */
.sprig { display: block; margin: 14px auto 0; opacity: 0.9; }
.sprig path, .sprig circle, .sprig ellipse { vector-effect: non-scaling-stroke; }
.sprig-draw path {
  stroke-dasharray: 240; stroke-dashoffset: 240;
}
.reveal.in .sprig-draw path, .fadeup .sprig-draw path {
  animation: sprig-draw 1.6s var(--ease) 0.4s forwards;
}
@keyframes sprig-draw { to { stroke-dashoffset: 0; } }

/* ═══════════ full-screen scenes (envelope / auth / thanks) ═ */
.scene {
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 32px;
  background: linear-gradient(175deg, #5E0F1D 0%, #6E1423 45%, #4E0D19 100%);
  color: var(--cream); text-align: center;
  transition: opacity 0.7s ease, visibility 0.7s;
}
.scene[hidden] { display: none; }
.scene.leaving { opacity: 0; pointer-events: none; }

/* ── envelope ─────────────────────────────────────────────── */
.env-names {
  font-family: var(--script); font-weight: 400;
  font-size: clamp(38px, 9.5vw, 64px); color: var(--cream); line-height: 1.05;
  padding: 0 16px; white-space: nowrap;
}
.env-eyebrow { font-size: 11.5px; letter-spacing: 4.5px; text-transform: uppercase; color: rgba(251, 247, 242, 0.75); margin-bottom: 10px; }

/* photographic envelope: a landscape (16:9) Higgsfield film with the couple's wax seal.
   The still and the film share one 16:9 stage sized from --film-h: it covers the screen
   on landscape displays and letterboxes over the film's softened sky and tabletop on upright phones,
   where covering would crop away everything but the middle of the envelope. */
.envelope-scene {
  padding: 0; overflow: hidden;
  container-type: size;
  --film-h: max(100vh, 56.25vw);
  --film-h: max(100cqh, 56.25cqw);
}
.env-bands {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: fill; /* upper half is the film's sky, lower half its tabletop, both softened */
  display: none;
}
.env-stage {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--film-h) * 16 / 9); height: var(--film-h);
  margin-left: calc(var(--film-h) * -8 / 9); margin-top: calc(var(--film-h) / -2);
  transform: scale(1.03);
  animation: env-breathe 7s ease-in-out infinite;
  will-change: transform;
}
@keyframes env-breathe {
  0%, 100% { transform: scale(1.03); }
  50% { transform: scale(1.06); }
}
/* hold the breathing wherever it is so the film starts on exactly the frame on screen */
.envelope-scene.opening .env-stage, .envelope-scene.playing .env-stage { animation-play-state: paused; }
.env-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  transform-origin: 50% 59%;
  transition: transform 1.4s var(--ease);
}
.envelope-scene.opening .env-photo { transform: scale(1.5); }
.env-video {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4;
  object-fit: cover;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
}
.envelope-scene.playing .env-video { opacity: 1; }
.env-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(46, 10, 18, 0.72) 0%, rgba(46, 10, 18, 0.18) 26%, rgba(46, 10, 18, 0) 45%, rgba(46, 10, 18, 0) 62%, rgba(46, 10, 18, 0.6) 100%);
}
@media (max-aspect-ratio: 7/5) {
  .envelope-scene {
    --film-h: min(100vh, 56.25vw);
    --film-h: min(100cqh, 56.25cqw);
  }
  .env-bands { display: block; }
  .env-stage {
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 9%, #000 91%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 9%, #000 91%, transparent 100%);
  }
  /* the bands above and below the film carry the names and the hint, so they are tinted, the film is not */
  .env-scrim {
    background: linear-gradient(180deg,
      rgba(46, 10, 18, 0.8) 0%,
      rgba(46, 10, 18, 0.2) calc(50% - var(--film-h) / 2),
      rgba(46, 10, 18, 0) calc(50% - var(--film-h) * 0.3),
      rgba(46, 10, 18, 0) calc(50% + var(--film-h) * 0.3),
      rgba(46, 10, 18, 0.2) calc(50% + var(--film-h) / 2),
      rgba(46, 10, 18, 0.8) 100%);
  }
}
.env-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(58% 42% at 50% 48%, rgba(243, 217, 196, 0.85) 0%, rgba(243, 217, 196, 0.25) 45%, rgba(243, 217, 196, 0) 72%);
  opacity: 0;
  transition: opacity 1s var(--ease);
}
.envelope-scene.opening .env-glow { opacity: 1; }
.env-header {
  position: absolute; left: 0; right: 0; top: max(56px, env(safe-area-inset-top));
  display: flex; flex-direction: column; align-items: center; gap: 0;
  transition: opacity 0.6s ease, transform 0.6s var(--ease);
}
.env-header .env-eyebrow { margin-bottom: 10px; }
/* animation: none drops the fadeup/float fill-mode hold so the opacity transition can win */
.envelope-scene.opening .env-header, .envelope-scene.playing .env-header,
.envelope-scene.opening .tap-hint, .envelope-scene.playing .tap-hint { animation: none; }
.envelope-scene.opening .env-header, .envelope-scene.playing .env-header { opacity: 0; transform: translateY(-16px); }
.env-tap {
  position: absolute; inset: 0; z-index: 5;
  background: none; border: none; padding: 0; cursor: pointer;
}
.env-tap::after {
  /* centred on the seal, which sits 59% down the film and is about 21% of its height */
  content: ""; position: absolute; left: 50%; top: calc(50% + var(--film-h) * 0.094);
  width: max(64px, calc(var(--film-h) * 0.28)); aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(243, 217, 196, 0.55);
  animation: env-ring 2.8s var(--ease) infinite;
  pointer-events: none;
}
@keyframes env-ring {
  0% { transform: translate(-50%, -50%) scale(0.82); opacity: 0; }
  35% { opacity: 0.9; }
  100% { transform: translate(-50%, -50%) scale(1.18); opacity: 0; }
}
.envelope-scene.opening .env-tap, .envelope-scene.playing .env-tap { cursor: default; }
.envelope-scene.opening .env-tap::after, .envelope-scene.playing .env-tap::after { animation: none; opacity: 0; transition: opacity 0.3s ease; }

.tap-hint {
  position: absolute; left: 0; right: 0; bottom: max(44px, calc(env(safe-area-inset-bottom) + 24px));
  width: fit-content; margin: 0 auto; padding: 9px 18px 9px 21px; border-radius: 999px;
  background: rgba(46, 10, 18, 0.55); /* the film's table and envelope are pale, so the hint carries its own ground */
  text-align: center;
  font-size: 11.5px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--sand);
  animation: ja-float 3.2s ease-in-out infinite;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.envelope-scene.opening .tap-hint, .envelope-scene.playing .tap-hint { opacity: 0; }

@keyframes ja-pulse { 0%, 100% { transform: translate(-50%, 0) scale(1); } 50% { transform: translate(-50%, 0) scale(1.045); } }
@keyframes ja-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* ── auth: a cream letter card over the Tuscan envelope backdrop ── */
.auth-scene { padding: 24px; }
.auth-backdrop {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%;
}
.auth-scrim { position: absolute; inset: 0; background: rgba(46, 10, 18, 0.5); }
/* straight after the film: the envelope scene stays underneath on its last frame (the blank card),
   and the sign-in card rises out of it */
.auth-scene.over-film { background: transparent; }
.auth-scene.over-film .auth-backdrop { display: none; }
.auth-scene.over-film .auth-scrim { background: rgba(46, 10, 18, 0.26); animation: auth-scrim-in 1.1s ease both; }
.auth-scene.over-film .auth-card { animation: auth-card-in 1s var(--ease) 0.2s both; }
@keyframes auth-scrim-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes auth-card-in {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
.auth-card {
  position: relative; z-index: 2; width: 100%; max-width: 380px;
  background: var(--cream); border-radius: 20px; padding: 34px 28px 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.auth-logo { height: 66px; width: auto; margin-bottom: 18px; }
.auth-eyebrow {
  font-size: 11px; letter-spacing: 3.5px; text-transform: uppercase;
  color: var(--moss); margin-bottom: 10px;
}
.auth-title {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(20px, 4.8vw, 23px); color: var(--burgundy); line-height: 1.3; margin-bottom: 12px;
}
.auth-example { font-size: 14px; color: var(--ink-soft); line-height: 1.5; margin-bottom: 20px; }
.auth-example-code { font-weight: 600; color: var(--burgundy); letter-spacing: 1px; }
.code-input {
  width: 100%; height: 56px; border-radius: 16px;
  border: 1px solid rgba(110, 20, 35, 0.25);
  background: #FFFFFF; color: var(--ink); text-align: center;
  font-size: 18px; letter-spacing: 3px; text-transform: uppercase; caret-color: var(--burgundy);
  padding: 0 14px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.code-input:focus { border-color: var(--burgundy) !important; box-shadow: 0 0 0 3px rgba(110, 20, 35, 0.08); }
.auth-btn { margin-top: 18px; width: 100%; height: 50px; font-size: 12.5px; letter-spacing: 2.2px; }
.auth-note { margin-top: 20px; font-size: 13px; color: var(--ink-muted); line-height: 1.6; max-width: 260px; }
.legal-links { display: flex; gap: 18px; justify-content: center; margin-top: 16px; font-size: 12.5px; }
.legal-links a { color: var(--ink-muted); text-decoration: underline; text-underline-offset: 3px; padding: 6px 2px; }
.legal-links-dark a { color: rgba(251, 247, 242, 0.78); }
.legal-links a:hover { color: var(--burgundy); }
.legal-links-dark a:hover { color: var(--cream); }
.auth-error { font-size: 12.5px; color: var(--cerise-text); margin-top: 12px; animation: ja-shake 0.45s var(--ease); }
@keyframes ja-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); } 40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); } 80% { transform: translateX(3px); }
}
.demo-chip {
  padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(251, 247, 242, 0.3);
  background: transparent; color: rgba(251, 247, 242, 0.85);
  font-size: 11.5px; letter-spacing: 2px; cursor: pointer;
  transition: background 0.25s ease, transform 0.25s var(--ease);
}
.demo-chip:hover { background: rgba(251, 247, 242, 0.12); transform: translateY(-1px); }

/* fade-up entrance for scene content */
.fadeup { animation: ja-fadeup 0.8s var(--ease) both; }
.fadeup-1 { animation-delay: 0.08s; } .fadeup-2 { animation-delay: 0.18s; }
.fadeup-3 { animation-delay: 0.3s; } .fadeup-4 { animation-delay: 0.42s; }
@keyframes ja-fadeup { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ═══════════ invitation app ═══════════ */
#app { display: none; }
#app.visible { display: block; animation: ja-fadeup 0.9s var(--ease) both; }

.container { max-width: 620px; margin: 0 auto; }

/* ── hero with parallax ───────────────────────────────────── */
.hero { position: relative; height: 100svh; min-height: 640px; max-height: 980px; overflow: hidden; }
.hero-media {
  position: absolute; inset: -12% 0; will-change: transform;
}
.hero-media img,
.hero-media video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: 72% 42%;
}
/* phones get the portrait gazebo photo: a taller media box, anchored to the
   bottom, lifts the couple clear of the names and countdown below them */
@media (max-width: 699px) {
  .hero-media { inset: -26% 0 0; }
  .hero-media img { object-position: 50% 50%; }
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, rgba(30, 15, 20, 0.28) 0%, rgba(30, 15, 20, 0) 24%, rgba(46, 10, 18, 0.12) 40%, rgba(46, 10, 18, 0.58) 58%, rgba(46, 10, 18, 0.72) 100%);
}
/* the hero dissolves into the cream of the next section */
.hero-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 7%; z-index: 3;
  background: linear-gradient(180deg, rgba(251, 247, 242, 0) 0%, rgba(251, 247, 242, 0.5) 60%, var(--cream) 100%);
  pointer-events: none;
}
.hero-content {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  padding: 0 28px clamp(30px, 6.5vh, 60px);
  display: flex; flex-direction: column; align-items: center; text-align: center; color: var(--cream);
}
.hero-content > * { animation: ja-fadeup 1s var(--ease) both; }
.hero-content > *:nth-child(1) { animation-delay: 0.25s; }
.hero-content > *:nth-child(2) { animation-delay: 0.4s; }
.hero-content > *:nth-child(3) { animation-delay: 0.55s; }
.hero-content > *:nth-child(4) { animation-delay: 0.65s; }
.hero-content > *:nth-child(5) { animation-delay: 0.75s; }
.hero-content > *:nth-child(6) { animation-delay: 0.9s; }
.hero-content > *:nth-child(7) { animation-delay: 1.05s; }
.hero-names {
  font-family: var(--script); font-weight: 400;
  font-size: clamp(46px, 11vw, 70px); line-height: 1; margin: 0 0 6px;
  white-space: nowrap;
}
.hero-names .amp { font-size: 0.72em; opacity: 0.85; }
.hero-eyebrow { font-size: 11px; letter-spacing: 4px; text-transform: uppercase; opacity: 0.95; margin-bottom: 9px; }
.hero-rule { width: 34px; height: 1px; background: rgba(251, 247, 242, 0.5); margin-bottom: 9px; }
.hero-date { font-size: 12px; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 3px; }
.hero-venue { font-size: 12px; letter-spacing: 2px; opacity: 0.92; margin-bottom: 13px; }
/* the greeting mirrors the printed invitation: caps, then the names in script */
.hero-greeting { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 16px; }
.hero-greeting-dear {
  font-family: var(--serif); font-style: italic; font-size: clamp(16px, 3.6vw, 19px);
  color: var(--sand); margin-bottom: 4px;
}
.hero-greeting-caps {
  font-size: 10.5px; letter-spacing: 2.6px; text-transform: uppercase; line-height: 1.7;
  color: rgba(251, 247, 242, 0.85); max-width: 340px;
}
.hero-greeting-names {
  font-family: var(--script); font-size: clamp(21px, 5.6vw, 36px); line-height: 1.1;
  color: var(--sand); margin: 2px -14px; padding: 0 4px;
}
.countdown { display: flex; gap: clamp(22px, 5vw, 34px); }
.cd-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cd-num {
  font-family: var(--serif); font-size: clamp(21px, 4.5vw, 26px);
  font-variant-numeric: tabular-nums; display: inline-block;
}
.cd-num.tick { animation: cd-tick 0.5s var(--ease); }
@keyframes cd-tick {
  0% { opacity: 0.2; transform: translateY(-7px); }
  100% { opacity: 1; transform: translateY(0); }
}
.cd-label { font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase; opacity: 0.9; }
.hero-scroll-cue {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  width: 1px; height: 0; opacity: 0;
}

/* ── sections ─────────────────────────────────────────────── */
.section { padding: 64px 24px 20px; }
.section-head { text-align: center; margin-bottom: 28px; }
/* signpost to the RSVP section at the foot of the page */
.section-note {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 6px; padding: 13px 8px;
  font-size: 14px; font-weight: 600; color: var(--burgundy);
  text-decoration: underline; text-underline-offset: 4px;
  text-decoration-thickness: 1px; text-decoration-color: rgba(110, 20, 35, 0.45);
  transition: text-decoration-color 0.25s var(--ease);
}
.section-note:hover { text-decoration-color: var(--burgundy); }
.section-note svg { transition: transform 0.35s var(--ease); }
.section-note:hover svg { transform: translateY(2px); }

/* events */
.events-list { display: flex; flex-direction: column; gap: 16px; }
.event-card {
  background: #FFFFFF; border: 1px solid rgba(110, 20, 35, 0.09); border-radius: 20px;
  padding: 26px 24px; box-shadow: var(--card-shadow);
  display: flex; flex-direction: column;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
  position: relative; overflow: hidden;
}
.event-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(75, 91, 52, 0.13); }
.event-card .corner-sprig { position: absolute; top: -6px; right: -8px; opacity: 0.5; pointer-events: none; }
.event-badge {
  align-self: flex-start; font-size: 10px; letter-spacing: 2.2px; text-transform: uppercase;
  color: var(--cerise-text); background: rgba(219, 62, 140, 0.09); border-radius: 999px;
  padding: 5px 12px; margin-bottom: 12px;
}
.event-name { font-family: var(--serif); font-weight: 500; font-size: 24px; color: var(--ink); margin-bottom: 6px; }
.event-when { font-size: 12.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--burgundy); margin-bottom: 14px; }
.event-where { font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; margin-bottom: 4px; }
.event-dress { font-size: 13px; color: var(--ink-muted); margin-bottom: 12px; }
.event-note {
  font-size: 13.5px; color: var(--ink-soft); line-height: 1.6;
  border-top: 1px solid rgba(110, 20, 35, 0.08); padding-top: 12px; margin-bottom: 16px;
}
/* buttons sit side by side where there is room and stack on phones, so the
   label never runs edge to edge */
.event-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.event-actions .btn { flex: 1 1 180px; height: 46px; padding: 0 16px; white-space: nowrap; letter-spacing: 1.4px; }

/* timeline */
.tl-row { display: grid; grid-template-columns: 66px 20px 1fr; }
.tl-time { font-family: var(--serif); font-size: 14.5px; white-space: nowrap; color: var(--burgundy); padding-top: 1px; text-align: right; padding-right: 6px; }
.tl-spine { display: flex; flex-direction: column; align-items: center; }
.tl-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--moss);
  margin-top: 5px; flex-shrink: 0;
  transition: transform 0.5s var(--ease); transform: scale(0);
}
.tl-row.in .tl-dot { transform: scale(1); transition-delay: calc(var(--d, 0s) + 0.15s); }
.tl-line { width: 1px; flex: 1; background: rgba(75, 91, 52, 0.3); transform-origin: top; transform: scaleY(0); transition: transform 0.8s var(--ease); }
.tl-row.in .tl-line { transform: scaleY(1); transition-delay: calc(var(--d, 0s) + 0.3s); }
.tl-row:last-child .tl-line { background: transparent; }
.tl-body { padding: 0 0 26px 12px; }
.tl-title { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.tl-detail { font-size: 13px; color: var(--ink-muted); line-height: 1.5; }

/* story */
.story-section { background: var(--moss); color: #F4F1E8; padding: 64px 28px 68px; position: relative; overflow: hidden; }
.story-section .eyebrow { color: var(--moss-soft); }
.story-title { font-family: var(--script); font-weight: 400; font-size: clamp(46px, 10vw, 60px); line-height: 1; color: #F4F1E8; margin: 0; }
.story-photo { width: 100%; height: clamp(210px, 40vw, 300px); object-fit: cover; border-radius: 18px; display: block; }
.story-photo-wide { object-position: 60% 45%; margin-bottom: 14px; }
.story-photo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 30px; }
.story-photo-pair img {
  width: 100%; height: clamp(150px, 28vw, 210px); object-fit: cover; border-radius: 14px; display: block;
}
.story-milestone { display: flex; flex-direction: column; gap: 5px; }
.story-year-row { display: flex; align-items: baseline; gap: 12px; }
.story-year { font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--sand); }
.story-rule { flex: 1; height: 1px; background: rgba(244, 241, 232, 0.22); transform-origin: left; transform: scaleX(0); transition: transform 1s var(--ease); }
.story-milestone.in .story-rule { transform: scaleX(1); transition-delay: calc(var(--d, 0s) + 0.2s); }
.story-mtitle { font-size: 14.5px; font-weight: 600; color: #FFFFFF; }
.story-mtext { font-size: 13.5px; line-height: 1.65; color: rgba(244, 241, 232, 0.82); }

/* dress code: transparent watercolour, so the figures sit directly on the
   page cream with no visible box */
.dress-illustration {
  display: block; width: 100%; max-width: 600px; margin: 0 auto 6px;
}
.dress-caption { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--cerise-text); margin: 14px 0 18px; }
.dress-note { font-size: 14px; line-height: 1.7; color: var(--ink-soft); max-width: 340px; margin: 0 auto 14px; }
.dress-avoid { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--burgundy); }

/* venue */
.venue-photo { width: 100%; height: auto; border-radius: 18px; margin-bottom: 18px; display: block; }
.venue-address { font-size: 13.5px; color: var(--ink-muted); margin-top: 8px; }
.venue-info-row {
  display: flex; flex-direction: column; gap: 3px;
  border-bottom: 1px solid rgba(110, 20, 35, 0.08); padding-bottom: 13px;
}
.venue-info-label { font-size: 10.5px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--moss); }
.venue-info-text { font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); }
.venue-map { width: 100%; height: auto; border-radius: 14px; margin-top: 8px; display: block; }
.venue-info-list { margin: 4px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.75; color: var(--ink-soft); }

/* faq */
.faq-item { border-bottom: 1px solid rgba(110, 20, 35, 0.1); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 2px; background: none; border: none; cursor: pointer; text-align: left;
}
.faq-q span:first-child { font-size: 15px; font-weight: 500; color: var(--ink); line-height: 1.45; }
.faq-chev { display: flex; flex-shrink: 0; transition: transform 0.35s var(--ease); }
.faq-item.open .faq-chev { transform: rotate(180deg); }
.faq-a-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s var(--ease); }
.faq-item.open .faq-a-wrap { grid-template-rows: 1fr; }
.faq-a-inner { overflow: hidden; }
.faq-a {
  font-size: 13.5px; line-height: 1.7; color: var(--ink-soft); padding: 0 2px 18px;
  opacity: 0; transform: translateY(6px); transition: opacity 0.35s ease 0.05s, transform 0.35s var(--ease) 0.05s;
}
.faq-item.open .faq-a { opacity: 1; transform: none; }

/* rsvp cta */
.rsvp-cta {
  background: linear-gradient(175deg, #6E1423 0%, #4E0D19 100%);
  padding: 64px 30px 64px; text-align: center; color: var(--cream);
  position: relative; overflow: hidden;
}
.rsvp-cta .eyebrow { color: var(--sand); }
.rsvp-cta-title {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(30px, 6vw, 38px); line-height: 1.25; margin-bottom: 14px;
}
.rsvp-cta-sub { font-size: 13.5px; color: rgba(251, 247, 242, 0.85); line-height: 1.6; margin-bottom: 26px; }
.rsvp-cta .btn { width: 100%; height: 54px; }
.rsvp-footer { margin-top: 44px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.footer-logo { height: 48px; width: auto; opacity: 0.92; }

/* ── music toggle ─────────────────────────────────────────── */
.music-btn {
  position: fixed; right: 16px; bottom: 20px; z-index: 35;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(110, 20, 35, 0.2);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: none; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 6px 16px rgba(42, 21, 24, 0.18);
  transition: background 0.3s ease, transform 0.3s var(--ease);
}
.music-btn:hover { transform: translateY(-2px); }
.music-btn.visible { display: flex; }
.music-btn.on { background: var(--burgundy); }
.music-btn.on::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 1px solid rgba(110, 20, 35, 0.35);
  animation: music-ring 2.4s ease-out infinite;
}
@keyframes music-ring {
  0% { transform: scale(0.88); opacity: 0.8; }
  100% { transform: scale(1.32); opacity: 0; }
}
.music-btn svg path, .music-btn svg circle { stroke: var(--burgundy); }
.music-btn svg circle { fill: var(--burgundy); stroke: none; }
.music-btn.on svg path { stroke: var(--cream); }
.music-btn.on svg circle { fill: var(--cream); }

/* ═══════════ RSVP overlay ═══════════ */
.rsvp-overlay {
  position: fixed; inset: 0; z-index: 50; background: var(--cream);
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.55s var(--ease);
}
.rsvp-overlay.open { transform: translateY(0); }
.rsvp-panel { max-width: 620px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.rsvp-header { padding: max(24px, env(safe-area-inset-top)) 24px 14px; display: flex; align-items: center; justify-content: space-between; }
.rsvp-title { font-family: var(--serif); font-weight: 500; font-size: 24px; color: var(--burgundy); margin: 0; outline: none; }
.rsvp-deadline { font-size: 12px; color: var(--ink-muted); margin-top: 3px; }
.rsvp-close {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(110, 20, 35, 0.25);
  background: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s var(--ease), background 0.25s ease;
}
.rsvp-close:hover { background: rgba(110, 20, 35, 0.06); transform: rotate(90deg); }
.rsvp-progress-track { height: 2px; background: rgba(110, 20, 35, 0.1); margin: 0 24px; border-radius: 2px; overflow: hidden; }
.rsvp-progress {
  height: 100%; background: var(--burgundy); border-radius: 2px;
  transform-origin: left; transition: transform 0.5s var(--ease);
}
.rsvp-body { flex: 1; overflow-y: auto; padding: 26px 24px 20px; }
.rsvp-step { animation: ja-fadeup 0.45s var(--ease) both; }
.rsvp-step-title { font-family: var(--serif); font-style: italic; font-size: 23px; color: var(--ink); margin-bottom: 22px; }
.rsvp-step-sub { font-size: 13.5px; color: var(--ink-muted); line-height: 1.6; margin: -14px 0 22px; }

.member-card {
  background: #FFFFFF; border: 1px solid rgba(110, 20, 35, 0.09); border-radius: 16px;
  padding: 16px; margin-bottom: 14px;
}
.member-name { font-size: 14.5px; font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.seg-row { display: flex; gap: 8px; }
.seg-btn {
  flex: 1; height: 46px; border-radius: 999px; cursor: pointer;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.6px;
  border: 1px solid rgba(110, 20, 35, 0.22); background: transparent; color: var(--burgundy);
  transition: background 0.25s ease, color 0.25s ease, transform 0.3s var(--ease), border-color 0.25s ease;
}
.seg-btn:hover { transform: translateY(-1px); }
.seg-btn.sel { border-color: transparent; color: var(--cream); animation: seg-pop 0.35s var(--ease); }
.seg-btn.sel-yes { background: var(--moss); }
.seg-btn.sel-no { background: var(--burgundy); }
@keyframes seg-pop { 0% { transform: scale(0.96); } 60% { transform: scale(1.03); } 100% { transform: scale(1); } }

.rsvp-mode-link {
  display: block; margin: 6px auto 0; padding: 10px 4px;
  background: none; border: none; cursor: pointer;
  font-family: var(--sans); font-size: 13px; color: var(--burgundy);
  text-decoration: underline; text-underline-offset: 3px;
  transition: opacity 0.25s ease;
}
.rsvp-mode-link:hover { opacity: 0.75; }
.event-answer-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px 12px;
  padding: 7px 0; flex-wrap: wrap;
}
.event-answer-row + .event-answer-row { border-top: 1px solid rgba(110, 20, 35, 0.07); }
.event-answer-label { font-size: 13.5px; color: var(--ink-soft); flex-shrink: 0; }
.seg-row-compact { flex: 0 0 auto; }
.seg-row-compact .seg-btn { flex: none; height: 40px; padding: 0 14px; font-size: 11.5px; }

.field-label {
  display: block; font-size: 11.5px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--moss); margin-bottom: 8px;
}
/* per-guest contact details: email and mobile side by side, stacked on
   narrow phones; at least one is needed somewhere in the party */
.contact-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
@media (max-width: 420px) { .contact-fields { grid-template-columns: 1fr; } }
.field-label-inline { margin-bottom: 6px; }
.text-input-sm { height: 46px; font-size: 16px; } /* 16px stops iOS zooming into the field */
.contact-hint { font-size: 13px; line-height: 1.55; color: var(--ink-muted); margin: 2px 0 10px; }
.contact-hint.warn { color: var(--cerise-text); }
.text-input {
  width: 100%; height: 50px; border-radius: 14px; border: 1px solid rgba(110, 20, 35, 0.2);
  background: #FFFFFF; padding: 0 16px; font-size: 16px; color: var(--ink);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.text-area {
  width: 100%; border-radius: 14px; border: 1px solid rgba(110, 20, 35, 0.2);
  background: #FFFFFF; padding: 14px 16px; font-size: 16px; line-height: 1.6;
  color: var(--ink); resize: none; margin-bottom: 22px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.text-input:focus, .text-area:focus { box-shadow: 0 0 0 3px rgba(110, 20, 35, 0.08); }

.review-card {
  background: #FFFFFF; border: 1px solid rgba(110, 20, 35, 0.09); border-radius: 18px;
  padding: 20px; display: flex; flex-direction: column; gap: 12px;
}
.review-row {
  display: flex; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid rgba(110, 20, 35, 0.07); padding-bottom: 11px;
}
.review-label { font-size: 12.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-muted); flex-shrink: 0; }
.review-value { font-size: 13.5px; color: var(--ink); text-align: right; line-height: 1.5; }
.review-note { font-size: 13px; color: var(--ink-muted); line-height: 1.6; }

.rsvp-footer-bar {
  padding: 14px 24px max(28px, env(safe-area-inset-bottom)); display: flex; gap: 10px;
  border-top: 1px solid rgba(110, 20, 35, 0.08); background: var(--cream);
}
.rsvp-back {
  flex: 1; height: 52px; border-radius: 999px; border: 1px solid rgba(110, 20, 35, 0.3);
  background: none; color: var(--burgundy); font-size: 12px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase; cursor: pointer;
  transition: background 0.25s ease;
}
.rsvp-back:hover { background: rgba(110, 20, 35, 0.05); }
.rsvp-next {
  flex: 2; height: 52px; border-radius: 999px; border: none;
  background: var(--burgundy); color: var(--cream); font-size: 12px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase; cursor: pointer;
  transition: background 0.3s ease, transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.rsvp-next:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(78, 13, 25, 0.25); }
.rsvp-next:disabled { background: rgba(110, 20, 35, 0.25); cursor: default; }

/* ═══════════ thank you ═══════════ */
.thanks-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; max-width: 360px; }
.thanks-title {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(32px, 6.5vw, 40px); line-height: 1.25; margin-bottom: 16px;
}
.thanks-sub { font-size: 14px; line-height: 1.65; color: rgba(251, 247, 242, 0.8); max-width: 280px; margin-bottom: 34px; }
.thanks-btn-ghost {
  width: 100%; height: 52px; border-radius: 999px; border: 1px solid rgba(251, 247, 242, 0.4);
  background: none; color: var(--cream); font-size: 12px; font-weight: 600;
  letter-spacing: 2.2px; text-transform: uppercase; cursor: pointer;
  transition: background 0.25s ease;
}
.thanks-btn-ghost:hover { background: rgba(251, 247, 242, 0.1); }

.petals { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.petal { position: absolute; top: -30px; border-radius: 60% 40% 55% 45%; opacity: 0.85; animation: ja-fall linear infinite; }
@keyframes ja-fall {
  0% { transform: translateY(-40px) rotate(0deg) translateX(0); opacity: 0; }
  10% { opacity: 0.9; }
  100% { transform: translateY(110vh) rotate(300deg) translateX(40px); opacity: 0; }
}

/* ── desktop refinements ──────────────────────────────────── */
@media (min-width: 700px) {
  .section { padding: 84px 32px 28px; }
  .story-section { padding: 84px 32px 88px; }
  .rsvp-cta { padding: 84px 32px; }
  .event-actions .btn { height: 46px; }
}

/* ── reduced motion: everything jumps to its end state ────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal-scale { opacity: 1; transform: none; }
  .tl-dot { transform: scale(1); }
  .tl-line { transform: scaleY(1); }
  .story-rule { transform: scaleX(1); }
  .hero-media img { transform: scale(1.02); animation: none; }
  .petals { display: none; }
  .sprig-draw path { stroke-dashoffset: 0 !important; animation: none !important; }
}
