/*
  vbirthday.com landing. One stylesheet, no frameworks, no web fonts.
  Palette comes from the app icon: coral #F88B6A → raspberry #DA4A5C.
  Every animation lives under prefers-reduced-motion: no-preference.
*/

:root {
  color-scheme: light dark;
  --bg: #fff8f3;
  --bg-2: #fff0e6;
  --card: #ffffff;
  --ink: #2a1f24;
  --muted: #7a6a70;
  --line: #f1dfd5;
  --accent: #e86b57;
  --accent-text: #c2483a;  /* accent for text: 4.6:1 on --bg, --accent itself is 3:1 */
  --accent-ink: #ffffff;
  --g1: #f88b6a;
  --g2: #da4a5c;
  --grad: linear-gradient(135deg, var(--g1), var(--g2));
  --lilac: #b9a3f5;
  --mint: #7fd6b8;
  --sun: #ffc857;
  --peach: #ffb38a;
  --sky: #8cc8ff;
  --shadow: 0 1px 2px rgba(80, 30, 30, .06), 0 12px 32px -12px rgba(160, 60, 50, .25);
  --shadow-lg: 0 30px 60px -20px rgba(150, 50, 50, .35);
  --night: #22183a;
  --radius: 24px;
  --gutter: 16px;
  --max: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1418;
    --bg-2: #241a20;
    --card: #2b2026;
    --ink: #f6ece8;
    --muted: #b8a6ad;
    --line: #3d2e35;
    --accent: #f98875;
    --accent-text: #f98875;
    --accent-ink: #2a1012;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .7);
    --night: #120c1f;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }
a { color: var(--accent-text); }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0; }
h2 { font-size: clamp(1.75rem, 6vw, 2.75rem); font-weight: 800; margin-bottom: .5em; }
h3 { font-size: 1.15rem; font-weight: 700; margin: .9em 0 .35em; }
p { margin: 0 0 1em; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--card); padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }

/* ── Buttons, forms ─────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 52px; padding: 0 24px;
  font: inherit; font-weight: 700; letter-spacing: -.01em;
  border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 24px -10px var(--g2); }
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 14px 30px -10px var(--g2); }
.btn:active { transform: scale(.97); }

.signup { display: flex; flex-wrap: wrap; gap: 10px; max-width: 520px; }
.signup input[type="email"], .calc-form input {
  flex: 1 1 220px; min-width: 0; min-height: 52px;
  padding: 0 20px; font: inherit; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line); border-radius: 999px;
  transition: border-color .2s, box-shadow .2s;
}
.signup input:focus, .calc-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.signup input::placeholder { color: var(--muted); }
.fine { font-size: .82rem; color: var(--muted); margin-top: 10px; max-width: 520px; }

/* ── Top bar ─────────────────────────────────────────── */

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) 10px max(var(--gutter), env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}

.logo { display: flex; align-items: center; gap: 6px; }
.wordmark { font-size: 1.3rem; font-weight: 800; letter-spacing: -.03em; color: var(--ink); text-decoration: none; }

.candle-btn {
  display: grid; place-items: center; width: 40px; height: 44px;
  padding: 0; margin: 0 -4px 0 -8px; border: 0; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.candle .flame { fill: var(--g1); }
.candle .flame-core { fill: #ffe3a3; }
.candle .wick { fill: var(--ink); }
.candle .wax { fill: var(--g2); }
.candle .wax-stripe { stroke: rgba(255, 255, 255, .45); }
.candle .smoke { stroke: var(--muted); opacity: 0; }
.candle .flame-g { transform-origin: 12px 20px; transition: transform .25s ease, opacity .25s ease; }
.candle-btn.out .flame-g { transform: scale(.1); opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
  .candle .flame-g { animation: flicker 2.8s ease-in-out infinite; }
  .candle-btn.out .flame-g { animation: none; }
  .candle-btn.out .smoke { animation: smoke 1.8s ease-out forwards; }
}
@keyframes flicker {
  0%, 100% { transform: scale(1) rotate(0); }
  25% { transform: scale(1.05, .96) rotate(-2deg); }
  55% { transform: scale(.96, 1.04) rotate(2deg); }
  80% { transform: scale(1.02, .99) rotate(-1deg); }
}
@keyframes smoke {
  0% { opacity: .9; transform: translateY(0); stroke-dasharray: 2 30; }
  100% { opacity: 0; transform: translateY(-14px); stroke-dasharray: 30 2; }
}

/* Language menu: a plain <details>, works without JS */
.langs { position: relative; }
.langs summary {
  list-style: none; display: flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: .9rem;
  -webkit-tap-highlight-color: transparent;
}
.langs summary::-webkit-details-marker { display: none; }
.langs summary img, .langs li img { width: 21px; height: 14px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.langs .chev { transition: transform .2s; }
.langs[open] .chev { transform: rotate(180deg); }
.langs ul {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 200px; margin: 0; padding: 6px; list-style: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg);
  transform-origin: top right;
}
@media (prefers-reduced-motion: no-preference) {
  .langs[open] ul { animation: pop .18s ease-out; }
}
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(-4px); } }
.langs li a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px;
  border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 500;
}
.langs li a:hover { background: var(--bg-2); }
.langs li a[aria-current] { background: var(--bg-2); font-weight: 700; }
.langs li a[aria-current]::after { content: "✓"; margin-left: auto; color: var(--accent-text); }

.anniversary {
  padding: 10px var(--gutter); text-align: center; font-weight: 700; font-size: .92rem;
  background: var(--grad); color: #fff;
}

/* ── Layout ──────────────────────────────────────────── */

main { overflow: clip; }

.section {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(56px, 12vw, 120px) max(var(--gutter), env(safe-area-inset-left));
}
.section-lead { font-size: 1.1rem; color: var(--muted); max-width: 640px; }

/* Scroll reveal. Without JS (.js missing) everything is simply visible. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .feature-grid .reveal:nth-child(3n+2) { transition-delay: .08s; }
  .js .feature-grid .reveal:nth-child(3n) { transition-delay: .16s; }
  .js .steps .reveal:nth-child(2), .js .stats .reveal:nth-child(2), .js .scenes .reveal:nth-child(2) { transition-delay: .12s; }
  .js .steps .reveal:nth-child(3), .js .stats .reveal:nth-child(3), .js .scenes .reveal:nth-child(3) { transition-delay: .24s; }
}

/* ── 1. Hero ─────────────────────────────────────────── */

.hero {
  position: relative; isolation: isolate;
  max-width: var(--max); margin: 0 auto;
  display: grid; gap: 40px; align-items: center;
  padding: 32px var(--gutter) 64px;
}
.hero::before {
  /* warm glow behind everything */
  content: ""; position: absolute; z-index: -2; inset: -10% -30% 0;
  background:
    radial-gradient(40% 35% at 20% 20%, color-mix(in srgb, var(--g1) 30%, transparent), transparent 70%),
    radial-gradient(35% 30% at 85% 30%, color-mix(in srgb, var(--lilac) 30%, transparent), transparent 70%),
    radial-gradient(40% 30% at 60% 90%, color-mix(in srgb, var(--sun) 22%, transparent), transparent 70%);
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .hero::before { animation: glow 18s ease-in-out infinite alternate; }
}
@keyframes glow { to { transform: translate3d(3%, 4%, 0) rotate(4deg) scale(1.05); } }

.eyebrow {
  display: inline-block; margin-bottom: 18px; padding: 6px 14px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); font-size: .85rem; font-weight: 600; color: var(--muted);
}
.hero h1 { font-size: clamp(2.5rem, 11vw, 4.6rem); font-weight: 850; letter-spacing: -.045em; margin-bottom: 20px; }
.hero h1 .grad { display: block; padding-bottom: .08em; }
.lead { font-size: clamp(1.08rem, 3.6vw, 1.25rem); color: var(--muted); max-width: 540px; margin-bottom: 26px; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.pills li {
  padding: 6px 12px 6px 30px; border-radius: 999px; font-size: .85rem; font-weight: 600; position: relative;
  background: color-mix(in srgb, var(--mint) 22%, var(--card));
}
.pills li::before { content: "✓"; position: absolute; left: 12px; color: #2f9e7a; font-weight: 900; }
.hint { display: none; margin: 18px 0 0; font-size: .8rem; color: var(--muted); font-style: italic; }
.js .hint { display: block; }

/* Balloons (built by the script) */
.balloons { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.balloon {
  position: absolute; bottom: -140px; width: 56px; height: 68px;
  pointer-events: auto; cursor: pointer; border: 0; padding: 0; background: none; opacity: .92;
  -webkit-tap-highlight-color: transparent;
}
.balloon::before {
  content: ""; position: absolute; inset: 0;
  /* wide shoulders on top, tapering down to the knot, like a real balloon */
  border-radius: 50% 50% 48% 52% / 42% 42% 58% 58%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .7) 0 8%, transparent 9%), var(--c);
  box-shadow: inset -8px -10px 0 rgba(0, 0, 0, .08);
}
.balloon::after {
  /* knot + string */
  content: ""; position: absolute; left: 50%; top: calc(100% - 1px); width: 8px; height: 72px; margin-left: -4px;
  background:
    conic-gradient(from 150deg at 50% 0, var(--c) 0 60deg, transparent 0) top / 8px 6px no-repeat,
    linear-gradient(var(--c), color-mix(in srgb, var(--muted) 40%, transparent)) 50% 6px / 1.5px 66px no-repeat;
}
@media (prefers-reduced-motion: no-preference) {
  .balloon { animation: rise var(--dur, 22s) linear var(--delay, 0s) infinite; }
  .balloon::before { animation: sway 4s ease-in-out infinite alternate; }
}
@media (prefers-reduced-motion: reduce) {
  .balloon { bottom: auto; top: var(--top, 30%); }
}
@keyframes rise {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(var(--drift, 30px), calc(-100vh - 900px), 0); }
}
@keyframes sway { from { rotate: -6deg; } to { rotate: 6deg; } }

.confetti {
  position: fixed; z-index: 60; width: 8px; height: 12px; pointer-events: none; border-radius: 2px;
  will-change: transform, opacity;
}

/* Phone mock-up */
.hero-visual { position: relative; display: grid; place-items: center; padding: 10px 0 70px; }

.phone {
  position: relative; width: min(290px, 74vw); aspect-ratio: 9 / 19.3;
  padding: 11px; border-radius: 50px;
  background: linear-gradient(145deg, #3a3036, #120d10);
  box-shadow: var(--shadow-lg), inset 0 0 0 2px #4b4046;
}
@media (prefers-reduced-motion: no-preference) {
  .phone { animation: float 7s ease-in-out infinite; }
}
@keyframes float { 50% { transform: translateY(-12px) rotate(-1deg); } }

.phone-screen {
  position: relative; height: 100%; overflow: hidden; border-radius: 40px; color: #fff; text-align: center;
  background:
    radial-gradient(120% 60% at 20% 0%, #ffb38a 0%, transparent 60%),
    radial-gradient(100% 60% at 100% 30%, #c86fd0 0%, transparent 60%),
    linear-gradient(170deg, #f88b6a 0%, #da4a5c 45%, #5b2a6e 100%);
}
.island { position: absolute; top: 10px; left: 50%; width: 32%; height: 26px; margin-left: -16%; border-radius: 20px; background: #000; }
.ls-date { margin: 0; padding-top: 50px; font-size: .82rem; font-weight: 600; opacity: .9; }
.ls-time { margin: -4px 0 0; font-size: 4.1rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }

.ls-widget {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 6px; padding: 8px 14px;
  border-radius: 18px; text-align: left; font-size: .78rem; line-height: 1.3;
  background: rgba(255, 255, 255, .2); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.ls-widget-emoji { font-size: 1.4rem; }

.ls-notifs { position: absolute; left: 10px; right: 10px; bottom: 150px; display: grid; gap: 8px; }
.notif {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; text-align: left;
  border-radius: 20px; font-size: .76rem; line-height: 1.3; color: #2a1f24;
  background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 6px 20px -8px rgba(0, 0, 0, .35);
}
.notif-icon { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--grad); position: relative; }
.notif-icon::after { content: "🎂"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 16px; }
.notif-icon[data-e]::after { content: attr(data-e); }
.notif-body { min-width: 0; }
@media (prefers-reduced-motion: no-preference) {
  .notif.enter { animation: notif-in .6s cubic-bezier(.2, .9, .3, 1.2) both; }
  .notif.leave { animation: notif-out .4s ease-in both; }
}
@keyframes notif-in { from { opacity: 0; transform: translateY(-30px) scale(.9); } }
@keyframes notif-out { to { opacity: 0; transform: translateY(20px) scale(.95); } }

.ls-bottom { position: absolute; left: 22px; right: 22px; bottom: 26px; display: flex; justify-content: space-between; }
.ls-bottom span { width: 40px; height: 40px; border-radius: 50%; background: rgba(0, 0, 0, .25); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

.widget-card {
  position: absolute; right: max(0px, calc(50% - 230px)); bottom: 0;
  width: 180px; padding: 14px 16px; border-radius: 26px;
  background: var(--card); box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  rotate: 4deg;
}
@media (prefers-reduced-motion: no-preference) {
  .widget-card { animation: float 7s ease-in-out -3.5s infinite; }
}
.widget-title { margin: 0 0 8px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-text); }
.widget-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.widget-list li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; font-size: .84rem; font-weight: 600; }
.wd {
  display: grid; place-items: center; height: 26px; border-radius: 8px;
  font-weight: 800; font-variant-numeric: tabular-nums; font-size: .82rem;
  background: color-mix(in srgb, var(--accent) 15%, var(--card)); color: var(--accent-text);
}
.widget-list li:first-child .wd { background: var(--grad); color: #fff; }
.wn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa { color: var(--muted); font-size: .8rem; }

/* ── 2. Comic ────────────────────────────────────────── */

.scenes { display: grid; gap: 22px; margin: 32px 0 0; padding: 0; list-style: none; counter-reset: scene; }
.scene { background: var(--card); border-radius: var(--radius); padding: 14px 14px 22px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.scene h3, .scene p { padding: 0 8px; }
.scene p { color: var(--muted); margin: 0; }
.scene-no {
  display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 6px; border-radius: 50%;
  background: var(--grad); color: #fff; font-size: .8rem; vertical-align: 2px;
}
.scene-art {
  position: relative; height: 200px; border-radius: 18px; overflow: hidden;
  display: grid; place-items: center; align-content: center; gap: 10px;
}
.scene-art.night { background: radial-gradient(circle at 75% 25%, #3b2a6b, var(--night) 70%); color: #fff; }
.scene-art.night::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(1.5px 1.5px at 20% 30%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 60% 15%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 85% 60%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 35% 75%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 10% 85%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 50% 50%, #fff 50%, transparent 51%);
  opacity: .7;
}
.moon { position: absolute; top: 14px; right: 18px; font-size: 1.8rem; }
.clock { position: relative; font-size: 3.4rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.clock.late { color: #ff8a8a; }
@media (prefers-reduced-motion: no-preference) {
  .clock.late { animation: shake .5s ease-in-out 2; }
}
@keyframes shake { 25% { transform: translateX(-4px) rotate(-2deg); } 75% { transform: translateX(4px) rotate(2deg); } }
.mini-notif {
  position: relative; padding: 9px 14px; border-radius: 14px; font-size: .85rem; font-weight: 600;
  background: rgba(255, 255, 255, .9); color: #2a1f24; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5);
}

.scene-art.station { background: linear-gradient(180deg, #2c3550, #4a3e5c 60%, #6b4c4c); }
.pump { position: absolute; left: 18px; bottom: 12px; font-size: 3rem; filter: saturate(.7); }
.sad-card {
  width: 150px; height: 110px; padding: 12px; display: grid; place-items: center; text-align: center;
  background: #fffdf2; color: #3355cc; border-radius: 4px; rotate: -6deg;
  font: 700 .95rem/1.2 "Comic Sans MS", "Chalkboard SE", "Marker Felt", cursive;
  box-shadow: 4px 6px 0 rgba(0, 0, 0, .25);
  background-image: radial-gradient(circle at 15% 20%, #ffd54d 4px, transparent 5px), radial-gradient(circle at 85% 80%, #7fb4ff 4px, transparent 5px);
}
@media (prefers-reduced-motion: no-preference) {
  .scene-2.in .sad-card { animation: wobble 2.6s ease-in-out .6s infinite; }
}
@keyframes wobble { 50% { rotate: -2deg; translate: 0 -4px; } }

.scene-art.morning { background: linear-gradient(180deg, #ffe7c2, #ffd0b5 60%, #ffc3c3); color: #2a1f24; }
.sun { position: absolute; top: 12px; left: 18px; font-size: 2rem; }
.mini-notif.calm { background: #fff; }
.greeted {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px 7px 10px; border-radius: 999px;
  background: #2f9e7a; color: #fff; font-weight: 700; font-size: .85rem;
}
.greeted .tick { stroke: #fff; stroke-dasharray: 24; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) {
  .js .scene-3 .greeted { opacity: 0; transform: scale(.6); transition: opacity .4s ease .9s, transform .5s cubic-bezier(.3, 1.6, .5, 1) .9s; }
  .js .scene-3 .tick { stroke-dashoffset: 24; transition: stroke-dashoffset .5s ease 1.3s; }
  .js .scene-3.in .greeted { opacity: 1; transform: none; }
  .js .scene-3.in .tick { stroke-dashoffset: 0; }
}

.moral { margin: 48px auto 0; max-width: 760px; text-align: center; font-size: clamp(1.5rem, 5.5vw, 2.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.2; }
.moral .grad { display: block; }

/* ── 3. Excuse-o-matic ───────────────────────────────── */

.slot-section { text-align: center; }
.slot-section .section-lead { margin-inline: auto; }
.slot {
  position: relative; max-width: 460px; margin: 36px auto 0; padding: 18px 18px 22px;
  border-radius: 30px 30px 22px 22px;
  background: linear-gradient(180deg, #ff6f61, #c7354a);
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, .2), inset 0 3px 0 rgba(255, 255, 255, .3), var(--shadow-lg);
}
.slot-marquee { display: flex; justify-content: space-between; padding: 0 6px 10px; }
.slot-marquee i { width: 10px; height: 10px; border-radius: 50%; background: #ffe7a0; box-shadow: 0 0 8px #ffd34d; }
@media (prefers-reduced-motion: no-preference) {
  .slot-marquee i { animation: bulb 1.2s steps(1) infinite; }
  .slot-marquee i:nth-child(even) { animation-delay: .6s; }
  .slot.spinning .slot-marquee i { animation-duration: .25s; }
  .slot.spinning .slot-marquee i:nth-child(even) { animation-delay: .125s; }
}
@keyframes bulb { 50% { background: #8a3b2e; box-shadow: none; } }
.slot-brand {
  margin: 0 0 12px; color: #ffe7a0; font-weight: 900; letter-spacing: .18em; font-size: .95rem;
  text-shadow: 0 2px 0 #8a2030;
}
.slot-window {
  position: relative; height: 130px; overflow: hidden; border-radius: 16px;
  background: #fffdf6; box-shadow: inset 0 6px 12px rgba(0, 0, 0, .25), 0 0 0 5px #8a2030;
}
.slot-window::before, .slot-window::after {
  content: ""; position: absolute; left: 0; right: 0; height: 30px; z-index: 1; pointer-events: none;
}
.slot-window::before { top: 0; background: linear-gradient(#fffdf6, transparent); }
.slot-window::after { bottom: 0; background: linear-gradient(transparent, #fffdf6); }
.slot-reel p {
  height: 130px; margin: 0; padding: 0 20px; display: grid; place-items: center;
  color: #2a1f24; font-weight: 700; font-size: 1.05rem; line-height: 1.3;
}
.slot-reel.blur { filter: blur(1.5px); }
.slot-btn { margin-top: 18px; background: linear-gradient(180deg, #ffd34d, #f7a823); color: #5a2a10; box-shadow: 0 6px 0 #b86d10; }
.slot-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #b86d10; }
.slot-btn:hover { filter: brightness(1.04); box-shadow: 0 6px 0 #b86d10; }
.slot-arm {
  position: absolute; right: -26px; top: 70px; width: 12px; height: 90px; border-radius: 6px;
  background: linear-gradient(90deg, #bbb, #eee, #999); transform-origin: 50% 100%;
}
.slot-knob { position: absolute; left: 50%; top: -18px; width: 30px; height: 30px; margin-left: -15px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff9a8a, #c7354a); }
@media (prefers-reduced-motion: no-preference) {
  .slot.pulled .slot-arm { animation: lever .6s ease-in-out; }
}
@keyframes lever { 40% { transform: scaleY(-.6); } }
.slot-verdict { margin: 26px auto 0; max-width: 460px; font-weight: 700; font-size: 1.1rem; }
@media (max-width: 520px) { .slot-arm { display: none; } }

/* ── 4. Math ─────────────────────────────────────────── */

.stats { display: grid; gap: 16px; margin: 32px 0 40px; }
.stat { padding: 22px 22px 18px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.stat-num { display: block; font-size: clamp(3rem, 12vw, 4.2rem); font-weight: 850; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat:nth-child(1) .stat-num { color: var(--accent-text); }
.stat:nth-child(2) .stat-num { color: #8a6be8; }
.stat:nth-child(3) .stat-num { color: #2f9e7a; }
@media (prefers-color-scheme: dark) {
  .stat:nth-child(2) .stat-num { color: var(--lilac); }
  .stat:nth-child(3) .stat-num { color: var(--mint); }
}
.stat p { margin: 10px 0 0; color: var(--muted); }

.year {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(9px, 1fr)); gap: 5px;
  padding: 18px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
}
.year i { aspect-ratio: 1; border-radius: 50%; background: var(--line); transition: background .3s, transform .3s; }
.year i.lit { background: var(--grad); transform: scale(1.35); box-shadow: 0 0 8px color-mix(in srgb, var(--g1) 70%, transparent); }
.year i.today { outline: 2px solid var(--ink); outline-offset: 1px; }
.caption { margin-top: 14px; color: var(--muted); font-size: .95rem; text-align: center; }
.sources { font-size: .78rem; color: var(--muted); }
.sources a { color: inherit; }

/* ── 5. Why ──────────────────────────────────────────── */

.why { max-width: 820px; text-align: center; }
.why blockquote { margin: 0 0 28px; }
.why blockquote p {
  font-size: clamp(1.8rem, 7vw, 3.2rem); font-weight: 850; letter-spacing: -.035em; line-height: 1.12; margin-bottom: 16px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.why blockquote footer { color: var(--muted); font-size: .9rem; }
.why > p { font-size: 1.1rem; color: var(--muted); }

/* ── 6. Calculator ───────────────────────────────────── */

.calc { max-width: 820px; }
.calc-form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.calc-form input { flex: 1 1 200px; }
.calc-form input::-webkit-date-and-time-value { text-align: left; }
.calc-out { display: grid; gap: 12px; margin: 24px 0 0; padding: 0; list-style: none; }
.calc-out li {
  padding: 16px 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  font-size: 1.05rem;
}
.calc-out li b { color: var(--accent-text); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: no-preference) {
  .calc-out li { animation: slide-in .5s cubic-bezier(.2, .9, .3, 1.1) both; }
  .calc-out li:nth-child(2) { animation-delay: .08s; }
  .calc-out li:nth-child(3) { animation-delay: .16s; }
  .calc-out li:nth-child(4) { animation-delay: .24s; }
  .calc-out li:nth-child(5) { animation-delay: .32s; }
}
@keyframes slide-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* ── 7. How it works ─────────────────────────────────── */

.steps { display: grid; gap: 18px; margin: 32px 0 0; padding: 0; list-style: none; }
.step { padding: 16px 16px 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.step h3, .step p { padding: 0 6px; }
.step p { color: var(--muted); margin: 0; }
.step-art { height: 120px; border-radius: 18px; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--bg-2); }
.step-art.contacts span {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; font-size: 1.5rem;
  background: var(--card); box-shadow: var(--shadow);
}
@media (prefers-reduced-motion: no-preference) {
  .js .step.reveal .step-art.contacts span { transition: transform .6s cubic-bezier(.2, 1.4, .4, 1), opacity .4s; opacity: 0; }
  .js .step.reveal .step-art.contacts span:nth-child(1) { transform: translate(-60px, -30px) rotate(-20deg); }
  .js .step.reveal .step-art.contacts span:nth-child(2) { transform: translate(-20px, 40px) rotate(15deg); transition-delay: .1s; }
  .js .step.reveal .step-art.contacts span:nth-child(3) { transform: translate(30px, -40px) rotate(-10deg); transition-delay: .2s; }
  .js .step.reveal .step-art.contacts span:nth-child(4) { transform: translate(60px, 30px) rotate(20deg); transition-delay: .3s; }
  .js .step.reveal.in .step-art.contacts span { transform: none; opacity: 1; }
}
.step-art.lock { background: linear-gradient(170deg, #f88b6a, #da4a5c 60%, #5b2a6e); }
.lock-pill { padding: 8px 16px; border-radius: 16px; color: #fff; font-weight: 700; font-size: .9rem; background: rgba(255, 255, 255, .22); }
.step-art.actions span {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; font-size: 1.4rem;
  background: var(--card); box-shadow: var(--shadow);
}
.step-art.actions .ok { background: #2f9e7a; color: #fff; font-weight: 900; }
@media (prefers-reduced-motion: no-preference) {
  .js .step.in .step-art.actions .ok { animation: boop .6s cubic-bezier(.3, 1.8, .5, 1) .5s both; }
}
@keyframes boop { from { transform: scale(.3); } }

/* ── 8. Features ─────────────────────────────────────── */

.feature-grid { display: grid; gap: 12px; margin: 28px 0 0; padding: 0; list-style: none; }
.feature-grid li {
  display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; align-items: start;
  padding: 18px; border-radius: 20px; background: var(--card); border: 1px solid var(--line);
}
.feature-grid .fi { grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--bg-2); font-size: 1.35rem; }
.feature-grid b { font-size: 1rem; }
.feature-grid li > span:last-child { color: var(--muted); font-size: .92rem; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .feature-grid li { transition: transform .2s, box-shadow .2s, opacity .7s ease; }
  .feature-grid li:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
  .feature-grid li:hover .fi { animation: jiggle .5s ease; }
}
@keyframes jiggle { 25% { rotate: -12deg; } 75% { rotate: 10deg; } }

/* ── 9. Free ─────────────────────────────────────────── */

.free { text-align: center; }
.free .section-lead { margin-inline: auto; }
.never { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; margin: 28px auto; padding: 0; max-width: 760px; list-style: none; }
.never li { font-size: clamp(1.15rem, 4.5vw, 1.6rem); font-weight: 800; letter-spacing: -.02em; }
.never s {
  text-decoration: none; position: relative; padding: 0 4px;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 55% / 100% 4px;
  color: var(--muted);
}
@media (prefers-reduced-motion: no-preference) {
  .js .never s { background-size: 0 4px; color: var(--ink); transition: background-size .45s cubic-bezier(.6, 0, .3, 1), color .45s; }
  .js .never li.struck s { background-size: 100% 4px; color: var(--muted); }
}
.free-note { max-width: 600px; margin: 0 auto; font-size: 1.15rem; font-weight: 600; }

/* ── 10. Since 2002 ──────────────────────────────────── */

.flip { display: inline-block; position: relative; font-variant-numeric: tabular-nums; }
.flip span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .flip.tick span { animation: flip .12s ease-in-out; }
}
@keyframes flip { 50% { transform: rotateX(90deg); } }
.legacy-row { display: grid; gap: 28px; align-items: start; margin-top: 18px; }
.retro { margin: 0; justify-self: center; text-align: center; }
.retro img {
  display: block; width: 176px; image-rendering: pixelated; border-radius: 6px;
  border: 10px solid #2f3437; border-width: 16px 12px 40px; box-shadow: var(--shadow-lg); rotate: -3deg; background: #2f3437;
}
.retro figcaption { margin-top: 14px; font-size: .8rem; color: var(--muted); }
.legacy-text p { font-size: 1.08rem; }
.sign { font-family: "Snell Roundhand", "Segoe Script", "Brush Script MT", cursive; font-size: 1.6rem !important; color: var(--accent-text); }
.weights { display: grid; gap: 8px; margin: 18px 0 0; }
.weights div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.weights dt { color: var(--muted); }
.weights dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ── 11. Finale ──────────────────────────────────────── */

.finale { text-align: center; display: grid; justify-items: center; padding-bottom: 80px; }
.finale .signup { justify-content: center; margin-inline: auto; }
.finale .fine { margin-inline: auto; }

.big-candle {
  position: relative; width: 90px; height: 190px; margin-bottom: 18px; padding: 0; border: 0; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.bc-wax {
  position: absolute; left: 25px; bottom: 0; width: 40px; height: 120px; border-radius: 8px;
  background: repeating-linear-gradient(-35deg, #fff 0 12px, #ffc0b4 12px 24px);
  box-shadow: inset -6px 0 0 rgba(0, 0, 0, .06), var(--shadow);
}
.bc-wax::before { /* wick */ content: ""; position: absolute; left: 50%; top: -12px; width: 3px; height: 12px; margin-left: -1.5px; border-radius: 2px; background: var(--ink); }
.bc-flame {
  position: absolute; left: 30px; bottom: 128px; width: 30px; height: 50px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 75%, #fff6d0 0 18%, #ffd34d 30%, #ff8a3d 60%, transparent 72%);
  filter: drop-shadow(0 0 18px #ffb04d);
  transform-origin: 50% 90%; transition: transform .3s ease, opacity .3s ease;
}
.bc-smoke { position: absolute; left: 40px; bottom: 130px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); opacity: 0; }
.big-candle.out .bc-flame { transform: scale(.05); opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .bc-flame { animation: flicker 2.2s ease-in-out infinite; }
  .big-candle.out .bc-flame { animation: none; }
  .big-candle.out .bc-smoke { animation: puff 2s ease-out forwards; }
}
@keyframes puff {
  0% { opacity: .6; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translate(10px, -80px) scale(5); }
}

/* ── Footer ──────────────────────────────────────────── */

.footer {
  padding: 40px var(--gutter) calc(40px + env(safe-area-inset-bottom)); text-align: center; font-size: .85rem; color: var(--muted);
  border-top: 1px solid var(--line);
}
.footer a { color: inherit; }
.footer-links a { color: var(--ink); font-weight: 600; }
.footer-langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
.footer-langs a { text-decoration: none; padding: 6px 0; }
.footer-langs a[aria-current] { color: var(--accent-text); font-weight: 700; }
.footer-made { margin-top: 18px; }

/* ── Text pages ──────────────────────────────────────── */

.prose { max-width: 720px; }
.prose h1 { font-size: clamp(2.2rem, 8vw, 3.4rem); font-weight: 850; letter-spacing: -.04em; margin-bottom: 16px; }
.prose h2 { font-size: 1.4rem; margin: 1.6em 0 .5em; }
.prose li { margin-bottom: .5em; }

/* ── Wider screens ───────────────────────────────────── */

@media (min-width: 720px) {
  :root { --gutter: 32px; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .scenes, .steps { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .legacy-row { grid-template-columns: auto 1fr; gap: 48px; }
  .year { grid-template-columns: repeat(53, 1fr); gap: 4px; }
}
@media (min-width: 960px) {
  .hero { grid-template-columns: 1.1fr .9fr; padding-top: 72px; padding-bottom: 96px; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .widget-card { right: -10px; }
}
