/* Alana & Anthony. Mobile first: most guests open this from WhatsApp on a phone.
   Palette sampled from the save the date. Playfair Display and Ms Madi stand in
   for The Seasons and Beautifully Delicious Script until those are licensed for web. */

@font-face { font-family: 'Montserrat'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/montserrat-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 500; font-style: normal; font-display: swap; src: url('/fonts/montserrat-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/montserrat-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/playfair-display-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/playfair-display-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-weight: 400; font-style: italic; font-display: swap; src: url('/fonts/playfair-display-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Ms Madi'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/ms-madi-latin-400-normal.woff2') format('woff2'); }

:root {
  --espresso: #3b2a22;
  --espresso-deep: #2e211b;
  --espresso-soft: #4a362c;
  --ink: #443027;
  --ink-2: #5a463b;
  --muted: #6e5a4c;
  --linen: #eae3d9;
  --paper: #f4efe8;
  --sand: #dccfbf;
  --sand-deep: #c9b8a3;
  --lining: #d9ccbb;
  --gold: #b1964e;
  --gold-soft: #c8b27a;
  --gold-deep: #86692f;
  --cream: #efe6da;
  --cream-2: #cbbba8;
  --danger: #9a3a28;
  --ok: #4f6b3a;

  --font-sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', 'Times New Roman', Georgia, serif;
  --font-script: 'Ms Madi', 'Snell Roundhand', cursive;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --r-s: 6px;
  --r-m: 12px;
  --r-l: 22px;
  --shadow-1: 0 1px 2px rgb(59 42 34 / 0.08), 0 2px 8px rgb(59 42 34 / 0.06);
  --shadow-2: 0 2px 6px rgb(59 42 34 / 0.08), 0 14px 34px rgb(59 42 34 / 0.12);
  --shadow-3: 0 18px 50px rgb(33 22 16 / 0.35);

  --gutter: 20px;
  --section-y: 88px;
  color-scheme: only light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

/* Samsung Internet recolours light pages in its dark mode unless the stylesheet answers the dark
   preference itself. The answer here: stay light. Other browsers already honour only light. */
@media (prefers-color-scheme: dark) {
  :root { color-scheme: only light; }
  html, body { background: var(--linen); }
  body { color: var(--ink-2); }
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  background: var(--linen);
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--linen);
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Paper grain on a fixed layer, never on a scrolling container. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .36 0 0 0 0 .27 0 0 0 0 .2 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg { display: block; max-width: 100%; }
picture { display: contents; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 600; color: var(--ink); text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
address { font-style: normal; }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 200;
  padding: 10px 14px;
  border-radius: var(--r-s);
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-160%);
  transition: transform 200ms var(--ease-out);
}
.skip:not(:focus) { opacity: 0; pointer-events: none; }
.skip:focus { transform: none; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); position: relative; z-index: 2; }
.narrow { max-width: 34rem; }
.center { text-align: center; }

.kicker {
  margin: 0 0 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.5;
}
.kicker-light { color: var(--cream); }

.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Placeholder chips: delete each one when the real photo goes in. */
.ph-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgb(46 33 27 / 0.72);
  color: var(--cream);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.4;
  pointer-events: none;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.2;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease, border-color 200ms ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:active { transform: scale(0.97); }
.btn-dark { background: var(--espresso); color: var(--cream); }
.btn-cream { background: var(--cream); color: var(--espresso); }
.btn-outline { border-color: var(--sand-deep); color: var(--ink); background: transparent; }
.btn-block { width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .btn-dark:hover { background: var(--espresso-soft); }
  .btn-cream:hover { background: #fff8ee; }
  .btn-outline:hover { border-color: var(--ink); }
}

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 4px;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  text-decoration-color: var(--gold);
  transition: transform 160ms var(--ease-out), opacity 200ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-text:active { transform: scale(0.97); }
.btn-text-light { color: var(--cream); }

/* ---------- Envelope ---------- */

/* One set of numbers places every layer of the envelope. --flap is where the flap's
   tip and the seal sit, as a share of the envelope's height. */
:root {
  --ew: min(86vw, 500px, calc(72vh - 16px));
  --eh: calc(var(--ew) * 0.7);
  --ey: calc(55vh - var(--eh) / 2);
  --seal: calc(var(--ew) * 0.29);
  --flap: 0.58;
}
@supports (height: 1svh) {
  :root {
    --ew: min(86vw, 500px, calc(72svh - 16px));
    --ey: calc(55svh - var(--eh) / 2);
  }
}

.intro-scene, .env, .intro-hint { display: none; }
html.intro .intro-scene, html.intro .env { display: block; }
html.intro .intro-hint { display: flex; }
html.intro { overscroll-behavior: none; }
html.intro .topbar, html.intro .ph-tag { visibility: hidden; }
/* Until the backdrop, the seal and the hint's font have arrived, the scene is plain linen colour;
   then the envelope fades in whole (app.js). The liner and the pictures further down wait too,
   so they don't compete for a slow connection. */
html.intro-wait .intro-linen, html.intro-wait .env, html.intro-wait .intro-hint { visibility: hidden; }
html.intro-wait .env-liner, html.intro-wait .flap-liner::before { background-image: none; }
html.intro-wait main img[loading="lazy"] { display: none; }

.intro-scene { position: fixed; inset: 0; z-index: 60; background: #e7e0d5; }
.intro-scene picture { display: block; width: 100%; height: 100%; }
.intro-linen { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; -webkit-user-drag: none; }

.env { position: fixed; left: calc(50% - var(--ew) / 2); top: var(--ey); width: var(--ew); height: var(--eh); }

/* The inside of the envelope: espresso paper, a printed liner, shade under the rim. */
.env-back {
  z-index: 62;
  border-radius: 3px;
  background: linear-gradient(180deg, #4b382e, var(--espresso) 60%);
  box-shadow: 0 2px 3px rgb(59 42 34 / 0.22), 0 14px 30px rgb(59 42 34 / 0.28), 0 30px 60px rgb(59 42 34 / 0.16);
}
.env-liner {
  position: absolute;
  inset: 4.5% 4% 0;
  border-radius: 2px 2px 0 0;
  background: url('/img/liner.webp') center / cover #efe7da;
}
.env-liner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(33 22 16 / 0.42), rgb(33 22 16 / 0.08) 32%, transparent 55%);
}

/* The front: two side flaps and a bottom flap folded over each other. */
.env-front { z-index: 80; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.env-side, .env-bottom { position: absolute; inset: 0; }
.env-side::after, .env-bottom::after, .flap-paper::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.5;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.014 .02' numOctaves='3' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .38 0 0 0 0 .3 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.env-side-left { clip-path: polygon(0 0, 52% 54%, 0 100%); background: linear-gradient(105deg, #4a362c, #3e2d25 80%); }
.env-side-right { clip-path: polygon(100% 0, 48% 54%, 100% 100%); background: linear-gradient(255deg, #3a2a22, #33251e 80%); }
.env-bottom-shadow { position: absolute; inset: 0; filter: drop-shadow(0 -1px 3px rgb(18 10 6 / 0.38)); }
.env-bottom { clip-path: polygon(0 100%, 50% 46%, 100% 100%); background: linear-gradient(180deg, #45332a, #3b2b23 70%, #35271f); }
.env-flap-shadow {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: calc(var(--flap) * 100% + 3%);
  filter: blur(5px);
  transform: translateY(5px);
  opacity: 0.6;
}
.env-flap-shadow::before { content: ''; position: absolute; inset: 0; clip-path: polygon(0 0, 100% 0, 50% 100%); background: rgb(18 10 6); }

/* The flap. The outer box carries the depth order (it drops behind the card once it is
   past upright); .flap-hinge does the 3D turn and shows the liner on the way over. */
.env-flap { z-index: 90; height: calc(var(--eh) * var(--flap)); pointer-events: none; }
.flap-hinge { position: absolute; inset: 0; transform-origin: 50% 0; transform-style: preserve-3d; transform: perspective(1100px) rotateX(0deg); }
.flap-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flap-paper { position: absolute; inset: 0; clip-path: polygon(0 0, 100% 0, 50% 100%); background: linear-gradient(180deg, #503b30, #43312a 55%, #3d2c25); }
/* Safari ignores backface-visibility here and drew the printed inside on the closed envelope, so
   the inside stays hidden until the flap passes upright; app.js swaps the faces at 90 degrees. */
.flap-inside { transform: rotateY(180deg); visibility: hidden; }
.flap-liner { position: absolute; inset: 0; clip-path: polygon(0 0, 100% 0, 50% 100%); background: var(--espresso); }
.flap-liner::before {
  content: '';
  position: absolute;
  inset: 0;
  clip-path: polygon(4% 3.5%, 96% 3.5%, 50% 92%);
  background: url('/img/liner.webp') center / cover #efe7da;
}
.flap-liner::after { content: ''; position: absolute; inset: 0; clip-path: polygon(0 0, 100% 0, 50% 100%); background: linear-gradient(0deg, rgb(33 22 16 / 0.25), transparent 40%); }

/* The seal. Whole while closed; on the tap it swaps for two halves split along a crack,
   the top half riding up with the flap, the bottom half staying on the pocket. */
.env-seal { z-index: 92; pointer-events: none; }
.seal {
  position: absolute;
  left: calc(50% - var(--seal) / 2);
  top: calc(var(--flap) * 100% - var(--seal) / 2);
  width: var(--seal);
  height: var(--seal);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  pointer-events: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.seal img, .seal-piece img { display: block; width: 100%; height: 100%; -webkit-user-drag: none; }
.seal img { filter: drop-shadow(0 4px 5px rgb(18 10 6 / 0.45)) drop-shadow(0 1px 1px rgb(18 10 6 / 0.35)); transition: transform 160ms var(--ease-out); }
.seal:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 6px; }
html.pressed .seal img { transform: scale(0.95); }
.seal-piece { position: absolute; left: calc(50% - var(--seal) / 2); width: var(--seal); height: var(--seal); visibility: hidden; filter: drop-shadow(0 4px 5px rgb(18 10 6 / 0.45)); }
.seal-high { top: calc(100% - var(--seal) / 2); }
.seal-low { top: calc(var(--flap) * 100% - var(--seal) / 2); }
.seal-high img { clip-path: polygon(0 0, 100% 0, 100% 51%, 87% 46%, 75% 55%, 62% 47%, 50% 56%, 38% 47%, 26% 55%, 13% 46%, 0 52%); }
.seal-low img { clip-path: polygon(0 52%, 13% 46%, 26% 55%, 38% 47%, 50% 56%, 62% 47%, 75% 55%, 87% 46%, 100% 51%, 100% 100%, 0 100%); }
html.opening .seal-piece { visibility: visible; }
html.opening .env-seal { visibility: hidden; }

.intro-hint {
  position: fixed;
  z-index: 95;
  left: 0;
  right: 0;
  top: calc(var(--ey) + var(--eh) + clamp(22px, 6vh, 54px));
  margin: 0;
  padding: 0 24px;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  line-height: 1.5;
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
  transition: opacity 250ms var(--ease-out);
}
.intro-hint::before {
  content: '';
  width: 30px;
  height: 30px;
  border: 1px solid rgb(68 48 39 / 0.45);
  border-radius: 50%;
  background: radial-gradient(circle, var(--ink) 0 2.5px, transparent 3px);
  animation: tap-hint 2.4s var(--ease-out) infinite;
}
@keyframes tap-hint {
  0% { transform: scale(0.7); opacity: 0; }
  30% { opacity: 1; }
  70%, 100% { transform: scale(1.25); opacity: 0; }
}
.on-mouse { display: none; }
@media (hover: hover) and (pointer: fine) {
  .on-touch { display: none; }
  .on-mouse { display: inline; }
}
html.opening .intro-hint { opacity: 0; }
@media (max-height: 500px) { .intro-hint::before { display: none; } }

/* The invitation card waits inside the envelope; app.js places it. */
html.intro .hero { z-index: 70; background: transparent; }
html.intro .hero-photo, html.intro .hero-shade { opacity: 0; }
html.intro .hero-card { transform-origin: 0 0; will-change: transform; pointer-events: none; }

/* ---------- Top bar ---------- */

/* Samsung Internet's dark mode ignores color-scheme: only light, so its users get this note. */
.dark-note {
  position: fixed;
  z-index: 200;
  top: calc(10px + env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  max-width: 26rem;
  margin: 0 auto;
  padding: 14px 16px 12px;
  border-radius: var(--r-m);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-3);
  font-size: 0.875rem;
  line-height: 1.5;
}
.dark-note p { margin: 0 0 10px; }
.dark-note-check { font-size: 0.75rem; color: var(--muted); }
.dark-note-actions { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.dark-note-chrome { display: inline-flex; align-items: center; min-height: 42px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--espresso); color: var(--cream); font: inherit; font-weight: 600; text-decoration: none; }
.dark-note-close { min-height: 42px; padding: 0 12px; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 600; }

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px var(--gutter);
  padding-top: max(10px, env(safe-area-inset-top));
  background: rgb(234 227 217 / 0.86);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 rgb(68 48 39 / 0.08);
  transform: translateY(-110%);
  transition: transform 300ms var(--ease-out);
}
.topbar.show { transform: none; }
.topbar-mono { display: block; width: 44px; height: 44px; color: var(--ink); }
.topbar-mono svg { width: 44px; height: 44px; fill: currentColor; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.topbar-menu, .topbar-rsvp {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
  -webkit-tap-highlight-color: transparent;
}
.topbar-menu { border: 1px solid var(--sand-deep); background: transparent; color: var(--ink); }
.topbar-rsvp { display: inline-flex; align-items: center; background: var(--espresso); color: var(--cream); }
.topbar-menu:active, .topbar-rsvp:active { transform: scale(0.97); }
@media (prefers-reduced-transparency: reduce) {
  .topbar { background: var(--linen); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ---------- Hero: the invitation card on their photo ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: calc(72px + env(safe-area-inset-top)) var(--gutter) calc(var(--gutter) + env(safe-area-inset-bottom));
  background: var(--espresso);
  isolation: isolate;
  overflow: hidden;
}
.hero-photo { position: absolute; inset: 0; z-index: -2; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgb(46 33 27 / 0.4) 0%, rgb(46 33 27 / 0) 26%, rgb(46 33 27 / 0) 48%, rgb(46 33 27 / 0.6) 100%);
}

.hero-card {
  position: relative;
  width: 100%;
  max-width: 26rem;
  padding: 24px 22px 18px;
  border-radius: 4px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgb(255 255 255 / 0.55), transparent 70%),
    var(--paper);
  box-shadow: 0 2px 6px rgb(33 22 16 / 0.18), 0 24px 60px rgb(33 22 16 / 0.32);
  color: var(--ink);
  text-align: center;
}
.hero-card::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid rgb(177 150 78 / 0.55);
  border-radius: 2px;
  pointer-events: none;
}
.hero-mono { width: 44px; height: 44px; margin: 0 auto 4px; fill: var(--gold-deep); }
.hero-kicker { margin: 0 0 2px; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.22em; line-height: 1.5; text-transform: uppercase; color: var(--muted); }
.hero-names {
  margin: 0 0 8px;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(2.6rem, 12.5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: 0;
  color: var(--ink);
  outline: none;
}
.hero-names .amp { font-size: 0.8em; color: var(--gold-deep); }
.hero-date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  font-variant-numeric: lining-nums;
}
.hero-date-bar { width: 1px; height: 1.2em; background: var(--sand-deep); }
.hero-place { margin: 0 0 18px; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.22em; line-height: 1.5; text-transform: uppercase; color: var(--muted); }

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 auto 16px;
  border-top: 1px solid var(--sand);
  border-bottom: 1px solid var(--sand);
}
.cd-cell { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 10px 0 8px; }
.cd-cell + .cd-cell { border-left: 1px solid var(--sand); }
.cd-num { font-family: var(--font-serif); font-size: 1.5rem; line-height: 1.1; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.cd-lab { font-size: 0.5625rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.countdown-done { font-family: var(--font-script); font-size: 2.4rem; line-height: 1.1; color: var(--gold-deep); margin: 0 0 14px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 18px; }
.hero-actions .btn { min-width: 8.5rem; }

/* Short phones: keep their photo in view above the card. */
@media (max-height: 720px) {
  .hero { padding-top: calc(56px + env(safe-area-inset-top)); }
  .hero-card { padding: 18px 18px 14px; }
  .hero-mono { display: none; }
  .hero-names { font-size: clamp(2.3rem, 11vw, 3rem); margin-bottom: 4px; }
  .hero-place { margin-bottom: 12px; }
  .cd-cell { padding: 7px 0 6px; }
  .cd-num { font-size: 1.3rem; }
  .countdown { margin-bottom: 10px; }
  .hero-actions .btn { min-height: 44px; }
}
/* Phones on their side: the card sits to the right of the photo. */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { justify-content: center; align-items: flex-end; padding: 16px max(var(--gutter), env(safe-area-inset-right)) 16px var(--gutter); }
  .hero-card { max-width: 22rem; }
  .hero-kicker { display: none; }
  .hero-names { font-size: 2.2rem; }
}

/* ---------- Sections ---------- */

.section { position: relative; padding: var(--section-y) 0; overflow-x: clip; }
.section-intro { max-width: 32rem; margin: 0 auto 40px; text-align: center; }

.lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 0 28px;
  text-align: center;
  line-height: 1;
}
.lockup-caps {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2.25rem, 11vw, 3.5rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
}
.lockup-script {
  margin: -0.42em 0 0 1.6em;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(3rem, 15vw, 4.75rem);
  line-height: 1;
  color: var(--gold-deep);
}
.lockup-light .lockup-caps { color: var(--cream); }
.lockup-light .lockup-script { color: var(--gold-soft); }

.ornament { width: 120px; height: 12px; margin: 0 auto 26px; fill: none; stroke: var(--gold); stroke-width: 1; }
.ornament-heart { fill: var(--gold); stroke: none; }

.welcome { position: relative; padding: 76px 0 8px; text-align: center; overflow: hidden; }
.sprig { position: absolute; z-index: 0; pointer-events: none; mix-blend-mode: multiply; -webkit-mask-image: radial-gradient(70% 68% at 70% 30%, #000 40%, transparent 78%); mask-image: radial-gradient(70% 68% at 70% 30%, #000 40%, transparent 78%); }
.sprig-welcome { top: -28px; right: -34px; width: min(44vw, 230px); height: auto; opacity: 0.85; }
.welcome-lead { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 1.375rem; color: var(--ink); margin-bottom: 14px; }
.signature { margin: 18px 0 0; font-family: var(--font-script); font-size: 2.6rem; line-height: 1; color: var(--gold-deep); }
.welcome-photo { width: min(58%, 13rem); margin: 26px auto 4px; padding: 8px 8px 22px; border-radius: 3px; background: var(--paper); box-shadow: var(--shadow-2); transform: rotate(-2.5deg); }
.welcome-photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; }
.welcome-photo + .signature { margin-top: -6px; position: relative; }

/* Story: their words, with a photo from each place tucked between the paragraphs */
.story-flow { max-width: 36rem; margin: 0 auto; }
.story-flow > p { margin-bottom: 1.15em; }
.dropcap::first-letter {
  float: left;
  margin: 0.08em 0.12em 0 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 3.4em;
  line-height: 0.8;
  color: var(--ink);
}
.postcard {
  margin: 30px 0 36px;
  width: min(74%, 19rem);
  padding: 9px 9px 10px;
  border-radius: 3px;
  background: var(--paper);
  box-shadow: var(--shadow-2);
}
.postcard img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; }
.postcard figcaption { padding-top: 6px; font-family: var(--font-script); font-size: 1.75rem; line-height: 1.15; color: var(--ink); text-align: center; }
.postcard-right { margin-left: auto; margin-right: 4%; transform: rotate(1.8deg); }
.postcard-left { margin-left: 6%; transform: rotate(-2deg); }
.postcard-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 34px 0 44px; padding: 0 8px; }
.postcard-trio .postcard { width: auto; margin: 0; padding: 5px 5px 6px; }
.postcard-trio .postcard:nth-child(1) { transform: rotate(-5deg) translate(4px, 8px); }
.postcard-trio .postcard:nth-child(2) { position: relative; z-index: 1; transform: rotate(1.5deg) translateY(-6px); }
.postcard-trio .postcard:nth-child(3) { transform: rotate(4.5deg) translate(-4px, 10px); }
.postcard-trio figcaption { font-size: clamp(1rem, 4.6vw, 1.35rem); padding-top: 4px; }

/* A full-width photo between the story and the day: a 4:5 photo on upright phones and tablets
   (the same query picks that crop in photos.toml), a wide strip everywhere else. */
.photo-band { position: relative; margin: 0; height: clamp(320px, 56vw, 820px); max-height: 100vh; overflow: hidden; background: var(--espresso); }
.photo-band img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
@media (max-aspect-ratio: 4/5) {
  .photo-band { height: min(125vw, 90vh); max-height: none; }
}

/* The day */
.day { background: var(--paper); }
.day::before, .day::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 22px;
  z-index: 1;
  pointer-events: none;
}
.day::before { top: -1px; background: linear-gradient(180deg, var(--linen), transparent); }
.day::after { bottom: -1px; background: linear-gradient(0deg, var(--linen), transparent); }

.when { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; justify-items: center; margin: 0 auto 72px; max-width: 26rem; }
.cal-card {
  position: relative;
  width: 100%;
  max-width: 21rem;
  padding: 30px 22px 24px;
  border-radius: 4px;
  background:
    radial-gradient(80% 60% at 20% 0%, rgb(255 255 255 / 0.05), transparent 70%),
    radial-gradient(70% 60% at 100% 100%, rgb(0 0 0 / 0.2), transparent 70%),
    var(--espresso);
  color: var(--cream-2);
  box-shadow: 10px 10px 0 -1px var(--paper), 10px 10px 0 0 var(--sand), var(--shadow-2);
  text-align: center;
}
.cal-month { margin: 0 0 18px; font-family: var(--font-serif); font-size: 1.25rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--gold-soft); font-variant-numeric: lining-nums; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 8px; font-size: 0.875rem; font-variant-numeric: tabular-nums; color: var(--cream); }
.cal-grid span { display: grid; place-items: center; height: 30px; }
.cal-dow { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.12em; color: var(--cream-2); }
.cal-heart { position: relative; }
.cal-heart svg { position: absolute; width: 32px; height: 30px; fill: var(--gold); left: 50%; top: 50%; transform: translate(-50%, -50%); }
.cal-heart b { position: relative; font-weight: 600; color: var(--espresso); font-size: 0.8125rem; margin-top: -2px; }
.cal-place { margin: 18px 0 0; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold-soft); }

.when-text { text-align: center; }
.when-date { margin: 0 0 6px; font-family: var(--font-serif); font-size: 1.5rem; color: var(--ink); font-variant-numeric: lining-nums; }
.when-times { margin: 0 0 22px; color: var(--ink-2); }

.venue { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; margin: 0 auto 80px; max-width: 34rem; }
.venue-text { text-align: center; }
.venue-name { margin: 0 0 10px; font-family: var(--font-serif); font-weight: 400; font-size: 2.5rem; letter-spacing: 0.06em; text-transform: uppercase; }
.venue-photo { position: relative; margin: 0; }
.venue-photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-s); box-shadow: var(--shadow-2); }
.venue-where { display: grid; justify-items: center; gap: 4px; padding: 26px 20px 28px; border-radius: var(--r-m); background: var(--linen); text-align: center; }
.venue-where address { margin-bottom: 16px; color: var(--ink); }

/* Timeline: a hand-drawn line that winds between the times. */
.order { margin: 0 auto 80px; max-width: 30rem; }
.timeline-wrap { position: relative; height: 520px; margin-top: 8px; }
.timeline { position: absolute; inset: 0; list-style: none; margin: 0; padding: 0; }
.tl-path { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke: var(--gold); stroke-width: 1.25; stroke-linecap: round; }
.tl-item { position: absolute; left: 0; right: 0; height: 104px; }
.tl-item:nth-child(2) { top: 104px; }
.tl-item:nth-child(3) { top: 208px; }
.tl-item:nth-child(4) { top: 312px; }
.tl-item:nth-child(5) { top: 416px; }
.tl-item:first-child { top: 0; }
.tl-item::before {
  content: '';
  position: absolute;
  top: 44px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--gold-deep);
}
.tl-left::before { left: calc(36% - 5.5px); }
.tl-right::before { left: calc(64% - 5.5px); }
.tl-item time, .tl-item span { position: absolute; width: 31%; }
.tl-left time, .tl-left span { right: 69%; text-align: right; }
.tl-right time, .tl-right span { left: 69%; text-align: left; }
.tl-item time { top: 26px; font-family: var(--font-serif); font-style: italic; font-size: 1.375rem; line-height: 1.2; color: var(--ink); }
.tl-item span { top: 58px; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.16em; line-height: 1.45; text-transform: uppercase; color: var(--muted); }
.tl-last::before { border: 0; border-radius: 0; background: none; width: 16px; height: 15px; top: 42px; left: calc(36% - 8px); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cpath fill='%23b1964e' d='M12 21.2C11.4 20.6 1.5 14.2 1.5 7.6 1.5 4.3 4 1.8 7.1 1.8c2 0 3.8 1 4.9 2.6 1.1-1.6 2.9-2.6 4.9-2.6 3.1 0 5.6 2.5 5.6 5.8 0 6.6-9.9 13-10.5 13.6z'/%3E%3C/svg%3E"); background-size: contain; background-repeat: no-repeat; }

/* Dress code */
.dress { margin: 0 auto; max-width: 30rem; text-align: center; }
.dress-code { margin: 0 0 8px; font-family: var(--font-serif); font-size: 1.75rem; line-height: 1.25; color: var(--ink); }
.dress-note { margin: 0 auto 26px; max-width: 24rem; }
.swatches { display: flex; justify-content: center; gap: 22px; margin: 0; padding: 0; list-style: none; }
.swatches li { display: grid; justify-items: center; gap: 10px; width: 5.5rem; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.12em; line-height: 1.45; text-transform: uppercase; color: var(--muted); }
.swatch { position: relative; width: 58px; height: 58px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(68 48 39 / 0.14), var(--shadow-1); overflow: hidden; }
.swatch::after { content: ''; position: absolute; left: 50%; top: -10%; width: 1.5px; height: 120%; background: var(--danger); transform: rotate(45deg); }
.swatch-mocha { background: linear-gradient(135deg, #4b3326 50%, #7a5a45 50%); }
.swatch-beige { background: #d9c7ae; }
.swatch-white { background: #ffffff; }

/* Wedding week */
.week-list { list-style: none; margin: 0 auto; padding: 0; max-width: 34rem; display: grid; gap: 14px; }
.week-day { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 16px; padding: 18px 18px 16px; border-radius: var(--r-m); background: var(--paper); box-shadow: var(--shadow-1); }
.week-date { display: grid; justify-items: center; align-content: start; margin: 0; padding-top: 2px; border-right: 1px solid var(--sand); padding-right: 14px; line-height: 1.1; }
.week-date .wd, .week-date .mo { font-size: 0.625rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.week-date .dn { font-family: var(--font-serif); font-size: 2.125rem; line-height: 1.15; color: var(--ink); font-variant-numeric: lining-nums; }
.week-events { display: grid; gap: 14px; }
.event { position: relative; padding-left: 32px; }
.event-icon { position: absolute; left: 0; top: 3px; width: 22px; height: 22px; fill: none; stroke: var(--gold-deep); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.week-day-wedding .event-icon { stroke: var(--gold-soft); }
.event + .event { padding-top: 14px; border-top: 1px solid var(--sand); }
.event + .event .event-icon { top: 17px; }
.event h3 { font-family: var(--font-serif); font-weight: 400; font-size: 1.3125rem; line-height: 1.3; margin: 0 0 6px; }
.event-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 4px; font-size: 0.875rem; color: var(--ink-2); }
.event-place { display: flex; align-items: flex-start; gap: 6px; margin: 0 0 4px; font-size: 0.875rem; line-height: 1.45; color: var(--ink-2); }
.event-place .icon { width: 15px; height: 15px; margin-top: 2px; color: var(--gold-deep); }
.event-note { margin: 0; font-size: 0.875rem; color: var(--muted); font-style: italic; }
.tag { display: inline-block; white-space: nowrap; padding: 3px 10px; border-radius: 999px; background: var(--linen); border: 1px solid var(--sand); font-size: 0.625rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); }
.week-day-wedding { background: var(--espresso); color: var(--cream-2); box-shadow: var(--shadow-2); }
.week-day-wedding .week-date { border-color: rgb(239 230 218 / 0.18); }
.week-day-wedding .wd, .week-day-wedding .mo { color: var(--cream-2); }
.week-day-wedding .dn, .week-day-wedding h3 { color: var(--cream); }
.week-day-wedding .event-meta, .week-day-wedding .event-place { color: var(--cream-2); }
.week-day-wedding .event-place .icon { color: var(--gold-soft); }

/* Stay */
.stay-card { position: relative; max-width: 34rem; margin: 0 auto; padding: 34px 24px 30px; border-radius: var(--r-m); background: var(--paper); box-shadow: var(--shadow-1); text-align: center; }
.stay-name { margin: 0 0 10px; font-family: var(--font-serif); font-weight: 400; font-size: 1.75rem; line-height: 1.25; }
.stay-where { margin: 0 0 6px; }
.stay-block { margin: 16px auto 22px; max-width: 26rem; }
.stay-block strong { font-weight: 600; color: var(--ink); white-space: nowrap; }
.rates { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; text-align: left; }
.rate { display: grid; align-content: start; gap: 8px; padding: 16px 14px 14px; border-radius: var(--r-m); background: #fffdf9; border: 1px solid var(--sand); }
.rate-name { margin: 0 0 2px; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.rate-price { margin: 0; line-height: 1.2; }
.rate-price b { display: block; font-family: var(--font-serif); font-weight: 400; font-size: 1.5rem; line-height: 1.2; color: var(--ink); font-variant-numeric: lining-nums; }
.rate-price span { font-size: 0.8125rem; color: var(--ink-2); }
.rate-note { margin: 4px 0 0; padding-top: 8px; border-top: 1px solid var(--sand); font-size: 0.8125rem; line-height: 1.45; color: var(--ink-2); }
.rate-incl { margin: 12px 0 24px; font-size: 0.8125rem; font-style: italic; color: var(--muted); }
.stay-steps { counter-reset: step; list-style: none; margin: 0 auto 18px; padding: 0; max-width: 24rem; display: grid; gap: 10px; text-align: left; }
.stay-steps li { counter-increment: step; position: relative; padding-left: 38px; min-height: 26px; line-height: 1.5; color: var(--ink); }
.stay-steps .step-key { margin: 0 -12px 2px; padding: 12px 14px 12px 50px; border-radius: var(--r-m); background: var(--linen); border: 1px solid var(--gold-soft); }
.stay-steps .step-key strong { display: block; font-weight: 600; color: var(--espresso); }
.stay-steps .step-key::before { left: 12px; top: 12px; background: var(--espresso); border-color: var(--espresso); color: var(--cream); }
.stay-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--gold); font-family: var(--font-serif); font-size: 0.875rem; color: var(--gold-deep); font-variant-numeric: lining-nums; }
.stay-other { margin: 0 auto 24px; max-width: 26rem; font-size: 0.9375rem; color: var(--muted); }
.stay-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
@media (max-width: 359px) {
  .rates { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- RSVP ---------- */

.rsvp { background: var(--espresso); color: var(--cream-2); padding-bottom: 96px; }
.rsvp::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .02' numOctaves='3' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .38 0 0 0 0 .3 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Their photo at the top of the section, the heading over its darkened foot and the card below.
   Upright phones and tablets get a portrait photo (same query as photos.toml). --head-at is where
   the heading starts, as a share of the photo's height: below the two of them in both photos. */
.rsvp { --photo-h: clamp(520px, 62vw, 960px); --head-at: 0.72; }
.rsvp-photo { position: absolute; top: 0; left: 0; right: 0; z-index: 0; height: var(--photo-h); overflow: hidden; }
.rsvp-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.rsvp-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(46 33 27 / 0.3) 0%, rgb(46 33 27 / 0) 16%, rgb(59 42 34 / 0) 56%, rgb(59 42 34 / 0.6) 70%, rgb(59 42 34 / 0.9) 86%, var(--espresso) 100%);
}
.rsvp-head { padding-top: calc(var(--photo-h) * var(--head-at) - var(--section-y)); }
@media (max-aspect-ratio: 4/5) {
  .rsvp { --photo-h: min(125vw, 90vh); --head-at: 0.58; }
  .rsvp-photo::after { background: linear-gradient(180deg, rgb(46 33 27 / 0.25) 0%, rgb(46 33 27 / 0) 18%, rgb(59 42 34 / 0) 42%, rgb(59 42 34 / 0.6) 60%, rgb(59 42 34 / 0.88) 80%, var(--espresso) 100%); }
}
.rsvp-by { margin: 0 0 30px; text-align: center; color: var(--cream-2); }
.rsvp-by strong { color: var(--cream); font-weight: 600; }
.rsvp-card { max-width: 34rem; margin: 0 auto; padding: 26px 20px 28px; border-radius: var(--r-l); background: var(--paper); color: var(--ink-2); box-shadow: var(--shadow-3); }
.rsvp-note { margin: 0 0 22px; padding: 12px 14px; border-radius: var(--r-s); background: var(--linen); font-size: 0.9375rem; line-height: 1.55; color: var(--ink); }
.rsvp-previous { margin: -8px 0 20px; padding: 12px 14px; border-radius: var(--r-s); border: 1px solid var(--sand-deep); font-size: 0.9375rem; line-height: 1.55; color: var(--ink); }
.rsvp-noscript { margin: 0 0 16px; color: var(--ink); }

.field { margin: 0 0 20px; padding: 0; border: 0; min-width: 0; display: grid; gap: 8px; }
.label { display: block; padding: 0; font-size: 0.875rem; font-weight: 600; color: var(--ink); line-height: 1.4; }
.opt { font-weight: 500; color: var(--muted); font-size: 0.8125rem; }
.help { margin: 0; font-size: 0.8125rem; line-height: 1.5; color: var(--muted); }
.error { margin: 0; font-size: 0.875rem; line-height: 1.45; color: var(--danger); font-weight: 600; }
.form-error { margin: 0 0 16px; padding: 12px 14px; border-radius: var(--r-s); background: #f5e3dc; color: var(--danger); font-weight: 600; font-size: 0.9375rem; line-height: 1.5; }

.input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--sand-deep);
  border-radius: var(--r-s);
  background: #fffdf9;
  color: var(--ink);
  font-size: 1rem; /* 16px stops iOS zooming into the field */
  font-weight: 500;
  line-height: 1.4;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder { color: #9c8a7c; }
.input:focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgb(177 150 78 / 0.28); }
textarea.input { min-height: 96px; resize: vertical; }
select.input {
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23443027' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 18px;
}
.field.invalid .input { border-color: var(--danger); }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 12px; }
.phone-row { display: grid; grid-template-columns: 7.2rem minmax(0, 1fr); gap: 8px; }

.choice-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.choice { position: relative; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice > span {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 12px 16px;
  border: 1px solid var(--sand-deep);
  border-radius: var(--r-m);
  background: #fffdf9;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.35;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 160ms var(--ease-out);
}
.choice > span::before {
  content: '';
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--sand-deep);
  background: #fffdf9;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.choice input[type='checkbox'] + span::before { border-radius: 5px; }
.choice:active > span { transform: scale(0.985); }
.choice input:checked + span { border-color: var(--espresso); background: var(--espresso); color: var(--cream); }
.choice input:checked + span::before { border-color: var(--cream); box-shadow: inset 0 0 0 4px var(--espresso), inset 0 0 0 10px var(--cream); }
.choice input[type='checkbox']:checked + span::before {
  box-shadow: none;
  background: var(--cream) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233b2a22' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.choice input:focus-visible + span { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
.choice-big > span { min-height: 58px; font-size: 1rem; }
.choice small { display: block; margin-top: 2px; font-weight: 500; font-size: 0.8125rem; opacity: 0.8; }
.choice-text { display: block; }
.menu-options, .checks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }

.menu-tbc { margin: -4px 0 16px; font-size: 0.8125rem; font-style: italic; color: var(--muted); }
.form-divider { display: flex; align-items: center; gap: 12px; margin: 30px 0 16px; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.form-divider::before, .form-divider::after { content: ''; flex: 1; height: 1px; background: var(--sand); }


.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.privacy { margin: 14px 0 0; text-align: center; font-size: 0.8125rem; color: var(--muted); }

#rsvp-submit { margin-top: 8px; }
#rsvp-submit[aria-busy='true'] { pointer-events: none; opacity: 0.85; }
#rsvp-submit[aria-busy='true'] .btn-label::after { content: ''; display: inline-block; width: 1.2em; text-align: left; animation: dots 1.2s steps(4, end) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }

.rsvp-done { text-align: center; outline: none; }
.done-title { margin: 0 0 8px; font-family: var(--font-script); font-weight: 400; font-size: 2.9rem; line-height: 1.1; color: var(--gold-deep); }
.done-lead { margin: 0 0 20px; color: var(--ink); }
.done-summary { display: grid; gap: 0; margin: 0 0 22px; padding: 4px 16px; border-radius: var(--r-m); background: var(--linen); text-align: left; }
.done-summary div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--sand); }
.done-summary div:last-child { border-bottom: 0; }
.done-summary dt { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.done-summary dd { margin: 0; color: var(--ink); line-height: 1.5; }
.done-change { margin: 18px 0 4px; font-size: 0.875rem; color: var(--muted); }
.done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 22px; }

/* ---------- Footer ---------- */

.footer { position: relative; z-index: 2; padding: 64px var(--gutter) calc(52px + env(safe-area-inset-bottom)); background: var(--espresso-deep); color: var(--cream-2); text-align: center; }
.footer-mono { width: 84px; height: 84px; margin: 0 auto 14px; fill: var(--gold); }
.footer-names { margin: 0 0 4px; font-family: var(--font-script); font-size: 2.4rem; line-height: 1.1; color: var(--cream); }
.footer-date { margin: 0 0 20px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; }
.footer-contact { margin: 0; font-size: 0.875rem; }
.footer-contact a { color: var(--cream); text-underline-offset: 4px; text-decoration-color: var(--gold); word-break: break-word; }

/* ---------- 404 ---------- */

.lost { position: relative; z-index: 2; min-height: 100svh; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 40px var(--gutter); text-align: center; }
.lost-mono { width: 110px; height: 110px; margin-bottom: 10px; fill: var(--gold-deep); }
.lost-title { font-family: var(--font-serif); font-weight: 400; font-size: 2rem; line-height: 1.2; margin-bottom: 6px; }

/* ---------- Bottom sheet (phones) / dialog (desktop) ---------- */

.sheet {
  position: fixed;
  inset: auto 0 0 0;
  width: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  overflow: visible;
}
.sheet::backdrop { background: rgb(30 21 16 / 0.5); opacity: 0; transition: opacity 300ms var(--ease-out); }
.sheet.is-open::backdrop { opacity: 1; }
.sheet-panel {
  max-height: 88svh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 22px calc(22px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  background: var(--paper);
  box-shadow: 0 -10px 40px rgb(33 22 16 / 0.28);
  transform: translateY(100%);
  transition: transform 460ms var(--ease-drawer);
  touch-action: pan-y;
}
.sheet.is-open .sheet-panel { transform: translateY(0); }
.sheet.dragging .sheet-panel { transition: none; }
.sheet-grab { width: 42px; height: 5px; margin: 0 auto 18px; border-radius: 3px; background: var(--sand-deep); }
.sheet-title { margin: 0 0 8px; font-family: var(--font-serif); font-weight: 600; font-size: 1.45rem; line-height: 1.3; color: var(--ink); }
.sheet-text { margin: 0 0 18px; font-size: 1rem; line-height: 1.6; color: var(--ink-2); }
.sheet-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 0 0 12px; }
.sheet-option {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 60px;
  padding: 12px 18px;
  border: 1px solid var(--sand);
  border-radius: var(--r-m);
  background: #fffdf9;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.35;
  transition: transform 160ms var(--ease-out), border-color 200ms ease;
  -webkit-tap-highlight-color: transparent;
}
.sheet-option small { font-weight: 500; font-size: 0.875rem; color: var(--muted); }
.sheet-option:active { transform: scale(0.985); }
@media (hover: hover) and (pointer: fine) { .sheet-option:hover { border-color: var(--ink); } }
.sheet-close { width: 100%; min-height: 50px; border: 0; border-radius: var(--r-m); background: var(--linen); color: var(--ink); font-size: 1rem; font-weight: 600; transition: transform 160ms var(--ease-out); }
.sheet-close:active { transform: scale(0.985); }

/* ---------- Reveal on scroll (once) ---------- */

.reveal-on [data-reveal] { opacity: 0; translate: 0 18px; transition: opacity 700ms var(--ease-out), translate 700ms var(--ease-out); }
.reveal-on [data-reveal].in { opacity: 1; translate: 0 0; }

/* ---------- Larger screens ---------- */

@media (min-width: 600px) {
  :root { --gutter: 32px; --section-y: 112px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rsvp-card { padding: 36px 36px 34px; }
}

@media (min-width: 900px) {
  :root { --section-y: 136px; }
  .hero { justify-content: center; align-items: flex-end; padding-right: max(6vw, var(--gutter)); }
  .hero-card { max-width: 25rem; }
  .story-flow { max-width: 38rem; }
  .story-flow::after { content: ''; display: block; clear: both; }
  .postcard-right { float: right; width: 14rem; margin: 6px -4rem 18px 30px; }
  .postcard-left { float: left; width: 14rem; margin: 6px 30px 18px -4rem; }
  .postcard-trio { clear: both; max-width: 34rem; margin: 48px auto 52px; }
  .when { grid-template-columns: auto auto; align-items: center; gap: 56px; max-width: none; justify-content: center; }
  .when-text { text-align: left; }
  .venue { max-width: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); grid-template-areas: 'text photo' 'where photo'; column-gap: 56px; align-items: center; }
  .venue-text { grid-area: text; text-align: left; align-self: end; }
  .venue-photo { grid-area: photo; }
  .venue-where { grid-area: where; justify-items: start; text-align: left; align-self: start; padding: 24px; }
  .sheet { inset: 0; margin: auto; width: min(440px, calc(100% - 48px)); height: fit-content; }
  .sheet-panel { border-radius: 22px; transform: translateY(12px) scale(0.97); opacity: 0; transition: transform 260ms var(--ease-out), opacity 260ms var(--ease-out); box-shadow: var(--shadow-3); }
  .sheet.is-open .sheet-panel { transform: none; opacity: 1; }
  .sheet-grab { display: none; }
}

@media (min-width: 1200px) {
  .postcard-right { margin-right: -9rem; }
  .postcard-left { margin-left: -9rem; }
}

/* ---------- Small phones ---------- */

@media (max-width: 360px) {
  :root { --gutter: 16px; --section-y: 72px; }
  .lockup-caps { font-size: clamp(1.9rem, 10.5vw, 2.25rem); }
  .lockup-script { font-size: clamp(2.6rem, 14vw, 3rem); }
  .week-day { grid-template-columns: 3.6rem minmax(0, 1fr); gap: 12px; padding: 16px 14px 14px; }
  .week-date { padding-right: 10px; }
  .rsvp-card { padding: 22px 16px 24px; }
  .phone-row { grid-template-columns: 6.6rem minmax(0, 1fr); }
  .hero-date { gap: 10px; font-size: 1.125rem; }
  .hero-card { padding-left: 14px; padding-right: 14px; }
  .cd-num { font-size: 1.25rem; }
  .intro-hint { letter-spacing: 0.14em; }
  .swatches { gap: 12px; }
  .tl-item time { font-size: 1.2rem; }
  .cal-place { letter-spacing: 0.16em; }
  .btn { letter-spacing: 0.1em; padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 300px) {
  .hero-names { font-size: 2.1rem; }
  .hero-kicker, .hero-place { letter-spacing: 0.14em; }
  .hero-actions .btn { min-width: 0; padding-left: 20px; padding-right: 20px; }
  .cd-lab { letter-spacing: 0.1em; }
  .dress-code { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro-hint::before { animation: none; opacity: 0.9; transform: none; }
  .sheet-panel { transition: opacity 200ms ease; transform: none; opacity: 0; }
  .sheet.is-open .sheet-panel { opacity: 1; }
  #rsvp-submit[aria-busy='true'] .btn-label::after { animation: none; content: '...'; }
}
