/* =====================================================================
   styles.css — components, glass, glow, animations
   Tailwind (loaded in index.html) handles utilities; this file handles
   everything with personality. Colors live in :root so you can retune
   the whole palette from one place.
   ===================================================================== */

:root {
  --bg-0: #0a0509;
  --bg-1: #130811;
  --bg-2: #1c0d18;
  --ink: #fbeff4;
  --ink-muted: #cfa9bb;
  --ink-faint: #8f6b7c;
  --neon: #ff2e93;
  --neon-2: #ff6fb5;
  --crimson: #d81e5b;
  --red: #9d0227;
  --rose: #e3a6ab;
  --rosegold: #d9a08c;
  --rosegold-2: #f7c6b5;
  --gold: #f5c77e;
  --peach: #ffb38a;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.10);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.2, 0.9, 0.25, 1.2);
  --radius: 22px;
  --nav-h: 56px;
}

/* dark theme only — force it regardless of the phone's setting */
:root { color-scheme: dark; }
:root:not([data-theme="light"]), :root[data-theme="dark"] { color-scheme: dark; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg-0);
  color: var(--ink);
  min-height: 100dvh;
  overflow-x: hidden;
  background-image:
    radial-gradient(1200px 600px at 50% -10%, rgba(255, 46, 147, 0.10), transparent 60%),
    radial-gradient(900px 500px at 100% 40%, rgba(216, 30, 91, 0.08), transparent 60%),
    radial-gradient(800px 500px at 0% 80%, rgba(245, 199, 126, 0.05), transparent 60%);
}
body.is-locked { overflow: hidden; }
::selection { background: rgba(255, 46, 147, 0.35); color: #fff; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.container--narrow { max-width: 760px; }
.section { position: relative; padding: clamp(64px, 10vw, 120px) 0; }
.section__head { max-width: 720px; margin: 0 auto clamp(28px, 5vw, 48px); text-align: center; }
.section__title { font-size: clamp(1.9rem, 5.2vw, 3.1rem); line-height: 1.12; font-weight: 600; letter-spacing: -0.01em; margin: 8px 0 12px; }
.section__title em { font-style: italic; background: linear-gradient(90deg, var(--neon-2), var(--rosegold-2), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section__lead { color: var(--ink-muted); font-size: 1.05rem; line-height: 1.6; }
.eyebrow { font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }
.subsection { margin-top: clamp(56px, 8vw, 88px); }
.subsection__head { max-width: 720px; margin: 0 auto 24px; text-align: center; }
.subsection__title { font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 600; display: inline-flex; align-items: center; gap: 10px; }
.subsection__lead { color: var(--ink-muted); line-height: 1.6; margin-top: 8px; }
.badge { font-family: "DM Sans", system-ui, sans-serif; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; border: 1px solid var(--glass-border); background: var(--glass-strong); color: var(--neon-2); font-weight: 700; vertical-align: middle; }
.gradient-text { background: linear-gradient(95deg, var(--neon) 0%, var(--neon-2) 40%, var(--rosegold-2) 75%, var(--gold) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.icon { width: 20px; height: 20px; flex: none; }

/* ---------- Glass ---------- */
.glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 0.98rem; letter-spacing: 0.01em; cursor: pointer;
  border: 1px solid transparent; text-decoration: none; color: var(--ink);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s, background-color 0.25s, border-color 0.25s, color 0.25s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.btn--lg { min-height: 54px; padding: 14px 26px; font-size: 1.02rem; }
.btn--primary {
  background: linear-gradient(135deg, var(--neon), var(--crimson));
  box-shadow: 0 10px 30px rgba(255, 46, 147, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn--primary:hover { box-shadow: 0 14px 40px rgba(255, 46, 147, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3); transform: translateY(-1px); }
.btn--primary:active { transform: translateY(1px) scale(0.99); }
.btn--ghost { background: var(--glass); border-color: var(--glass-border); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn--ghost:hover { background: var(--glass-strong); border-color: rgba(255, 255, 255, 0.2); }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 0.9rem; }

/* ---------- Intro gate ---------- */
.gate {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(900px 600px at 50% 30%, rgba(255, 46, 147, 0.16), transparent 60%), var(--bg-0);
  transition: opacity 0.7s var(--ease-out), visibility 0.7s;
}
.gate.is-open { opacity: 0; visibility: hidden; pointer-events: none; }
.gate__card { text-align: center; max-width: 520px; animation: gateIn 1s var(--ease-out) both; }
.gate__title { font-size: clamp(2.6rem, 9vw, 4.6rem); font-weight: 600; font-style: italic; line-height: 1; margin: 18px 0 30px; letter-spacing: -0.02em; }
.gate__hint { margin-top: 18px; color: var(--ink-faint); font-size: 0.82rem; }
@keyframes gateIn { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------- Background: hearts canvas, grain, cursor glow ---------- */
.hearts { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1.5s; }
.hearts.is-on { opacity: 1; }
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* animated grain only on desktop-class devices (cheap there, costly on phones) */
@media (hover: hover) and (pointer: fine) {
  .grain { inset: -50%; animation: grain 8s steps(10) infinite; }
}
@keyframes grain { 0%, 100% { transform: translate(0, 0); } 10% { transform: translate(-5%, -10%); } 30% { transform: translate(3%, -15%); } 50% { transform: translate(12%, 9%); } 70% { transform: translate(9%, 4%); } 90% { transform: translate(-1%, 7%); } }
.cursor-glow { position: fixed; left: 0; top: 0; z-index: 1; width: 420px; height: 420px; margin: -210px 0 0 -210px; pointer-events: none; border-radius: 50%; background: radial-gradient(circle, rgba(255, 46, 147, 0.10), transparent 60%); opacity: 0; transition: opacity 0.6s; display: none; }
@media (hover: hover) and (pointer: fine) { .cursor-glow { display: block; } }
main { position: relative; z-index: 2; }

/* ---------- Floating nav ---------- */
.nav {
  position: fixed; top: 14px; left: 50%; z-index: 40; transform: translateX(-50%);
  display: flex; gap: 2px; padding: 5px; border-radius: 999px;
  background: rgba(19, 8, 17, 0.6); border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  opacity: 0; visibility: hidden; transition: opacity 0.4s, transform 0.4s var(--ease-out), visibility 0.4s;
}
.nav.is-visible { opacity: 1; visibility: visible; }
.nav.is-hidden { transform: translate(-50%, -140%); }
.nav a {
  padding: 8px 12px; min-height: 36px; display: inline-flex; align-items: center; border-radius: 999px;
  font-size: 0.82rem; font-weight: 600; color: var(--ink-muted); text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.nav a:hover, .nav a.is-active { background: rgba(255, 46, 147, 0.16); color: #fff; }
.nav a:focus-visible { outline: 2px solid var(--gold); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; justify-content: center; text-align: center; padding: calc(var(--nav-h) + 40px) 16px 72px; overflow: hidden; }
.hero__inner { position: relative; z-index: 2; max-width: 860px; margin: 0 auto; }
.hero__glow { position: absolute; border-radius: 50%; filter: blur(48px); opacity: 0.55; pointer-events: none; will-change: transform; transform: translateZ(0); }
@media (max-width: 767px) { .hero__glow { filter: blur(36px); opacity: 0.5; } .hero__glow--c { display: none; } }
.hero__glow--a { width: 60vw; height: 60vw; max-width: 620px; max-height: 620px; left: -10%; top: -10%; background: radial-gradient(circle, rgba(255, 46, 147, 0.55), transparent 65%); animation: drift 14s ease-in-out infinite alternate; }
.hero__glow--b { width: 50vw; height: 50vw; max-width: 520px; max-height: 520px; right: -10%; top: 20%; background: radial-gradient(circle, rgba(216, 30, 91, 0.5), transparent 65%); animation: drift 18s ease-in-out infinite alternate-reverse; }
.hero__glow--c { width: 40vw; height: 40vw; max-width: 420px; max-height: 420px; left: 30%; bottom: -15%; background: radial-gradient(circle, rgba(245, 199, 126, 0.35), transparent 65%); animation: drift 22s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(6%, 8%) scale(1.12); } }

.hero__title { font-size: clamp(2.35rem, 7.4vw, 5rem); line-height: 1.06; font-weight: 700; letter-spacing: -0.02em; margin: 14px 0 18px; text-wrap: balance; }
.beat { display: inline-block; width: 0.8em; height: 0.8em; vertical-align: -0.08em; margin-left: 0.1em; animation: beat 1.6s ease-in-out infinite; }
.beat svg { width: 100%; height: 100%; fill: url(#heartGrad); fill: var(--neon); filter: drop-shadow(0 0 14px rgba(255, 46, 147, 0.7)); }
@keyframes beat { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.18); } 28% { transform: scale(1); } 42% { transform: scale(1.12); } 70% { transform: scale(1); } }
.hero__subtitle { font-size: clamp(1.05rem, 2.4vw, 1.35rem); color: var(--ink-muted); max-width: 640px; margin: 0 auto; line-height: 1.55; }
.hero__quote { font-size: clamp(1.4rem, 3.2vw, 1.9rem); color: var(--rosegold-2); margin: 22px auto 0; max-width: 620px; line-height: 1.25; }
.hero__quote-src { display: block; font-family: "DM Sans", system-ui, sans-serif; font-size: 0.78rem; color: var(--ink-faint); margin-top: 8px; letter-spacing: 0.04em; }

.counter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 560px; margin: 30px auto 0; }
.counter__tile { padding: 14px 6px; border-radius: 16px; background: var(--glass); border: 1px solid var(--glass-border); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.counter__num { display: block; font-family: "Playfair Display", Georgia, serif; font-size: clamp(1.7rem, 6vw, 2.6rem); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 0 24px rgba(255, 46, 147, 0.35); }
.counter__label { display: block; margin-top: 6px; font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }
.counter__caption { margin-top: 14px; color: var(--ink-muted); font-size: 0.95rem; }
.counter__sub { margin-top: 4px; color: var(--ink-faint); font-size: 0.9rem; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; }

.scroll-cue { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); width: 24px; height: 38px; border: 2px solid rgba(255, 255, 255, 0.18); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--neon-2); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* Hero entrance (staggered by --i) */
.hero__in { opacity: 0; transform: translateY(18px); }
body.is-open .hero__in { animation: heroIn 0.9s var(--ease-out) forwards; animation-delay: calc(0.15s + var(--i) * 0.09s); }
@keyframes heroIn { to { opacity: 1; transform: none; } }

/* ---------- Marquee ---------- */
.marquee { position: relative; overflow: hidden; border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border); background: rgba(255, 255, 255, 0.02); padding: 14px 0; contain: paint; }
/* soft fade at both edges (cheaper than a CSS mask over an animated track) */
.marquee::before, .marquee::after { content: ""; position: absolute; top: 0; bottom: 0; width: 18%; max-width: 160px; z-index: 1; pointer-events: none; }
.marquee::before { left: 0; background: linear-gradient(90deg, var(--bg-0), transparent); }
.marquee::after { right: 0; background: linear-gradient(270deg, var(--bg-0), transparent); }
.marquee__track { display: flex; gap: 0; width: max-content; will-change: transform; animation: marquee 60s linear infinite; }
.marquee__track span { font-family: "Caveat", cursive; font-size: 1.45rem; color: var(--rosegold-2); white-space: nowrap; padding: 0 22px; }
.marquee__track span::after { content: "·"; color: var(--neon); margin-left: 44px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.stat { position: relative; padding: 22px 18px 20px; border-radius: var(--radius); background: var(--glass); border: 1px solid var(--glass-border); overflow: hidden; transition: transform 0.35s var(--ease-out), border-color 0.35s, box-shadow 0.35s; }
.stat::before { content: ""; position: absolute; inset: 0; background: radial-gradient(240px 120px at 20% 0%, rgba(255, 46, 147, 0.18), transparent 70%); opacity: 0; transition: opacity 0.4s; }
.stat:hover { transform: translateY(-4px); border-color: rgba(255, 111, 181, 0.35); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); }
.stat:hover::before { opacity: 1; }
.stat__num { font-family: "Playfair Display", Georgia, serif; font-size: clamp(1.9rem, 5vw, 2.7rem); font-weight: 600; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.stat__num small { font-size: 0.55em; color: var(--rosegold-2); }
.stat__label { margin-top: 8px; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--neon-2); font-weight: 700; }
.stat__caption { margin-top: 10px; color: var(--ink-muted); font-size: 0.86rem; line-height: 1.5; }

/* ---------- Timeline ---------- */
.timeline { position: relative; list-style: none; margin: 0; padding: 8px 0 0; }
.timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: 15px; width: 2px; background: linear-gradient(180deg, transparent, rgba(255, 46, 147, 0.35) 8%, rgba(255, 46, 147, 0.35) 92%, transparent); }
.tl-item { position: relative; padding: 0 0 34px 46px; }
.tl-dot { position: absolute; left: 6px; top: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg-1); border: 2px solid var(--neon); box-shadow: 0 0 0 4px rgba(255, 46, 147, 0.12), 0 0 18px rgba(255, 46, 147, 0.4); transition: transform 0.4s var(--ease-spring); }
.tl-item.is-in .tl-dot { transform: scale(1.15); }
.tl-item--today .tl-dot { background: var(--neon); animation: pulse 2s ease-in-out infinite; }
.tl-item--future .tl-dot { border-style: dashed; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(245, 199, 126, 0.12); background: var(--bg-1); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(255, 46, 147, 0.15), 0 0 18px rgba(255, 46, 147, 0.5); } 50% { box-shadow: 0 0 0 10px rgba(255, 46, 147, 0.06), 0 0 30px rgba(255, 46, 147, 0.75); } }
.tl-card { padding: 20px 20px 18px; border-radius: var(--radius); background: var(--glass); border: 1px solid var(--glass-border); transition: border-color 0.3s, transform 0.3s var(--ease-out); }
.tl-card:hover { border-color: rgba(255, 111, 181, 0.3); }
.tl-item--future .tl-card { border-style: dashed; border-color: rgba(245, 199, 126, 0.35); }
.tl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.tl-date { font-size: 0.8rem; font-weight: 700; color: var(--gold); letter-spacing: 0.06em; }
.tl-tag { font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); padding: 3px 8px; border-radius: 999px; border: 1px solid var(--glass-border); }
.tl-title { font-family: "Playfair Display", Georgia, serif; font-size: clamp(1.25rem, 3vw, 1.6rem); font-weight: 600; line-height: 1.2; }
.tl-text { margin-top: 8px; color: var(--ink-muted); line-height: 1.6; font-size: 0.97rem; }
.chat { display: flex; flex-direction: column; gap: 5px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--glass-border); }
.bubble { max-width: 88%; padding: 8px 13px; border-radius: 18px; font-size: 0.93rem; line-height: 1.4; width: fit-content; word-break: break-word; }
.bubble--her { align-self: flex-start; background: rgba(255, 255, 255, 0.09); border-bottom-left-radius: 6px; color: var(--ink); }
.bubble--me { align-self: flex-end; background: linear-gradient(135deg, var(--neon), var(--crimson)); border-bottom-right-radius: 6px; color: #fff; }
.bubble + .bubble--her, .bubble--me + .bubble--me { margin-top: -1px; }
.chat__who { font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin: 6px 0 -2px; }
.chat__who--me { align-self: flex-end; }
@media (min-width: 900px) {
  .timeline::before { left: 50%; margin-left: -1px; }
  .tl-item { width: 50%; padding: 0 0 40px 0; }
  .tl-item:nth-child(odd) { padding-right: 44px; }
  .tl-item:nth-child(even) { margin-left: 50%; padding-left: 44px; }
  .tl-item .tl-dot { left: auto; right: -10px; top: 12px; }
  .tl-item:nth-child(even) .tl-dot { right: auto; left: -10px; }
}

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 768px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
.photo { position: relative; margin: 0; border-radius: 18px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--glass-border); cursor: pointer; aspect-ratio: 4 / 3; transform-style: preserve-3d; transition: transform 0.35s var(--ease-out), box-shadow 0.35s, border-color 0.35s; }
.photo--portrait img { object-position: center 42%; }   /* tall photo: keep the face in the 4:3 crop (full photo in the lightbox) */
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--ease-out); }
.photo:hover { border-color: rgba(255, 111, 181, 0.4); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 30px rgba(255, 46, 147, 0.15); }
.photo:hover img { transform: scale(1.04); }
.photo:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.photo figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; font-family: "Caveat", cursive; font-size: 1.05rem; line-height: 1.15; color: #fff; background: linear-gradient(180deg, transparent, rgba(10, 5, 9, 0.85)); opacity: 0; transform: translateY(6px); transition: opacity 0.3s, transform 0.3s; }
.photo:hover figcaption, .photo:focus-visible figcaption { opacity: 1; transform: none; }
@media (hover: none) { .photo figcaption { opacity: 1; transform: none; } }
.photo--placeholder { grid-column: 1 / -1; aspect-ratio: auto; min-height: 96px; cursor: default; border: 1px dashed rgba(245, 199, 126, 0.4); background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.02) 0 10px, transparent 10px 20px); display: flex; align-items: center; justify-content: center; gap: 14px; padding: 18px 20px; text-align: left; }
.photo--placeholder:hover { transform: none; box-shadow: none; border-color: rgba(245, 199, 126, 0.6); }
.photo--placeholder svg { width: 30px; height: 30px; flex: none; color: var(--gold); opacity: 0.85; }
.photo--placeholder p { font-family: "Caveat", cursive; font-size: 1.25rem; line-height: 1.1; color: var(--ink-muted); }
.photo--placeholder small { display: block; color: var(--ink-faint); font-size: 0.74rem; margin-top: 4px; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(10, 5, 9, 0.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding: 16px; opacity: 0; transition: opacity 0.3s; }
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox__figure { margin: 0; text-align: center; max-width: min(92vw, 1000px); }
.lightbox__figure img { max-width: 100%; max-height: 74vh; border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 46, 147, 0.15); animation: lbIn 0.35s var(--ease-out); }
.lightbox__figure figcaption { margin-top: 14px; font-family: "Caveat", cursive; font-size: 1.4rem; color: var(--rosegold-2); }
@keyframes lbIn { from { opacity: 0; transform: scale(0.96); } }
.lightbox__close, .lightbox__nav { position: absolute; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--glass-strong); border: 1px solid var(--glass-border); color: #fff; cursor: pointer; transition: background-color 0.2s, transform 0.2s; }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255, 46, 147, 0.3); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: 10px; } .lightbox__nav--next { right: 10px; }
@media (max-width: 640px) { .lightbox__nav { top: auto; bottom: 18px; transform: none; } .lightbox__nav--prev { left: calc(50% - 60px); } .lightbox__nav--next { right: calc(50% - 60px); } }

/* ---------- Quiz ---------- */
.quiz { max-width: 720px; margin: 0 auto; }
.quiz__card { padding: clamp(20px, 4vw, 34px); border-radius: var(--radius); background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)); border: 1px solid var(--glass-border); box-shadow: var(--shadow); }
.quiz__progress { display: flex; gap: 6px; margin-bottom: 18px; }
.quiz__progress i { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); transition: background-color 0.3s; }
.quiz__progress i.is-done { background: var(--neon); }
.quiz__progress i.is-current { background: var(--gold); }
.quiz__count { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
.quiz__q { font-family: "Playfair Display", Georgia, serif; font-size: clamp(1.3rem, 3.4vw, 1.75rem); font-weight: 600; line-height: 1.25; margin: 6px 0 18px; }
.quiz__options { display: grid; gap: 10px; }
.quiz__opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; min-height: 52px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-border); color: var(--ink); font-size: 0.97rem; cursor: pointer; transition: background-color 0.2s, border-color 0.2s, transform 0.2s; }
.quiz__opt:hover:not(:disabled) { background: rgba(255, 46, 147, 0.12); border-color: rgba(255, 111, 181, 0.4); }
.quiz__opt:focus-visible { outline: 2px solid var(--gold); }
.quiz__opt:disabled { cursor: default; opacity: 0.7; }
.quiz__opt .k { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: rgba(255, 255, 255, 0.08); font-size: 0.78rem; font-weight: 700; color: var(--ink-muted); }
.quiz__opt.is-correct { background: rgba(72, 199, 142, 0.16); border-color: rgba(72, 199, 142, 0.6); opacity: 1; }
.quiz__opt.is-correct .k { background: #48c78e; color: #06201a; }
.quiz__opt.is-wrong { background: rgba(216, 30, 91, 0.14); border-color: rgba(216, 30, 91, 0.5); opacity: 1; animation: shake 0.4s; }
.quiz__opt.is-wrong .k { background: var(--crimson); color: #fff; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.quiz__reveal { margin-top: 16px; padding: 16px 18px; border-radius: 14px; background: rgba(245, 199, 126, 0.07); border: 1px solid rgba(245, 199, 126, 0.25); color: var(--ink); line-height: 1.6; font-size: 0.97rem; animation: revealIn 0.4s var(--ease-out); }
.quiz__reveal strong { color: var(--gold); }
@keyframes revealIn { from { opacity: 0; transform: translateY(8px); } }
.quiz__actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.reaction { margin-top: 14px; display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; }
.reaction img { width: 96px; height: 96px; border-radius: 14px; object-fit: cover; border: 2px solid rgba(255, 255, 255, 0.15); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }
.reaction p { font-family: "Caveat", cursive; font-size: 1.3rem; color: var(--rosegold-2); line-height: 1.15; }
.quiz__outro { text-align: center; }
.quiz__score { font-family: "Playfair Display", Georgia, serif; font-size: clamp(2.6rem, 9vw, 4rem); font-weight: 700; line-height: 1; margin: 6px 0 10px; }
.quiz__outro .reaction { grid-template-columns: 1fr; justify-items: center; text-align: center; margin-top: 22px; }
.quiz__outro .reaction img { width: 160px; height: 160px; }

/* ---------- GIF (text edition) ---------- */
.gif-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 768px) { .gif-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
.gif { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--glass-border); display: grid; place-items: center; text-align: center; padding: 16px; transition: transform 0.3s var(--ease-out), border-color 0.3s, box-shadow 0.3s; }
.gif::after { content: "GIF"; position: absolute; top: 10px; left: 10px; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.12em; padding: 3px 7px; border-radius: 6px; background: rgba(255, 255, 255, 0.9); color: #111; }
.gif:hover { transform: translateY(-3px); border-color: rgba(255, 111, 181, 0.4); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4); }
.gif--text { background: linear-gradient(160deg, rgba(255, 46, 147, 0.12), rgba(216, 30, 91, 0.06)), var(--bg-2); }
.gif--text p { font-family: "DM Sans", system-ui, sans-serif; font-weight: 600; color: var(--ink); font-size: clamp(0.9rem, 2.4vw, 1.05rem); line-height: 1.3; }
.gif--text small { display: block; margin-top: 8px; color: var(--ink-faint); font-size: 0.72rem; }
.gif--img { padding: 0; cursor: pointer; }
.gif--img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.gif--img figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 8px; font-family: "Caveat", cursive; font-size: 1.05rem; color: #fff; background: linear-gradient(180deg, transparent, rgba(10, 5, 9, 0.9)); line-height: 1.1; }
.gif--img.is-cracking img { animation: crack 0.6s ease-in-out; }
@keyframes crack { 0%, 100% { transform: rotate(0) scale(1); } 20% { transform: rotate(-4deg) scale(1.06); } 40% { transform: rotate(4deg) scale(1.08); } 60% { transform: rotate(-3deg) scale(1.06); } 80% { transform: rotate(3deg) scale(1.04); } }
.haha { position: fixed; z-index: 45; pointer-events: none; font-family: "Caveat", cursive; font-weight: 700; font-size: 1.6rem; color: var(--gold); text-shadow: 0 0 12px rgba(255, 46, 147, 0.6); animation: haha 1.4s var(--ease-out) forwards; }
@keyframes haha { from { opacity: 1; transform: translate(-50%, 0) rotate(var(--r)); } to { opacity: 0; transform: translate(calc(-50% + var(--dx)), -140px) rotate(var(--r)); } }

/* ---------- Flip cards (reasons + Manglish) ---------- */
.flip-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .flip-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .flip-grid { grid-template-columns: repeat(3, 1fr); } }
.flip-grid--compact { grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 768px) { .flip-grid--compact { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 1024px) { .flip-grid--compact { grid-template-columns: repeat(5, 1fr); } }
.flip { perspective: 1200px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.flip:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: var(--radius); }
.flip__inner { position: relative; display: grid; transform-style: preserve-3d; transition: transform 0.75s var(--ease-spring); min-height: 190px; }
.flip.is-flipped .flip__inner { transform: rotateY(180deg); }
.flip__face { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--glass-border); }
.flip__front { background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)); transition: border-color 0.3s, box-shadow 0.3s; }
.flip:hover .flip__front { border-color: rgba(255, 111, 181, 0.4); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), 0 0 30px rgba(255, 46, 147, 0.12); }
.flip__back { transform: rotateY(180deg); background: linear-gradient(160deg, rgba(255, 46, 147, 0.22), rgba(216, 30, 91, 0.12)), var(--bg-2); border-color: rgba(255, 111, 181, 0.35); }
.flip__num { font-family: "Playfair Display", Georgia, serif; font-size: 0.95rem; color: var(--gold); font-style: italic; }
.flip__teaser { font-family: "Playfair Display", Georgia, serif; font-size: clamp(1.25rem, 3vw, 1.5rem); font-weight: 600; line-height: 1.2; margin-top: 18px; }
.flip__hint { margin-top: 18px; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }
.flip__text { color: var(--ink); line-height: 1.55; font-size: 0.97rem; }
.flip__note { margin-top: 14px; font-family: "Caveat", cursive; font-size: 1.15rem; color: var(--rosegold-2); }
.flip--word .flip__inner { min-height: 150px; }
.flip--word .flip__face { padding: 18px; }
.flip--word .flip__word { font-family: "Playfair Display", Georgia, serif; font-size: clamp(1.35rem, 4vw, 1.7rem); font-weight: 600; font-style: italic; line-height: 1.1; }
.flip--word .flip__text { font-size: 0.9rem; }
.flip--word .flip__note { font-size: 1.05rem; margin-top: 10px; }

/* ---------- Letter ---------- */
.letter { position: relative; padding: clamp(26px, 5vw, 48px) clamp(20px, 5vw, 48px); background: linear-gradient(160deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)), repeating-linear-gradient(0deg, transparent 0 41px, rgba(255, 255, 255, 0.035) 41px 42px); }
.letter__pin { position: absolute; top: -12px; left: 50%; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, var(--neon) 40%, var(--red)); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 46, 147, 0.5); }
.letter__skip { position: absolute; top: 14px; right: 16px; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); background: transparent; border: 1px solid var(--glass-border); border-radius: 999px; padding: 6px 10px; cursor: pointer; transition: color 0.2s, border-color 0.2s; }
.letter__skip:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.3); }
.letter__body { font-size: clamp(1.35rem, 2.6vw, 1.65rem); line-height: 1.45; color: var(--ink); }
.letter__body p { margin: 0 0 18px; min-height: 1.4em; }
.letter__body p:first-child { font-size: 1.25em; color: var(--rosegold-2); }
.letter__body p:last-child { margin-bottom: 0; }
.letter__body .caret { display: inline-block; width: 2px; height: 1em; background: var(--neon); vertical-align: -0.15em; margin-left: 2px; animation: blink 0.9s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.letter.is-typing p { opacity: 0; }
.letter.is-typing p.is-typed, .letter.is-typing p.is-live { opacity: 1; }

/* ---------- Finale ---------- */
.finale { position: relative; padding: clamp(90px, 14vw, 160px) 0 0; text-align: center; overflow: hidden; }
.finale__glow { position: absolute; left: 50%; top: 10%; width: 90vw; max-width: 900px; height: 60%; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle, rgba(255, 46, 147, 0.28), transparent 60%); filter: blur(60px); pointer-events: none; }
.finale__inner { position: relative; }
.finale__title { font-size: clamp(2.4rem, 8vw, 5.2rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; margin: 12px 0 14px; text-wrap: balance; }
.finale__lead { color: var(--ink-muted); font-size: clamp(1.05rem, 2.4vw, 1.3rem); }
.finale__quote { font-size: clamp(1.4rem, 3.4vw, 2rem); color: var(--gold); margin: 22px auto 30px; line-height: 1.2; }
.finale__quote span { display: block; font-size: 0.55em; color: var(--ink-faint); margin-top: 6px; }
.footer { margin-top: clamp(64px, 10vw, 110px); padding: 26px 16px 34px; border-top: 1px solid var(--glass-border); color: var(--ink-faint); font-size: 0.82rem; letter-spacing: 0.04em; }

/* ---------- Song button ---------- */
.song { position: fixed; right: 14px; bottom: 14px; z-index: 40; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 14px 10px 12px; border-radius: 999px; background: rgba(19, 8, 17, 0.7); border: 1px solid var(--glass-border); color: var(--ink); cursor: pointer; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); opacity: 0; visibility: hidden; transition: opacity 0.4s, visibility 0.4s, border-color 0.3s, box-shadow 0.3s; }
.song.is-visible { opacity: 1; visibility: visible; }
.song:hover { border-color: rgba(255, 111, 181, 0.5); }
.song:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.song__icon { width: 20px; height: 20px; }
.song__label { font-size: 0.82rem; font-weight: 600; }
.song__eq { display: none; align-items: flex-end; gap: 2px; height: 16px; }
.song__eq i { width: 3px; height: 40%; background: var(--neon-2); border-radius: 2px; animation: eq 0.8s ease-in-out infinite; }
.song__eq i:nth-child(2) { animation-delay: 0.2s; } .song__eq i:nth-child(3) { animation-delay: 0.4s; }
@keyframes eq { 0%, 100% { height: 30%; } 50% { height: 100%; } }
.song.is-playing { border-color: rgba(255, 46, 147, 0.6); box-shadow: 0 10px 30px rgba(255, 46, 147, 0.3); }
.song.is-playing .song__icon { display: none; }
.song.is-playing .song__eq { display: flex; }
.song.is-missing { opacity: 0.75; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 76px; z-index: 50; transform: translate(-50%, 20px); padding: 10px 16px; border-radius: 999px; background: rgba(19, 8, 17, 0.85); border: 1px solid rgba(255, 111, 181, 0.35); color: var(--ink); font-family: "Caveat", cursive; font-size: 1.25rem; white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; opacity: 0; visibility: hidden; transition: opacity 0.3s, transform 0.3s var(--ease-out), visibility 0.3s; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }
.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ---------- Scroll reveal ---------- */
.js-reveal [data-reveal], .js-reveal .tl-item, .js-reveal .stat, .js-reveal .photo, .js-reveal .flip, .js-reveal .gif { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); transition-delay: var(--d, 0s); }
.js-reveal .is-in { opacity: 1; transform: none; }
.js-reveal .flip.is-in { transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .hero__in { opacity: 1; transform: none; }
  .js-reveal [data-reveal], .js-reveal .tl-item, .js-reveal .stat, .js-reveal .photo, .js-reveal .flip, .js-reveal .gif { opacity: 1; transform: none; }
  .marquee__track { animation: none; }
  .hearts { display: none; }
}

/* ---------- ?static=1 : no motion at all (screenshots, very slow phones) ---------- */
.no-motion *, .no-motion *::before, .no-motion *::after { animation: none !important; transition: none !important; }
.no-motion .hero__in { opacity: 1 !important; transform: none !important; }
.no-motion .hearts, .no-motion .grain { display: none !important; }
