/* swaybiz.in: a scroll-played film. Theme: blue (the machine), yellow to orange (the accent); amber is the request travelling from Swayam's laptop. */
:root{
  --ink:#03050a; --ink-2:#070b14; --panel:rgb(7 11 20 / .58);
  --text:#eef3f8; --muted:#9aa6b6; --dim:#5d6878; --line:rgb(238 243 248 / .14);
  --yellow:#ffd23f; --orange:#ff8a1f; --amber:#ffb547; --warm:linear-gradient(90deg,#ffd23f,#ff8a1f);
  --sans:"Archivo",-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
  --mono:"IBM Plex Mono",ui-monospace,"SF Mono",Menlo,monospace;
  --gut:clamp(18px,4.2vw,64px);
  --ease:cubic-bezier(.16,1,.3,1);
}
*,*::before,*::after{box-sizing:border-box}
html{background:var(--ink);color:var(--text);-webkit-text-size-adjust:100%}
body{margin:0;font-family:var(--sans);font-size:16px;line-height:1.55;-webkit-font-smoothing:antialiased;background:var(--ink);overflow-x:clip}
h1,h2,p{margin:0}
a{color:inherit}
em{font-style:italic}
.mono{font-family:var(--mono);font-size:12px;letter-spacing:0}
.skip{position:fixed;left:12px;top:-60px;z-index:100;padding:10px 14px;background:var(--text);color:var(--ink);border-radius:8px;text-decoration:none}
.skip:focus{top:12px}
:focus-visible{outline:2px solid var(--orange);outline-offset:3px}

/* ---------------------------------------------------------------- the stage */
#gl{position:fixed;inset:0;width:100%;height:100%;display:block;z-index:0}
.vignette{position:fixed;inset:0;z-index:1;pointer-events:none;
  background:radial-gradient(120% 90% at 50% 50%,transparent 55%,rgb(0 0 0 / .55) 100%),
             linear-gradient(180deg,rgb(3 5 10 / .55) 0,transparent 16%,transparent 78%,rgb(3 5 10 / .7) 100%)}
.flash{position:fixed;inset:0;z-index:2;pointer-events:none;opacity:0;
  background:radial-gradient(60% 60% at 50% 50%,#ffffff 0,#f3f5f8 35%,rgb(238 243 248 / .55) 65%,rgb(238 243 248 / 0) 100%)}
.runway{height:1400vh}

/* ---------------------------------------------------------------- boot */
.boot{position:fixed;inset:0;z-index:50;display:grid;place-content:center;justify-items:center;gap:18px;background:var(--ink);transition:opacity .9s var(--ease),visibility .9s}
.boot__mark{font-size:clamp(2.2rem,5vw,3.4rem);font-weight:700;font-stretch:75%;letter-spacing:-.01em}
.boot__mark span,.hud__mark span,.hud__chapter b,.cue__eyebrow,.cue p.cue__eyebrow,.static-page p.cue__eyebrow{background:var(--warm);-webkit-background-clip:text;background-clip:text;color:transparent;text-shadow:none}
.boot__bar{width:180px;height:1px;background:var(--line);overflow:hidden}
.boot__bar i{display:block;height:100%;width:100%;background:var(--warm);transform-origin:0 50%;transform:scaleX(0);transition:transform .4s var(--ease)}
.boot__note{color:var(--dim);font-size:13px}
html.is-ready .boot{opacity:0;visibility:hidden}

/* ---------------------------------------------------------------- HUD + player */
.hud{position:fixed;left:0;right:0;top:0;z-index:10;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px var(--gut);pointer-events:none}
.hud>*{pointer-events:auto}
.hud__mark{font-size:22px;font-weight:700;font-stretch:75%;text-decoration:none;letter-spacing:-.005em}
.hud__chapter{color:var(--muted);flex:1;text-align:center;font-size:13px}
.hud__chapter b{font-weight:600;margin-right:.45em;font-variant-numeric:tabular-nums}
.hud__about{font-size:14px;text-decoration:none;padding:8px 14px;border:1px solid var(--line);border-radius:999px;background:rgb(3 5 10 / .7);transition:border-color .3s}
.hud__about:hover{border-color:rgb(238 243 248 / .4)}

/* ---------------------------------------------------------------- cues (the film's captions) */
.film{position:fixed;inset:0;z-index:3;pointer-events:none}
.cue{position:absolute;opacity:0;visibility:hidden;text-shadow:0 2px 24px rgb(3 5 10 / .75)}
.cue.is-on{visibility:visible}
.cue--left::before,.cue--right::before,.cue--top::before{content:"";position:absolute;z-index:-1;inset:-26% -30%;pointer-events:none;background:radial-gradient(closest-side,rgb(3 5 10 / .9),rgb(3 5 10 / .7) 50%,rgb(3 5 10 / 0))}
.cue__eyebrow{width:fit-content;margin-bottom:14px;font-size:14px;font-weight:600;letter-spacing:.01em}
.cue h2{font-weight:700;font-stretch:75%;font-size:clamp(2.1rem,1.1rem + 3vw,4.4rem);line-height:1;letter-spacing:-.01em;margin-bottom:18px;text-wrap:balance}
.cue p{font-size:clamp(16px,.9rem + .3vw,19px);color:var(--muted);max-width:34ch}
.cue--left{left:var(--gut);bottom:clamp(64px,12vh,150px);max-width:min(40rem,calc(100vw - 2 * var(--gut)))}
.cue--top{left:var(--gut);top:clamp(84px,13vh,140px);max-width:min(44rem,calc(100vw - 2 * var(--gut)))}
.cue--wide{max-width:min(46rem,calc(100vw - 2 * var(--gut)))}
.cue--right{right:var(--gut);bottom:clamp(64px,12vh,150px);max-width:min(36rem,calc(100vw - 2 * var(--gut)));text-align:right}
.cue--right p,.cue--right .cue__eyebrow{margin-left:auto}
.cue--title .cue__eyebrow,.cue--doors .cue__eyebrow,.lock .cue__eyebrow{margin-left:auto;margin-right:auto}
.cue p.cue__readout,.cue p.cue__clock{margin-top:22px;color:var(--yellow);font-size:13px}
.cue__clock span{font-size:28px;letter-spacing:.06em;margin-right:6px}

/* title: five stacked copies in real 3D, zoomed through */
.cue--title{inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:0 var(--gut);perspective:900px}
.cue--title .cue__eyebrow{margin-bottom:22px}
.cue--title .cue__lead{margin-top:clamp(20px,4vh,40px);max-width:38ch;text-align:center}
.title3d{position:relative;font-weight:800;font-stretch:68%;text-transform:uppercase;font-size:clamp(2.6rem,.5rem + 7.2vw,8.6rem);line-height:.92;letter-spacing:-.005em;transform-style:preserve-3d;display:grid;margin:0}
.title3d__layer{grid-area:1 / 1;display:block;color:transparent;-webkit-text-stroke:1px rgb(255 168 40 / .6)}
.title3d__layer:nth-child(1){transform:translateZ(-160px);opacity:.18}
.title3d__layer:nth-child(2){transform:translateZ(-120px);opacity:.28}
.title3d__layer:nth-child(3){transform:translateZ(-80px);opacity:.42}
.title3d__layer:nth-child(4){transform:translateZ(-40px);opacity:.62}
.title3d__layer--front{color:var(--text);-webkit-text-stroke:0;transform:translateZ(0)}

/* backend log (JARVIS) */
.log{margin-top:26px;width:min(30rem,100%);padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:rgb(5 9 16 / .86);text-shadow:none}
.cue .log__head{font-size:12px;max-width:none;color:var(--dim);display:flex;align-items:center;gap:8px;margin-bottom:10px}
.log__head i{width:6px;height:6px;border-radius:50%;background:var(--orange);box-shadow:0 0 8px var(--orange);animation:blink 1.6s steps(2,start) infinite}
@keyframes blink{50%{opacity:.25}}
.log__lines{list-style:none;margin:0;padding:0;height:calc(7 * 1.9em);overflow:hidden;font-size:12px;letter-spacing:0;display:flex;flex-direction:column;justify-content:flex-end}
.log__lines li{display:flex;gap:12px;line-height:1.9em;color:var(--muted);animation:logIn .5s var(--ease)}
.log__lines li b{font-weight:400;color:var(--dim);flex:none}
.log__lines li u{text-decoration:none;color:var(--yellow)}
.log__lines li u.amb{color:var(--amber)}
@keyframes logIn{from{opacity:0;transform:translateY(8px)}}

/* doors: buttons pinned over the 3D portals by JS */
.cue--doors{left:var(--gut);right:var(--gut);top:clamp(84px,13vh,140px);text-align:center}
.cue--doors p{margin:0 auto;max-width:none}
.doors{position:fixed;inset:0;z-index:9;pointer-events:none;opacity:0;visibility:hidden;transition:opacity .6s,visibility .6s}
.doors.is-on{opacity:1;visibility:visible}
.doors.is-on .door{pointer-events:auto}
.door{all:unset;box-sizing:border-box;cursor:pointer;position:absolute;left:0;top:0;width:12rem;height:16rem;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding-bottom:6px;border-radius:12px;text-decoration:none}
.door:focus-visible{outline:2px solid var(--orange);outline-offset:2px}
.door__n,.door strong{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.door small{display:inline-flex;align-items:center;gap:6px;transform:translateY(130%);padding:6px 12px;border-radius:999px;border:1px solid var(--line);background:rgb(3 5 10 / .78);color:var(--text);font-size:13px;font-weight:500;transition:border-color .3s,color .3s}
.door small svg{width:14px;height:14px}
@media (max-width:760px){.door small{white-space:nowrap;font-size:11px;padding:4px 8px}.door:not(.door--open) small{font-size:0;gap:0;padding:6px}}
.door--open small{color:var(--amber);border-color:rgb(255 181 71 / .45)}
.door:hover small,.door:focus-visible small{border-color:var(--orange)}
.door--open:hover small{border-color:var(--amber)}

html.door-focus .cue--doors,html.door-focus .doors{visibility:hidden!important;opacity:0!important}
/* sign-in sheet: sits low so the door it opens stays in view */
.lock{position:fixed;inset:auto 0 max(18px,env(safe-area-inset-bottom)) 0;margin:0 auto;border:1px solid var(--line);border-radius:20px;padding:30px 28px 26px;max-width:min(calc(100vw - 32px),25rem);width:100%;color:var(--text);text-align:center;
  background:rgb(7 11 20 / .9);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.lock::backdrop{background:rgb(0 0 0 / .2)}
.lock[open]{display:flex;flex-direction:column;align-items:center;animation:lockIn .5s var(--ease)}
@keyframes lockIn{from{opacity:0;transform:translateY(24px)}}
.lock__glyph{width:72px;height:72px;margin-bottom:16px;color:var(--muted);position:relative;transition:color .4s}
.lock__glyph svg{position:absolute;inset:0;width:100%;height:100%}
.lock__face{display:none}
.lock.is-face .lock__face{display:block}
.lock.is-face .lock__print{display:none}
.lock__print path{stroke-dasharray:40;stroke-dashoffset:0}
.lock[data-state=scan] .lock__glyph{color:var(--yellow)}
.lock[data-state=open] .lock__glyph{color:var(--orange)}
.lock[data-state=denied] .lock__glyph{color:#ff7a3d;animation:shake .4s}
@keyframes shake{20%,60%{transform:translateX(-6px)}40%,80%{transform:translateX(6px)}}
.lock h2{font-weight:700;font-stretch:75%;font-size:1.9rem;line-height:1.05;margin:2px 0 10px}
.lock__body{color:var(--muted);max-width:32ch;min-height:1.5em}
.lock__actions{display:flex;gap:10px;margin-top:22px;flex-wrap:wrap;justify-content:center}
.lock [hidden]{display:none}
.btn{all:unset;cursor:pointer;padding:11px 20px;border-radius:999px;border:1px solid var(--line);font-size:14px;transition:border-color .3s,background .3s}
.btn:hover{border-color:rgb(238 243 248 / .45)}
.btn:focus-visible{outline:2px solid var(--orange);outline-offset:3px}
.btn--solid{background:var(--text);color:var(--ink);border-color:var(--text);font-weight:600}
@media (prefers-reduced-motion:no-preference){
  .lock[data-state=scan] .lock__print path{animation:scan 1.3s cubic-bezier(.65,0,.35,1) infinite}
  .lock[data-state=scan] .lock__face{animation:breathe 1.1s ease-in-out infinite}
  .lock[data-state=scan] .lock__face .eye{animation:blinkEye 2.2s steps(1) infinite}
  @keyframes scan{0%{stroke-dashoffset:40}65%,100%{stroke-dashoffset:0}}
  @keyframes breathe{50%{transform:scale(.9)}}
  @keyframes blinkEye{0%,92%{opacity:1}93%,100%{opacity:0}}
}

/* ---------------------------------------------------------------- static version */
.static-page{display:none}
html.static #gl,html.static .flash,html.static .vignette,html.static .boot,html.static .hud__chapter,html.static .film,html.static .doors,html.static .runway,html.static .skip,
html:not(.js) #gl,html:not(.js) .flash,html:not(.js) .boot,html:not(.js) .film,html:not(.js) .doors,html:not(.js) .runway{display:none}
html.static .static-page,html:not(.js) .static-page{display:block;padding:120px var(--gut) 80px;max-width:52rem;margin:0 auto}
html.static .hud{position:absolute;background:transparent}
.static-page section{padding:56px 0;border-top:1px solid var(--line)}
.static-page section:first-child{border-top:0}
.static-page h1,.static-page h2{font-weight:700;font-stretch:75%;font-size:clamp(2.2rem,1rem + 3.4vw,4rem);line-height:1;margin-bottom:18px}
.static-page p{color:var(--muted);max-width:56ch;margin-bottom:12px}
.static-list{color:var(--text);padding-left:1.2em}

/* ---------------------------------------------------------------- small screens */
@media (max-width:760px){
  .hud{padding:14px var(--gut)}
  .hud__chapter{display:none}
  .cue--left,.cue--right{left:var(--gut);right:var(--gut);bottom:clamp(96px,14vh,140px);text-align:left}
  .cue--right .cue__eyebrow{justify-content:flex-start}
  .cue--right p{margin-left:0}
  .log{display:none}

}
