/* ===== Shared birthday layout. Each card's theme block below overrides the tokens and intro. ===== */
:root {
  --bg: #fff; --bg2: #f6f6f6; --ink: #222; --muted: #666; --accent: #e44; --accent2: #fb3; --accent-ink: #fff;
  --panel: rgba(255,255,255,.9); --line: rgba(0,0,0,.12);
  --display: Georgia, serif; --body: system-ui, sans-serif; --script: cursive;
  --radius: 22px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.is-locked { overflow: hidden; height: 100svh; }
img, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }

/* ---------- Intro ---------- */
.intro { position: fixed; inset: 0; z-index: 40; background: var(--intro-bg, #000); overflow: hidden; transition: opacity 1s ease, visibility 0s linear 1s; }
.intro.is-gone { opacity: 0; visibility: hidden; }
.intro__film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.intro__cover { position: absolute; inset: 0; pointer-events: none; }
.intro__text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: max(11svh, 70px) 20px max(8svh, 48px); text-align: center; transition: opacity .7s ease, transform .7s ease; }
.intro__text .tap { margin-top: auto; }
.intro.is-tapped .intro__text { opacity: 0; transform: translateY(20px); pointer-events: none; }
.intro__kicker { margin: 0; text-shadow: 0 1px 8px rgba(0,0,0,.6); font-size: 13px; letter-spacing: .28em; text-transform: uppercase; color: var(--intro-ink, #fff); opacity: .9; }
.intro__names { margin: 0 0 8px; font: 400 clamp(40px, 12vw, 64px)/1 var(--display); color: var(--intro-ink, #fff); text-shadow: 0 3px 18px rgba(0,0,0,.35); }
.intro__names span { display: block; margin-top: 8px; font-family: var(--script); font-size: .62em; color: var(--intro-sub, var(--accent2)); text-shadow: 0 2px 12px rgba(0,0,0,.55), 0 0 2px rgba(0,0,0,.4); }
.tap { display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 16px; letter-spacing: .04em; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.3); animation: tapPulse 2.2s ease-in-out infinite; }
.tap:focus-visible { outline: 3px solid var(--accent2); outline-offset: 4px; }
.tap__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent2); box-shadow: 0 0 0 0 var(--accent2); animation: dot 1.6s ease-out infinite; }
@keyframes tapPulse { 50% { transform: scale(1.05); } }
@keyframes dot { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.6); } 100% { box-shadow: 0 0 0 12px rgba(255,255,255,0); } }

/* ---------- Controls ---------- */
.controls { position: fixed; top: max(12px, env(safe-area-inset-top)); right: 12px; z-index: 50; display: flex; gap: 8px; }
.controls[hidden], .ctl[hidden] { display: none; }
.ctl { border: 0; background: rgba(0,0,0,.45); color: #fff; padding: 9px 16px; border-radius: 999px; cursor: pointer; backdrop-filter: blur(6px); font-size: 14px; }
.ctl--round { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; }
.ctl svg { width: 22px; height: 22px; fill: currentColor; }
.ctl[aria-pressed="true"] .ico-off, .ctl[aria-pressed="false"] .ico-on { display: none; }

/* ---------- Common type ---------- */
.eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); }
.display { margin: 0 0 22px; font: 400 clamp(34px, 9vw, 52px)/1.08 var(--display); color: var(--ink); }
.display em { font-style: normal; font-family: var(--script); color: var(--accent); }
section { padding: 84px 22px; text-align: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; border-radius: 999px; border: 2px solid var(--accent); color: var(--accent); background: transparent; text-decoration: none; font-weight: 600; cursor: pointer; }
.btn--solid { background: var(--accent); color: var(--accent-ink); }
.btn:focus-visible { outline: 3px solid var(--accent2); outline-offset: 3px; }

/* ---------- Animations ---------- */
.fade { opacity: 0; }
body.is-open .fade { animation: fadeUp 1s cubic-bezier(.2,.7,.2,1) var(--d, 0s) forwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; padding: 0; display: grid; align-items: start; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; background: var(--hero-bg) center / cover no-repeat; }
.hero__bg::after { content: ""; position: absolute; inset: 0; background: var(--hero-shade, linear-gradient(rgba(0,0,0,.35), transparent 55%)); }
.hero__text { position: relative; padding: max(12svh, 80px) 20px 0; display: grid; justify-items: center; color: var(--hero-ink, #fff); }
.hero__text .eyebrow { color: var(--hero-ink, #fff); opacity: .95; }
.hero__name { margin: 0; font: 400 clamp(56px, 17vw, 96px)/.95 var(--display); text-shadow: 0 4px 24px rgba(0,0,0,.3); }
.hero__turns { margin: 6px 0 0; font: 400 clamp(24px, 7vw, 34px)/1 var(--script); color: var(--accent2); }
.hero__age { margin: 0; font: 700 clamp(110px, 34vw, 180px)/.9 var(--display); color: var(--accent2); text-shadow: 0 6px 0 var(--age-shadow, rgba(0,0,0,.25)), 0 10px 30px rgba(0,0,0,.3); }
.hero__date { margin: 10px 0 0; font-size: 15px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }

/* ---------- Invite ---------- */
.invite { background: var(--bg); }
.invite__inner { max-width: 560px; margin: 0 auto; }
.invite__lead { margin: 0 0 18px; font-size: 18px; }
.invite__lead span { color: var(--muted); font-size: 16px; }
.invite__name { margin: 0 0 18px; font: 400 clamp(44px, 12vw, 68px)/1 var(--script); color: var(--accent); }
.invite__line { margin: 0; color: var(--muted); }

/* ---------- Window ---------- */
.window { background: var(--bg2); }
.window__frame { width: min(78vw, 340px); aspect-ratio: 9 / 16; margin: 0 auto 36px; border-radius: var(--frame-radius, 28px); overflow: hidden; box-shadow: 0 0 0 6px var(--panel), 0 0 0 8px var(--accent2), 0 24px 60px rgba(0,0,0,.25); background: #000; }
.window__film { width: 100%; height: 100%; object-fit: cover; }
.window__text { max-width: 560px; margin: 0 auto 50px; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fact { background: var(--panel); border-radius: 18px; padding: 16px 12px; box-shadow: 0 6px 18px rgba(0,0,0,.06); border: 1px solid var(--line); }
.fact b { display: block; font-size: 28px; line-height: 1.1; }
.fact small { display: block; margin-top: 6px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.fact span { display: block; margin-top: 2px; font-weight: 600; }
.count { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 460px; margin: 0 auto; }
.count__unit { background: var(--accent); color: var(--accent-ink); border-radius: 18px; padding: 14px 4px 10px; box-shadow: 0 8px 0 var(--count-shadow, rgba(0,0,0,.18)); }
.count__unit b { display: block; font: 700 30px/1 var(--display); }
.count__unit small { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .9; }

/* ---------- Plan ---------- */
.venue { max-width: 520px; margin: 0 auto 40px; background: var(--panel); border: 2px dashed var(--accent2); border-radius: var(--radius); padding: 26px 20px; }
.venue__when { margin: 0; font-weight: 700; color: var(--accent); letter-spacing: .04em; }
.venue__place { margin: 6px 0 2px; font: 400 26px/1.2 var(--display); }
.venue__addr { margin: 0 0 18px; color: var(--muted); }
.venue__actions, .rsvp__actions, .foot__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.plan__list { list-style: none; margin: 0 auto; padding: 0; max-width: 520px; display: grid; gap: 16px; text-align: left; }
.stop { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; }
.stop__icon { width: 64px; height: 64px; display: grid; place-items: center; font-size: 30px; border-radius: 50%; background: var(--panel); border: 3px solid var(--accent2); transform: scale(.6) rotate(-20deg); transition: transform .6s cubic-bezier(.3,1.6,.5,1); }
.stop.is-on .stop__icon { transform: none; }
.stop__card { background: var(--panel); border-radius: 18px; padding: 14px 16px; border: 1px solid var(--line); }
.stop__when { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.stop__name { margin: 2px 0 4px; font: 400 22px/1.2 var(--display); }
.stop__note { margin: 0; font-size: 15px; color: var(--muted); }
.notes { max-width: 520px; margin: 34px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.note { background: var(--panel); border-radius: 18px; padding: 18px 12px; border: 1px solid var(--line); }
.note__icon { font-size: 30px; }
.note h3 { margin: 4px 0; font: 400 20px/1.2 var(--display); color: var(--accent); }
.note p { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- RSVP ---------- */
.rsvp { background: var(--bg2); }
.rsvp__form { max-width: 480px; margin: 0 auto; display: grid; gap: 16px; text-align: left; background: var(--panel); padding: 24px 20px; border-radius: var(--radius); border: 1px solid var(--line); }
.field { display: grid; gap: 6px; }
.field > span, .choice legend { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: #222; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.choice label { display: flex; }
.choice input { position: absolute; opacity: 0; }
.choice span { flex: 1; padding: 11px 14px; border-radius: 12px; border: 1.5px solid var(--line); cursor: pointer; background: #fff; color: #222; }
.choice input:checked + span { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.choice input:focus-visible + span { outline: 2px solid var(--accent2); outline-offset: 2px; }

/* ---------- Footer ---------- */
.foot { padding: 70px 22px 80px; text-align: center; background: var(--bg); }
.foot__img { width: 150px; height: 150px; object-fit: cover; border-radius: 50%; margin: 0 auto 20px; box-shadow: 0 0 0 5px var(--panel), 0 0 0 7px var(--accent2); }
.foot__big { margin: 0; font: 400 clamp(34px, 10vw, 52px)/1.1 var(--script); color: var(--accent); }
.foot__names { margin: 8px 0 26px; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); z-index: 70; background: #222; color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 15px; max-width: calc(100% - 32px); visibility: hidden; transition: transform .4s ease, visibility 0s linear .4s; }
.toast.is-on { transform: translate(-50%, 0); visibility: visible; transition: transform .4s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .fade, .reveal { opacity: 1; transform: none; }
}

/* ===== Engagement additions ===== */
.intro__names i { font-style: normal; font-family: var(--script); color: var(--accent2); padding: 0 .12em; }
.intro__names span { font-size: .42em; letter-spacing: .04em; }
.hero__couple { margin: 0; display: grid; justify-items: center; line-height: .95; }
.hero__couple .hero__name { display: block; }
.hero__amp { display: block; font: 400 clamp(40px, 12vw, 64px)/1.1 var(--script); color: var(--accent2); }
.hero__turns { margin-top: 14px; }
.invite__with { margin: -6px 0 12px; font-size: 13px; letter-spacing: .4em; text-transform: uppercase; color: var(--accent); }
.foot__eyebrow { margin: 0 0 6px; font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }

/* ===== Lantern Vows theme ===== */
:root { --bg: #1B2350; --bg2: #141A3D; --ink: #F7EEE6; --muted: #C3C2DA; --accent: #F6B17A; --accent2: #FFD99A; --accent-ink: #1B2350;
  --panel: rgba(255,255,255,.07); --line: rgba(246,177,122,.35);
  --display: "Playfair Display", Georgia, serif; --body: "Lato", system-ui, sans-serif; --script: "Allura", cursive;
  --hero-bg: url("img/end.webp"); --intro-bg: #0f1430; --count-shadow: #b5743f; --frame-radius: 50% 50% 24px 24px / 30% 30% 24px 24px; }
body { background-image: radial-gradient(60% 40% at 50% 0%, rgba(246,177,122,.15), transparent 70%); }
.hero__name { font-size: clamp(50px, 15vw, 86px); font-style: italic; }
.invite__inner .eyebrow { font-family: "Noto Serif Gurmukhi", serif; letter-spacing: .1em; font-size: 15px; }
.intro__kicker { font-family: "Noto Serif Gurmukhi", "Lato", serif; letter-spacing: .14em; }
.count__unit { background: linear-gradient(#f7c08f, #e8915a); color: #3a2414; }
.field > span, .choice legend { color: var(--muted); }
.stop__icon { background: #141A3D; }
.night { position: absolute; inset: 0; background: linear-gradient(rgba(10,14,40,.82), rgba(10,14,40,.45) 60%, rgba(10,14,40,.7)); transition: opacity 1.6s ease .4s; }
.lantern { position: absolute; left: 50%; top: 56%; width: 20vmin; height: 26vmin; transform: translate(-50%, -50%); transition: transform 2.2s cubic-bezier(.5,0,.3,1), opacity 1.6s ease .8s; }
.lantern::before { content: ""; position: absolute; inset: 0; clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%); border-radius: 6px;
  background: repeating-linear-gradient(90deg, transparent 0 18%, rgba(160,70,20,.25) 18% 19%), linear-gradient(rgba(150,60,20,.35), transparent 14%), radial-gradient(70% 60% at 50% 75%, #fff4d6, #ffc46b 45%, #e9772f 85%); box-shadow: 0 0 40px rgba(255,180,90,.8); }
.lantern b { position: absolute; left: 50%; bottom: -12%; width: 180%; height: 90%; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,196,107,.55), transparent); }
.intro:not(.is-tapped) .lantern { animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, -54%); } }
.intro.is-opening .lantern { transform: translate(-50%, -260%) scale(.5); opacity: 0; }
.intro.is-opening .night { opacity: 0; }
.intro__text { z-index: 1; }
