/* Design tokens: docs/DESIGN.md. Sketchbook: graphite on cool paper, watercolor washes, violet ink, one marigold. */
:root {
  --paper: #fafaf7;
  --paper-2: #f1f1ec;
  --graphite: #2f3036;
  --smudge: #6e7079;
  --rule: #dcdcd4;
  --wash-blue: #a9c3de;
  --wash-rose: #edc0b4;
  --violet: #42306e;
  --violet-2: #5a4592;
  --marigold: #e2a646;
  --danger: #a3372c;
  --ok: #3f6b3a;

  --display: "Gloock", "Iowan Old Style", Georgia, serif;
  --sans: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --arabic: "Amiri", "Noto Naskh Arabic", serif;

  --s-13: .8125rem; --s-17: 1.0625rem; --s-22: 1.375rem; --s-30: 1.875rem; --s-40: 2.5rem; --s-53: 3.3rem; --s-71: 4.4rem; --s-94: 5.9rem;
  --gutter: clamp(16px, 4.5vw, 56px);
  --max: 1200px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --radius-sm: 10px;
  --radius-lg: 22px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--graphite); font: 400 var(--s-17)/1.55 var(--sans); font-optical-sizing: auto; -webkit-font-smoothing: antialiased; }
img, svg, video { display: block; max-width: 100%; }
a { color: var(--violet); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--violet-2); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.04; letter-spacing: -.012em; margin: 0 0 .45em; text-wrap: balance; }
h1 { font-size: clamp(var(--s-40), 7.2vw, var(--s-94)); }
h2 { font-size: clamp(var(--s-30), 4.2vw, var(--s-53)); }
h3 { font-size: var(--s-22); line-height: 1.2; }
p { margin: 0 0 1em; text-wrap: pretty; }
.quiet { color: var(--smudge); }
.small { font-size: var(--s-13); }
.lede { font-size: clamp(1.1rem, 1.6vw, var(--s-22)); line-height: 1.5; color: var(--smudge); max-width: 36ch; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.inline { display: inline; }
code { font-size: .88em; background: var(--paper-2); padding: .1em .35em; border-radius: 5px; }

/* buttons */
.btn { --bg: var(--graphite); --fg: var(--paper); display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: .8rem 1.35rem; border-radius: 999px; border: 1.5px solid var(--bg); background: var(--bg); color: var(--fg); font: 600 1rem/1 var(--sans); text-decoration: none; cursor: pointer; transition: transform .25s var(--ease), background-color .25s, color .25s; }
.btn:hover { color: var(--fg); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-ink { --bg: var(--violet); --fg: #fff; }
.btn-ink:hover { background: var(--violet-2); border-color: var(--violet-2); }
.btn-ghost { --fg: var(--graphite); background: transparent; }
.btn-ghost:hover { background: var(--paper-2); }
.btn-sm { min-height: 40px; padding: .55rem 1rem; font-size: .92rem; }
.btn-danger { --bg: transparent; --fg: var(--danger); border-color: currentColor; color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--violet); cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.5rem; }

/* chrome */
.demo-note { margin: 0; padding: .45rem var(--gutter); background: var(--graphite); color: #e9e9e4; font-size: var(--s-13); text-align: center; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem var(--gutter); max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; position: relative; z-index: 2; }
.topbar nav { display: flex; align-items: center; gap: clamp(.9rem, 2.4vw, 1.8rem); flex-wrap: wrap; }
.topbar nav a:not(.btn) { color: var(--graphite); text-decoration: none; font-weight: 500; }
.topbar nav a:not(.btn):hover { text-decoration: underline; }
.topbar-studio { max-width: none; border-bottom: 1px solid var(--rule); background: var(--paper); }
.wordmark { font-family: var(--display); font-size: 1.6rem; letter-spacing: -.02em; color: var(--graphite); text-decoration: none; margin: 0; }
.footer { max-width: var(--max); margin: 0 auto; padding: 3.5rem var(--gutter) 3rem; display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; border-top: 1px solid var(--rule); }
.footer-links { display: grid; gap: .45rem; }
.footer-links a { color: var(--graphite); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* watercolor washes: soft, irregular, behind content */
.washes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.washes span { position: absolute; border-radius: 50%; filter: url(#wash); opacity: .55; mix-blend-mode: multiply; }
.washes .w1 { width: 46vmax; height: 38vmax; background: var(--wash-blue); top: -18vmax; right: -12vmax; }
.washes .w2 { width: 34vmax; height: 30vmax; background: var(--wash-rose); bottom: -16vmax; left: -10vmax; opacity: .5; }
.washes .w3 { width: 18vmax; height: 16vmax; background: var(--marigold); top: 34%; right: 22%; opacity: .16; }

/* sections */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(3.5rem, 9vw, 7.5rem) var(--gutter); position: relative; }
.section-narrow { max-width: 760px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.section-head h1, .section-head h2 { margin: 0; }

/* home: hero */
.hero { position: relative; overflow: hidden; }
.hero-inner { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; padding: clamp(1.5rem, 5vw, 4rem) var(--gutter) clamp(3rem, 8vw, 6rem); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hero h1 { max-width: 11ch; }
.hero .lede { margin-top: 1.25rem; }
.replay { margin-top: 1rem; }
.phone-stage { display: grid; justify-items: center; gap: .9rem; }
.phone { position: relative; width: min(330px, 78vw); aspect-ratio: 9 / 19.2; border-radius: 46px; padding: 11px; background: #1e1f24; box-shadow: 0 40px 80px -30px rgba(40, 32, 70, .45), 0 0 0 1px rgba(0,0,0,.08), inset 0 0 0 2px #3a3b42; }
.phone::before { content: ""; position: absolute; top: 20px; left: 50%; width: 92px; height: 26px; margin-left: -46px; border-radius: 20px; background: #1e1f24; z-index: 2; }
.phone iframe, .phone > .screen { width: 100%; height: 100%; border: 0; border-radius: 36px; background: var(--paper); overflow: hidden; display: block; }
.phone-caption { font-size: var(--s-13); color: var(--smudge); }

/* home: promise */
.promise { padding-block: clamp(3rem, 8vw, 6rem); }
.promise blockquote { margin: 0; font-family: var(--display); font-size: clamp(var(--s-30), 5vw, var(--s-71)); line-height: 1.06; max-width: 18ch; }
.promise cite { display: block; margin-top: 1.4rem; font: 400 var(--s-17)/1.4 var(--sans); color: var(--smudge); font-style: normal; }

/* home: packages as a progression */
.progression { display: grid; grid-template-columns: .9fr 1.15fr 1.25fr; border-top: 1.5px solid var(--graphite); }
.tier { padding: 1.75rem clamp(1rem, 2.4vw, 2rem) 2rem; display: grid; grid-template-rows: auto auto 1fr auto; gap: .6rem; }
.tier + .tier { border-left: 1px solid var(--rule); }
.tier .sketch { height: 150px; color: var(--graphite); margin-bottom: .6rem; }
.tier .sketch svg { height: 100%; width: auto; }
.tier p { color: var(--smudge); max-width: 34ch; }
.tier .price { font-family: var(--display); font-size: var(--s-30); color: var(--graphite); margin: 0; }
.tier .price small { font: 400 var(--s-13) var(--sans); color: var(--smudge); display: block; }
.tier .actions { margin-top: .8rem; }

/* home: steps joined by a line */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.4rem; counter-reset: step; position: relative; }
.steps::before { content: ""; position: absolute; top: 19px; left: 20px; right: 20px; height: 1.5px; background: var(--graphite); opacity: .25; }
.steps li { counter-increment: step; position: relative; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--graphite); font-family: var(--display); font-size: 1.15rem; margin-bottom: .9rem; position: relative; }
.steps li:last-child::before { background: var(--marigold); border-color: var(--marigold); }
.steps h3 { font-family: var(--sans); font-weight: 600; font-size: 1.02rem; margin-bottom: .3rem; }
.steps p { font-size: .95rem; color: var(--smudge); margin: 0; }

/* forms */
.field { display: grid; gap: .35rem; margin-bottom: 1.1rem; }
.field-label { font-weight: 600; font-size: .95rem; }
.optional { font-weight: 400; color: var(--smudge); font-size: .85rem; }
.field input, .field textarea, .field select { font: inherit; font-size: 16px; padding: .8rem .95rem; border: 1.5px solid var(--rule); border-radius: var(--radius-sm); background: #fff; color: var(--graphite); width: 100%; transition: border-color .2s, box-shadow .2s; }
.field textarea { resize: vertical; min-height: 6rem; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(66, 48, 110, .14); }
.field-hint { font-size: .88rem; color: var(--smudge); }
.field-error { font-size: .9rem; color: var(--danger); }
.has-error input, .has-error textarea { border-color: var(--danger); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }
.notice { padding: .9rem 1.1rem; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--rule); border-left: 4px solid var(--violet); margin: 1rem 0; }
.notice.ok { border-left-color: var(--ok); }
.error-text { color: var(--danger); }

/* choice tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.tile { position: relative; display: grid; gap: .35rem; align-content: start; padding: 1rem 1.1rem 1.1rem; border: 1.5px solid var(--rule); border-radius: var(--radius-lg); background: #fff; cursor: pointer; transition: border-color .2s, transform .2s var(--ease); }
.tile:hover { transform: translateY(-2px); }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile strong { font-size: 1.05rem; }
.tile span { color: var(--smudge); font-size: .94rem; }
.tile:has(input:checked) { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(66, 48, 110, .12); }
.tile:has(input:focus-visible) { outline: 2px solid var(--violet); outline-offset: 2px; }
.tile .glyph { width: 46px; height: 64px; margin-bottom: .4rem; color: var(--graphite); }
.designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: .9rem; }
.design { position: relative; display: grid; gap: .5rem; cursor: pointer; }
.design input { position: absolute; opacity: 0; pointer-events: none; }
.design .thumb { aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: var(--paper-2); border: 1.5px solid var(--rule); transition: transform .25s var(--ease), border-color .2s; }
.design .thumb img, .design .thumb .art { width: 100%; height: 100%; object-fit: cover; }
.design:hover .thumb { transform: translateY(-2px); }
.design:has(input:checked) .thumb { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(66, 48, 110, .14); }
.design:has(input:focus-visible) .thumb { outline: 2px solid var(--violet); outline-offset: 2px; }
.design-name { font-weight: 600; font-size: .95rem; }
.design[hidden] { display: none; }

/* builder */
.builder { max-width: var(--max); margin: 0 auto; padding: clamp(1rem, 3vw, 2.5rem) var(--gutter) 4rem; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.builder h1 { font-size: clamp(var(--s-30), 4.6vw, var(--s-53)); }
.rail { display: none; }
.js .rail { display: flex; gap: .4rem; list-style: none; padding: 0; margin: 0 0 2rem; }
.rail li { flex: 1; }
.rail button { width: 100%; text-align: left; background: none; border: 0; padding: .6rem 0 0; border-top: 3px solid var(--rule); font: 500 .85rem/1.2 var(--sans); color: var(--smudge); cursor: pointer; transition: border-color .3s, color .3s; }
.rail button[aria-current="step"] { border-top-color: var(--violet); color: var(--graphite); }
.rail button.done { border-top-color: var(--graphite); color: var(--graphite); }
.rail button:disabled { cursor: default; }
.step { margin-bottom: 2.6rem; }
.step-title { font-family: var(--display); font-size: var(--s-30); margin-bottom: .3rem; }
.step-intro { color: var(--smudge); margin-bottom: 1.4rem; }
.js .step { display: none; margin-bottom: 0; }
.js .step.is-active { display: block; animation: stepIn .45s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.step-nav { display: none; }
.js .step-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--rule); }
.js .submit-all { display: none; }
.preview-col { position: sticky; top: 1.25rem; display: grid; justify-items: center; gap: .8rem; }
.summary { display: grid; gap: .2rem; padding: 1.2rem 1.3rem; border: 1px solid var(--rule); border-radius: var(--radius-lg); background: #fff; margin-bottom: 1.2rem; }
.summary-row { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; }
.summary-row + .summary-row { border-top: 1px dashed var(--rule); }
.summary-total { font-family: var(--display); font-size: var(--s-30); }

/* couple's page */
.couple-head { display: grid; gap: .5rem; margin-bottom: 2rem; }
.share { position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: clamp(1.4rem, 4vw, 2.2rem); background: var(--violet); color: #f2eefb; margin-bottom: 2.4rem; }
.share h2 { color: #fff; font-size: clamp(var(--s-22), 3vw, var(--s-30)); margin-bottom: .2rem; }
.share .url { font-family: var(--display); font-size: clamp(1.15rem, 3.4vw, 1.75rem); color: #fff; word-break: break-all; margin: .6rem 0 1.2rem; }
.share .btn { --bg: #fff; --fg: var(--violet); }
.share .btn-ghost { --fg: #fff; border-color: rgba(255,255,255,.55); background: transparent; }
.share .btn-ghost:hover { background: rgba(255,255,255,.12); }
.share .quiet { color: #cfc6e6; }
.pay { border: 1.5px solid var(--graphite); border-radius: var(--radius-lg); padding: 1.4rem 1.5rem; margin-bottom: 2rem; background: #fff; }
.totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin: 1rem 0 1.4rem; }
.total { padding: 1rem 1.1rem; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--rule); }
.total strong { display: block; font-family: var(--display); font-weight: 400; font-size: var(--s-40); line-height: 1; }
.total span { color: var(--smudge); font-size: .95rem; }
.total.is-coming strong { color: var(--ok); }
.replies { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.replies li { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; padding: .85rem 0; border-bottom: 1px solid var(--rule); }
.replies li.is-new { animation: arrive 1.2s var(--ease); }
@keyframes arrive { from { background: rgba(226, 166, 70, .25); } to { background: transparent; } }
.reply-note { grid-column: 1 / -1; color: var(--smudge); font-size: .95rem; }
.badge { display: inline-block; padding: .2rem .65rem; border-radius: 999px; font-size: .85rem; font-weight: 500; background: var(--paper-2); color: var(--smudge); white-space: nowrap; }
.badge.yes { background: #e2eedd; color: var(--ok); }
.badge.no { background: #f4e1dd; color: var(--danger); }
.badge.wait { background: #f6ead2; color: #7a5413; }
.badge.info { background: #e8e3f4; color: var(--violet); }

/* admin */
.admin { max-width: 1240px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.kpi { padding: .9rem 1rem; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--rule); }
.kpi strong { display: block; font-family: var(--display); font-weight: 400; font-size: var(--s-30); line-height: 1.1; }
.kpi span { color: var(--smudge); font-size: .9rem; }
.callout { padding: .85rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1.4rem; font-size: .95rem; background: #f6ead2; }
.callout.ok { background: #e2eedd; }
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.table th { font-weight: 600; color: var(--smudge); background: var(--paper-2); font-size: .88rem; }
.table tr:last-child td { border-bottom: 0; }
.cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: start; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.2rem; margin: 0 0 1.5rem; }
.kv dt { color: var(--smudge); }
.kv dd { margin: 0; }
.subhead { font-family: var(--sans); font-weight: 600; font-size: 1.05rem; margin: 1.8rem 0 .7rem; }
.stack { display: grid; gap: .2rem; align-content: start; }
.panel { padding: 1.3rem; border: 1px solid var(--rule); border-radius: var(--radius-lg); background: #fff; }
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.login { max-width: 380px; margin: 0 auto; padding: 4rem var(--gutter); }

/* ========== the invitation ========== */
.body-invite { background: var(--inv-paper, var(--paper)); }
@media (min-width: 560px) { .body-invite { background: color-mix(in srgb, var(--inv-paper, #fafaf7) 82%, #000 6%); } }
.invitation { --paper: var(--inv-paper, #fafaf7); --ink: var(--inv-ink, #2f3036); --accent: var(--inv-accent, #42306e); position: relative; max-width: 440px; margin: 0 auto; min-height: 100svh; background: var(--paper); color: var(--ink); text-align: center; overflow: hidden; }
@media (min-width: 560px) { .invitation { box-shadow: 0 30px 80px -40px rgba(0,0,0,.35); } }
.invitation[dir="rtl"] { font-family: var(--arabic); }
.invitation[dir="rtl"] .names, .invitation[dir="rtl"] h2 { font-family: var(--arabic); font-weight: 700; }
.invitation .page { position: relative; padding: 1.25rem 1.25rem 2.25rem; }
.invitation .cover { min-height: 100svh; display: grid; align-content: center; gap: 1rem; padding-top: 1.25rem; }
.cover-frame { position: relative; display: grid; }
.cover-frame > .art, .cover-frame > .art-svg { grid-area: 1 / 1; width: 100%; height: auto; }
.cover-frame .words { grid-area: 1 / 1; align-self: center; justify-self: center; width: 70%; display: grid; gap: .55rem; z-index: 1; }
.cover-illus { display: grid; gap: 1.1rem; }
.illus { position: relative; aspect-ratio: 1080 / 1500; border-radius: 26px; overflow: hidden; }
.illus .layer { position: absolute; inset: -4% 0 0; width: 100%; height: 104%; object-fit: cover; will-change: transform; }
.illus .art-slot { position: absolute; inset: 0; }
.invitation .opening { font-size: .95rem; color: color-mix(in srgb, var(--ink) 70%, transparent); margin: 0; letter-spacing: .01em; }
.invitation .names { font-family: var(--display); font-weight: 400; font-size: clamp(2.6rem, 12.5vw, 3.6rem); line-height: .98; margin: 0; letter-spacing: -.01em; }
.invitation .names .amp { display: block; font-size: .42em; line-height: 1.6; color: var(--accent); }
.invitation .when-line { margin: .2rem 0 0; font-size: 1.05rem; }
.invitation .venue-line { margin: 0; color: color-mix(in srgb, var(--ink) 75%, transparent); }
.invitation .btn-accent, .invitation .btn { --bg: var(--accent); --fg: #fff; }
.invitation .btn-ghost { --fg: var(--ink); background: transparent; border-color: color-mix(in srgb, var(--ink) 35%, transparent); }
.invitation .btn-ghost:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.scroll-cue { margin-top: .6rem; font-size: .9rem; color: color-mix(in srgb, var(--ink) 60%, transparent); }
.scroll-cue::after { content: ""; display: block; width: 1.5px; height: 34px; margin: .6rem auto 0; background: currentColor; transform-origin: top; animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.details { display: grid; gap: .9rem; padding-top: 1.4rem; }
.invitation .strip { border-radius: 18px; overflow: hidden; aspect-ratio: 1080 / 600; }
.invitation .strip .art { width: 100%; height: 100%; object-fit: cover; }
.when-big { font-family: var(--display); font-size: 1.7rem; line-height: 1.15; margin: 0; }
.place { margin: 0; }
.center-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.schedule { list-style: none; padding: 0; margin: .4rem auto 0; display: grid; gap: .55rem; width: min(100%, 300px); text-align: start; }
.schedule li { display: grid; grid-template-columns: 76px 1fr; gap: .9rem; padding-bottom: .55rem; border-bottom: 1px dashed color-mix(in srgb, var(--ink) 20%, transparent); }
.schedule .t { font-family: var(--display); color: var(--accent); }
.dress, .note { margin: 0; }
.note { font-family: var(--display); font-size: 1.25rem; line-height: 1.3; }
.countdown { font-size: .95rem; color: color-mix(in srgb, var(--ink) 65%, transparent); }
.rsvp { margin-top: 1.8rem; padding: 1.6rem 1.25rem 1.4rem; border-radius: 24px; background: color-mix(in srgb, var(--accent) 7%, #fff); text-align: start; }
.rsvp h2 { font-size: 1.9rem; text-align: center; margin-bottom: .2rem; }
.reply-by { text-align: center; color: color-mix(in srgb, var(--ink) 65%, transparent); font-size: .95rem; margin-bottom: 1.2rem; }
.invitation .field input, .invitation .field textarea { border-color: color-mix(in srgb, var(--ink) 18%, transparent); }
.invitation .field input:focus, .invitation .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.yesno { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1.1rem; }
.yesno label { position: relative; display: grid; place-items: center; min-height: 52px; border-radius: 14px; border: 1.5px solid color-mix(in srgb, var(--ink) 18%, transparent); background: #fff; font-weight: 600; cursor: pointer; transition: all .2s; }
.yesno input { position: absolute; opacity: 0; }
.yesno label:has(input:checked) { background: var(--accent); border-color: var(--accent); color: #fff; }
.yesno label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.rsvp .btn { width: 100%; }
.thanks { text-align: center; padding: .4rem 0 1rem; }
.thanks strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.6rem; margin-bottom: .2rem; }
.inv-foot { padding: 2.5rem 1rem 3rem; display: grid; gap: .8rem; justify-items: center; font-size: .9rem; }
.inv-foot a { color: color-mix(in srgb, var(--ink) 60%, transparent); text-decoration: none; }
.preview-flag { position: sticky; top: 0; z-index: 5; margin: 0; padding: .45rem; background: var(--ink); color: var(--paper); font-size: .85rem; }
.film { background: #000; }
.film video { width: 100%; aspect-ratio: 16 / 9; }
.film-pending { padding: 1rem 1.25rem 0; }
.film-pending .frame { aspect-ratio: 16 / 9; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 10%, #fff); color: color-mix(in srgb, var(--ink) 70%, transparent); font-size: .95rem; padding: 1rem; }

/* art slots (no file and no placeholder) */
.art-slot { display: grid; place-items: center; background: #cfccc4; color: #4a4742; font-size: .75rem; padding: .5rem; text-align: center; }
.frame-art.art-slot { aspect-ratio: 1080 / 2340; border-radius: 26px; place-items: start center; padding-top: 1rem; }

/* the seal: tap to open */
.seal { display: none; }
.js .seal { display: grid; position: fixed; inset: 0; z-index: 20; place-items: center; align-content: center; gap: 1.4rem; background: var(--paper); color: var(--ink); transition: opacity .7s var(--ease), visibility 0s .7s; }
.seal-button { position: relative; width: 156px; height: 156px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; font-family: var(--display); font-size: 2.6rem; cursor: pointer; box-shadow: 0 18px 40px -12px color-mix(in srgb, var(--accent) 70%, #000), inset 0 0 0 9px color-mix(in srgb, #fff 18%, var(--accent)), inset 0 0 0 10px color-mix(in srgb, #000 12%, var(--accent)); transition: transform .5s var(--ease); }
.seal-button:hover { transform: scale(1.04) rotate(-3deg); }
.seal p { margin: 0; color: color-mix(in srgb, var(--ink) 70%, transparent); }
.seal-to { font-family: var(--display); font-size: 1.5rem; color: var(--ink) !important; }
.is-open .seal { opacity: 0; visibility: hidden; }
.is-open .seal-button { transform: scale(1.6); }

/* ===== motion: one orchestrated opening ===== */
.art-svg .ln { stroke-dasharray: 1; stroke-dashoffset: 1; }
.art-svg .lf { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.4); }
.reveal { opacity: 0; transform: translateY(16px); }
.illus .layer { opacity: 0; }
.illus .layer.l-middle { transform: translateY(6%); }
.illus .layer.l-front { transform: translateY(12%); }
.art-img.frame-art { clip-path: circle(0% at 50% 50%); }

.is-playing .art-svg .ln { animation: draw var(--dur, 2s) cubic-bezier(.55, .1, .3, 1) var(--d, 0s) forwards; }
.is-playing .art-svg .lf { animation: bud .55s var(--ease) var(--d, 0s) forwards; }
.is-playing .art-img.frame-art { animation: inkOpen 2.4s var(--ease) .2s forwards; }
.is-playing .illus .layer { animation: rise 1.6s var(--ease) var(--ld, 0s) forwards; }
.is-playing .reveal { animation: rise 1s var(--ease) var(--rd, 2.2s) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes bud { to { opacity: 1; transform: scale(1); } }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }
@keyframes inkOpen { to { clip-path: circle(80% at 50% 50%); } }

/* finished state: no-JS, reduced motion, previews that should not replay */
html:not(.js) .art-svg .ln, .is-still .art-svg .ln { stroke-dashoffset: 0; animation: none; }
html:not(.js) .art-svg .lf, .is-still .art-svg .lf { opacity: 1; transform: none; animation: none; }
html:not(.js) .reveal, .is-still .reveal, html:not(.js) .illus .layer, .is-still .illus .layer { opacity: 1; transform: none; animation: none; }
html:not(.js) .art-img.frame-art, .is-still .art-img.frame-art { clip-path: none; animation: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-delay: 0s !important; transition-duration: .001s !important; scroll-behavior: auto !important; }
  .art-svg .ln { stroke-dashoffset: 0; } .art-svg .lf, .reveal, .illus .layer { opacity: 1; transform: none; } .art-img.frame-art { clip-path: none; }
}

/* responsive */
@media (max-width: 980px) {
  .builder { grid-template-columns: 1fr; }
  .preview-col { position: static; order: -1; }
  .js .preview-col { display: none; }
  .js .builder.show-preview .preview-col { display: grid; order: 0; }
  .steps { grid-template-columns: 1fr 1fr 1fr; row-gap: 2rem; }
  .steps::before { display: none; }
}
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero h1 { max-width: 13ch; }
  .progression { grid-template-columns: 1fr; }
  .tier + .tier { border-left: 0; border-top: 1px solid var(--rule); }
  .cols { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
}
@media (max-width: 560px) {
  .pair, .tiles { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .totals { grid-template-columns: 1fr 1fr 1fr; gap: .5rem; }
  .total strong { font-size: var(--s-30); }
  .rail button { font-size: 0; }
  .rail button::after { content: attr(data-short); font-size: .8rem; }
}
@media (max-width: 560px) { .total span { font-size: .82rem; } .total { padding: .8rem .75rem; } .share .actions .btn { flex: 1 1 auto; } }
