/* How agents built Sogni World.
   Palette is lifted from Simon's reference photo (studio blue, fur pink, horn cream);
   the .ward section cuts hard to the hospital's tile green, because the scare spec bans dissolves. */
*{box-sizing:border-box}
:root{
  --page:#11264a;--panel:#1a3a6c;--rule:#2d5190;--ink:#fbf1dc;--soft:#c3cfe3;--muted:#93a6c6;
  --pink:#ff5aa5;--pink-deep:#e0197a;--claw:#eddcab;--code:#0b1a35;
  --display:"Fraunces",Georgia,serif;--body:"Instrument Sans",system-ui,-apple-system,sans-serif;--mono:"JetBrains Mono",ui-monospace,Menlo,monospace;
  --col:672px;--wide:1080px;
}
html{scroll-behavior:smooth;scroll-padding-top:96px}
body{margin:0;background:var(--page);color:var(--ink);font:17.5px/1.72 var(--body);-webkit-font-smoothing:antialiased}
img,video{display:block;max-width:100%;height:auto}
a{color:var(--pink);text-decoration-thickness:1px;text-underline-offset:4px}
a:hover{text-decoration-thickness:2px}
a:focus-visible,button:focus-visible,.spot:focus-visible{outline:3px solid var(--claw);outline-offset:4px}
main{overflow-x:clip;padding-bottom:0}

/* Hero */
.hero{max-width:var(--wide);margin:0 auto;padding:72px 28px 36px}
.kicker{margin:0 0 22px;font-size:15px;color:var(--soft)}
.kicker b{color:var(--claw);font-weight:600}
.hero h1{margin:0;max-width:16ch;font-family:var(--display);font-weight:560;font-size:clamp(42px,7.4vw,92px);line-height:1.02;letter-spacing:-.025em;font-variation-settings:"SOFT" 100,"WONK" 1;text-wrap:balance}
.hero h1 span{display:block;color:var(--pink);font-style:italic;font-weight:420}
.standfirst{max-width:60ch;margin:30px 0 0;font-size:clamp(19px,2.1vw,23px);line-height:1.55;color:var(--soft)}
.byline{display:flex;flex-wrap:wrap;gap:6px 22px;margin:28px 0 0;padding:0;list-style:none;font-size:14.5px;color:var(--muted)}
.byline strong{color:var(--ink);font-weight:600}

/* Playable junction */
.play{max-width:var(--wide);margin:0 auto 20px;padding:0 28px}
.stage{position:relative;border-radius:14px;overflow:hidden;background:#0a1630;box-shadow:0 30px 80px -30px rgba(3,10,28,.9)}
.frame{position:relative;aspect-ratio:1344/768;background:#05070c}
.frame img,.frame video,.frame svg{position:absolute;inset:0;width:100%;height:100%}
.frame img,.frame video{object-fit:cover}
.frame video{opacity:0;pointer-events:none}
.stage.is-crossing .frame video{opacity:1}
.stage.is-crossing svg,.stage.has-arrived svg{display:none}
.spot{fill:rgba(255,90,165,.16);stroke:var(--pink);stroke-width:3;stroke-linejoin:round;vector-effect:non-scaling-stroke;cursor:pointer;outline:none;animation:breathe 3.2s ease-in-out infinite}
.spot:nth-of-type(2){animation-delay:.5s}.spot:nth-of-type(3){animation-delay:1s}
.spot:hover,.spot:focus-visible{fill:rgba(255,90,165,.4);stroke:#fff;animation:none}
@keyframes breathe{50%{fill:rgba(255,90,165,.3)}}
.stage-note{position:absolute;left:16px;bottom:16px;max-width:min(430px,calc(100% - 32px));margin:0;padding:12px 16px;border-radius:10px;background:rgba(8,16,34,.86);backdrop-filter:blur(6px);font-size:14.5px;line-height:1.45;color:var(--ink)}
.stage-note b{display:block;font-family:var(--display);font-size:19px;font-weight:560;font-variation-settings:"SOFT" 100,"WONK" 1}
.stage.is-crossing .stage-note{display:none}
.stage-back{position:absolute;right:16px;bottom:16px;display:none;min-height:44px;padding:10px 18px;border:0;border-radius:24px;background:var(--pink);color:#25061a;font:600 14.5px var(--body);cursor:pointer}
.stage-back:hover{background:#ff86bd}
.stage.has-arrived .stage-back{display:block}
.play figcaption,.figure figcaption{margin-top:12px;font-size:14px;line-height:1.5;color:var(--muted);max-width:78ch}

/* Reading column with a right-hand gutter for exhibits */
.prose{max-width:var(--col);margin:0 auto;padding:36px 28px 0}
.prose p{margin:0 0 1.15em;color:var(--soft)}
.prose p strong,.prose li strong{color:var(--ink);font-weight:600}
.prose h2{margin:2.4em 0 .7em;font-family:var(--display);font-weight:540;font-size:clamp(30px,4vw,44px);line-height:1.1;letter-spacing:-.02em;color:var(--ink);font-variation-settings:"SOFT" 100,"WONK" 1;text-wrap:balance}
.prose h3{margin:2em 0 .5em;font-family:var(--display);font-weight:560;font-size:24px;line-height:1.2;color:var(--ink);font-variation-settings:"SOFT" 100,"WONK" 1}
.prose ul,.prose ol{margin:0 0 1.3em;padding-left:1.25em;color:var(--soft)}
.prose li{margin:.45em 0;padding-left:.2em}
.prose li::marker{color:var(--pink)}
.lede::first-letter{float:left;margin:.06em .1em 0 0;font:560 4.1em/.8 var(--display);color:var(--pink);font-variation-settings:"SOFT" 100,"WONK" 1}
code{font:0.86em var(--mono);padding:.12em .4em;border-radius:5px;background:var(--code);color:var(--claw);overflow-wrap:anywhere}
pre{margin:0 0 1.4em;padding:18px 20px;border-radius:12px;background:var(--code);overflow-x:auto;font:14px/1.6 var(--mono);color:#d9e4f7}
pre code{padding:0;background:none;color:inherit;font-size:inherit;overflow-wrap:normal}
pre .c{color:#7f95ba}pre .k{color:var(--pink)}pre .s{color:var(--claw)}

/* Exhibits: real quotes from the repo, the journal and the human */
.exhibit{margin:1.8em 0;padding:4px 0 4px 18px;border-left:3px solid var(--pink);font-size:15.5px;line-height:1.55;color:var(--ink)}
.exhibit p{margin:0 0 .5em;color:inherit}
.exhibit cite{display:block;font-style:normal;font-size:13.5px;color:var(--muted)}
.exhibit.human{border-left-color:var(--claw)}
.exhibit.inline{font-size:17px;padding-left:22px}
@media(min-width:1240px){
  .prose{position:relative;left:-150px}
  .exhibit:not(.inline){float:right;clear:right;width:270px;margin:.3em -320px 1.2em 0}
}

/* Figures */
.figure{margin:2.2em 0}
.figure img,.figure video{width:100%;border-radius:12px;background:#05070c}
.figure.wide{width:min(1024px,100vw - 56px);margin-left:50%;transform:translateX(-50%)}
@media(min-width:1240px){.figure.wide{margin-left:calc(50% + 150px)}}
.pair{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.pair figure{margin:0}
.pair figcaption{grid-column:1/-1}
.simon{display:grid;grid-template-columns:minmax(0,210px) 1fr;gap:26px;align-items:center;margin:2em 0;padding:22px;border-radius:14px;background:var(--panel)}
.simon img{border-radius:10px}
.simon p{margin:0;font-size:15.5px;line-height:1.6;color:var(--ink)}
.simon p+p{margin-top:.8em;color:var(--soft);font-size:14px}

/* The eight models, which really are a sequence */
.prose .recipe{counter-reset:step;list-style:none;margin:1.6em 0 2em;padding:0;border-top:1px solid var(--rule)}
.prose .recipe li{counter-increment:step;display:grid;grid-template-columns:2.4em 1fr;gap:0 10px;margin:0;padding:16px 0;border-bottom:1px solid var(--rule)}
.recipe li::before{content:counter(step);grid-row:span 3;font:italic 420 30px/1 var(--display);color:var(--pink);font-variation-settings:"SOFT" 100,"WONK" 1}
.recipe b{color:var(--ink);font-weight:600}
.recipe code{justify-self:start;margin:4px 0}
.recipe span{grid-column:2;font-size:15.5px;line-height:1.55;color:var(--soft)}

.tally{margin:2em 0;border-top:1px solid var(--rule)}
.tally div{display:grid;grid-template-columns:6.2em 1fr;gap:0 18px;align-items:baseline;padding:13px 0;border-bottom:1px solid var(--rule)}
.tally dt{font:560 30px/1 var(--display);color:var(--ink);font-variation-settings:"SOFT" 100,"WONK" 1;white-space:nowrap}
.tally dd{margin:0;font-size:15.5px;line-height:1.5;color:var(--soft)}

/* The ward: a hard cut, no dissolve */
.ward{--page:#06100d;--panel:#0d1d18;--rule:#1d3a31;--ink:#dbe8df;--soft:#a9c0b4;--muted:#789587;--pink:#8fd6b8;--claw:#e8776e;--code:#030907;
  margin-top:88px;padding:1px 0 88px;background:var(--page);color:var(--ink);border-top:6px solid #8d1f1f}
.ward h2,.ward h3,.ward .tally dt{font-variation-settings:"SOFT" 0,"WONK" 0;font-weight:380;letter-spacing:-.01em}
.ward .exhibit cite{color:var(--muted)}
.ward-open{max-width:var(--wide);margin:0 auto;padding:72px 28px 0}
.ward-open p{margin:0 0 14px;font-size:15px;color:var(--muted)}
.ward-open h2{margin:0 0 34px;max-width:18ch;font-family:var(--display);font-weight:340;font-size:clamp(38px,6vw,76px);line-height:1.04;letter-spacing:-.02em;font-variation-settings:"SOFT" 0,"WONK" 0;color:var(--ink)}
.ward-open video{width:100%;border-radius:4px;background:#000}
.ward-open figcaption{margin-top:12px;font-size:14px;color:var(--muted)}
.ward .figure img,.ward .figure video{border-radius:4px}

/* Back outside */
.prose.outside{padding-top:72px;padding-bottom:80px}
.actions{display:flex;flex-wrap:wrap;align-items:center;gap:14px 26px;margin:1.8em 0}
.button{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:12px 24px;border-radius:28px;background:var(--pink);color:#25061a;font-weight:600;font-size:15.5px;text-decoration:none}
.button:hover{background:#ff86bd}
.start{margin:2em 0;padding:26px;border-radius:14px;background:var(--panel)}
.start h3{margin-top:0}
.start pre{margin-bottom:1em}
.start p:last-child{margin-bottom:0}
.smallprint{font-size:14px;color:var(--muted)}
.related{margin-top:64px;border-top:1px solid var(--rule);padding-top:8px}
.related h2{font-size:28px;margin:1.2em 0 .4em}
.related a{display:block;padding:16px 0;border-bottom:1px solid var(--rule);text-decoration:none}
.related small{display:block;font-size:13px;color:var(--muted)}
.related strong{display:block;font-weight:500;color:var(--ink)}
.related a:hover strong{color:var(--pink)}

@media(max-width:720px){
  body{font-size:16.5px}
  .hero{padding:44px 20px 28px}
  .play,.ward-open{padding-left:16px;padding-right:16px}
  .prose{padding-left:20px;padding-right:20px}
  .figure.wide{width:calc(100vw - 32px)}
  .stage{border-radius:10px}
  .stage-note{position:static;max-width:none;border-radius:0;background:#0a1630;backdrop-filter:none}
  .stage{display:flex;flex-direction:column}
  .stage-back{position:static;margin:0 16px 14px;align-self:flex-start}
  .pair{grid-template-columns:1fr}
  .simon{grid-template-columns:1fr}
  .simon img{max-width:190px}
  .ward{margin-top:64px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.spot{animation:none}}

.autoloop{cursor:pointer}

/* Jump list: plain links, no chrome */
.jump{margin:2.4em 0 0;padding:18px 0 4px;border-top:1px solid var(--rule);border-bottom:1px solid var(--rule)}
.jump p{margin:0 0 .3em;font-size:14px;color:var(--muted)}
.prose .jump ul{list-style:none;margin:0 0 1em;padding:0;columns:2;column-gap:28px}
.prose .jump li{margin:0;padding:.28em 0;font-size:15.5px;break-inside:avoid}
.start h4{margin:0 0 .6em;font:560 21px/1.2 var(--display);color:var(--ink);font-variation-settings:"SOFT" 100,"WONK" 1}
@media(max-width:720px){.prose .jump ul{columns:1}}
