/* Hadir — guest pages */
@font-face { font-family: "Cormorant"; src: url(/fonts/cormorant-garamond-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url(/fonts/cormorant-garamond-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url(/fonts/cormorant-garamond-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url(/fonts/cormorant-garamond-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url(/fonts/cormorant-garamond-latin-500-italic.woff2) format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url(/fonts/cormorant-garamond-latin-600-italic.woff2) format("woff2"); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Pinyon"; src: url(/fonts/pinyon-script-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Montserrat"; src: url(/fonts/montserrat-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url(/fonts/montserrat-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url(/fonts/montserrat-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --paper: #f5f2ea;
  --paper-2: #ece6da;
  --ink: #3a3632;
  --muted: #6f675f;
  --rose: #b7837f;
  --rose-deep: #9a625d;
  --rose-soft: #f1e3df;
  --sage: #7f8e6b;
  --line: rgba(58, 54, 50, .16);
  --card: rgba(255, 253, 249, .72);
  --err: #a8433b;
  --serif: "Cormorant", "Cormorant Garamond", Georgia, serif;
  --script: "Pinyon", "Snell Roundhand", cursive;
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 18px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font-family: var(--serif); font-size: 19px; line-height: 1.55;
  background-color: var(--paper);
  /* fine woven grain, drawn in the browser */
  background-image:
    radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,.65), rgba(255,255,255,0) 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9 .045' numOctaves='2' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .31 0 0 0 0 .26 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)' opacity='.22'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.045 .9' numOctaves='2' seed='8'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .31 0 0 0 0 .26 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23b)' opacity='.18'/%3E%3C/svg%3E");
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 50; font-family: var(--sans); font-size: 14px; }
.skip:focus { top: 12px; }

/* decorative sprigs */
.sprig { position: absolute; pointer-events: none; z-index: 0; background: url(/assets/sprig.svg) no-repeat center / contain; opacity: .85; }
.sprig-tr { width: clamp(96px, 24vw, 300px); aspect-ratio: 250 / 310; top: -34px; right: -34px; transform: rotate(8deg); }
.sprig-bl { width: clamp(110px, 24vw, 250px); aspect-ratio: 250 / 310; top: calc(100svh - clamp(120px, 28vw, 280px)); left: -30px; transform: rotate(188deg); opacity: .55; }
body { position: relative; }
.decor { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }

main { position: relative; z-index: 1; width: min(100% - 32px, 600px); margin: 0 auto; padding: 0 0 40px; }

/* ---------- invitation ---------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 84px 4px 40px; }
.hero > * { animation: rise .9s var(--ease) both; }
.hero > *:nth-child(2) { animation-delay: .08s; } .hero > *:nth-child(3) { animation-delay: .18s; }
.hero > *:nth-child(4) { animation-delay: .3s; } .hero > *:nth-child(5) { animation-delay: .4s; }
.hero > *:nth-child(6) { animation-delay: .48s; } .hero > *:nth-child(7) { animation-delay: .56s; }
.hero > *:nth-child(n+8) { animation-delay: .64s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.cover { margin: 0 0 28px; width: min(100%, 360px); }
.cover-btn { display: block; width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.55); cursor: zoom-in; box-shadow: 0 18px 40px -26px rgba(58,54,50,.45); }
.cover-btn img { width: 100%; border-radius: 15px; max-height: 62vh; object-fit: cover; }

.eyebrow { margin: 0 0 18px; padding: 0 6px; font-family: var(--serif); font-weight: 600; font-size: clamp(14px, 3.6vw, 17px); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); max-width: 36em; line-height: 1.6; text-wrap: balance; }
.names { margin: 0; font-weight: 400; display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.names { width: 100%; }
.names .n1, .names .n2 { font-family: var(--script); font-size: clamp(44px, 12.5vw, 76px); color: var(--ink); padding: 0 .12em; white-space: nowrap; max-width: 100%; }
.names .amp { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(30px, 8vw, 46px); color: var(--rose); margin: .05em 0 .1em; }

.when { margin: 30px 0 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rule { display: flex; align-items: center; gap: 12px; color: var(--rose); font-size: 11px; }
.rule i { display: block; width: 54px; height: 1px; background: currentColor; opacity: .55; }
.weekday { margin: 12px 0 0; font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); }
.date { margin: 2px 0 0; font-size: clamp(27px, 7vw, 34px); font-weight: 500; letter-spacing: .02em; }
.time { margin: 0 0 12px; font-style: italic; font-size: 20px; color: var(--muted); }
.venue { margin: 18px 0 0; font-style: italic; font-size: 21px; font-weight: 500; max-width: 26ch; }
.for { margin: 24px 0 0; font-family: var(--sans); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.for strong { font-family: var(--serif); font-size: 24px; letter-spacing: 0; text-transform: none; font-weight: 600; color: var(--ink); }
.welcome { margin: 22px auto 0; max-width: 34ch; font-size: 19px; color: var(--ink); }
.actions { margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(100%, 340px); }
.btn-row { display: flex; gap: 10px; width: 100%; }
.btn-row .btn { flex: 1; }
.countdown { margin: 20px 0 0; font-family: var(--sans); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--sage); }
.intro-note { margin: 30px auto 0; max-width: 30ch; font-style: italic; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  -webkit-appearance: none; appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 22px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; text-decoration: none;
  font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  transition: transform .2s var(--ease), background-color .2s, box-shadow .2s, color .2s, border-color .2s;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--rose-deep); color: #fff; box-shadow: 0 12px 26px -16px rgba(154,98,93,.9); width: 100%; }
.btn.primary:hover { background: #8a5550; }
.btn.ghost { background: rgba(255,255,255,.5); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--rose); color: var(--rose-deep); }
.btn.small { min-height: 44px; padding: 8px 16px; font-size: 12px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn:focus-visible, .link-btn:focus-visible, .step:focus-visible, .cover-btn:focus-visible { outline: 2px solid var(--rose-deep); outline-offset: 3px; }
.link-btn { -webkit-appearance: none; appearance: none; background: none; border: 0; padding: 10px 2px; min-height: 44px; font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .06em; color: var(--rose-deep); cursor: pointer; }
.link-btn[disabled] { color: var(--muted); opacity: .6; cursor: not-allowed; }

/* ---------- cards ---------- */
.card { margin: 0 0 26px; padding: clamp(24px, 6vw, 40px); background: var(--card); border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 30px 60px -44px rgba(58,54,50,.5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.h2 { margin: 0 0 6px; font-weight: 500; font-size: clamp(30px, 7.5vw, 38px); letter-spacing: .02em; text-align: center; line-height: 1.15; }
.h3 { margin: 0 0 4px; font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.card-head { text-align: center; margin-bottom: 26px; }
.sub { margin: 4px 0 0; font-style: italic; color: var(--muted); font-size: 18px; }
.reveal-on-scroll { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal-on-scroll.in { opacity: 1; transform: none; }

/* programme */
.sched { list-style: none; margin: 22px 0 0; padding: 0; }
.sched li { display: grid; grid-template-columns: minmax(84px, 30%) 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); align-items: baseline; }
.sched li:first-child { border-top: 0; }
.sched .t { font-weight: 600; font-style: italic; text-align: right; color: var(--rose-deep); font-size: 18px; }
.sched .x { font-size: 19px; }
.sched li.no-time .t::before { content: "·"; color: var(--rose); }
.info { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); text-align: center; }
.details > .info:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.info p { margin: 6px 0 0; white-space: pre-line; font-size: 19px; }

/* ---------- form ---------- */
form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
label, .label, legend { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); padding: 0; }
legend { margin-bottom: 8px; }
.req { color: var(--rose-deep); }
.opt { font-weight: 400; letter-spacing: .04em; text-transform: none; color: var(--muted); }
input[type=text], input[type=tel], input[type=email], textarea {
  width: 100%; min-height: 52px; padding: 13px 16px; border: 1px solid rgba(58,54,50,.22); border-radius: 14px; background: rgba(255,255,255,.82);
  font-family: var(--sans); font-size: 16px; color: var(--ink); transition: border-color .2s, box-shadow .2s, background-color .2s;
}
textarea { resize: vertical; line-height: 1.5; min-height: 64px; }
input::placeholder, textarea::placeholder { color: #9b938a; }
input:focus, textarea:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 4px rgba(183,131,127,.18); background: #fff; }
.field.bad input, .field.bad textarea { border-color: var(--err); }
.ferr { margin: 0; min-height: 0; font-family: var(--sans); font-size: 13px; color: var(--err); }
.ferr:empty { display: none; }
.hint { margin: 0; font-family: var(--sans); font-size: 12.5px; color: var(--muted); }
.hint:empty { display: none; }
.err-summary { padding: 14px 16px; border-radius: 14px; background: #f7e4e1; border: 1px solid rgba(168,67,59,.35); color: #7d2f29; font-family: var(--sans); font-size: 14px; line-height: 1.45; }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 10px 16px; border: 1px solid rgba(58,54,50,.2); border-radius: 18px; background: rgba(255,255,255,.7); cursor: pointer; text-align: center; text-transform: none; letter-spacing: 0; font-weight: 400; transition: border-color .2s, background-color .2s, box-shadow .2s, transform .2s var(--ease); }
.choice-card:hover { border-color: var(--rose); }
.choice-card input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice-card .ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; transition: background-color .2s, border-color .2s; }
.choice-card svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.choice-card .txt { display: flex; flex-direction: column; gap: 2px; }
.choice-card b { font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.choice-card small { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--muted); }
.choice-card:has(input:checked) { border-color: var(--rose-deep); background: var(--rose-soft); box-shadow: 0 0 0 3px rgba(183,131,127,.18); }
.choice-card:has(input:checked) .ico { background: var(--rose-deep); border-color: var(--rose-deep); }
.choice-card:has(input:checked) svg { stroke: #fff; }
.choice-card:has(input:focus-visible) { outline: 2px solid var(--rose-deep); outline-offset: 3px; }
.choice-card.on { border-color: var(--rose-deep); background: var(--rose-soft); }

/* smooth show / hide for the attendance questions */
.reveal { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .45s var(--ease), opacity .35s; margin-top: -20px; }
.reveal.open { grid-template-rows: 1fr; opacity: 1; margin-top: 0; }
.reveal-in { overflow: hidden; display: flex; flex-direction: column; gap: 20px; min-height: 0; }
.reveal.open .reveal-in { overflow: visible; }

.stepper { display: flex; align-items: center; gap: 12px; }
.step { width: 50px; height: 50px; border-radius: 50%; border: 1px solid rgba(58,54,50,.22); background: #fff; color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: border-color .2s, transform .15s; font-family: var(--sans); }
.step:hover:not([disabled]) { border-color: var(--rose); }
.step:active:not([disabled]) { transform: scale(.94); }
.step[disabled] { opacity: .35; cursor: not-allowed; }
.stepper output { min-width: 40px; text-align: center; font-size: 32px; font-weight: 500; }
.step-unit { font-style: italic; color: var(--muted); font-size: 18px; }

.guests { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.guests li { display: flex; gap: 8px; align-items: center; animation: rise .35s var(--ease) both; }
.guests input { flex: 1; min-width: 0; }
.rm { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.7); color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.rm:hover { color: var(--err); border-color: rgba(168,67,59,.4); }
.rm:focus-visible { outline: 2px solid var(--rose-deep); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.btn .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- confirmation ---------- */
.done { text-align: center; outline: none; animation: rise .7s var(--ease) both; }
.tick { width: 64px; height: 64px; margin: 0 auto 10px; display: block; }
.tick circle { fill: none; stroke: var(--rose); stroke-width: 1.6; stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .8s var(--ease) .1s forwards; }
.tick path { fill: none; stroke: var(--rose-deep); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .45s var(--ease) .7s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done-kicker { margin: 4px 0 0; font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--sage); }
.done-title { margin: 6px 0 0; font-family: var(--script); font-weight: 400; font-size: clamp(46px, 12vw, 64px); line-height: 1.1; }
.done-name { margin: 2px 0 0; font-size: 24px; font-weight: 600; }
.done-msg { margin: 12px auto 0; max-width: 34ch; color: var(--muted); font-size: 19px; }
.summary { margin: 26px 0 0; padding: 6px 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.6); text-align: left; }
.summary div { display: grid; grid-template-columns: minmax(96px, 38%) 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.summary div:first-child { border-top: 0; }
.summary dt { font-family: var(--sans); font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.summary dd { margin: 0; font-size: 18px; overflow-wrap: anywhere; white-space: pre-line; }
.done-actions { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.editlink { margin-top: 24px; padding-top: 20px; border-top: 1px dashed var(--line); }
.editlink p { margin: 0 0 10px; font-family: var(--sans); font-size: 13px; color: var(--muted); }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; min-height: 44px; font-size: 13px; padding: 8px 12px; color: var(--muted); }

.notice { text-align: center; }
.notice p { margin: 8px auto 0; max-width: 34ch; color: var(--muted); }

.foot { text-align: center; padding: 10px 0 30px; font-size: 17px; color: var(--muted); }
.foot a { color: var(--rose-deep); text-underline-offset: 3px; }

.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(30,27,24,.92); display: grid; place-items: center; padding: 20px; animation: fade .25s both; }
.lightbox img { max-height: 100%; max-width: 100%; object-fit: contain; border-radius: 8px; }
.lb-close { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 28px; cursor: pointer; }
@keyframes fade { from { opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-family: var(--sans); font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease); z-index: 70; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 359px) {
  .choices { grid-template-columns: 1fr; }
  .btn-row { flex-direction: column; }
  .sched li { grid-template-columns: 1fr; gap: 2px; }
  .sched .t { text-align: left; }
}
@media (min-width: 760px) {
  body { font-size: 20px; }
  main { padding-bottom: 60px; }
  .done-actions { flex-direction: row; justify-content: center; }
  .done-actions .btn { min-width: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal-on-scroll { opacity: 1; transform: none; }
}
