/* Gimbix — an attitude indicator for model spend: sky and earth may tilt, the horizon (answer quality) holds level. */
:root {
  --sky: #2b63d9;
  --sky-deep: #1d4aa8;
  --earth: #6e4e37;
  --earth-deep: #573c2a;
  --horizon: #ff6a13;
  --ink: #0c1b2e;
  --ink-soft: #41526a;
  --page: #eef2f7;
  --panel: #ffffff;
  --rule: #d5dde8;
  --good: #1f7a4d;
  --bad: #b3261e;
  --display: "Saira Semi Condensed", "Arial Narrow", sans-serif;
  --body: "Public Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.75rem;
  --step-3: 2.6rem;
  --step-4: clamp(2.6rem, 6.2vw, 4.9rem);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 var(--step-0)/1.6 var(--body); }
a { color: var(--sky-deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--horizon); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; letter-spacing: 0.005em; margin: 0 0 0.5em; }
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; max-width: 68ch; }
code, .mono, table.data td.num, .readout { font-family: var(--mono); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--panel); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(238, 242, 247, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 1.35rem/1 var(--display); color: var(--ink); text-decoration: none; letter-spacing: 0.02em; }
.brand svg { width: 28px; height: 28px; }
.site-nav { display: flex; gap: 22px; margin-left: auto; font-size: var(--step--1); }
.site-nav a { color: var(--ink-soft); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav .cta { color: var(--panel); background: var(--ink); padding: 7px 14px; border-radius: 6px; }
.site-nav .cta:hover { background: var(--sky-deep); color: var(--panel); }
@media (max-width: 760px) { .site-nav a:not(.cta) { display: none; } }

/* Hero: the attitude indicator. The world pivots on the horizon line; the horizon and headline never move. */
.hero { position: relative; overflow: hidden; color: #fff; display: flex; flex-direction: column; isolation: isolate; background: var(--earth); }
.hero .world { position: absolute; z-index: -2; left: -100vw; width: 300vw; height: 400vh; top: calc(var(--hy, 50%) - 200vh);
  transform-origin: 50% 50%; transform: rotate(var(--tilt, -4deg)) translateY(var(--pitch, 0px)); transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.hero .sky { position: absolute; inset: 0 0 50% 0; background: linear-gradient(180deg, var(--sky-deep) 45%, var(--sky)); }
.hero .earth { position: absolute; inset: 50% 0 0 0; background: linear-gradient(180deg, var(--earth), var(--earth-deep) 55%); }
.hero .ladder { position: absolute; right: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); top: var(--hy, 50%); transform: translateY(-50%); width: 70px; z-index: -1; }
.hero .ladder i { display: block; height: 2px; margin: 26px 0 26px auto; width: 40%; background: rgba(255,255,255,0.4); }
.hero .ladder i:nth-child(odd) { width: 70%; }
.hero .ladder i.zero { width: 100%; background: transparent; }
.hero .horizon { position: relative; height: 3px; background: var(--horizon); box-shadow: 0 0 18px rgba(255,106,19,0.55); }
.hero .above { width: 100%; padding-top: clamp(72px, 12vh, 128px); padding-bottom: 26px; }
.hero .below { width: 100%; padding-top: 30px; padding-bottom: 64px; }
.hero .eyebrow { font: 500 var(--step--1)/1.2 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.8); margin-bottom: 18px; }
.hero h1 { font-size: var(--step-4); max-width: 16ch; margin: 0; }
.hero h1 .level { display: block; }
.hero .lede { font-size: var(--step-1); line-height: 1.45; max-width: 46ch; color: rgba(255,255,255,0.94); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.btn { display: inline-block; font: 600 var(--step-0)/1 var(--body); padding: 15px 22px; border-radius: 8px; text-decoration: none; }
.btn.primary { background: var(--horizon); color: var(--ink); }
.btn.primary:hover { background: #ff8a45; color: var(--ink); }
.btn.ghost { color: #fff; border: 1.5px solid rgba(255,255,255,0.6); }
.btn.ghost:hover { border-color: #fff; color: #fff; }
.readouts { display: grid; grid-template-columns: repeat(3, minmax(0, max-content)); gap: 10px 40px; margin-top: 40px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.28); }
.readout { font-size: var(--step--1); color: rgba(255,255,255,0.85); }
.readout b { display: block; font: 600 var(--step-2)/1.15 var(--mono); color: #fff; }
.hero .footnote { font-size: 0.8rem; color: rgba(255,255,255,0.72); margin-top: 14px; }
@media (max-width: 760px) { .readouts { grid-template-columns: 1fr 1fr; } .hero .ladder { display: none; } }
@media (max-width: 480px) { .readouts { grid-template-columns: 1fr; gap: 14px; } .readout b { display: inline; margin-right: 10px; font-size: var(--step-1); } }
@media (prefers-reduced-motion: reduce) { .hero .world { transition: none; transform: rotate(-4deg); } }
/* Load: the horizon draws across, then the words settle onto it. CSS, so it never waits on a script or a visible tab. */
@media (prefers-reduced-motion: no-preference) {
  .hero .horizon { transform-origin: 0 50%; animation: draw-horizon 1.1s cubic-bezier(.65, 0, .35, 1) both; }
  .hero .eyebrow, .hero h1, .hero .lede, .hero .actions, .hero .readouts, .hero .footnote { animation: settle 0.8s cubic-bezier(.2, .7, .2, 1) 0.2s both; }
  .hero h1 { animation-delay: 0.3s; }
  .hero .lede { animation-delay: 0.45s; }
  .hero .actions { animation-delay: 0.55s; }
  .hero .readouts { animation-delay: 0.65s; }
  .hero .footnote { animation-delay: 0.75s; }
}
@keyframes draw-horizon { from { transform: scaleX(0); } }
@keyframes settle { from { opacity: 0; transform: translateY(22px); } }

/* The 3D gimbal: centred on the horizon line, so the ball's horizon continues the page's. */
.hero .gimbal { position: absolute; z-index: -1; right: calc(max(0px, (100vw - var(--max)) / 2) - 36px); top: var(--hy, 50%); width: min(38vw, 540px); aspect-ratio: 1;
  transform: translateY(-50%); opacity: 0; transition: opacity 1.4s ease; pointer-events: none; }
.hero .gimbal.is-live { opacity: 1; }
.hero .gimbal canvas { display: block; width: 100% !important; height: 100% !important; }
.hero { min-height: min(88vh, 860px); justify-content: center; }
.hero-short { min-height: min(72vh, 700px); }
@media (max-width: 900px) { .hero .gimbal { width: 86vw; right: -30vw; } .hero .gimbal.is-live { opacity: 0.42; } }

/* Sections */
section.band { padding: 84px 0; border-bottom: 1px solid var(--rule); }
section.band { overflow-x: clip; }
section.band.panel { background: var(--panel); }
.kicker { font: 500 var(--step--1)/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 12px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 28px; margin-top: 34px; counter-reset: step; }
.step { border-top: 3px solid var(--ink); padding-top: 16px; }
.step::before { counter-increment: step; content: "Step " counter(step); font: 500 var(--step--1)/1 var(--mono); color: var(--ink-soft); display: block; margin-bottom: 10px; }
.step h3 { margin-bottom: 8px; }
.step p { font-size: 0.98rem; color: var(--ink-soft); }

/* Evidence ledger */
table.data { width: 100%; border-collapse: collapse; font-size: 0.95rem; background: var(--panel); }
table.data th, table.data td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.data th { font: 600 var(--step--1)/1.2 var(--body); color: var(--ink-soft); background: #f6f8fb; }
table.data td.num { text-align: right; white-space: nowrap; }
table.data tr:hover td { background: #f8fafd; }
.table-scroll { overflow-x: auto; border: 1px solid var(--rule); border-radius: 10px; }
.verdict { font: 600 0.8rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; padding: 4px 8px; border-radius: 4px; white-space: nowrap; }
.verdict.pass { background: #e3f3ea; color: var(--good); }
.verdict.fail { background: #fbe7e5; color: var(--bad); }
.verdict.info { background: #e8eef9; color: var(--sky-deep); }

/* Receipt */
.receipt { font: 400 0.86rem/1.55 var(--mono); background: var(--panel); border: 1px dashed var(--ink-soft); border-radius: 6px; padding: 20px 22px; max-width: 520px; white-space: pre-wrap; }

/* Model and comparison pages */
.page-head { padding: 54px 0 30px; border-bottom: 1px solid var(--rule); }
.crumbs { font-size: var(--step--1); color: var(--ink-soft); margin-bottom: 14px; }
.crumbs a { color: var(--ink-soft); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; margin: 28px 0; }
.fact { background: var(--panel); padding: 16px 18px; }
.fact span { display: block; font-size: var(--step--1); color: var(--ink-soft); }
.fact b { font: 600 var(--step-1)/1.2 var(--mono); }
.level-bar { position: relative; height: 10px; background: #e3e9f2; border-radius: 5px; overflow: hidden; }
.level-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--sky); border-radius: 5px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
.note { font-size: var(--step--1); color: var(--ink-soft); }
.chip { display: inline-block; font: 500 0.78rem/1 var(--mono); padding: 5px 8px; border-radius: 4px; background: #e8eef9; color: var(--sky-deep); margin: 0 6px 6px 0; }
.chip.no { background: #eef0f3; color: var(--ink-soft); }
.list-cols { columns: 3 240px; column-gap: 28px; padding: 0; list-style: none; }
.list-cols li { break-inside: avoid; padding: 5px 0; border-bottom: 1px solid var(--rule); font-size: 0.95rem; }
.callout { background: var(--ink); color: #fff; border-radius: 12px; padding: 34px; margin: 40px 0; }
.callout h2 { color: #fff; }
.callout p { color: rgba(255,255,255,0.85); }
.callout .btn.primary { margin-top: 8px; }

/* Calculator */
.calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; padding: 22px; }
.calc label { display: block; font-size: var(--step--1); color: var(--ink-soft); margin-bottom: 6px; }
.calc input, .calc select { width: 100%; font: 400 1rem var(--mono); padding: 10px; border: 1px solid var(--rule); border-radius: 6px; background: #fbfcfe; color: var(--ink); }
.calc output { font: 600 var(--step-2)/1.1 var(--mono); display: block; }

/* Footer */
.site-footer { padding: 48px 0 64px; font-size: var(--step--1); color: var(--ink-soft); }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; }
.site-footer h4 { font: 600 var(--step--1)/1 var(--body); color: var(--ink); margin: 0 0 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* Dark instrument bands: the problem and the end goal */
section.band.problem, section.band.vision-band { background: var(--ink); color: #fff; border-bottom: 0; position: relative; }
.problem .kicker, .vision-band .kicker { color: rgba(255,255,255,0.62); }
.problem h2, .vision-band h2 { color: #fff; }
.spread { font: 700 clamp(7rem, 21vw, 16rem)/0.82 var(--display); color: var(--horizon); margin: 0 0 22px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; max-width: none; }
.problem h2 { font-size: var(--step-3); max-width: 19ch; }
.big { font-size: var(--step-1); line-height: 1.5; max-width: 60ch; }
.problem .big { color: rgba(255,255,255,0.8); }
.vision-band::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--horizon); box-shadow: 0 0 18px rgba(255,106,19,0.5); }
.statement { font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.1; max-width: 30ch; margin-bottom: 22px; }
.statement span { color: rgba(255,255,255,0.55); }
.vision-band p { color: rgba(255,255,255,0.8); }
.vision-band a { color: #ffb489; }

/* The idea: request flow */
.idea-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .idea-grid { grid-template-columns: 1fr; gap: 28px; } }
.flow { margin: 0; }
.flow svg { display: block; width: 100%; height: auto; overflow: visible; }
.flow .node rect { fill: var(--page); stroke: var(--ink); stroke-width: 1.5; }
.flow .node text { font: 600 15px var(--mono); fill: var(--ink); text-anchor: middle; }
.flow .node text.small { font: 400 11.5px var(--mono); fill: var(--ink-soft); }
.flow .cheap rect { fill: #e8eef9; stroke: var(--sky); }
.flow .served rect { fill: #e3f3ea; stroke: var(--good); }
.flow .yours rect { fill: #f3ece6; stroke: var(--earth); }
.flow .draw { fill: none; stroke: var(--ink); stroke-width: 2; }

/* How it holds level: four steps that stand up in 3D as you scroll */
.steps3d { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 40px; perspective: 1200px; counter-reset: step; }
.steps3d .step { background: var(--panel); border: 1px solid var(--rule); border-top: 3px solid var(--ink); border-radius: 10px; padding: 22px 20px 12px; }
@media (max-width: 900px) { .steps3d { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps3d { grid-template-columns: 1fr; } }
.steps-rail { position: relative; height: 3px; margin-top: 30px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.steps-rail i { position: absolute; inset: 0; background: var(--horizon); transform-origin: 0 50%; }
@media (min-width: 900px) { .steps-band { min-height: calc(100vh - 60px); display: flex; align-items: center; } .steps-band > .wrap { width: 100%; } .steps3d .step { min-height: 250px; padding: 26px 24px 16px; } }

/* Goals: target and today, side by side */
.goals { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 36px; perspective: 1400px; }
.goal { background: var(--panel); color: var(--ink); border: 1px solid var(--rule); border-radius: 12px; padding: 22px 22px 18px; }
.goal header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--rule); }
.goal h3 { margin: 0; font-size: var(--step-2); }
.goal .status { font: 500 0.72rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--sky-deep); background: #e8eef9; padding: 5px 8px; border-radius: 4px; text-align: right; }
.goal .status.met { color: var(--good); background: #e3f3ea; }
.goal dl { display: grid; gap: 12px; margin: 0; }
.goal dt { font: 500 0.72rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); margin-bottom: 5px; }
.goal dd { margin: 0; font-size: 0.96rem; line-height: 1.5; }
.goal dl > div:first-child dd { font-weight: 600; }

/* Roadmap: a sequence, so it is drawn as one */
.roadmap { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; list-style: none; padding: 0; margin: 40px 0 0; }
.roadmap::before { content: ""; position: absolute; top: 7px; left: 0; right: 0; height: 2px; background: var(--rule); }
.roadmap li { position: relative; padding-top: 32px; }
.roadmap li::before { content: ""; position: absolute; top: 0; left: 0; width: 16px; height: 16px; box-sizing: border-box; border-radius: 50%; background: var(--page); border: 3px solid var(--ink); }
.roadmap li:first-child::before { background: var(--horizon); border-color: var(--horizon); }
.roadmap .when { font: 500 var(--step--1)/1 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); }
.roadmap h3 { margin: 10px 0 8px; }
.roadmap p { font-size: 0.96rem; color: var(--ink-soft); }
@media (max-width: 760px) {
  .roadmap { grid-template-columns: 1fr; }
  .roadmap::before { top: 0; bottom: 0; left: 7px; right: auto; width: 2px; height: auto; }
  .roadmap li { padding: 0 0 0 36px; }
}
.principles { list-style: none; padding: 0; margin: 0; }
.principles li { position: relative; padding: 12px 0 12px 28px; border-bottom: 1px solid var(--rule); }
.principles li::before { content: ""; position: absolute; left: 0; top: 24px; width: 14px; height: 2px; background: var(--horizon); }

/* The spread, drawn to scale */
.problem-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: end; }
@media (max-width: 900px) { .problem-grid { grid-template-columns: 1fr; gap: 36px; } }
.tiers { margin: 0; display: grid; gap: 18px; padding-bottom: 8px; }
.tiers figcaption { font: 500 var(--step--1)/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.62); margin-bottom: 4px; }
.tier { display: grid; grid-template-columns: 7.5rem 1fr 4.5rem; align-items: center; gap: 14px; font-size: var(--step--1); }
.tier .label { color: rgba(255,255,255,0.85); }
.tier .bar { height: 14px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.tier .bar i { display: block; height: 100%; background: var(--horizon); border-radius: 3px; transform-origin: 0 50%; }
.tier b { font: 600 var(--step-0)/1 var(--mono); text-align: right; color: #fff; }
