/* Jana i Vitorio: invitation page. Paper and ink taken from the save-the-date card. */

/* ---------- Fonts (self-hosted, Latin + Latin Extended for č ć đ š ž) ---------- */
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/cormorant-garamond-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/cormorant-garamond-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/cormorant-garamond-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/cormorant-garamond-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/cormorant-garamond-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/cormorant-garamond-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant"; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/cormorant-garamond-latin-400-italic.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant"; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/cormorant-garamond-latin-ext-400-italic.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant"; font-style: italic; font-weight: 500; font-display: swap; src: url(/fonts/cormorant-garamond-latin-500-italic.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant"; font-style: italic; font-weight: 500; font-display: swap; src: url(/fonts/cormorant-garamond-latin-ext-500-italic.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/jost-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/jost-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/jost-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/jost-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Tokens ---------- */
:root {
  --paper: #f2f0eb;
  --paper-deep: #e9e5dc;
  --sheet: #faf9f6;
  --ink: #26221f;
  --ink-2: #5a534c;
  --ink-3: #8a8178;
  --line: #d9d3c8;
  --line-strong: #b9b0a3;
  --accent: #8f6440;
  --danger: #9b3b2e;
  --serif: "Cormorant", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", -apple-system, system-ui, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.2, 0.7, 0.1, 1);
  --gutter: clamp(22px, 6vw, 40px);
  --measure: 34rem;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 19px;
  line-height: 1.55;
  font-feature-settings: "kern", "liga", "onum";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
p { margin: 0; }
h1, h2 { margin: 0; font-weight: inherit; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button, a, label, [role="button"] { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
::selection { background: #e6d9c8; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; background: var(--ink); color: var(--paper); font-family: var(--sans); font-size: 14px; text-decoration: none; }
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 12px); }

.eyebrow {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 12.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-align: center;
}
.note { color: var(--ink-2); font-size: 17px; }
.link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: var(--line-strong); }
.link:active { text-decoration-color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 30px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 120ms ease-out, background-color 160ms ease-out, color 160ms ease-out, opacity 160ms;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--ink); color: var(--sheet); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:active { background: var(--paper-deep); }
.btn-text { border-color: transparent; background: none; min-height: 48px; padding: 0 12px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--line-strong); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: #3a3531; }
  .btn-ghost:hover { background: var(--paper-deep); }
  .btn-text:hover { color: var(--ink); }
}

/* ---------- Hero: the card, redrawn ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 0 72px;
}
.card {
  width: min(100%, 600px);
  container-type: inline-size;
  text-align: center;
}
.hands { position: relative; aspect-ratio: 1024 / 1172; }
.hand { position: absolute; inset: 0; width: 100%; height: 100%; }
/* The two hands are one drawing, cut at the hooked little fingers, so they can meet. */
.hand-left { clip-path: inset(0 46.5% 0 0); }
.hand-right { clip-path: inset(0 0 0 53.5%); }
.std {
  position: absolute;
  left: 50%;
  top: 15.6%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.3cqi;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 6.4cqi;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding-left: 0.2em; /* optically centre the tracked caps */
}
.std .the { font-size: 0.62em; letter-spacing: 0.24em; }
.names { margin: 1cqi auto 0; width: 64%; }
.names img { width: 100%; }
.hero .date {
  margin-top: 4.5cqi;
  font-size: clamp(21px, 5.6cqi, 32px);
  letter-spacing: 0.42em;
  padding-left: 0.42em;
  font-feature-settings: "lnum";
}
.venue {
  margin-top: 3.4cqi;
  font-size: clamp(14px, 3.6cqi, 19px);
  letter-spacing: 0.26em;
  padding-left: 0.26em;
}
.scroll-cue {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
  left: 50%;
  translate: -50% 0;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--ink-2);
}

/* Entrance: hands slide together, then the words appear. Pure CSS, so it runs before any script. */
@media (prefers-reduced-motion: no-preference) {
  .hand-left { animation: hand-in-left 1.9s var(--ease-out) 0.15s both; }
  .hand-right { animation: hand-in-right 1.9s var(--ease-out) 0.15s both; }
  .std { animation: rise-centered 1.1s var(--ease-out) 1.05s both; }
  .names { animation: rise 1.2s var(--ease-out) 1.35s both; }
  .hero .date { animation: rise 1s var(--ease-out) 1.6s both; }
  .venue { animation: rise 1s var(--ease-out) 1.75s both; }
  .scroll-cue { animation: fade 1s ease 2.4s both, nudge 2.4s ease-in-out 3.4s infinite; }
}
@keyframes hand-in-left { from { opacity: 0; transform: translateX(-9%); } 35% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes hand-in-right { from { opacity: 0; transform: translateX(9%); } 35% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@keyframes rise-centered { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translateX(-50%); } }

/* ---------- Scroll reveal (armed by script; without it everything is simply visible) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal-armed .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s ease, transform 0.9s var(--ease-out); }
  .reveal-armed .reveal.is-in { opacity: 1; transform: none; }
}

/* ---------- Intro ---------- */
.intro {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 40px var(--gutter) 48px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}
.intro::before { content: ""; width: 1px; height: 56px; background: var(--line-strong); }
.lead { font-size: clamp(24px, 6.4vw, 30px); line-height: 1.38; text-wrap: balance; }
.lead em { font-style: italic; }
.countdown { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.countdown .num { font-size: 68px; line-height: 1; font-weight: 400; font-feature-settings: "lnum", "tnum"; }
.countdown .lbl { font-family: var(--sans); font-size: 12.5px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-2); }

/* ---------- Full-bleed photo ---------- */
.bleed { position: relative; margin: 0 auto; max-width: 720px; }
/* The photo dissolves into the paper at the top, so the grey sky never meets the page as a hard edge. */
.bleed img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background-size: cover;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 24%, #000 94%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 24%, #000 94%, transparent 100%);
}
.bleed figcaption::first-letter { text-transform: uppercase; }
.bleed figcaption {
  position: absolute;
  top: 9%;
  left: 0;
  right: 0;
  text-align: center;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(22px, 6vw, 30px);
  color: #2b2724;
}

/* ---------- Details ---------- */
.details {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 96px var(--gutter) 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
}
.detail { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.label { font-family: var(--sans); font-size: 12.5px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.value { font-size: 28px; line-height: 1.25; }
.value::first-letter { text-transform: uppercase; }
.schedule { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.schedule li { display: flex; gap: 14px; justify-content: center; font-size: 19px; }
.schedule .time { font-feature-settings: "lnum", "tnum"; color: var(--ink-2); min-width: 3.2em; text-align: right; }
.schedule.is-empty { display: none; }
.schedule:not(.is-empty) + .schedule-pending { display: none; }
.rule { width: 1px; height: 40px; background: var(--line-strong); }
.maps { display: flex; gap: 12px; align-items: center; margin-top: 6px; font-size: 18px; color: var(--ink-2); }
.maps .link { padding: 8px 0; color: var(--ink); }
.details .btn { margin-top: 18px; }

/* ---------- Moments (gallery) ---------- */
.moments { padding: 8px 0 96px; }
.moments .eyebrow { margin-bottom: 28px; }
.track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(78vw, 340px);
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 0 max(var(--gutter), calc((100vw - 1060px) / 2));
  scroll-padding: 0 max(var(--gutter), calc((100vw - 1060px) / 2));
  scrollbar-width: none;
}
.track::-webkit-scrollbar { display: none; }
.track:focus-visible { outline-offset: -2px; }
.slide { margin: 0; scroll-snap-align: start; }
.slide img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 2px; background-size: cover; }
.dots { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); transition: background-color 200ms, transform 200ms; }
.dots i.is-on { background: var(--ink); transform: scale(1.25); }
@media (min-width: 1100px) { .dots { display: none; } }

/* ---------- RSVP ---------- */
.rsvp {
  background: var(--paper-deep);
  padding: 96px 16px calc(120px + env(safe-area-inset-bottom, 0px));
  scroll-margin-top: 0;
}
.rsvp-head { max-width: var(--measure); margin: 0 auto 40px; text-align: center; display: grid; gap: 14px; padding: 0 var(--gutter); }
.rsvp-title { font-style: italic; font-weight: 400; font-size: clamp(34px, 9vw, 46px); line-height: 1.1; }
.form, .done, .closed {
  max-width: 560px;
  margin: 0 auto;
  background: var(--sheet);
  border: 1px solid #e1dbd0;
  padding: 40px clamp(20px, 6vw, 44px) 32px;
}
.field { border: 0; margin: 0 0 34px; padding: 0; min-width: 0; }
.field > label, .field > legend {
  display: block;
  padding: 0;
  margin-bottom: 8px;
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.opt { text-transform: none; letter-spacing: 0.02em; color: var(--ink-3); }
.help { font-size: 16.5px; line-height: 1.45; color: var(--ink-2); margin-top: 8px; }
.field > legend + .help { margin: -2px 0 12px; }
input[type="text"], textarea {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 10px 2px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 21px;
  line-height: 1.35;
  transition: border-color 160ms;
  -webkit-appearance: none;
  appearance: none;
}
textarea { resize: vertical; min-height: 56px; }
input[type="text"]:focus, textarea:focus { outline: none; border-bottom-color: var(--ink); box-shadow: 0 1px 0 0 var(--ink); }
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: 1; }
.error { color: var(--danger); font-family: var(--sans); font-size: 14px; letter-spacing: 0.01em; margin-top: 8px; }
.error:empty { display: none; }
.has-error input[type="text"], .has-error textarea { border-bottom-color: var(--danger); }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; pointer-events: none; }
.choice-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 112px;
  justify-content: center;
  padding: 16px 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  text-align: center;
  transition: border-color 180ms, background-color 180ms, transform 120ms;
}
.choice:active .choice-body { transform: scale(0.98); }
.choice-mark {
  width: 20px; height: 20px; margin-bottom: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: grid; place-items: center;
  transition: background-color 180ms, border-color 180ms;
}
.choice-mark::after {
  content: "";
  width: 8px; height: 4px;
  border-left: 1.3px solid var(--sheet);
  border-bottom: 1.3px solid var(--sheet);
  transform: translateY(-1px) rotate(-45deg) scale(0.4);
  opacity: 0;
  transition: transform 220ms var(--ease-out), opacity 160ms;
}
.choice-title { font-size: 22px; line-height: 1.2; }
.choice-sub { font-style: italic; font-weight: 400; font-size: 17px; color: var(--ink-2); }
.choice input:checked + .choice-body { border-color: var(--ink); background: #f4f0e8; }
.choice input:checked + .choice-body .choice-mark { background: var(--ink); border-color: var(--ink); }
.choice input:checked + .choice-body .choice-mark::after { opacity: 1; transform: translateY(-1px) rotate(-45deg) scale(1); }
.choice input:focus-visible + .choice-body { outline: 2px solid var(--ink); outline-offset: 3px; }

.when-yes { animation: open 360ms var(--ease-out); }
@keyframes open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.companions { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.companion { animation: open 280ms var(--ease-out); }
.companion-row { display: flex; align-items: center; gap: 8px; }
.companion-row input[type="text"] { flex: 1; min-width: 0; font-size: 20px; }
.chip { position: relative; flex: none; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.chip span {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  font-family: var(--sans); font-size: 13px; letter-spacing: 0.06em; color: var(--ink-2);
  transition: background-color 160ms, color 160ms, border-color 160ms;
}
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--sheet); }
.chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.icon-btn {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; background: none; color: var(--ink-3); cursor: pointer; border-radius: 50%;
}
.icon-btn:active { background: var(--paper-deep); color: var(--ink); }
.btn-add {
  width: 100%; margin-top: 12px; border: 1px dashed var(--line-strong); color: var(--ink-2); background: transparent;
  letter-spacing: 0.16em;
}
.btn-add:active { background: var(--paper); }
.btn-add[hidden] { display: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { text-align: center; margin: -10px 0 18px; }
.btn-submit { width: 100%; position: relative; }
.btn-submit .spinner {
  position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 1.3px solid rgba(250, 249, 246, 0.35); border-top-color: var(--sheet);
  opacity: 0; animation: spin 0.8s linear infinite;
}
.btn-submit.is-loading { pointer-events: none; }
.btn-submit.is-loading .btn-label { opacity: 0; }
.btn-submit.is-loading .spinner { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
[data-cancel-edit] { display: flex; margin: 10px auto 0; }
[data-cancel-edit][hidden] { display: none; }

.done, .closed { text-align: center; padding-top: 28px; }
.done:focus { outline: none; }
.done-hands {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  object-position: 50% 100%;
  margin: 0 auto 6px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 34%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 34%);
}
.done-title { font-style: italic; font-weight: 400; font-size: clamp(32px, 8.5vw, 42px); line-height: 1.12; text-wrap: balance; }
.done-text { margin: 14px auto 0; max-width: 26rem; font-size: 19px; text-wrap: pretty; }
.done-summary { list-style: none; margin: 26px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 18px; color: var(--ink-2); }
.done-summary:empty { display: none; }
.done-summary strong { color: var(--ink); font-weight: 600; }
.done-actions { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 30px; }
.done-actions .btn-ghost { width: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .done.is-shown .done-hands { animation: rise 1s var(--ease-out) both; }
  .done.is-shown .done-title { animation: rise 0.9s var(--ease-out) 0.15s both; }
  .done.is-shown .done-text, .done.is-shown .done-summary, .done.is-shown .done-actions { animation: rise 0.9s var(--ease-out) 0.3s both; }
}

/* ---------- Footer ---------- */
.footer {
  padding: 72px var(--gutter) calc(110px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  background: var(--paper-deep);
  border-top: 1px solid #ddd7cc;
}
.footer img { width: min(56%, 260px); }
.footer .date { font-size: 18px; letter-spacing: 0.4em; padding-left: 0.4em; color: var(--ink-2); font-feature-settings: "lnum"; }

/* ---------- Sticky call to action ---------- */
.sticky-cta {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  z-index: 20;
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 30px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--sheet);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 10px 30px -12px rgba(38, 34, 31, 0.55);
  transform: translate(-50%, 0);
  transition: transform 320ms var(--ease-out), opacity 240ms ease;
}
.sticky-cta.is-away { transform: translate(-50%, 140%); opacity: 0; pointer-events: none; }
.sticky-cta[hidden] { display: none; }

/* ---------- Larger screens ---------- */
@media (min-width: 760px) {
  body { font-size: 20px; }
  .hero { padding-bottom: 96px; }
  .card { width: min(56vh, 560px); }
  /* On a wide screen the sleeves would end in mid-air: let them fade out instead. */
  .hands {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%), linear-gradient(to bottom, transparent 0%, #000 12%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%), linear-gradient(to bottom, transparent 0%, #000 12%);
    mask-composite: intersect;
  }
  .rsvp { padding-top: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* ---------- 404 ---------- */
.lost { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px; text-align: center; }
.lost img { width: min(64%, 300px); }
.lost p { font-style: italic; font-weight: 400; font-size: 22px; color: var(--ink-2); }
