/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V5
 * genre: playful · theme: custom "Nashik at harvest" · macrostructure: scrolling invitation (phone-column storybook)
 * motion: on; the user asked for the reference's interactivity (curtain opener, photos that develop on a string, self-drawing frames).
 * audit fixes applied 2026-10-17: self-hosted fonts, motion trimmed to the set pieces, control contrast, type size, print styles.
 */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--text-base);
  line-height: 1.5;
  /* Cormorant defaults to old-style figures, which sit a size smaller than the caps beside them */
  font-variant-numeric: lining-nums;
  color: var(--color-ink);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}
html.is-closed body { overflow: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ol, ul, figure, address { margin: 0; padding: 0; }
ol, ul { list-style: none; }
address { font-style: normal; }
a { color: inherit; }
b { font-weight: 600; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.nowrap { white-space: nowrap; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Painted artwork sits on the same ivory as the page; darken melts its ground away. */
.hero__painting, .event__art {
  mix-blend-mode: darken;
}

/* ---------- Shared surfaces ---------- */
:root {
  /* One shamiana fabric: the desktop wall behind the invite (the curtain flaps use a larger-scale cut) */
  --stripes: repeating-linear-gradient(90deg,
    var(--color-stripe-a) 0 24px,
    var(--color-stripe-b) 24px 33px,
    var(--color-stripe-c) 33px 35px,
    var(--color-stripe-b) 35px 43px,
    var(--color-stripe-d) 43px 65px,
    var(--color-stripe-b) 65px 72px,
    var(--color-stripe-c) 72px 73px,
    var(--color-stripe-b) 73px 82px);
  --stripes-mirror: repeating-linear-gradient(270deg,
    var(--color-stripe-a) 0 24px,
    var(--color-stripe-b) 24px 33px,
    var(--color-stripe-c) 33px 35px,
    var(--color-stripe-b) 35px 43px,
    var(--color-stripe-d) 43px 65px,
    var(--color-stripe-b) 65px 72px,
    var(--color-stripe-c) 72px 73px,
    var(--color-stripe-b) 73px 82px);
}
.invite {
  container-type: inline-size;
  position: relative;
  width: 100%;
  max-width: var(--invite-width);
  margin-inline: auto;
  /* The tent wall: every section hangs on it as a card of the same width */
  background-color: var(--color-stripe-b);
  /* mirrored halves so both gutters show the same stripe */
  background-image: var(--stripes), var(--stripes-mirror);
  background-size: 50% 100%, 50% 100%;
  background-position: left top, right top;
  background-repeat: no-repeat;
  text-align: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-lg);
  padding-top: var(--space-lg);
}

/* One card for every section: same width, same paper, same tied cord */
.card {
  position: relative;
  margin-inline: var(--gutter);
  padding: var(--space-2xl) var(--space-lg);
  background: var(--color-paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.card[data-rope] { --card-px: 2.5rem; padding-inline: var(--card-px); }
.card__inner { position: relative; z-index: 1; display: grid; justify-items: center; gap: var(--space-xs); }

/* Desktop: the same tent wall runs the full width of the screen behind the column. */
@media (min-width: 40rem) {
  body { background-color: var(--color-stripe-b); }
  /* A fixed layer instead of background-attachment: fixed, so the stripes never repaint on scroll */
  body::before {
    content: ""; position: fixed; inset: 0; z-index: -1;
    background-color: var(--color-stripe-b);
    background-image: linear-gradient(oklch(97% 0.015 85 / 0.45), oklch(97% 0.015 85 / 0.45)), var(--stripes);
    pointer-events: none;
  }
  .invite { background: none; }
  .card, .finale { box-shadow: 0 1px 0 oklch(70% 0.06 70 / 0.25), 0 24px 60px -24px oklch(27% 0.05 340 / 0.35); }
}

/* ---------- Type voices ---------- */
.script-title {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(2.75rem, 12cqi, 3.25rem);
  line-height: 1.05;
  color: var(--color-grape);
  padding-inline: 0.15em;
  text-wrap: balance;
}
.gold-script {
  font-family: var(--font-script);
  font-size: clamp(2.25rem, 10.5cqi, 2.75rem);
  line-height: 1.1;
  color: var(--color-gold);
  text-wrap: balance;
}
.caps-title {
  font-weight: 600;
  font-size: var(--text-lg);
  line-height: 1.2;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-grape);
  text-wrap: balance;
}
.caps-title__sub {
  display: block; margin-top: var(--space-2xs);
  font-size: var(--text-sm); letter-spacing: var(--track-wide); color: var(--color-gold);
}
.caps-sub {
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--color-ink-2);
  text-wrap: balance;
}

/* ---------- Pills ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  min-height: 48px; padding: 0 var(--space-lg);
  border: 1.5px solid var(--color-grape);
  border-radius: var(--radius-pill);
  background: var(--color-grape);
  color: var(--color-on-dark);
  font: 600 var(--text-sm) / 1 var(--font-serif);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
}
.pill svg { flex: none; width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pill:hover { background: var(--color-grape-2); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.pill:active { transform: translateY(0); box-shadow: none; }
.pill:disabled { opacity: 0.6; cursor: progress; transform: none; }
.pill--ghost { background: transparent; color: var(--color-grape); }
.pill--ghost:hover { background: var(--color-card); }
/* Outline pill for dark backgrounds (the finale) */
.pill--light { background: transparent; border-color: var(--color-on-dark); color: var(--color-on-dark); text-shadow: none; }
.pill--light:hover { background: var(--color-on-dark); color: var(--color-grape); }
.pill--wide { width: 100%; }
.pill[data-state="loading"] .btn__label::after { content: "…"; }

/* ============================================================
   Opener · the shamiana curtain
   ============================================================ */
.opener { display: none; }
.js .opener {
  display: block;
  position: fixed; inset: 0;
  z-index: var(--z-opener);
  pointer-events: none;
}
html.is-closed .opener { pointer-events: auto; }
.opener__flap {
  position: absolute; top: 0; bottom: 0; width: 50.5%;
  background-color: var(--color-stripe-b);
  background-image: repeating-linear-gradient(90deg,
    var(--color-stripe-a) 0 26px,
    var(--color-stripe-b) 26px 36px,
    var(--color-stripe-c) 36px 38px,
    var(--color-stripe-b) 38px 47px,
    var(--color-stripe-d) 47px 70px,
    var(--color-stripe-b) 70px 78px);
  transition: transform 1500ms var(--ease-in-out);
  will-change: transform;
}
.opener__flap::after {          /* fabric folds */
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 38px, var(--color-scrim) 38px 39px, transparent 39px 78px);
  opacity: 0.12;
}
.opener__flap--l { left: 0; transform-origin: left top; }
.opener__flap--r { right: 0; transform-origin: right top; }
html:not(.is-closed) .opener__flap--l { transform: translateX(-104%) skewX(4deg); }
html:not(.is-closed) .opener__flap--r { transform: translateX(104%) skewX(-4deg); }

.opener__stage {
  position: absolute; left: 50%; top: 50%;
  translate: -50% -50%;
  width: min(20rem, 86vw); aspect-ratio: 1;
  display: grid; place-content: center; justify-items: center; gap: var(--space-sm);
  border: 0; border-radius: 50%;
  background: var(--color-paper);
  box-shadow: var(--shadow-soft), inset 0 0 0 12px var(--color-paper), inset 0 0 0 13px var(--color-gold);
  color: var(--color-grape);
  font: inherit;
  cursor: pointer;
  transition: opacity 600ms var(--ease-out), scale 900ms var(--ease-in-out);
}
.opener__stage:hover { scale: 1.03; }
html:not(.is-closed) .opener__stage { opacity: 0; scale: 0.6; }
.opener .signature { width: min(17rem, 76vw); margin-top: var(--space-sm); }  /* script reads top-heavy; sit it a touch low */
.opener .signature__names { font-size: min(13cqi, 3.5rem); }
@media (min-width: 40rem) { .opener__stage { width: 25rem; } .opener .signature { width: 21rem; } }
.opener__hint {
  position: absolute; left: 50%; top: calc(100% + var(--space-lg)); translate: -50% 0;
  padding: var(--space-2xs) var(--space-md);
  border-radius: var(--radius-pill);
  background: var(--color-card);
  border: 1px solid var(--color-gold);
  box-shadow: var(--shadow-card);
  font-weight: 600; font-size: var(--text-sm); letter-spacing: var(--track-caps); text-transform: uppercase;
  color: var(--color-grape);
  white-space: nowrap;
  opacity: 0; animation: fade-up 800ms var(--ease-out) 2600ms forwards, bob 2.4s var(--ease-in-out) 3400ms infinite;
}

/* ---------- Signature logo · the names written in one hand, then a single gold flourish ---------- */
.signature { display: grid; justify-items: center; width: 100%; container-type: inline-size; }
.signature__names {
  display: block; padding: 0.1em 0.3em;
  font-family: var(--font-script); font-weight: 400; font-size: min(12.5cqi, 3.75rem); line-height: 1.15;
  letter-spacing: 0; text-transform: none; white-space: nowrap;
  color: var(--color-grape);
}
.signature__amp { color: var(--color-gold); }
.signature__flourish { display: block; width: 70%; height: auto; margin-top: -3cqi; overflow: visible; }
.signature__swash { fill: none; stroke: var(--color-gold); stroke-width: 1.4; stroke-linecap: round; }
.signature__date {
  display: block; margin-top: var(--space-sm);
  font-weight: 600; font-size: var(--text-xs); letter-spacing: var(--track-caps); text-transform: uppercase;
  color: var(--color-muted); white-space: nowrap;
}

/* Ink runs left to right behind a soft edge, the flourish follows the pen, then the date settles in */
.js .signature__names {
  -webkit-mask-image: linear-gradient(to right, black 45%, transparent 55%);
          mask-image: linear-gradient(to right, black 45%, transparent 55%);
  -webkit-mask-size: 220% 100%; mask-size: 220% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: 100% 0; mask-position: 100% 0;
}
.js .signature__swash { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; } /* hidden too, or the round cap shows as a dot */
.js .signature__date { opacity: 0; }
.hero .signature { --sig-at: 600ms; }
.js .opener .signature__names,
html.js:not(.is-closed) .hero .signature__names { animation: ink 2000ms var(--ease-in-out) var(--sig-at, 250ms) forwards; }
.js .opener .signature__swash,
html.js:not(.is-closed) .hero .signature__swash {
  animation: draw 900ms var(--ease-out) calc(var(--sig-at, 250ms) + 1700ms) forwards, fade-in 1ms linear calc(var(--sig-at, 250ms) + 1700ms) forwards;
}
.js .opener .signature__date { animation: fade-up 800ms var(--ease-out) calc(var(--sig-at, 250ms) + 2200ms) forwards; }

/* ---------- Floating sound toggle ---------- */
.sound {
  position: fixed;
  /* 50% of a fixed element's containing block is half the viewport without the scrollbar */
  right: max(var(--space-md), calc(50% - var(--invite-width) / 2 + var(--space-md)));
  bottom: max(var(--space-md), env(safe-area-inset-bottom));
  z-index: var(--z-float);
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--color-gold);
  background: var(--color-card); color: var(--color-grape);
  box-shadow: var(--shadow-card);
  cursor: pointer;
}
.sound svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sound .sound__on { display: none; }
.sound[aria-pressed="true"] .sound__on { display: block; }
.sound[aria-pressed="true"] .sound__off { display: none; }
.sound[aria-pressed="true"] { animation: pulse-ring 2.4s var(--ease-out) infinite; }

/* ---------- Sparkle bursts ---------- */
.sparkles { position: fixed; inset: 0; pointer-events: none; z-index: var(--z-sparkle); overflow: hidden; }
.spark {
  position: absolute; left: 0; top: 0;
  width: var(--s, 10px); height: var(--s, 10px);
  background: var(--color-gold);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}
.spark:nth-child(3n) { background: var(--color-marigold); }
.spark:nth-child(5n) { background: var(--color-heart); clip-path: circle(35%); }

/* ============================================================
   Hero
   ============================================================ */
.hero { padding-top: var(--space-xl); padding-bottom: 0; }
.hero .signature__names { font-size: min(14cqi, 4rem); }
.hero__top { padding-inline: var(--gutter); display: grid; justify-items: center; gap: var(--space-sm); position: relative; z-index: 1; }


.hero__married { font-style: italic; font-size: var(--text-md); color: var(--color-ink-2); }
.hero__meta time, .hero__place { display: block; white-space: nowrap; }
.hero__place { margin-top: var(--space-2xs); color: var(--color-gold); letter-spacing: var(--track-wide); }
.hero__meta { font-weight: 600; font-size: var(--text-xs); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--color-ink-2); line-height: 1.6; text-wrap: balance; }

.hero__art {
  position: relative; overflow: clip;
  margin: calc(-1 * var(--space-3xl)) calc(-1 * var(--space-lg)) 0;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.hero__painting {
  width: 100%; height: auto;
  aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 100%;
  transform: translate3d(0, var(--py, 0px), 0) scale(1.08);
  transform-origin: center top;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, black 18%);
          mask-image: linear-gradient(to bottom, transparent 0, black 18%);
}
/* A paper disc with a grape chevron: readable on any part of the pale painting */
.hero__scroll {
  position: absolute; left: 50%; bottom: var(--space-lg); translate: -50% 0;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--color-paper);
  box-shadow: var(--shadow-card);
  color: var(--color-grape);
  text-decoration: none;
}
.hero__scroll svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; animation: bob 1.8s var(--ease-in-out) infinite; }

/* Hero entrance: plays once the curtain parts */
.js .hero__top > :not(.signature) { opacity: 0; }
html.js:not(.is-closed) .hero__married { animation: fade-up 900ms var(--ease-out) 1500ms forwards; }
html.js:not(.is-closed) .hero__meta { animation: fade-up 900ms var(--ease-out) 1750ms forwards; }

/* ============================================================
   Blessing + two photos pegged on a string
   ============================================================ */
/* No cord here: a plain block on the sheet, about a screen tall on phones.
   Narrower side padding gives the prints more room; --card-pad also tells the string how far to reach. */
.couple {
  --card-pad: var(--space-md);
  display: grid; align-content: center;
  padding: var(--space-2xl) var(--card-pad) var(--space-xl);
}
/* About a screen tall on phones only; on wider screens the card hugs its content */
.blessing { font-style: italic; font-size: var(--text-md); line-height: 1.45; color: var(--color-ink-2); max-width: 22rem; margin-bottom: var(--space-md); }

/* Both prints share one size; the string runs edge to edge across the card */
.photo-line {
  position: relative; width: 100%; padding-bottom: var(--space-md);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: var(--space-lg) var(--space-md);
}
.photo-line__string {
  position: absolute; left: calc(-1 * var(--card-pad, var(--space-lg))); top: 0;
  width: calc(100% + 2 * var(--card-pad, var(--space-lg))); height: 3.5rem; max-width: none; overflow: visible;
}
.photo-line__string path { fill: none; stroke: var(--color-string); stroke-width: 1.4; vector-effect: non-scaling-stroke; }

/* Each print's top edge sits where the sagging string crosses it, so the pegs clip onto the line */
.polaroid {
  container-type: inline-size;
  position: relative;
  padding: 3.15cqi 3.15cqi 0;
  background: var(--color-card);
  box-shadow: var(--shadow-card);
}
.polaroid--bride { margin-top: 1.9rem; rotate: -1.5deg; }
.polaroid--groom { margin-top: 2.7rem; rotate: 1.5deg; }
.polaroid::before {                /* wooden peg, centred on the string */
  content: ""; position: absolute; left: 50%; top: -0.875rem; translate: -50% 0; z-index: 1;
  width: 0.6rem; height: 1.75rem; border-radius: var(--radius-xs);
  background: var(--color-peg); box-shadow: inset 0 0 0 1px var(--color-peg-edge);
}
.polaroid__photo { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--color-paper-2); }
.polaroid__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.polaroid__cap {
  padding: 3cqi 0 3.6cqi; text-align: center;
  font-family: var(--font-script); font-size: clamp(1.25rem, 20cqi, 2.6rem); line-height: 1.1; color: var(--color-grape);
}
/* The line about each of them: second grid row, so both sit level under the prints */
.photo-line__note { padding-inline: var(--space-2xs); font-style: italic; font-size: clamp(0.9375rem, 4.4cqi, var(--text-base)); line-height: 1.4; color: var(--color-ink-2); text-wrap: balance; }

/* Scrolling to them: the string draws, the photos drop onto it, then develop */
/* dash lengths are screen px, since the stroke doesn't scale */
.js [data-reveal="hang"] .photo-line__string path { stroke-dasharray: 800; stroke-dashoffset: 800; transition: stroke-dashoffset 1400ms var(--ease-in-out); }
.js [data-reveal="hang"].is-in .photo-line__string path { stroke-dashoffset: 0; }
.js [data-reveal="hang"] .polaroid { transition: opacity 600ms var(--ease-out), translate 1100ms var(--ease-spring); }
.js [data-reveal="hang"]:not(.is-in) .polaroid { opacity: 0; translate: 0 -40%; }
.js [data-reveal="hang"].is-in .polaroid { transition-delay: 700ms; }
.js [data-reveal="hang"].is-in .polaroid--groom { transition-delay: 950ms; }
.js [data-reveal="hang"] .polaroid__photo img { filter: sepia(1) brightness(1.5) contrast(0.55) blur(6px); transition: filter 2800ms var(--ease-out) 1500ms; }
.js [data-reveal="hang"] .polaroid--groom .polaroid__photo img { transition-delay: 1800ms; }
.js [data-reveal="hang"].is-in .polaroid__photo img { filter: none; }
.js [data-reveal="hang"] .photo-line__note { transition: opacity 900ms var(--ease-out) 2600ms; }
.js [data-reveal="hang"]:not(.is-in) .photo-line__note { opacity: 0; }

/* ============================================================
   Schedule · rope frame on the sheet
   ============================================================ */
.rope {
  position: absolute; left: -12px; top: -12px;
  width: calc(100% + 24px); height: calc(100% + 24px); max-width: none;
  overflow: visible; pointer-events: none; z-index: 2;
}
.rope__path { fill: none; stroke: var(--color-gold); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.js .rope__path { stroke-dasharray: var(--len, 6000); stroke-dashoffset: var(--len, 6000); }
.js .card.is-drawn .rope__path { stroke-dashoffset: 0; transition: stroke-dashoffset 3200ms var(--ease-in-out); }

.events { display: grid; gap: var(--space-xl); margin-top: var(--space-xl); width: 100%; }
.event { position: relative; display: grid; justify-items: center; gap: var(--space-2xs); }
.event + .event { padding-top: var(--space-xl); }
.event + .event::before {          /* dotted gold divider */
  content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 4px;
  background: radial-gradient(circle, var(--color-gold) 1.5px, transparent 2px) 0 0 / 12px 4px repeat-x;
}
.event__name { font-family: var(--font-script); font-weight: 400; font-size: clamp(2.4rem, 11cqi, 3rem); line-height: 1.1; color: var(--color-gold); }
.event__time { text-wrap: balance; font-weight: 600; font-size: var(--text-xs); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--color-grape); }
.event__note { font-style: italic; color: var(--color-ink-2); max-width: 19rem; }
.event__art { width: 62%; max-width: 13rem; margin-top: var(--space-xs); }

/* Pheras: the hanging garlands sway slowly, as if in a light breeze. Each strand pivots from its top. */
.sway { position: relative; aspect-ratio: 1; }
.sway > img { display: block; width: 100%; height: auto; }
.sway > .sway__strand {
  position: absolute; height: auto; transform-origin: 50% 0;
  animation: sway 6.5s var(--ease-in-out) var(--d, 0s) infinite alternate both;
}
@keyframes sway { from { rotate: -3deg; } to { rotate: 3deg; } }

/* "18th": the ordinal sits small and raised, in lower case even in all-caps lines */
.th { font-size: 0.6em; line-height: 0; vertical-align: 0.6em; text-transform: lowercase; letter-spacing: 0.04em; }

/* ============================================================
   Venue & getting there · pick a route, ride it to the hotel
   ============================================================ */
@property --spread { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
.venue { display: grid; justify-items: center; gap: var(--space-sm); }
.venue__travel { width: 100%; margin-top: var(--space-md); display: grid; justify-items: center; gap: var(--space-lg); }

/* Fine print under the venue buttons: a quiet Kumbh Mela heads-up */
.travel-fine {
  margin: var(--space-md) 0 0 -2.75rem; padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--color-rule); border-radius: var(--radius-sm);
  text-align: justify; text-align-last: center; font-style: italic; font-size: var(--text-xs); line-height: 1.5; color: var(--color-muted);
}
.travel-fine span { color: var(--color-gold); font-style: normal; }

.modes { display: none; }
.js .modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-xs); width: 100%; }
/* Phones: keep a clear gap between the tabs and let the label use the tab's width */
@media (max-width: 25rem) {
  .js .modes { gap: var(--space-xs); }
  .modes .mode { padding: var(--space-sm) var(--space-2xs) var(--space-sm) calc(var(--space-2xs) + 0.06em); font-size: 0.75rem; letter-spacing: 0.06em; }
  .modes .mode svg { width: 2rem; height: 2rem; }
}
.mode {
  display: grid; justify-items: center; gap: var(--space-2xs);
  padding: var(--space-xs) var(--space-2xs) var(--space-sm);
  border: 1px solid var(--color-rule-strong); border-radius: var(--radius-card);
  background: var(--color-card); color: var(--color-ink-2);
  font: 600 var(--text-xs) / 1 var(--font-serif); letter-spacing: var(--track-caps); text-transform: uppercase; white-space: nowrap;
  cursor: pointer;
  transition: border-color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out), translate var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
}
.mode { padding: var(--space-md) var(--space-xs) var(--space-sm) calc(var(--space-xs) + 0.1em); gap: var(--space-xs); letter-spacing: 0.1em; }
.mode svg { width: 2.25rem; height: 2.25rem; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; transition: scale 500ms var(--ease-out); }
.mode:hover { border-color: var(--color-gold); translate: 0 -2px; }
.mode:hover svg { scale: 1.08; }
.mode:active { translate: 0 1px; }
.mode:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.mode[aria-selected="true"] {
  border-color: var(--color-grape); background: var(--color-wash); color: var(--color-grape);
  box-shadow: inset 0 0 0 1px var(--color-grape);
}

/* Only the chosen route takes up room, so the hotel follows right after its last leg */
.journeys { display: grid; width: 100%; }
.journey {
  --line-top: 1.1rem; --line-h: 0px; --run: 2400ms;
  position: relative; list-style: none; margin: 0; padding: 0 0 0 2.75rem;
  display: grid; align-content: start; gap: var(--space-xs);
  text-align: left;
}
.journey:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 6px; border-radius: var(--radius-sm); }
html:not(.js) .journey + .journey { margin-top: var(--space-xl); }
.js .journey:not(.is-active) { display: none; }
.js .journey.is-active { animation: panel-in 400ms var(--ease-out); }

/* The track: a pale dashed path, a gold line that draws over it, and a traveller riding the front */
.journey::before, .journey::after {
  content: ""; position: absolute; left: 0.875rem; top: var(--line-top); height: var(--line-h);
  width: 2px; translate: -50% 0;
}
.journey::before { background: repeating-linear-gradient(to bottom, var(--color-rule) 0 6px, transparent 6px 11px); }
.journey::after { background: var(--color-gold); transform-origin: top; }
.journey__traveller {
  position: absolute; left: 0.875rem; top: var(--line-top); z-index: 1;
  width: 1.75rem; height: 1.75rem; translate: -50% -50%;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--color-grape); color: var(--color-on-dark); box-shadow: var(--shadow-card);
}
.journey__traveller svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.stop { position: relative; font: 400 1.6rem / 1.25 var(--font-script); color: var(--color-grape); }
.stop::before {
  content: ""; position: absolute; left: -1.875rem; top: 0.625em; translate: -50% -50%;
  width: 0.875rem; height: 0.875rem; border-radius: 50%;
  background: var(--color-card); border: 2px solid var(--color-gold);
}
.stop__name { display: block; }
.stop__note { display: block; font: italic 400 var(--text-sm) / 1.3 var(--font-serif); color: var(--color-muted); }
.leg {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-xs); align-items: start;
  font-size: var(--text-sm); line-height: 1.45; color: var(--color-ink-2);
  padding-block: 0 var(--space-sm);
}
.leg svg { width: 1.05rem; height: 1.05rem; margin-top: 0.15em; fill: none; stroke: var(--color-gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Playback: line and traveller run together; each stop lights up as the traveller reaches it (--at, from script.js) */
.js .journey::after { scale: 1 0; }
.js .journey__traveller { opacity: 0; }
.js .journey > li { opacity: 0.2; transition: opacity 500ms var(--ease-out); }
.js .journey > li::before { scale: 0; transition: scale 600ms var(--ease-out); }
.js .journey.is-playing::after { scale: 1 1; transition: scale var(--run) var(--ease-in-out); }
.js .journey.is-playing .journey__traveller {
  opacity: 1; translate: -50% calc(var(--line-h) - 50%);
  transition: translate var(--run) var(--ease-in-out), opacity 300ms var(--ease-out);
}
.js .journey.is-playing > li { opacity: 1; transition-delay: var(--at, 0ms); }
.js .journey.is-playing > li::before { scale: 1; transition-delay: var(--at, 0ms); }
.js .journey.is-done .journey__traveller { opacity: 0; transition-delay: 0s; }

/* The shared last stop: every route's line runs on into it */
.destination { position: relative; width: 100%; display: grid; gap: var(--space-2xs); padding-left: 2.75rem; text-align: left; }
.destination__name { position: relative; font: 400 2.25rem / 1.1 var(--font-script); color: var(--color-gold); }
.destination__name::before, .destination__name::after {
  content: ""; position: absolute; left: -1.875rem; top: 0.55em; translate: -50% -50%;
  width: 1.25rem; height: 1.25rem; border-radius: 50%;
}
.destination__name::before { background: var(--color-gold); border: 2px solid var(--color-card); box-shadow: 0 0 0 2px var(--color-gold); }
.destination__address { font-style: italic; font-size: var(--text-sm); line-height: 1.45; color: var(--color-ink-2); text-wrap: balance; }
.destination__art { margin: var(--space-xs) calc(26px - var(--card-px, var(--space-lg))) 0 calc(26px - 2.75rem - var(--card-px, var(--space-lg))); }
/* A wide crop of the painting; its cut top and bottom edges feather into the paper */
.destination__art img {
  display: block; width: 100%; mix-blend-mode: darken;
  /* feathered on all four sides so the painting melts in just inside the cord */
  -webkit-mask-image: linear-gradient(transparent, black 16%, black 80%, transparent), linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
          mask-image: linear-gradient(transparent, black 16%, black 80%, transparent), linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.venue__actions { margin-top: var(--space-md); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: center; gap: var(--space-xs); margin-left: -2.75rem; }
.venue__actions .pill { min-height: 44px; padding-inline: var(--space-sm); gap: var(--space-2xs); letter-spacing: 0.08em; }

/* Arrival: the dot lands, then the hotel paints itself in from the lawn outward */
.js .destination__name { opacity: 0.2; transition: opacity 500ms var(--ease-out); }
.js .destination__name::before { scale: 0; transition: scale 600ms var(--ease-out); }
.js .destination__art {
  --spread: 0%;
  -webkit-mask-image: radial-gradient(ellipse 70% 62% at 50% 62%, black var(--spread), transparent calc(var(--spread) + 22%));
          mask-image: radial-gradient(ellipse 70% 62% at 50% 62%, black var(--spread), transparent calc(var(--spread) + 22%));
  transition: --spread var(--dur-draw) var(--ease-in-out);
}
.js .destination.is-arrived .destination__name { opacity: 1; }
.js .destination.is-arrived .destination__name::before { scale: 1; }
.js .destination.is-arrived .destination__art { --spread: 160%; }
.js .destination.is-here .destination__name::after { border: 2px solid var(--color-gold); animation: ripple 2.2s var(--ease-out) infinite; }


/* ============================================================
   RSVP
   ============================================================ */
/* same airy rhythm as the schedule's events, not a packed form */
.rsvp__form { display: grid; gap: var(--space-xl); margin-top: var(--space-xl); width: 100%; text-align: left; }
.rsvp__attending { display: grid; gap: var(--space-xl); }
/* The answer first, then the details, set apart by the same dotted gold rule as the schedule */
.rsvp__form > [data-field="attending"] { position: relative; padding-bottom: var(--space-xl); }
.rsvp__form > [data-field="attending"]::after {
  content: ""; position: absolute; bottom: 0; left: 30%; right: 30%; height: 4px;
  background: radial-gradient(circle, var(--color-gold) 1.5px, transparent 2px) 0 0 / 12px 4px repeat-x;
}
.rsvp__form .field { gap: var(--space-xs); }
.rsvp__form .field--choice { gap: 0; }
.rsvp__form .choice { min-height: 52px; }
.rsvp__form textarea.field__input { min-height: 8rem; }
.rsvp__form .pill { margin-top: var(--space-md); }

.field { display: grid; gap: var(--space-2xs); border: 0; padding: 0; margin: 0; min-width: 0; }
.field__label { font-weight: 600; font-size: var(--text-xs); letter-spacing: 0.08em; text-wrap: balance; text-transform: uppercase; color: var(--color-grape); padding: 0; }
.field__optional { font-weight: 400; letter-spacing: 0; text-transform: none; font-style: italic; color: var(--color-muted); }
.field__input {
  font: inherit; color: var(--color-ink);
  width: 100%; min-height: 48px;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-card);
  border: 1px solid var(--color-rule-strong);
  border-radius: var(--radius-md);
  transition: border-color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
}
textarea.field__input { resize: vertical; min-height: 6rem; }
select.field__input {
  appearance: none; -webkit-appearance: none; padding-right: 2.75rem; cursor: pointer;
  background: var(--color-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b2a5c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 1rem center / 1rem;
}
.field__input:hover { border-color: var(--color-muted); }
.field__input:focus-visible { outline: none; border-color: var(--color-focus); box-shadow: 0 0 0 3px var(--color-wash); }
.field__input:disabled { background: var(--color-paper-2); color: var(--color-muted); cursor: not-allowed; }
.field[data-invalid] .field__input { border-color: var(--color-error); }
.field__hint { font-size: var(--text-sm); font-style: italic; color: var(--color-ink-2); text-wrap: pretty; margin-bottom: var(--space-2xs); }
.field__error { font-size: var(--text-sm); color: var(--color-error); }
.field__error:empty { display: none; }
.field--choice { gap: 0; }
.field--choice .field__label { margin-bottom: var(--space-2xs); }
.choice { display: flex; align-items: center; gap: var(--space-sm); min-height: 44px; cursor: pointer; }
.choice input {
  appearance: none; margin: 0; flex: none;
  width: 1.25rem; height: 1.25rem; border-radius: 50%;
  border: 1.5px solid var(--color-ink-2); background: var(--color-card);
  display: grid; place-content: center; cursor: pointer;
}
.choice input::before {
  content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%;
  background: var(--color-grape); transform: scale(0);
  transition: transform var(--dur-short) var(--ease-out);
}
.choice input:checked { border-color: var(--color-grape); }
.choice input:checked::before { transform: scale(1); }
.choice input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.field[data-invalid] .choice input { border-color: var(--color-error); }

.rsvp__status:empty { display: none; }
.rsvp__status { min-height: 1.3em; margin-top: calc(-1 * var(--space-md)); font-size: var(--text-sm); color: var(--color-ink-2); text-align: center; }
.rsvp__status[data-tone="error"] { color: var(--color-error); }
.rsvp__thanks { margin-top: var(--space-lg); display: grid; gap: var(--space-xs); }
.rsvp__thanks:focus { outline: none; }
.rsvp__thanks-title { font-family: var(--font-script); font-size: clamp(2.4rem, 11cqi, 3rem); line-height: 1.1; color: var(--color-gold); }

/* ============================================================
   Finale
   ============================================================ */
.finale {
  margin-inline: var(--gutter); overflow: clip;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  color: var(--color-on-dark); background: var(--color-dusk);
}
.finale__scene { position: relative; min-height: 30rem; overflow: clip; }
.finale__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 84% 60%; }
.finale__scene::before {           /* melts out of the page above and into the dusk band below */
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom, var(--color-paper) 0, transparent 14%, transparent 55%, var(--color-scrim) 80%, var(--color-dusk) 100%);
}
.finale__text {
  padding: var(--space-md) var(--gutter) max(var(--space-xl), env(safe-area-inset-bottom));
  display: grid; gap: var(--space-xs);
}
.finale__names { font-family: var(--font-script); font-size: clamp(2.5rem, 11cqi, 3rem); line-height: 1.1; white-space: nowrap; }
.finale__names .signature__amp { color: var(--color-marigold); }
.finale__date { font-weight: 600; font-size: var(--text-xs); letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--color-marigold); }
.finale__links { display: grid; justify-items: center; gap: var(--space-sm); margin-top: var(--space-md); }
.finale__links .pill { width: 100%; max-width: 19rem; min-height: 48px; padding-inline: var(--space-sm); letter-spacing: 0.1em; }
.finale__text > * { min-width: 0; }

/* ============================================================
   Guest pages · itinerary, registry
   ============================================================ */
@media (max-width: 39.99rem) {
  body:has(.subpage) { background-color: var(--color-stripe-b); background-image: var(--stripes), var(--stripes-mirror); background-size: 50% 100%; background-position: left top, right top; background-repeat: no-repeat; }
}
.subpage {
  min-height: 100svh;
  width: auto; max-width: calc(var(--invite-width) - 2 * var(--gutter));
  margin: var(--space-lg) var(--gutter);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  background: var(--color-paper);
  padding: var(--space-lg) var(--gutter) var(--space-3xl);
  display: grid; align-content: start; justify-items: center; gap: var(--space-md);
}
/* Desktop: one centred card on the wall, like the invite's column */
@media (min-width: 40rem) {
  .subpage { margin: var(--space-xl) auto; box-shadow: 0 24px 60px -24px oklch(27% 0.05 340 / 0.35); }
}
.subpage__back {
  justify-self: start; min-height: 44px;
  display: inline-flex; align-items: center; gap: var(--space-2xs);
  font-weight: 600; font-size: var(--text-xs); letter-spacing: var(--track-caps); text-transform: uppercase; white-space: nowrap;
  color: var(--color-grape); text-decoration: none;
}
.subpage__back svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.subpage__back:hover { text-decoration: underline; text-underline-offset: 4px; }
.subpage__back:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; border-radius: var(--radius-sm); }
.subpage > h1 { margin-top: var(--space-lg); }

/* Itinerary: Eat / See / Stay, each place a name (opens Maps), where it is, and why go */
.itin__lede { max-width: 24rem; font-style: italic; color: var(--color-ink-2); text-wrap: balance; }
.itin__jump { display: flex; justify-content: center; gap: var(--space-xs); margin-top: var(--space-xs); }
.itin__jump a {
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--space-lg);
  border: 1px solid var(--color-rule-strong); border-radius: var(--radius-pill); background: var(--color-card);
  font-weight: 600; font-size: var(--text-xs); letter-spacing: var(--track-caps); text-transform: uppercase; white-space: nowrap;
  color: var(--color-grape); text-decoration: none;
  transition: border-color var(--dur-short) var(--ease-out), translate var(--dur-short) var(--ease-out);
}
.itin__jump a:hover { border-color: var(--color-gold); translate: 0 -2px; }
.itin__jump a:active { translate: 0 1px; }
.itin__jump a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.itin { width: 100%; display: grid; gap: var(--space-sm); margin-top: var(--space-xl); scroll-margin-top: var(--space-lg); }
.itin__title { font-size: var(--text-2xl); }
.itin__group {
  margin-top: var(--space-lg); padding-bottom: var(--space-xs); border-bottom: 1px solid var(--color-gold);
  font-weight: 600; font-size: var(--text-xs); letter-spacing: var(--track-caps); text-transform: uppercase;
  color: var(--color-grape); text-align: left;
}
.places { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-lg); text-align: left; }
.place { display: grid; gap: 2px; }
.place__name { font-weight: 600; font-size: var(--text-md); line-height: 1.25; }
.place__name a {
  color: var(--color-ink); text-decoration: underline; text-decoration-color: var(--color-rule);
  text-decoration-thickness: 1px; text-underline-offset: 4px;
  transition: color var(--dur-short) var(--ease-out), text-decoration-color var(--dur-short) var(--ease-out);
}
.place__name a:hover { color: var(--color-grape); text-decoration-color: var(--color-gold); }
.place__name a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: var(--radius-xs); }
.place__meta { font-weight: 600; font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-ink-2); }
.place__note { font-size: var(--text-base); line-height: 1.45; color: var(--color-ink-2); text-wrap: pretty; }
.itin__fine { max-width: 24rem; font-size: var(--text-sm); font-style: italic; color: var(--color-muted); text-wrap: balance; }

/* ============================================================
   Scroll reveals
   ============================================================ */
.js [data-reveal="write"] { clip-path: inset(-30% 100% -30% 0); transition: clip-path 1800ms var(--ease-in-out); }
.js [data-reveal="write"].is-in { clip-path: inset(-30% -10% -30% -10%); }
.js [data-reveal="draw"] {
  -webkit-mask-image: linear-gradient(to bottom, black 45%, transparent 55%);
          mask-image: linear-gradient(to bottom, black 45%, transparent 55%);
  -webkit-mask-size: 100% 220%; mask-size: 100% 220%;
  -webkit-mask-position: 0 100%; mask-position: 0 100%;
  transition: -webkit-mask-position var(--dur-draw) var(--ease-in-out), mask-position var(--dur-draw) var(--ease-in-out);
}
.js [data-reveal="draw"].is-in { -webkit-mask-position: 0 0; mask-position: 0 0; }

/* ============================================================
   Keyframes
   ============================================================ */
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes ink { to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes panel-in { from { opacity: 0; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { opacity: 0.7; } }
@keyframes bob { 50% { transform: translateY(5px); } }
@keyframes ripple { 0% { opacity: 0.5; scale: 0.6; } 100% { opacity: 0; scale: 2.6; } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 var(--color-gold), var(--shadow-card); } 100% { box-shadow: 0 0 0 14px transparent, var(--shadow-card); } }

/* ============================================================
   Reduced motion: everything is simply there
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important;
    transition-duration: 1ms !important; transition-delay: 0ms !important;
  }
  .js [data-reveal] {
    opacity: 1 !important; transform: none !important; translate: none !important; scale: none !important;
    clip-path: none !important; -webkit-mask-image: none !important; mask-image: none !important;
  }
  .js .rope__path, .js .photo-line__string path { stroke-dashoffset: 0; }
  .js .polaroid, .js .photo-line__note { opacity: 1 !important; translate: none !important; }
  .js .polaroid__photo img { filter: none !important; }
  .hero__painting { transform: none; }
}

/* ============================================================
   Print: the whole invitation, settled and still
   ============================================================ */
@media print {
  .opener, .sound, .sparkles, .hero__scroll, .finale__links, .journey__traveller { display: none !important; }
  body { background: none !important; }
  body::before { content: none !important; }
  .invite { box-shadow: none !important; max-width: none !important; }
  .js [data-reveal], .polaroid, .photo-line__note, .journey > li, .destination__name, .destination__art,
  .js .hero__top > :not(.signature), .signature__date {
    opacity: 1 !important; transform: none !important; translate: none !important; scale: none !important;
    clip-path: none !important; -webkit-mask-image: none !important; mask-image: none !important;
    animation: none !important; transition: none !important;
  }
  .signature__names { -webkit-mask-image: none !important; mask-image: none !important; animation: none !important; }
  .signature__swash { opacity: 1 !important; stroke-dashoffset: 0 !important; animation: none !important; }
  .journey > li::before, .destination__name::before { scale: 1 !important; transition: none !important; }
  .js .journeys > .journey {
    display: grid !important; visibility: visible !important; opacity: 1 !important; position: static !important;
    transition: none !important;
  }
  .journey::before, .journey::after { display: none; }
  .rope__path, .photo-line__string path { stroke-dashoffset: 0 !important; transition: none !important; }
  .polaroid__photo img { filter: none !important; transition: none !important; }
  .hero__painting { transform: none !important; }
  .card, .event { break-inside: avoid; page-break-inside: avoid; }
  .invite { background: none !important; }
  .card { box-shadow: none !important; }
}
