/* vortx.ai homepage. One file, no framework, no build step.
   The page is a story in seven scenes. Colours are the ones the emem talks use. */

:root {
  --bg: #0d1117;
  --panel: #161b22;
  --line: #30363d;
  --line-soft: #21262d;
  --text: #e6edf3;
  --muted: #8b949e;
  --blue: #79c0ff;
  --orange: #ffa657;
  --green: #7ee787;
  --red: #ff7b72;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1120px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 2px; }
code { font: 0.9em var(--mono); color: var(--orange); font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
.num { font-family: var(--mono); font-size: 0.92em; white-space: nowrap; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }

/* Every heading stays on one line. Each size comes from the heading's measured width in
   Newsreader: the hero line is 16.0em wide, the longest scene title 9.5em. */
h1 { font: 400 min(calc((100vw - 2 * var(--gutter)) / 16.6), 66px)/1.05 var(--serif); letter-spacing: -0.015em; white-space: nowrap; }
h2 { font: 400 min(calc((100vw - 2 * var(--gutter)) / 10.2), 60px)/1.1 var(--serif); letter-spacing: -0.01em; white-space: nowrap; }
h3 { font: 500 19px/1.35 var(--sans); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.alias { position: absolute; }
.center { text-align: center; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: var(--bg); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }


/* buttons */
.btn { display: inline-block; padding: 12px 20px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); text-decoration: none; font: 500 15px var(--sans); }
.btn:hover { color: var(--text); border-color: var(--muted); }
.btn-main { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn-main:hover { background: #fff; border-color: #fff; color: var(--bg); }
.btn-glass { background: rgba(13, 17, 23, 0.45); border-color: rgba(230, 237, 243, 0.4); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 30px 0 0; }

/* full-bleed satellite plates: the hero and the finale */
.plate { position: absolute; inset: 0; overflow: hidden; }
.plate-move { position: absolute; inset: 0; animation: drift 40s ease-in-out infinite alternate; transform-origin: 55% 45%; }
.plate img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.plate::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(13, 17, 23, 0.6) 0%, rgba(13, 17, 23, 0.38) 30%, rgba(13, 17, 23, 0.42) 62%, rgba(13, 17, 23, 0.97) 100%); }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.07); } }

/* 1. the opening */
.hero { position: relative; min-height: min(calc(100svh - 58px), 960px); display: flex; flex-direction: column; overflow: hidden; }
.hero-in { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding-top: 64px; padding-bottom: 32px; }
.hero h1 { text-shadow: 0 2px 32px rgba(0, 0, 0, 0.5); }
.lede { text-wrap: balance; max-width: 620px; margin: 22px auto 0; font-size: 20px; line-height: 1.5; color: #f0f3f6; text-shadow: 0 1px 14px rgba(0, 0, 0, 0.7); }
.hero-foot { position: relative; text-align: center; padding-bottom: 26px; }
.works { text-wrap: balance; margin: 0 auto 8px; max-width: 820px; font-size: 15px; color: #c9d1d9; }
.works a { color: var(--text); }
.works a:hover { color: var(--blue); }
.credit { margin: 0; font: 12px var(--mono); color: var(--muted); }

/* scenes */
.scene { padding: 96px 0; text-align: center; }
.scene-dark { background: #090c10; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.say { text-wrap: balance; max-width: 640px; margin: 18px auto 0; font: 400 22px/1.45 var(--serif); color: #d6dde4; }
.note { text-wrap: balance; max-width: 680px; margin: 30px auto 0; font-size: 14px; color: var(--muted); }

/* 2. one reading, eight values */
.drift { list-style: none; padding: 0; margin: 44px auto 0; max-width: 920px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.drift li { padding: 20px 12px 18px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--panel); }
.drift .v { display: block; font: 500 28px/1.2 var(--mono); color: var(--red); }
.drift .c { display: block; margin-top: 6px; font-size: 14px; color: var(--muted); }
.drift .true { border-color: rgba(126, 231, 135, 0.6); background: rgba(126, 231, 135, 0.07); }
.drift .true .v { color: var(--green); }
.drift .true .c { color: var(--text); }
.drift .impossible .v { text-decoration: line-through; text-decoration-thickness: 2px; }
.drift .t { display: inline-block; margin-top: 10px; padding: 2px 8px; border-radius: 4px; font: 500 12px var(--mono); color: var(--red); background: rgba(255, 123, 114, 0.1); }
.drift .true .t { color: var(--green); background: rgba(126, 231, 135, 0.12); }

/* 3. the measurement */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 760px; margin: 44px auto 0; }
.stat { padding: 30px 22px 26px; border-radius: 8px; border: 1px solid var(--line-soft); background: var(--bg); }
.dots { position: relative; width: min(100%, 276px); margin: 0 auto 22px; }
.dots svg { display: block; width: 100%; height: auto; }
.dots .hit { position: absolute; inset: 0; }
.js .dots .hit { clip-path: inset(0 0 100% 0); transition: clip-path 1.8s steps(12, end) 0.3s; }
.js .in .dots .hit { clip-path: inset(0); }
.stat .big { margin: 0 0 10px; font: 400 min(20vw, 104px)/1 var(--serif); }
.stat .big small { font: 400 20px var(--sans); color: var(--muted); }
.stat.bad { border-color: rgba(255, 123, 114, 0.35); }
.stat.good { border-color: rgba(126, 231, 135, 0.45); }
.stat.bad .big { color: var(--red); }
.stat.good .big { color: var(--green); }
.stat p:not(.big) { margin: 0; color: var(--muted); }

/* 4. emem */
.squeeze { display: flex; align-items: center; justify-content: center; gap: 28px; margin: 44px auto 0; }
.squeeze p { margin: 0; }
.squeeze .v { display: block; font: 400 min(11vw, 64px)/1 var(--serif); white-space: nowrap; }
.squeeze .c { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); }
.squeeze .to .v { color: var(--orange); }
.squeeze .arrow { align-self: flex-start; font: 400 40px var(--sans); line-height: min(11vw, 64px); color: var(--muted); }
.token { margin: 30px auto 0; max-width: 760px; overflow-wrap: anywhere; }
.token code { font-size: 15px; }
.token-check { margin: 10px 0 0; }
.sub { margin: 72px 0 0; font: 400 min(calc((100vw - 2 * var(--gutter)) / 10.2), 36px)/1.2 var(--serif); white-space: nowrap; }
.frames { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; text-align: left; }
.shot { position: relative; border-radius: 6px; overflow: hidden; background: var(--panel); }
.pin { position: absolute; left: 50.02%; top: 50.07%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 2px solid var(--orange); border-radius: 50%; box-shadow: 0 0 0 2px rgba(13, 17, 23, 0.55); }
.pin::after { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; background: var(--orange); border-radius: 50%; }
.pin::before { content: ""; position: absolute; inset: -2px; border: 2px solid var(--orange); border-radius: 50%; animation: ping 2.8s ease-out infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: 0.9; } 70%, 100% { transform: scale(2.4); opacity: 0; } }
.frame-date { margin: 12px 0 2px; font: 500 13px var(--mono); color: var(--muted); }
.frame-reading { margin: 0 0 6px; font: 400 22px/1.3 var(--serif); }
.check { background: none; border: 0; padding: 0; color: var(--blue); font: 14px var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.check:hover { color: var(--text); }
.check[disabled] { color: var(--muted); cursor: default; text-decoration: none; }
.check-out { margin: 6px 0 0; font: 13px/1.5 var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.check-out:empty { display: none; }
.check-out.ok { color: var(--green); }
.check-out.bad { color: var(--red); }

/* 5. the planet grades AI */
.timeline { list-style: none; padding: 0; margin: 48px auto 0; max-width: 820px; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.timeline::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 9px; height: 2px; background: var(--line); }
.timeline li { position: relative; padding-top: 34px; }
.timeline li::before { content: ""; position: absolute; left: 50%; top: 1px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: #090c10; border: 2px solid var(--muted); }
.timeline li.past::before { background: var(--orange); border-color: var(--orange); }
.timeline li.next::before { border-color: var(--orange); box-shadow: 0 0 0 6px rgba(255, 166, 87, 0.15); }
.timeline li.past .c { color: #c9d1d9; }
.timeline .d { display: block; font: 500 16px var(--mono); }
.timeline .c { display: block; font-size: 14px; color: var(--muted); }

/* the questions we grade AI on: they arrive one at a time */
.asks { list-style: none; max-width: 760px; margin: 44px auto 0; padding: 0; }
.asks li { padding: 14px 0; border-top: 1px solid var(--line-soft); font: 400 28px/1.3 var(--serif); color: #e6edf3; }
.asks li:last-child { border-bottom: 1px solid var(--line-soft); color: var(--orange); }
.js .asks li { opacity: 0; transform: translateY(8px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .asks.in li { opacity: 1; transform: none; }
.js .asks.in li:nth-child(2) { transition-delay: 0.15s; }
.js .asks.in li:nth-child(3) { transition-delay: 0.3s; }
.js .asks.in li:nth-child(4) { transition-delay: 0.45s; }
.js .asks.in li:nth-child(5) { transition-delay: 0.6s; }
.asks + .sub { margin-top: 64px; }

/* the bar to beat: average miss, 0 to 2 °C, shorter wins */
.race { max-width: 760px; margin: 52px auto 0; display: grid; gap: 30px; text-align: left; }
.lane { display: grid; grid-template-columns: 190px minmax(0, 1fr) 200px; gap: 20px; align-items: center; }
.who { margin: 0; font: 500 16px/1.3 var(--sans); }
.who small { display: block; margin-top: 2px; font: 400 13px var(--sans); color: var(--muted); }
.track { position: relative; height: 14px; border-radius: 7px; background: var(--line-soft); }
.track::after { content: ""; position: absolute; left: 59%; top: -8px; bottom: -8px; border-left: 2px dashed rgba(255, 166, 87, 0.85); }
.bar { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; transform-origin: left center; }
.bar.slow { width: 90.5%; background: var(--red); }
.bar.par { width: 59%; background: var(--orange); }
.bar.sealed { width: 100%; background: repeating-linear-gradient(-45deg, rgba(139, 148, 158, 0.38) 0 6px, rgba(139, 148, 158, 0.12) 6px 12px); animation: seal 1.6s linear infinite; }
@keyframes seal { to { background-position: 33.94px 0; } }
.lane.ai .track::before { content: "beat 1.18 °C"; position: absolute; left: 59%; bottom: 22px; transform: translateX(-50%); font: 500 12px var(--mono); color: var(--orange); white-space: nowrap; }
.miss { margin: 0; text-align: right; font: 500 16px var(--mono); color: var(--muted); white-space: nowrap; }
.miss.slow { color: var(--red); }
.miss.par { color: var(--orange); }
.js .race .bar.slow, .js .race .bar.par { transform: scaleX(0); transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s; }
.js .race .bar.par { transition-delay: 0.8s; }
.js .race.in .bar.slow, .js .race.in .bar.par { transform: none; }
.race + .note { margin-top: 26px; }

/* a season, sealed before it ends */
.season { max-width: 760px; margin: 28px auto 0; padding: 26px 28px; border: 1px solid rgba(126, 231, 135, 0.4); border-radius: 8px; background: var(--bg); text-align: left; }
.season-d { margin: 0 0 8px; font: 500 13px var(--mono); color: var(--green); }
.season-t { margin: 0 0 10px; font: 400 24px/1.35 var(--serif); color: var(--text); }
.season-n { margin: 0 0 18px; font-size: 15px; color: var(--muted); }
.season p:last-child { margin: 0; }
.season + .say { margin-top: 40px; }

/* 6. the ladder: goal at the top, rail green from where we are down to the idea */
.ladder { list-style: none; margin: 48px auto 0; padding: 0; max-width: 780px; text-align: left; }
.rung { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr) 128px; gap: 22px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.rung:last-child { border-bottom: 0; }
.rung::before, .rung::after { content: ""; position: absolute; left: 25px; width: 2px; top: 0; bottom: 0; }
.rung::before { background: var(--line-soft); }
.rung:first-child::before, .rung:first-child::after { top: 42px; }
.rung:last-child::before, .rung:last-child::after { bottom: auto; height: 42px; }
.rung.done::after { background: var(--green); opacity: 0.55; }
.rung.now::after { top: 42px; background: var(--green); opacity: 0.55; }
.rung-n { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); font: 500 20px var(--mono); color: var(--muted); }
.rung.done .rung-n { border-color: var(--green); color: var(--text); }
.rung.now .rung-n { border-color: var(--orange); background: var(--orange); color: var(--bg); box-shadow: 0 0 0 6px rgba(255, 166, 87, 0.15); }
.rung.now .rung-n::after { content: ""; position: absolute; inset: -2px; border: 2px solid var(--orange); border-radius: 50%; animation: halo 2.8s ease-out infinite; }
@keyframes halo { 0% { transform: scale(1); opacity: 0.8; } 70%, 100% { transform: scale(1.7); opacity: 0; } }
.rung h3 { white-space: nowrap; }
.rung:not(.done):not(.now) h3 { color: #c9d1d9; }
.rung-body p { margin: 4px 0 0; color: var(--muted); }
.rung.done .rung-body > p, .rung.now .rung-body > p { color: #c9d1d9; }
.rung .here { font: 500 13px var(--mono); color: var(--orange); margin: 0 0 4px; }
.state { padding-top: 4px; text-align: right; font: 13px var(--mono); color: var(--muted); }
.rung.done .state { color: var(--green); }
.rung.now .state { color: var(--orange); }
.rung-body details { margin-top: 4px; }
.rung-body details > summary { display: inline-block; cursor: pointer; list-style: none; color: var(--blue); font-size: 14px; }
.rung summary::-webkit-details-marker { display: none; }
.rung-body details > summary::before { content: "+ "; font-family: var(--mono); }
.rung-body details[open] > summary::before { content: "− "; }
.rung-body details p { font-size: 15px; color: var(--muted); }
/* folded rungs: number and title on one row, the rest opens on a tap */
.rung.fold { padding: 10px 0; }
.rung.fold .rung-n { width: 40px; height: 40px; justify-self: center; font-size: 16px; }
details.rung-body { margin: 0; }
details.rung-body > summary { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; list-style: none; }
details.rung-body > summary::after { content: "+"; font: 15px var(--mono); color: var(--blue); }
details.rung-body[open] > summary::after { content: "−"; }
details.rung-body > summary:hover h3 { color: var(--text); }
details.rung-body > p { margin: 2px 0 8px; }
.rung.fold .state { padding-top: 11px; }
.rung-body .proof { font-size: 15px; color: var(--muted) !important; }

/* 7. the finale */
.finale { position: relative; min-height: 640px; display: flex; align-items: center; overflow: hidden; text-align: center; }
.finale .plate::after { background: radial-gradient(ellipse at center, rgba(13, 17, 23, 0.42) 0%, rgba(13, 17, 23, 0.7) 65%, rgba(13, 17, 23, 0.94) 100%); }
.finale-in { position: relative; width: 100%; padding-top: 104px; padding-bottom: 104px; }
.finale h2 { text-shadow: 0 2px 28px rgba(0, 0, 0, 0.55); }
.finale-credit { position: absolute; left: 0; right: 0; bottom: 18px; padding: 0 var(--gutter); text-align: center; }
.finale .say { color: #f0f3f6; text-shadow: 0 1px 14px rgba(0, 0, 0, 0.7); }

/* try it */
.connect { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 40px 0 28px; text-align: left; }
.connect p { margin: 0; padding: 18px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 8px; color: var(--muted); font-size: 15px; }
.connect b { display: block; margin-bottom: 4px; color: var(--text); font-weight: 500; }
.plist { margin: 0; border-top: 1px solid var(--line); text-align: left; }
.prow { display: grid; grid-template-columns: 200px minmax(0, 1fr) 130px; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.prow dt { font: 400 26px/1.2 var(--serif); }
.prow dt a { color: var(--text); text-decoration: none; }
.prow dt a:hover { text-decoration: underline; }
.prow dd { margin: 0; color: var(--muted); }
.prow .state { text-align: right; padding-top: 0; }
.prow .state.live { color: var(--green); }

/* company */
.company-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 48px; margin-top: 36px; text-align: left; }
.people { list-style: none; margin: 16px 0 0; padding: 0; }
.people li { padding: 10px 0; border-top: 1px solid var(--line-soft); color: var(--muted); }
.people a { color: var(--text); font-weight: 500; text-decoration-color: rgba(230, 237, 243, 0.35); }
.people a:hover { color: var(--blue); text-decoration-color: currentColor; }
.small-h { font: 500 13px var(--mono); color: var(--muted); margin-bottom: 10px; }
.support { list-style: none; margin: 0; padding: 0; }
.support li { font: 400 26px/1.5 var(--serif); }

/* work with us */
.doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 36px; text-align: left; }
.doors p { color: var(--muted); margin: 8px 0 10px; }
.doors a { display: inline-block; margin-right: 16px; overflow-wrap: anywhere; }
.hours { margin: 36px 0 0; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; text-align: left; }


/* scroll reveal: only while the script runs, never for people who ask for less motion */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .plate-move, .pin::before, .rung.now .rung-n::after, .bar.sealed { animation: none; }
  .js .race .bar.slow, .js .race .bar.par { transform: none; transition: none; }
  .js .asks li { opacity: 1; transform: none; transition: none; }
  .js .dots .hit { clip-path: none; transition: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* small screens (the header and footer live in shell.css) */
@media (max-width: 900px) {
  .drift { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .company-grid { grid-template-columns: 1fr; gap: 32px; }
  .doors, .connect { grid-template-columns: 1fr; gap: 16px; }
  .prow { grid-template-columns: 1fr auto; gap: 6px 16px; }
  .prow .state { grid-column: 2; grid-row: 1; }
  .prow dd:not(.state) { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  :root { --gutter: 20px; }
  body { font-size: 16px; }
  .hero { min-height: calc(100svh - 58px); }
  .lede { font-size: 16px; margin-top: 16px; }
  .scene { padding: 68px 0; }
  .say { font-size: 19px; }
  .drift .v { font-size: 22px; }
  .pair { grid-template-columns: 1fr; gap: 14px; }
  .squeeze { flex-direction: column; gap: 10px; }
  .squeeze .arrow { align-self: center; transform: rotate(90deg); font-size: 30px; line-height: 1; }
  .frames { grid-template-columns: 1fr; gap: 28px; }
  .timeline { grid-template-columns: 1fr 1fr; row-gap: 26px; }
  .race { gap: 26px; }
  .asks li { font-size: 21px; padding: 12px 0; }
  .season { padding: 22px 20px; }
  .season-t { font-size: 20px; }
  .lane { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .lane .track { grid-column: 1 / -1; grid-row: 2; }
  .lane.ai { padding-bottom: 20px; }
  .lane.ai .track::before { bottom: auto; top: 20px; }
  .timeline::before { display: none; }
  .rung { grid-template-columns: 44px minmax(0, 1fr); gap: 14px; }
  .rung-n { width: 44px; height: 44px; font-size: 17px; }
  .rung::before, .rung::after { left: 21px; }
  .rung:first-child::before, .rung:first-child::after, .rung.now::after { top: 38px; }
  .rung:last-child::before, .rung:last-child::after { height: 38px; }
  .rung .state, .rung.fold .state { grid-column: 2; text-align: left; padding-top: 0; }
  .rung.fold .rung-n { width: 34px; height: 34px; font-size: 14px; }
  details.rung-body > summary { min-height: 34px; }
  .finale { min-height: 560px; }
  .hours { flex-direction: column; align-items: flex-start; }
}
