/* The home page: four full-screen chapters drawn in three.js, then the cork plate and the end. */
html { background: #04050b; }
/* The top bar overlays chapter 1 so it fills the first screen (the bar is 60px plus its 1px border), and keeps Story on phones. */
body.home .top { margin-bottom: -61px; background: transparent; border-bottom-color: transparent; }
body.home .top nav a { display: inline; }
.chapter { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: #04050b; color: #f3efe7; }
.chapter .art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.chapter .still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.chapter.no-art .still { display: block; }
.chapter.no-art .art, .chapter.no-art :is(.first-labels, .ask-q, .first-spec, .ws-pick, .cap-lens, .cap-status, .lens-ring) { display: none !important; }
.chapter::before, .chapter::after { content: ""; position: absolute; left: 0; right: 0; height: 14vh; z-index: 1; pointer-events: none; }
.chapter::before { top: 0; background: linear-gradient(180deg, #04050b, rgba(4, 5, 11, 0)); }
.chapter::after { bottom: 0; background: linear-gradient(0deg, #04050b, rgba(4, 5, 11, 0)); }
#ask::before { display: none; }
.chapter > :is(.first-labels, .ask-q, .first-spec, .ws-pick, .cap-lens, .cap-status, .lens-ring) { position: absolute; z-index: 2; }
.chapter .grain { position: absolute; inset: -50%; z-index: 1; pointer-events: none; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0% { transform: translate(0, 0) } 33% { transform: translate(-3%, 2%) } 66% { transform: translate(2%, -3%) } 100% { transform: translate(0, 0) } }
.chapter .art + * ~ .words, .chapter .words { text-shadow: 0 2px 30px rgba(4, 5, 11, .8); }

/* Words: a large, quiet headline and one sentence, revealed as the chapter arrives. */
.words { position: absolute; z-index: 3; left: 6vw; top: 50%; transform: translateY(-50%); max-width: 40vw; }
#researchers .words { top: auto; bottom: 12vh; transform: none; }
.words h1, .words h2 { font-size: clamp(30px, 4.4vw, 76px); line-height: 1.02; font-weight: 600; letter-spacing: -0.035em; margin: 0;
  background: linear-gradient(180deg, #fffaf0 0%, #e9e4da 70%, #cfc9bd 100%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.words h2 { font-size: clamp(28px, 3.6vw, 60px); }
.words p { color: #b9bccb; margin: 2vh 0 0; font-size: clamp(15px, 1.15vw, 18px); line-height: 1.5; max-width: 34em; }
.words p em { font-style: normal; color: #f3f1ec; }
.words .eyebrow { color: #727894; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; margin: 0 0 2vh; }
.words .note { color: #727894; font-size: 13px; }
.words .actions { margin-top: 3vh; display: flex; gap: 10px; flex-wrap: wrap; }
.words .button, .finale .button { font-weight: 600; border-radius: 999px; padding: 13px 20px; color: #f3f1ec; background: rgba(255, 255, 255, .04); border: 0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.words .button.primary, .finale .button.primary { color: #04050b; background: #f3f1ec; box-shadow: 0 8px 30px rgba(243, 241, 236, .12); }
.words .button:hover, .finale .button:hover { background: rgba(255, 255, 255, .1); }
.words .button.primary:hover, .finale .button.primary:hover { background: #fff; }
.words a:focus-visible { outline-color: rgba(243, 239, 231, 0.7); }
/* The first screen's words rise in by CSS alone, so they show even if a script never runs; later chapters' words are
   hidden only once the script has seen they are still below the screen, and rise in when they arrive. */
#ask .words > * { animation: rise 1s cubic-bezier(.2, .7, .1, 1) both; }
#ask .words > :nth-child(2) { animation-delay: .12s; } #ask .words > :nth-child(3) { animation-delay: .24s; } #ask .words > :nth-child(4) { animation-delay: .36s; } #ask .words > :nth-child(5) { animation-delay: .48s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.reveal > * { opacity: 0; transform: translateY(16px); transition: opacity 1s cubic-bezier(.2, .7, .1, 1), transform 1s cubic-bezier(.2, .7, .1, 1); }
.reveal.in > * { opacity: 1; transform: none; }
.words .short { display: none; }
.words .note.send { display: block; }
.reveal.in > :nth-child(2) { transition-delay: .12s; } .reveal.in > :nth-child(3) { transition-delay: .24s; } .reveal.in > :nth-child(4) { transition-delay: .36s; } .reveal.in > :nth-child(5) { transition-delay: .48s; }
@media (prefers-reduced-motion: reduce) { .reveal > *, #ask .words > * { opacity: 1; transform: none; transition: none; animation: none; } .chapter .grain, .ask-q .t::after, .first-spec i { animation: none; } .ask-q.sent { opacity: 1; scale: 1; translate: none; } }

/* Chapter 1: the question on the specimen, the models' names, the specimen's tag. */
.first-labels { inset: 0; pointer-events: none; }
.lbl { position: absolute; left: 0; top: 0; white-space: nowrap; font-size: 11.5px; font-weight: 500; letter-spacing: .01em; color: rgba(185, 188, 203, .4); transition: color .6s, opacity .6s; text-align: center; will-change: transform; }
.lbl small { display: block; font-size: 8px; letter-spacing: .16em; text-transform: uppercase; opacity: .65; margin-top: 2px; }
/* A label's size changes at once when it lights (so placement can measure it); only its colour fades. */
.lbl em { display: none; font-style: normal; font-size: 10px; letter-spacing: 0; color: rgba(214, 216, 226, .72); margin-top: 3px; }
.lbl.on em { display: block; }
.lbl.on.mac { color: #f2c46d; } .lbl.on.cloud { color: #8cc2ff; }
.lbl:not(.on) { font-size: 9.5px; } .lbl:not(.on) small { display: none; }
.ask-q { left: 0; top: 0; pointer-events: auto; cursor: pointer; min-width: 0; max-width: min(360px, 80vw); padding: 8px 13px 9px; border-radius: 13px;
  background: rgba(12, 14, 26, .62); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 20px 60px rgba(0, 0, 0, .5); opacity: 0; transition: opacity .5s, scale .5s, translate .5s; }
.ask-q.on { opacity: 1; }
/* Sent: the question lifts toward the models and fades, then comes back once the plan has formed. */
.ask-q.sent { opacity: 0; scale: .9; translate: 0 -18px; transition: opacity .35s ease-in, scale .35s ease-in, translate .35s ease-in; }
.ask-q .k { display: block; font-size: 8.5px; letter-spacing: .2em; text-transform: uppercase; color: #727894; }
.ask-q .t { display: block; margin-top: 3px; font-size: 13.5px; line-height: 1.35; color: #f3f1ec; min-height: 1.35em; }
.ask-q .t::after { content: ""; display: inline-block; width: 1px; height: 1em; margin-left: 2px; vertical-align: -2px; background: #f2c46d; animation: blink 1s steps(2) infinite; }
.ask-q .s { display: block; margin-top: 4px; font-size: 10px; color: #b9bccb; opacity: 0; transition: opacity .6s; }
.ask-q .s.on { opacity: 1; }
.ask-q .s b { font-weight: 600; color: #f2c46d; } .ask-q .s b.c { color: #8cc2ff; }
@keyframes blink { 50% { opacity: 0; } }
.first-spec { left: 0; top: 0; pointer-events: none; font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: #727894; white-space: nowrap; opacity: 0; transition: opacity 1.2s 1.6s; }
.first-spec.on { opacity: 1; }
.first-spec i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #ff6b6b; box-shadow: 0 0 10px #ff6b6b; margin-right: 8px; vertical-align: 1px; animation: live 1.6s ease-in-out infinite; }
@keyframes live { 50% { opacity: .35; } }

/* Chapter 3: the layers a pointed cell lights through. */
.ws-pick { display: none; max-width: min(280px, calc(100% - 16px)); font-size: 11.5px; line-height: 1.6; color: #b9bccb; background: rgba(10, 12, 22, .62); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); padding: 9px 13px; pointer-events: none; }
.ws-pick b { font-weight: 600; color: #f3f1ec; display: block; margin-bottom: 2px; }

/* Chapter 4: the lens's list of models and the count of models on. */
.cap-lens { pointer-events: none; font-size: 11.5px; line-height: 1.6; font-weight: 500; background: rgba(10, 12, 22, .62); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); padding: 8px 12px; display: none; }
.lens-ring { pointer-events: none; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(243, 241, 236, .5), 0 0 30px rgba(243, 241, 236, .08); display: none; }
.cap-status { right: 4vw; bottom: 5vh; font-size: 12px; color: #b9bccb; text-align: right; pointer-events: none; }
.cap-status small { display: block; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #727894; margin-top: 4px; }
.cap-lbl { pointer-events: auto; cursor: pointer; }
.cap-lbl.off { color: rgba(140, 146, 170, .4) !important; text-decoration: line-through; text-decoration-color: rgba(140, 146, 170, .4); }

.end { background: #04050b; }

@media (max-width: 760px) and (orientation: portrait), (max-width: 520px) {
  /* Phones: the art fills the chapter and the words sit over its top on a ground that fades into it, so the glow runs
     up under them instead of stopping at an edge. */
  .chapter { display: block; }
  .words, #researchers .words { position: absolute; top: 0; left: 0; right: 0; bottom: auto; transform: none; max-width: none; padding: 78px 20px 26px;
    background: linear-gradient(180deg, #04050b 0%, rgba(4, 5, 11, .94) 62%, rgba(4, 5, 11, .6) 84%, rgba(4, 5, 11, 0) 100%); }
  .words h1 { font-size: 31px; } .words h2 { font-size: 27px; }
  .words p { font-size: 14px; margin-top: 10px; }
  .words .eyebrow { margin-bottom: 10px; }
  .words .actions { margin-top: 14px; } .words .button, .finale .button { padding: 11px 16px; font-size: 14px; }
  .words .note:not(.send) { display: none; }
  .words .long { display: none; } .words .short { display: inline; }
  .words .note.send { margin-top: 8px; font-size: 12px; }
  #ask::before { display: none; }
  .ask-q { min-width: 0; max-width: 70vw; padding: 6px 10px 7px; border-radius: 11px; }
  .ask-q .k { font-size: 7.5px; } .ask-q .t { font-size: 11.5px; margin-top: 2px; } .ask-q .s { font-size: 9px; margin-top: 3px; }
  .lbl { font-size: 11px; } .lbl small, .lbl em { display: none !important; }
  .cap-status { right: 16px; bottom: 16px; }
}

/* Chapter 2: where the two swarms come from. */
.res-tag { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; font-size: 10px; font-weight: 600; letter-spacing: .2em; }
.res-tag.mac { color: rgba(242, 196, 109, .85); } .res-tag.cloud { color: rgba(140, 194, 255, .85); }
.chapter.no-art .res-tag { display: none; }
#researchers .words::before { content: ""; position: absolute; inset: -30% -25% -30% -40%; z-index: -1; background: radial-gradient(closest-side, rgba(4, 5, 11, .82), rgba(4, 5, 11, 0)); pointer-events: none; }
@media (max-width: 760px) and (orientation: portrait), (max-width: 520px) { #researchers .words::before { display: none; } }
.ws-lbl, .cap-lbl { z-index: 3; }
#researchers::after { height: 46vh; background: linear-gradient(0deg, #04050b 10%, rgba(4, 5, 11, .7) 45%, rgba(4, 5, 11, 0)); }
.cap-lens, .ws-pick { z-index: 5 !important; background: rgba(10, 12, 22, .88); }

/* Night into the cork section's morning: a long, soft dawn instead of an edge. */
#open { position: relative; padding-top: 22vh; background: linear-gradient(180deg, #04050b 0%, #0b1230 6%, #2b2f63 11%, #7d6f9e 16%, #d7bfc8 21%, #f1e6e2 25%, var(--day) 29%, #fbf9f8 45%, #ffffff 75%); }
/* Clear over the first screen; once the page moves, the bar gets a frosted dark ground so words never run under it. */
body.home .top { transition: background-color .4s, backdrop-filter .4s; }
body.home .top.scrolled { background: rgba(4, 5, 11, .72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom-color: rgba(243, 239, 231, .07); }

/* Chapter 4: who made each model, shown when you point at it; the staff paragraph under the claim. */
.cap-lbl small { display: none; margin-top: 3px; font-size: 9.5px; letter-spacing: .02em; text-transform: none; color: rgba(214, 216, 226, .78); font-weight: 400; }
.cap-lbl.hot small { display: block; }
.words p.staff { font-size: clamp(13px, .95vw, 15px); color: #8f94a8; margin-top: 2vh; }
@media (max-width: 760px) and (orientation: portrait), (max-width: 520px) { .words p.staff { font-size: 12.5px; margin-top: 8px; line-height: 1.45; } .cap-lbl.hot small { display: none; } }

/* A phone on its side: words beside the art, smaller, as on a laptop. */
@media (max-height: 520px) and (orientation: landscape) {
  .words { max-width: 42vw; left: 5vw; }
  .words h1 { font-size: 26px; } .words h2 { font-size: 22px; }
  .words p { font-size: 13px; margin-top: 8px; } .words p.staff, .words .note { display: none; }
  .words .eyebrow { margin-bottom: 8px; } .words .actions { margin-top: 12px; } .words .button, .finale .button { padding: 9px 14px; font-size: 13px; }
  #researchers .words { bottom: 8vh; }
  .ask-q { min-width: 0; max-width: 48vw; padding: 7px 11px 8px; } .ask-q .t { font-size: 12.5px; } .ask-q .s { display: none; }
  .lbl small, .lbl em { display: none !important; }
}

/* The finale: morning back into night, an eyepiece of light behind one large line, the steps as four quiet cards. */
.finale { position: relative; overflow: hidden; text-align: center; color: #f3f1ec; padding: 38vh 6vw 16vh;
  background: linear-gradient(180deg, #ffffff 0%, #f1e6e2 6%, #d7bfc8 10%, #7d6f9e 15%, #2b2f63 20%, #0b1230 25%, #04050b 31%); }
.finale-glow { position: absolute; left: 50%; top: 58%; width: min(980px, 150vw); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(242, 196, 109, .13), rgba(140, 194, 255, .06) 48%, rgba(4, 5, 11, 0) 72%); }
.finale-glow::after { content: ""; position: absolute; inset: 21%; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(243, 241, 236, .07), 0 0 120px rgba(242, 196, 109, .05); }
.finale-inner { position: relative; max-width: 1120px; margin: 0 auto; }
.finale .eyebrow { color: #727894; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; margin: 0 0 2.4vh; }
.finale h2 { margin: 0; font-size: clamp(48px, 8vw, 132px); line-height: .98; font-weight: 600; letter-spacing: -0.045em;
  background: linear-gradient(180deg, #fffaf0 0%, #e9e4da 70%, #cfc9bd 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.finale .say { max-width: 32em; margin: 2.6vh auto 0; color: #b9bccb; font-size: clamp(15px, 1.25vw, 19px); line-height: 1.5; }
.finale .actions { margin-top: 4.4vh; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.finale .note.send { margin-top: 10px; color: #727894; font-size: 12px; }
.finale-steps { list-style: none; padding: 0; margin: 10vh 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; text-align: left; }
.finale-steps li { padding: 22px 20px 24px; border-radius: 18px; background: rgba(255, 255, 255, .025); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.finale-steps b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 12px; font-weight: 700; color: #04050b; background: #f2c46d; box-shadow: 0 0 18px rgba(242, 196, 109, .35); }
.finale-steps li:nth-child(4) b { background: #8cc2ff; box-shadow: 0 0 18px rgba(140, 194, 255, .35); }
.finale-steps h3 { margin: 16px 0 6px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: #f3f1ec; }
.finale-steps p { margin: 0; font-size: 13.5px; line-height: 1.5; color: #9a9fb3; }
.finale .fine { margin: 6vh auto 0; max-width: 48em; font-size: 12.5px; line-height: 1.6; color: #727894; }
.finale .fine a { color: #b9bccb; }
@media (max-width: 860px) { .finale-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .finale { padding: 30vh 20px 12vh; } .finale-steps { grid-template-columns: 1fr; margin-top: 7vh; } .finale-steps li { display: grid; grid-template-columns: 26px 1fr; column-gap: 14px; padding: 18px; } .finale-steps h3 { margin: 2px 0 4px; } .finale-steps p { grid-column: 2; } }
/* The footer, in the finale's night. */
body.home .foot { background: #04050b; border-top: 1px solid rgba(243, 241, 236, .06); color: #727894; }
body.home .foot a { color: #b9bccb; }
.finale .eyebrow { display: block; text-align: center; }

/* Open by design: your harness runs Hooke, Hooke runs the community's open-source models. */
.open-sec { position: relative; background: #04050b; color: #f3f1ec; padding: 16vh 6vw 18vh; overflow: hidden; }
.open-sec::before { content: ""; position: absolute; left: 50%; top: 50%; width: 90vw; height: 70vh; transform: translate(-30%, -50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(242, 196, 109, .07), rgba(140, 194, 255, .04) 55%, rgba(4, 5, 11, 0)); }
.open-inner { position: relative; max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.open-copy .eyebrow { color: #727894; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; margin: 0 0 2vh; }
.open-copy h2 { margin: 0; font-size: clamp(30px, 3.4vw, 56px); line-height: 1.04; font-weight: 600; letter-spacing: -0.035em;
  background: linear-gradient(180deg, #fffaf0 0%, #e9e4da 70%, #cfc9bd 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.open-copy h3 { margin: 5vh 0 0; font-size: clamp(18px, 1.6vw, 24px); font-weight: 600; letter-spacing: -0.02em; color: #f3f1ec; }
.open-copy p { color: #b9bccb; font-size: clamp(14px, 1.1vw, 17px); line-height: 1.55; margin: 1.6vh 0 0; max-width: 34em; }
.open-map { position: relative; margin: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(40px, 6vw, 110px); min-height: 360px; }
.open-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.open-line { fill: none; stroke-width: 1; }
.open-line.h { stroke: rgba(242, 196, 109, .28); } .open-line.c { stroke: rgba(140, 194, 255, .28); }
.open-dot { filter: drop-shadow(0 0 6px currentColor); }
.open-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; position: relative; z-index: 1; }
.open-list.harness { justify-items: end; } .open-list.catalog { justify-items: start; }
.open-list li { font-size: 13.5px; font-weight: 500; padding: 9px 14px; border-radius: 999px; white-space: nowrap; background: rgba(12, 14, 26, .75); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.open-list.harness li { color: #f2c46d; } .open-list.catalog li { color: #8cc2ff; }
.open-list li.yours { color: #f3f1ec; box-shadow: inset 0 0 0 1px rgba(243, 241, 236, .45); background: rgba(243, 241, 236, .06); }
.open-core { position: relative; z-index: 1; display: grid; justify-items: center; gap: 6px; width: 150px; height: 150px; place-content: center; text-align: center; border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 196, 109, .16), rgba(12, 14, 26, .9) 65%); box-shadow: inset 0 0 0 1px rgba(243, 241, 236, .14), 0 0 80px rgba(242, 196, 109, .12); }
.open-core span { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.open-core small { font-size: 10px; line-height: 1.3; color: #9a9fb3; max-width: 11em; }
@media (max-width: 980px) {
  .open-inner { grid-template-columns: 1fr; }
  .open-map { grid-template-columns: 1fr; justify-items: center; gap: 46px; min-height: 0; padding: 10px 0; }
  .open-list { grid-auto-flow: row; grid-template-columns: repeat(2, auto); justify-content: center; justify-items: center !important; gap: 10px; }
  .open-list li { font-size: 12.5px; padding: 8px 12px; }
  .open-core { width: 124px; height: 124px; }
}
@media (max-width: 520px) { .open-sec { padding: 12vh 20px 14vh; } }
