/* ThoughtLeap robot atelier, candidate of 2026-11-17. One stylesheet, no build step.
   The grammar is the ThoughtLeap.ai page's (ledger LOOK, 2026-10-20): one ink world, bone and platinum type,
   Archivo for form, IBM Plex Mono for labels and figures, hairlines, 3 px corners, light as the material.
   The page itself carries no vermilion: the orange dot printed on the robot's chest is the one accent in view. */

@font-face { font-family: "Archivo"; src: url("../fonts/Archivo-VF.ttf") format("truetype"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/IBMPlexMono-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }

:root {
  --ink: #0B0D10;
  --graphite: #171B20;
  --steel: #2A3036;
  --platinum: #D8DBDE;
  --bone: #F3F0EA;
  --mute: #9AA1A8;
  --hair: rgba(216, 219, 222, 0.16);
  --hair-strong: rgba(216, 219, 222, 0.34);
  --chip: rgba(11, 13, 16, 0.62);
  --display: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gl: max(clamp(16px, 5vw, 72px), env(safe-area-inset-left, 0px));
  --gr: max(clamp(16px, 5vw, 72px), env(safe-area-inset-right, 0px));
  --left: clamp(380px, 36vw, 560px);
  --wide: 1240px;
  /* The stage's slots (where the robot and the photograph stand). The loading photograph uses the same box. */
  --slots-pad: 104px var(--gr) 72px var(--left);
  /* Colorway swatches. The page script replaces these with the values in assets/robot/robot.json. */
  --navy-armor: #1C3D79; --navy-frame: #EDF0F3;
  --white-armor: #EAEAEA; --white-frame: #162C71;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--ink); scrollbar-width: thin; scrollbar-color: var(--steel) transparent; }
body { margin: 0; background: var(--ink); color: var(--bone); font: 400 18px/1.55 var(--display); font-stretch: 100%; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, p, dl, dd, dt, figure, ul { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 1px solid var(--platinum); outline-offset: 3px; }
::selection { background: var(--platinum); color: var(--ink); }
.skip { position: fixed; top: 0; left: 16px; z-index: 100; background: var(--bone); color: var(--ink); padding: 12px 18px; transform: translateY(-130%); font-weight: 600; text-decoration: none; }
.skip:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Two voices: Archivo carries form, Plex Mono carries labels. */
.eyebrow, .label, .word, .hint, .stage-note, .slot-label, .sheet dt { font-family: var(--mono); letter-spacing: 0.16em; text-transform: uppercase; }
.eyebrow { font-size: 11px; color: var(--platinum); }
.label { font-size: 10.5px; color: var(--mute); }

/* Header: one quiet line. */
.bar { position: absolute; top: 0; left: 0; right: 0; z-index: 6; display: flex; align-items: center; padding: calc(18px + env(safe-area-inset-top, 0px)) var(--gr) 12px var(--gl); pointer-events: none; }
.word { font-size: 11px; color: var(--platinum); text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; min-height: 32px; pointer-events: auto; }
.word:hover { color: var(--bone); }

/* The first screen. Desktop: the robot stands right of the words, on a stage that fills the screen. */
.hero { position: relative; display: grid; grid-template-columns: var(--left) minmax(0, 1fr); grid-template-rows: minmax(88px, 1fr) auto auto minmax(56px, 1fr); min-height: max(100svh, 680px); }
.title { grid-column: 1; grid-row: 2; position: relative; z-index: 2; display: grid; gap: 16px; padding: 0 28px 0 var(--gl); }
.title h1 { font-weight: 820; font-stretch: 88%; font-size: clamp(44px, 4.9vw, 82px); line-height: 0.92; letter-spacing: -0.045em; color: var(--bone); text-wrap: balance; max-width: 8.6em; }
.lede { font-size: 18px; line-height: 1.5; color: var(--platinum); max-width: 26em; text-wrap: pretty; }
.panel { grid-column: 1; grid-row: 3; position: relative; z-index: 2; display: grid; gap: 18px; align-content: start; padding: 32px 28px 0 var(--gl); container-type: inline-size; }

.stage { position: absolute; inset: 0; z-index: 0; overflow: hidden; touch-action: pan-y; cursor: grab; outline: none; -webkit-tap-highlight-color: transparent; }
.stage.is-dragging { cursor: grabbing; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.stage::before { content: ""; position: absolute; z-index: 1; inset: 0 auto 0 0; width: calc(var(--left) + 96px); background: linear-gradient(90deg, rgba(11, 13, 16, 0.94) 0%, rgba(11, 13, 16, 0.88) 62%, rgba(11, 13, 16, 0) 100%); pointer-events: none; }
.is-ready .stage canvas { opacity: 1; }
/* A colorway change: the stage fades to ink, everything changes there at once, and it fades back. No glide through colors or poses. */
.is-ready .stage.is-switching canvas, .stage.is-switching .slot-photo .photo { opacity: 0; transition: opacity 0.25s cubic-bezier(0.4, 0, 1, 1); }
.stage.is-fading-in canvas, .stage.is-fading-in .slot-photo .photo { transition: opacity 0.35s cubic-bezier(0, 0, 0.2, 1); }
/* A close framing (the chest) can reach behind the words: a deeper veil fades in over the column. */
.stage::after { content: ""; position: absolute; z-index: 1; inset: 0 auto 0 0; width: calc(var(--left) + 96px); background: linear-gradient(90deg, rgba(11, 13, 16, 0.985) 0%, rgba(11, 13, 16, 0.975) 80%, rgba(11, 13, 16, 0) 100%); pointer-events: none; opacity: 0; transition: opacity 0.6s; }
.is-close .stage::after { opacity: 1; }
/* Keyboard focus on the stage: a hairline round the robot's slot (the stage's own outline would sit under the canvas). */
.stage:focus-visible .slot-figure { outline: 1px solid var(--platinum); outline-offset: 6px; border-radius: 3px; }

/* Slots: empty boxes the script reads to place the robot and the photograph. CSS owns the layout; the camera follows it. */
.slots { position: absolute; inset: 0; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding: var(--slots-pad); pointer-events: none; }
.slot { position: relative; min-width: 0; min-height: 0; }
.slot-photo { display: none; container-type: size; place-items: center; }
/* Labels: the render is always called a model, the photograph a photograph. Ink chips, so they read over anything. */
.slot-label { position: absolute; left: 50%; bottom: -46px; transform: translateX(-50%); font-size: 10px; line-height: 1; color: var(--platinum); white-space: nowrap; padding: 6px 8px 5px; background: var(--ink); border: 1px solid var(--hair); border-radius: 3px; }
.js:not(.is-ready) .slot-figure .slot-label { visibility: hidden; }
.is-compare .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.is-compare .slot-photo { display: grid; }
.photo { position: relative; display: grid; place-items: center; width: 100%; height: 100%; transition: opacity 0.35s; }

/* A photograph shown as it is: the box hides only fully transparent margin (checked: zero visible pixels hidden).
   Never wider than its native pixels. */
.photo-crop { position: relative; overflow: hidden; aspect-ratio: var(--w) / var(--h); width: min(100%, calc(var(--w) * 1px)); }
.photo-crop img { position: absolute; max-width: none; width: calc(var(--W) / var(--w) * 100%); height: auto; left: calc(var(--x) / var(--w) * -100%); top: calc(var(--y) / var(--h) * -100%); }
.slot-photo .photo-crop { width: min(100cqw, calc(var(--w) * 1px), calc(100cqh * var(--w) / var(--h))); }

.stage-note { position: absolute; z-index: 2; font-size: 10.5px; line-height: 1.4; color: var(--mute); pointer-events: none; }
#stage-loading { left: var(--left); bottom: 24px; transition: opacity 0.4s; }
#stage-loading .when-slow, .is-slow #stage-loading .when-loading { display: none; }
.is-slow #stage-loading .when-slow { display: inline; }
.is-ready #stage-loading, .nogl #stage-loading, .no-js #stage-loading { opacity: 0; }
.standin-note { top: 96px; right: var(--gr); max-width: 22em; text-align: right; color: var(--bone); padding: 8px 10px; border: 1px solid var(--hair-strong); border-radius: 3px; background: var(--chip); }

.hint { position: absolute; z-index: 2; left: var(--left); bottom: 24px; font-size: 10.5px; color: var(--mute); pointer-events: none; transition: opacity 0.6s; text-shadow: 0 0 6px var(--ink), 0 0 2px var(--ink); }
.js:not(.is-ready) .hint, .is-compare .hint { opacity: 0; }
.hint .touch { display: none; }
@media (hover: none) { .hint .mouse { display: none; } .hint .touch { display: inline; } }
.has-turned .hint { opacity: 0; }
/* In a close framing the robot fills the stage: the hint steps aside rather than sit on the armor. */
.is-close .hint { opacity: 0; }

/* The photograph of the real robot. While the model loads it stands in the robot's own box, labeled, and the model
   fades in over it in the same place. Without WebGL or scripts it stays, with a sentence saying why. */
.poster { display: none; }
.js:not(.nogl) .poster { display: block; position: absolute; z-index: 2; inset: 0; padding: var(--slots-pad); pointer-events: none; transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s linear 0.9s; }
.js:not(.nogl) .poster .poster-box { position: relative; width: 100%; height: 100%; container-type: size; }
.js:not(.nogl) .poster .photo-crop { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(90cqw, calc(var(--w) * 1px), calc(90cqh * var(--w) / var(--h))); }
.js:not(.nogl) .poster-caption { display: none; }
.is-ready .poster { opacity: 0; visibility: hidden; }
.nogl .poster, .no-js .poster { position: absolute; z-index: 2; inset: 104px var(--gr) 56px var(--left); display: grid; place-items: center; align-content: center; gap: 14px; container-type: size; }
.nogl .poster .photo-crop, .no-js .poster .photo-crop { width: min(100%, calc(var(--w) * 1px), calc((100cqh - 64px) * var(--w) / var(--h))); }
.nogl .poster-box, .no-js .poster-box { display: contents; }
.nogl .poster-label, .no-js .poster-label { display: none; }
.poster figcaption { font-size: 15px; line-height: 1.5; color: var(--platinum); max-width: 24em; text-align: center; }
.nogl .panel, .no-js .panel, .nogl .hint, .no-js .hint, .nogl .slots, .no-js .slots { display: none; }
.nogl .stage, .no-js .stage { cursor: default; }
/* Until the model is ready the controls hold their place but do nothing, so they are not shown. */
.js:not(.is-ready):not(.nogl) .panel { visibility: hidden; }

/* Controls: hairline chips, bone when chosen. Views and colors are choose-one sets (radio groups). */
.group { display: grid; gap: 8px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button, .toggle { appearance: none; display: inline-flex; align-items: center; gap: 9px; min-height: 42px; padding: 10px 14px; border: 1px solid var(--hair); border-radius: 3px; background: var(--chip); color: var(--platinum); font: 500 14px/1.1 var(--display); letter-spacing: 0.005em; cursor: pointer; transition: background-color 0.25s, color 0.25s, border-color 0.25s; -webkit-tap-highlight-color: transparent; }
.seg button:hover, .toggle:hover { border-color: var(--platinum); color: var(--bone); }
.seg button[aria-checked="true"], .toggle[aria-pressed="true"] { background: var(--bone); border-color: var(--bone); color: var(--ink); }
.seg button:disabled { opacity: 0.4; cursor: default; }
.sw { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px var(--hair-strong); }
.sw-navy { background: linear-gradient(90deg, var(--navy-armor) 50%, var(--navy-frame) 50%); }
.sw-white { background: linear-gradient(90deg, var(--white-armor) 50%, var(--white-frame) 50%); }
.seg button[aria-checked="true"] .sw { box-shadow: 0 0 0 1px rgba(11, 13, 16, 0.45); }
.toggles { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; padding-top: 4px; }
.quiet { appearance: none; display: inline-flex; align-items: center; gap: 9px; min-height: 42px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--hair); background: none; color: var(--platinum); font: 500 14px/1.1 var(--display); cursor: pointer; }
.quiet[hidden] { display: none; }
.quiet::before { content: ""; width: 8px; height: 8px; border: 1px solid var(--mute); border-radius: 1px; flex: none; transition: background-color 0.25s, border-color 0.25s; }
.quiet:hover { color: var(--bone); border-bottom-color: var(--platinum); }
.quiet[aria-pressed="true"] { color: var(--bone); border-bottom-color: var(--platinum); }
.quiet[aria-pressed="true"]::before { background: var(--bone); border-color: var(--bone); }
.build-note { font-size: 15px; line-height: 1.5; color: var(--platinum); max-width: 26em; }
/* While the model is not final, a plain note under the controls says so. It never sits on the stage, so it never covers the photograph. */
.provisional-note { font: 400 12px/1.5 var(--mono); color: var(--mute); max-width: 34em; padding: 9px 11px; border: 1px solid var(--hair); border-radius: 3px; }
.provisional-note::first-line { color: var(--platinum); }

/* Where it comes from: written the way an inspection sheet is written. */
.band { position: relative; z-index: 3; background: var(--ink); border-top: 1px solid var(--hair); padding: clamp(64px, 9vw, 120px) var(--gr) clamp(56px, 8vw, 104px) var(--gl); }
.provenance h2 { font-weight: 820; font-stretch: 88%; font-size: clamp(34px, 4.4vw, 64px); line-height: 0.95; letter-spacing: -0.04em; color: var(--bone); max-width: 14em; }
.sheet { max-width: var(--wide); margin-top: clamp(28px, 4vw, 48px); border-top: 1px solid var(--platinum); }
.sheet .row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 8px 32px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--hair); }
.sheet dt { font-size: 10.5px; line-height: 1.6; color: var(--mute); }
.sheet dd { font-size: 17px; line-height: 1.55; color: var(--platinum); max-width: 44em; text-wrap: pretty; }
.sheet a { color: var(--bone); text-underline-offset: 3px; text-decoration-color: var(--hair-strong); display: inline-block; padding: 4px 0; }
.sheet a:hover { text-decoration-color: var(--platinum); }
.sheet .links { display: inline-flex; flex-wrap: wrap; gap: 0 22px; }
.readings { list-style: none; display: grid; gap: 10px; margin-top: 14px; }
.readings li { position: relative; padding-left: 20px; }
.readings li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border: 1px solid var(--mute); border-radius: 1px; }

.foot { border-top: 1px solid var(--hair); padding: 32px var(--gr) calc(32px + env(safe-area-inset-bottom, 0px)) var(--gl); display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 32px; }
.foot .word { color: var(--bone); }
.foot-line { font: 700 20px/1 var(--display); font-stretch: 88%; letter-spacing: -0.02em; color: var(--bone); }

/* A narrow column: the four views sit two by two instead of wrapping one onto its own line. */
@container (max-width: 410px) {
  .seg-views { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seg-views button { justify-content: center; }
}

/* Laptops with short screens. */
@media (min-width: 900px) and (max-height: 820px) {
  .hero { grid-template-rows: minmax(76px, 1fr) auto auto minmax(48px, 1fr); }
  .title { gap: 10px; }
  .title h1 { font-size: clamp(38px, 4vw, 60px); }
  .lede { font-size: 17px; }
  .panel { padding-top: 18px; gap: 12px; }
}

/* Phones and small tablets: the words, then the robot, then the controls. */
@media (max-width: 899px) {
  :root { --slots-pad: 16px 16px 44px; }
  .hero { display: flex; flex-direction: column; min-height: 0; padding-top: 72px; }
  .title { padding: 0 var(--gr) 0 var(--gl); gap: 12px; }
  .title h1 { font-size: clamp(36px, 10.4vw, 56px); max-width: 9em; }
  .lede { font-size: 16px; }
  .stage { position: relative; inset: auto; height: clamp(380px, 56svh, 640px); margin-top: 10px; }
  .stage::before, .stage::after { display: none; }
  .slots { gap: 10px; }
  .slot-label { bottom: -32px; }
  /* On a phone the model's label sits top left of the stage; beside the photograph, both labels sit under their slots. */
  .slot-figure .slot-label, .poster .poster-label { top: -4px; left: 0; bottom: auto; transform: none; }
  .is-compare .slot-figure .slot-label { top: auto; left: 50%; bottom: -32px; transform: translateX(-50%); }
  #stage-loading { left: var(--gl); bottom: 12px; }
  .standin-note { top: 12px; right: 12px; left: 12px; max-width: none; text-align: left; }
  .hint { left: var(--gl); right: auto; bottom: 12px; }
  .panel { padding: 18px var(--gr) 8px var(--gl); gap: 16px; }
  .seg-views { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seg-views button { justify-content: center; }
  .nogl .poster, .no-js .poster { inset: 12px 16px 12px 16px; }
  .sheet .row { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 16px 0; }
  .sheet dd { font-size: 16px; }
}
@media (pointer: coarse) { .seg button, .toggle, .quiet { min-height: 44px; } }

/* Motion contract: the robot glides; the page itself barely moves. Reduced motion keeps everything readable. */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print { .stage, .bar, .panel { display: none !important; } body, .band, .foot { background: #fff !important; color: #000 !important; } }
