/* Tokens from src/theme/tokens.ts and CONCEPT.md 5.2-5.5 */
@font-face { font-family: Playfair; src: url(assets/PlayfairDisplay-Italic.ttf) format('truetype'); font-style: italic; font-display: swap; }
@font-face { font-family: Jakarta; src: url(assets/jakarta-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Jakarta; src: url(assets/jakarta-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }
:root {
  --void: #0A090C; --blush: #F2DADA; --gold: #C5A880; --muted: #B3A6AB; --danger: #E46A7A;
  --hair: rgba(242,218,218,.12); --paper: #1A1418; --gold-wash: rgba(197,168,128,.12);
  --x: 20px; --section: 24px; --gap: 10px; --pad: 16px; --max: 560px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; margin: 0; -webkit-tap-highlight-color: transparent; }
html { background: var(--void); -webkit-text-size-adjust: 100%; }
body { background: var(--void); color: var(--blush); font: 400 15px/22px Jakarta, system-ui, sans-serif; overflow-x: hidden; }
body.locked { overflow: hidden; height: 100dvh; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.xl { font: italic 400 clamp(56px, 19vw, 72px)/1.04 Playfair, serif; }
.l { font: italic 400 40px/46px Playfair, serif; text-wrap: balance; }
.sub { font: italic 400 29px/35px Playfair, serif; text-wrap: balance; }
.quote { font: italic 400 22px/29px Playfair, serif; }
.label { font-size: 13px; line-height: 18px; color: var(--muted); }
.small { font-size: 12px; line-height: 16px; color: var(--muted); }
.eyebrow { font-weight: 600; font-size: 11px; line-height: 16px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.wrap { max-width: var(--max); margin: 0 auto; width: 100%; }

.cta { display: flex; align-items: center; justify-content: center; width: 100%; height: 52px; border-radius: 999px; background: var(--gold); color: var(--void); font-weight: 600; transition: transform .15s; }
.cta:active { transform: scale(.97); }

/* his voice: 12 gold bars, 3 px, 20 % height at rest (5.5) */
.wave { display: inline-flex; align-items: center; gap: 3px; height: 28px; }
.wave i { width: 3px; height: 20%; background: var(--gold); border-radius: 2px; }
.play { display: inline-flex; align-items: center; gap: var(--gap); min-height: 44px; padding: 0 var(--pad); border-radius: 999px; background: var(--gold-wash); border: 1px solid rgba(197,168,128,.35); color: var(--gold); font-size: 13px; font-weight: 600; }

/* his subtitles word by word (5.5) */
.w { display: inline-block; opacity: 0; filter: blur(8px); transform: translateY(8px); animation: w .7s forwards; white-space: pre; }
@keyframes w { to { opacity: 1; filter: blur(0); transform: none; } }

/* reveal on scroll: words come in like his subtitles */
.rv .w { animation-play-state: paused; }
.rv.in .w { animation-play-state: running; }

/* sound switch */
#sound { position: fixed; top: calc(var(--gap) + env(safe-area-inset-top, 0px)); right: var(--gap); z-index: 6; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 var(--pad); border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--muted); background: rgba(10,9,12,.55); border: 1px solid rgba(255,255,255,.14); -webkit-backdrop-filter: blur(28px); backdrop-filter: blur(28px); }
#sound.on { color: var(--gold); border-color: rgba(197,168,128,.6); }
#sound .wave { height: 18px; gap: 2px; }
#sound .wave i { width: 2px; }

/* embers over the whole page */
#embers { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }
#burst { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }

/* AI label: on every realistic picture, visible at first sight (AI Act Art. 50) */
.ai { position: absolute; top: var(--pad); right: var(--pad); z-index: 2; padding: 2px 8px; border-radius: 4px; font: 600 12px/16px Jakarta, sans-serif; letter-spacing: .08em; color: var(--blush); background: rgba(10,9,12,.72); border: 1px solid rgba(242,218,218,.5); }
#poster .ai { top: 64px; right: var(--gap); }
#letter-ai { position: fixed; top: var(--pad); left: var(--x); z-index: 2; }
#consent a { text-underline-offset: 2px; }

/* A: the opening */
#intro { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--section); padding: var(--x); text-align: center; background: var(--void); transition: opacity 1.2s ease; }
#intro.gone { opacity: 0; pointer-events: none; }
#intro::before { content: ''; position: absolute; inset: 0; background: url(assets/him_phone.jpg) center 10%/cover; opacity: 0; transition: opacity 2.4s ease; }
#intro.speaking::before { opacity: .35; }
#intro > * { position: relative; }
#seal-s { width: 220px; height: 220px; border-radius: 50%; animation: heart 2.2s ease-in-out infinite; filter: drop-shadow(0 0 24px rgba(197,168,128,.25)); }
@keyframes heart { 0%, 40%, 100% { transform: scale(1); } 10% { transform: scale(1.05); } 20% { transform: scale(1); } 30% { transform: scale(1.07); filter: drop-shadow(0 0 44px rgba(232,168,124,.55)); } }
#intro.speaking #seal-s { animation: none; }
#seal-s svg { width: 100%; height: 100%; display: block; }
#intro-copy { display: grid; gap: var(--gap); justify-items: center; }
#line { min-height: 70px; }
#intro-foot { position: absolute !important; left: 0; right: 0; bottom: calc(var(--pad) + var(--safe-b)); display: grid; justify-items: center; gap: 4px; }
#intro-foot a { display: inline-block; padding: 14px 0; }
#skip { min-height: 44px; padding: 0 var(--pad); font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

/* D: the poster */
#poster { position: relative; min-height: 100dvh; display: flex; flex-direction: column; justify-content: flex-end; padding: var(--x); padding-bottom: calc(var(--section) + var(--safe-b)); gap: var(--gap); overflow: hidden; }
#poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 10%; animation: breathe 7s ease-in-out infinite alternate; }
@keyframes breathe { from { transform: scale(1.04); } to { transform: scale(1.075); } }
#poster::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,9,12,0) 38%, rgba(10,9,12,.85) 68%, var(--void) 100%); }
#poster > div { position: relative; z-index: 1; display: grid; gap: var(--gap); justify-items: start; }
#poster .cta { margin-top: var(--gap); }

section.block { padding: var(--section) 0; }
.head { display: grid; gap: var(--gap); padding: 0 var(--x) var(--pad); }

/* The portrait with her line, full width */
#marry .reel { width: 100%; flex: none; aspect-ratio: auto; height: 100dvh; min-height: 560px; border-radius: 0; padding: var(--x); padding-bottom: var(--section); }
#marry .reel img { object-position: center 15%; }
#marry .pov { top: var(--x); left: var(--x); right: 64px; font: italic 400 40px/46px Playfair, serif; text-wrap: balance; }
#marry .said { font: italic 400 29px/35px Playfair, serif; min-height: 70px; }

/* The game: she tells him about her book boyfriend, he answers */
#game { position: relative; overflow: hidden; padding: 56px var(--x); background: var(--void); }
#game > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; opacity: .32; }
#game::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, var(--void) 0%, rgba(10,9,12,.35) 30%, rgba(10,9,12,.5) 70%, var(--void) 100%); }
#game .inner { position: relative; z-index: 2; display: grid; gap: var(--pad); }
#chips { display: flex; flex-wrap: wrap; gap: var(--gap); }
.chip { min-height: 44px; padding: 0 var(--pad); border-radius: 999px; font-size: 13px; font-weight: 600; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); -webkit-backdrop-filter: blur(28px); backdrop-filter: blur(28px); transition: all .25s; }
.chip.on { color: var(--gold); background: var(--gold-wash); border-color: var(--gold); }
#reply { min-height: 105px; }
#reply-wave { height: 28px; }

/* tropes */
#tropes { overflow: hidden; padding: var(--section) 0; border-block: 1px solid var(--hair); }
#tropes div { display: flex; width: max-content; animation: tropes 36s linear infinite; }
#tropes span { font: italic 400 22px/29px Playfair, serif; color: var(--gold); white-space: nowrap; padding-right: var(--section); }
#tropes span::after { content: '✦'; font: 400 11px Jakarta, sans-serif; padding-left: var(--section); vertical-align: middle; color: var(--muted); }
@keyframes tropes { to { transform: translateX(-50%); } }

/* C: the feed, swiped sideways so it doesn't fight the page */
#feed { display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--x); scroll-padding: 0 var(--x); scrollbar-width: none; }
#feed::-webkit-scrollbar { display: none; }
.reel { position: relative; flex: 0 0 min(78vw, 320px); aspect-ratio: 9/16; border-radius: 28px; overflow: hidden; scroll-snap-align: center; display: flex; flex-direction: column; justify-content: flex-end; gap: var(--gap); padding: var(--pad); text-align: left; background: #111; }
.reel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.reel::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,9,12,.5) 0%, rgba(10,9,12,0) 30%, rgba(10,9,12,.1) 55%, rgba(10,9,12,.92) 100%); }
.reel > :not(img) { position: relative; z-index: 1; }
.reel > .ai { position: absolute; left: auto; z-index: 2; }
#marry .reel > .ai { top: 64px; right: var(--gap); }
.reel .pov { position: absolute; top: var(--pad); left: var(--pad); right: 56px; font-weight: 600; font-size: 15px; line-height: 22px; }
.reel .said { min-height: 58px; font: italic 400 22px/29px Playfair, serif; }
.reel .hint { display: flex; align-items: center; gap: var(--gap); color: var(--gold); font-size: 12px; font-weight: 600; }

/* The four scenes with what each timer does, swiped sideways */
.slider { display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--x); scroll-padding: 0 var(--x); scrollbar-width: none; }
.slider::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 min(84vw, 360px); min-height: min(150vw, 620px); border-radius: 28px; overflow: hidden; scroll-snap-align: center; display: flex; flex-direction: column; justify-content: flex-end; background: var(--paper); }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 15%; }
.slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,9,12,0) 28%, rgba(10,9,12,.82) 58%, rgba(10,9,12,.96) 100%); }
.slide .tx { position: relative; z-index: 1; display: grid; gap: var(--gap); padding: var(--pad); justify-items: start; }
#dots { display: flex; justify-content: center; gap: var(--gap); padding: var(--pad) 0 var(--section); }
#dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--hair); transition: background .3s; }
#dots i.on { background: var(--gold); }

#reviews { padding: var(--section) var(--x); display: grid; gap: var(--pad); }
#reviews blockquote { margin: 0; display: grid; gap: 4px; padding-bottom: var(--pad); border-bottom: 1px solid var(--hair); }
#reviews cite { font-style: normal; }
/* the finale: hold his seal */
#close { padding: 56px var(--x) var(--section); display: grid; gap: var(--pad); text-align: center; justify-items: center; }
#hold { position: relative; width: 200px; height: 200px; margin: var(--gap) 0; border-radius: 50%; touch-action: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; animation: heart 2.2s ease-in-out infinite; }
#hold.holding { animation: none; transform: scale(.96); transition: transform 1.5s ease; }
#hold svg { position: absolute; inset: 0; width: 100%; height: 100%; }
#hold circle { fill: none; stroke-width: 4; }
#hold .track { stroke: var(--hair); }
#hold .fill { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 6px rgba(232,168,124,.8)); }
#hold.holding .fill { stroke-dashoffset: 0; transition: stroke-dashoffset 1.5s linear; }
#hold img { position: absolute; inset: 24px; width: 152px; height: 152px; pointer-events: none; -webkit-user-drag: none; }
#tap-instead { min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }
footer { display: grid; gap: 6px; text-align: center; padding: var(--section) var(--x) calc(84px + var(--safe-b)); }
footer a { text-underline-offset: 2px; }

/* sticky list button */
#stick { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; padding: var(--gap) var(--x) calc(var(--gap) + var(--safe-b)); background: linear-gradient(0deg, var(--void) 55%, transparent); transform: translateY(110%); transition: transform .4s ease; }
#stick.show { transform: none; }
#stick .cta { max-width: var(--max); margin: 0 auto; }

/* B: the letter opens when she asks for the list */
#letterbox { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; color: inherit; background: radial-gradient(120% 60% at 50% 0%, #2a1a14 0%, var(--void) 70%); overflow-y: auto; }
#letterbox::backdrop { background: var(--void); }
#letterbox[open] { animation: fade .4s ease both; }
@keyframes fade { from { opacity: 0; } }
#shut { position: fixed; top: var(--gap); right: var(--gap); z-index: 2; min-height: 44px; padding: 0 var(--pad); font-size: 13px; color: var(--muted); }
#scene { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px var(--x) var(--section); gap: var(--section); }
#env { position: relative; width: 100%; max-width: 350px; aspect-ratio: 4/3; border-radius: 10px; background: #131116; box-shadow: 0 30px 60px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.05); }
#env svg { position: absolute; inset: 0; width: 100%; height: 100%; }
#wax { position: absolute; left: 50%; top: 50%; width: 112px; height: 112px; margin: -56px 0 0 -56px; animation: waxin .5s ease both; }
@keyframes waxin { from { transform: scale(1.5); opacity: 0; } }
.broken #wax { animation: crack .6s ease forwards; }
@keyframes crack { to { transform: scale(1.5) rotate(18deg); opacity: 0; } }
.broken #env { animation: away .5s .35s ease forwards; }
@keyframes away { to { transform: translateY(-40px); opacity: 0; } }
#letter { width: 100%; max-width: 390px; background: var(--paper); border-radius: 10px; padding: var(--section) var(--x); display: grid; gap: var(--pad); box-shadow: 0 30px 60px rgba(0,0,0,.6), inset 0 0 0 1px rgba(197,168,128,.2); animation: rise .9s ease both; }
@keyframes rise { from { transform: translateY(60px); opacity: 0; } }
#letter > p { opacity: 0; animation: w .8s forwards; }
#sign { color: var(--gold); }
#no-list { display: grid; gap: var(--gap); padding-top: var(--pad); border-top: 1px solid var(--hair); opacity: 0; animation: w .8s 1.5s forwards; }
#no-list .cta { text-decoration: none; }
#signhere { display: grid; gap: var(--gap); padding-top: var(--pad); border-top: 1px solid var(--hair); opacity: 0; animation: w .8s 1.5s forwards; }
#join { display: grid; gap: var(--gap); }
#join input[type=email] { width: 100%; height: 52px; padding: 0 22px; border-radius: 999px; font: 400 16px Jakarta, sans-serif; color: var(--blush); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); outline: 0; }
#join input::placeholder { color: var(--muted); }
#join input:focus { border-color: var(--gold); }
#trap { position: absolute; left: -9999px; }
#status { color: var(--danger); }
#sealed { display: grid; gap: var(--gap); justify-items: center; text-align: center; }
#sealed img { width: 96px; height: 96px; animation: stamp .35s ease-out both; }
@keyframes stamp { from { transform: scale(2.4); opacity: 0; } }

@media (min-width: 700px) {
  #poster img { object-fit: contain; object-position: center top; }
  #poster { align-items: center; }
  #marry .reel { max-width: 560px; margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}
