/* ===== STORY: a film in scenes ===== */
html.st-on{scroll-snap-type:y mandatory}
html.st-on body{overflow:visible!important;overflow-x:clip!important}
#main .st{position:relative;background:#000;color:#fff3e8;margin:0!important;padding:0!important}
/* every scene is one full screen, no sticky tricks */
#main .st>.st-scene{position:relative!important;display:block!important;width:100%!important;max-width:none!important;height:100vh;height:100svh;margin:0!important;padding:0!important;overflow:hidden;scroll-snap-align:start;background:#000!important;border:0!important}
.st-pic{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:60% 35%;filter:brightness(.72) saturate(1.1);transform:scale(1.08);transition:transform 9s linear}
.st-scene.live .st-pic{transform:scale(1)}
.st-grade{position:absolute;inset:0;background:radial-gradient(ellipse 80% 70% at 55% 45%,transparent 35%,rgba(0,0,0,.7)),linear-gradient(transparent 55%,rgba(0,0,0,.75))}
/* letterbox + grain */
.st-bar{position:fixed;left:0;right:0;height:6vh;background:#000;z-index:40;pointer-events:none}
.st-bar.top{top:0}.st-bar.bot{bottom:0}
html:not(.st-on) .st-bar,html:not(.st-on) .st-reel{display:none}
#main .st::after{content:'';position:fixed;inset:0;z-index:41;pointer-events:none;opacity:.08;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}
/* scene card: year + title, top left */
.st-card{position:absolute;left:5vw;top:calc(6vh + 48px);z-index:2;opacity:0;transform:translateY(16px);transition:opacity .9s .2s,transform .9s .2s}
.st-scene.live .st-card{opacity:1;transform:none}
#main .st-year{margin:0!important;font:500 14px/1 ui-monospace,Menlo,monospace!important;letter-spacing:.35em;color:#ffd36b!important}
#main .st-card h2{margin:10px 0 0!important;font:400 clamp(44px,7vw,110px)/.9 'Anton',Impact,sans-serif!important;text-transform:uppercase!important;color:#fff3e8!important;max-width:14ch}
/* subtitles: one line at a time, bottom centre */
.st-subs{position:absolute;left:0;right:0;bottom:calc(6vh + 28px);z-index:3;display:grid;place-items:center;padding:0 6vw}
#main .st-subs p{grid-area:1/1;margin:0!important;max-width:880px;text-align:center;font:500 clamp(18px,2vw,28px)/1.35 'Space Grotesk',sans-serif!important;color:#fff9c9!important;text-shadow:0 2px 0 #000,0 0 16px rgba(0,0,0,.9);opacity:0;transition:opacity .5s}
#main .st-subs p.on{opacity:1}
/* reel: jump to a year, sits in the bottom bar */
.st-reel{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(3vh - 11px);z-index:42;display:flex;gap:4px;max-width:96vw;overflow-x:auto;scrollbar-width:none}
#main .st-reel button{all:unset!important;cursor:pointer!important;flex:0 0 auto;padding:5px 7px!important;font:600 11px/1 ui-monospace,Menlo,monospace!important;color:rgba(255,243,232,.55)!important;border-bottom:2px solid transparent!important}
#main .st-reel button:hover,#main .st-reel button[aria-current]{color:#ffd36b!important;border-bottom-color:#ffd36b!important}
#main .st-reel button:focus-visible{outline:2px solid #ffd36b!important}
/* opening and end */
#main .st>.st-open,#main .st>.st-end{display:grid!important;place-items:center;align-content:center;gap:28px}
#main .st .st-name{position:static!important;clip:auto!important;width:auto!important;height:auto!important;overflow:visible!important;margin:0!important;font:400 clamp(110px,22vw,340px)/.85 'Anton',Impact,sans-serif!important;text-transform:uppercase;color:#fff3e8!important;text-shadow:0 0 60px rgba(255,211,107,.25);animation:st-title 3s cubic-bezier(.2,.8,.2,1) both}
@keyframes st-title{0%{opacity:0;letter-spacing:.3em;filter:blur(12px)}100%{opacity:1;letter-spacing:.02em;filter:blur(0)}}
#main .st-next{margin:0!important;font:500 14px/1 ui-monospace,Menlo,monospace!important;letter-spacing:.35em;text-transform:uppercase;color:#ffd36b!important}
#main .st-cont{all:unset;cursor:pointer;font:600 40px/1 'Caveat',cursive;color:#fff3e8;border-bottom:2px solid #ffd36b;padding-bottom:4px}
@media (max-width:700px){.st-card{left:16px;top:calc(6vh + 64px)}.st-subs{padding:0 16px}}
@media (prefers-reduced-motion:reduce){.st-pic{transition:none;transform:none}#main .st .st-name{animation:none}html.st-on{scroll-snap-type:none}}
/* sound, start, progress */
#main .st-roll-btn{all:unset!important;cursor:pointer!important;font:500 14px/1 ui-monospace,Menlo,monospace!important;letter-spacing:.3em!important;text-transform:uppercase!important;color:#ffd36b!important;border-bottom:1px solid #ffd36b!important;padding-bottom:6px!important;animation:st-pulse 2.4s ease-in-out infinite}
@keyframes st-pulse{50%{opacity:.45}}
#main .st-snd{all:unset!important;cursor:pointer!important;position:fixed!important;right:20px;bottom:calc(3vh - 8px);z-index:43;font:600 11px/1 ui-monospace,Menlo,monospace!important;letter-spacing:.2em!important;text-transform:uppercase!important;color:rgba(255,243,232,.6)!important}
#main .st-snd[aria-pressed="true"]{color:#ffd36b!important}
html:not(.st-on) .st-snd{display:none!important}
.st-prog{position:absolute;left:0;bottom:6vh;height:2px;width:0;background:#ffd36b;z-index:4}
.st-scene.rolling .st-prog{animation:st-prog var(--dur,7s) linear forwards}
@keyframes st-prog{to{width:100%}}
.st-scene:not(:has(.st-pic)){background:radial-gradient(ellipse 60% 50% at 50% 50%,#2a1608,#000)!important}
#main .st-reel{left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:max-content!important;max-width:calc(100vw - 120px)!important}
#main .st-start{all:unset!important;cursor:pointer!important;font:inherit!important;color:inherit!important;letter-spacing:inherit!important}
#main .st-snd{display:flex!important;align-items:end;gap:3px;height:14px}
#main .st-snd i{display:block;width:3px;height:4px;background:rgba(255,243,232,.5)}
#main .st-snd[aria-pressed="true"] i{background:#ffd36b;animation:st-eq .9s ease-in-out infinite alternate}
#main .st-snd[aria-pressed="true"] i:nth-child(2){animation-delay:.3s}#main .st-snd[aria-pressed="true"] i:nth-child(3){animation-delay:.6s}
@keyframes st-eq{to{height:14px}}
/* 1998: childhood film stills, crossfading */
.st-slides img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:40% 30%;opacity:0;animation:st-slide 12s linear infinite;animation-delay:calc(var(--i) * 3s)}
@keyframes st-slide{0%{opacity:0}6%{opacity:1}25%{opacity:1}31%{opacity:0}100%{opacity:0}}
/* opening: a collage of every era behind the name */
.st-collage{position:absolute;inset:-4%;display:grid;grid-template-columns:repeat(4,1fr);grid-auto-rows:1fr;gap:10px;transform:rotate(-4deg) scale(1.08);filter:brightness(.38) saturate(1.1);animation:st-drift 40s linear infinite alternate}
.st-collage img{width:100%;height:100%;object-fit:cover;border:6px solid #fff3e8;box-shadow:0 10px 30px rgba(0,0,0,.6);transform:rotate(calc((var(--k) * 37 % 9 - 4) * 1deg))}
@keyframes st-drift{to{transform:rotate(-4deg) scale(1.08) translateY(-3%)}}
#main .st>.st-open{position:relative!important}
#main .st .st-name{position:relative!important;z-index:2}
@media (max-width:700px){.st-collage{grid-template-columns:repeat(3,1fr)}}
@media (prefers-reduced-motion:reduce){.st-collage,.st-slides img{animation:none}.st-slides img:first-child{opacity:1}}

/* bars show the real state: still and dim when muted or blocked, moving when playing */
html:not(.st-playing) #main .st-snd i{animation:none!important;background:rgba(255,243,232,.5)!important;height:4px!important}
#main .st-snd{padding:8px!important;margin:-8px!important}
/* Story is one viewport; a single clock cuts between scenes. */
html.st-on{scroll-snap-type:none!important;overflow:hidden!important}
html.st-on body{overflow:hidden!important}
html.st-on #main{padding:0!important;margin:0!important;min-height:100svh!important;animation:none!important;transform:none!important;filter:none!important}
#main .st{position:fixed!important;inset:0!important;height:100svh!important;overflow:hidden!important;z-index:30}
#main .st>.st-scene{position:absolute!important;inset:0!important;height:100%!important;opacity:0!important;visibility:hidden!important;pointer-events:none;transition:opacity .6s ease,visibility .6s}
#main .st>.st-scene.live{opacity:1!important;visibility:visible!important;pointer-events:auto}
#main .st .st-prog{width:calc(var(--progress,0)*100%)!important;animation:none!important}
#main .st-snd{position:fixed!important;right:18px!important;bottom:12px!important;width:40px!important;height:40px!important;display:grid!important;place-items:center!important;padding:0!important;margin:0!important;z-index:5100!important;pointer-events:auto!important}
#main .st-snd svg{width:24px;height:24px;fill:none;stroke:#ffd36b;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#main .st-snd .st-slash{display:none}#main .st-snd.muted .st-slash{display:block}#main .st-snd.muted .st-waves{display:none}
#main .st-reel{bottom:17px!important;max-width:calc(100vw - 120px)!important}
/* footer stays on Story too */
.st-sequence{position:absolute;inset:0;overflow:hidden}.st-seq-part{opacity:0!important;visibility:hidden!important}.st-seq-part.active{opacity:1!important;visibility:visible!important}
/* Each period carries its own atmosphere, with a gentle cut through black. */
#main .st>.st-scene{transition:opacity .85s ease,visibility .85s!important}
#main .st .st-card{transition:opacity 1.2s .2s,transform 1.2s .2s}
#main .st .st-subs p{transition:opacity .7s ease!important;max-width:940px;font-size:clamp(18px,1.65vw,25px)!important;line-height:1.45!important}
#st-0 .st-pic,#st-1 .st-pic,#st-2 .st-pic,#st-3 .st-pic{filter:brightness(.74) saturate(.75) sepia(.16)}
#st-4 .st-pic,#st-5 .st-pic{filter:brightness(.8) saturate(.85)}
#st-6 .st-pic,#st-7 .st-pic{filter:brightness(.7) saturate(.95)}
#st-8 .st-pic{filter:brightness(.72) saturate(1.08)}
#st-9 .st-pic,#st-10 .st-pic{filter:brightness(.7) saturate(1.18)}
#st-11 .st-pic{filter:brightness(.75) saturate(1.1)}
#st-12 .st-pic{filter:brightness(.68) saturate(1.18)}
#st-13 .st-pic{filter:brightness(.72) saturate(1.15)}
@media(max-width:700px){#main .st .st-card h2{font-size:clamp(35px,10vw,64px)!important;max-width:12ch}#main .st .st-subs{bottom:100px!important;padding:0 22px!important}#main .st-snd{bottom:12px!important}#main .st-reel{bottom:18px!important}}

/* Keep childhood portraits intact instead of cropping faces to fill the screen. */
#st-0 .st-pic{object-fit:contain!important;object-position:center!important;background:#17100d}


/* End on the wink in the existing Mrs Claus clip. */
#main .st-end{background:#000!important}
#main .st>.st-scene.st-finale.live{opacity:var(--final-opacity,1)!important;transition:none!important}

#main .st>.st-end{padding:40px 24px!important;text-align:center;gap:22px}
#main .st-closing-title{margin:0;max-width:18ch;font:500 clamp(38px,6vw,76px)/1.05 'Space Grotesk',sans-serif;color:#fff3e8;letter-spacing:-.04em}
#main .st-closing-copy{margin:0;max-width:42ch;font:400 clamp(17px,2vw,23px)/1.5 'Space Grotesk',sans-serif;color:#fff3e8}
#main .st-closing-future{margin:0;font:500 17px/1.5 'Space Grotesk',sans-serif;color:#ffd36b}
#main .st-reel{touch-action:pan-x;-webkit-overflow-scrolling:touch}
@media (max-aspect-ratio:4/5){#main .st .st-scene video{object-fit:contain!important;height:auto!important;max-height:100%;top:50%!important;translate:0 -50%;background:#000}}
@media (max-aspect-ratio:4/5){#main .st .st-scene video{object-fit:cover!important;width:100%!important;height:auto!important;aspect-ratio:4/3;max-height:none}}
html.st-on,html.st-on body{overflow:hidden!important;height:100%}html.st-on body>header{position:fixed!important;top:0;left:0;right:0}
