@import url("/static/brand.css");

:root {
  color-scheme: light;
  --bg: #fbf9f6;
  --ink: #1c1917;
  --ink-muted: #6b6560;
  /* Brand red: AA on --bg (6.7:1) and under white button text (7.0:1). */
  --red: #b0161c;
  --red-6: #8e1116;
  /* ASCII aurora ramp, faint to dense; index matches the character ramp in aurora.js. */
  --aurora-1: #f2dddb;
  --aurora-2: #e8c0c0;
  --aurora-3: #dfa4a4;
  --aurora-4: #d68889;
  --aurora-5: #cc6b6e;
  --aurora-6: #c34f52;
  --aurora-7: #b93237;
  --aurora-8: #b0161c;
  --aurora-9: #921217;
  --aurora-10: #780f13;
  --aurora-11: #5f0c0f;
  --rule: color-mix(in srgb, var(--ink-muted) 35%, transparent);
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.65;
}

/* Geist and Geist Mono, latin subset, variable weight; SIL OFL (web/fonts/OFL.txt). */
@font-face { font-family: "Geist"; font-weight: 100 900; font-display: swap; src: url(/static/fonts/geist.woff2) format("woff2"); }
@font-face { font-family: "Geist Mono"; font-weight: 100 900; font-display: swap; src: url(/static/fonts/geist-mono.woff2) format("woff2"); }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
main { max-width: 38rem; padding: 3.5rem 2rem 5rem; margin: 0 auto; }
a, .wordmark { color: var(--red); }
a { text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
.wordmark { display: inline-block; margin: 0 0 2.5rem; font-weight: 650; letter-spacing: -.01em; text-decoration: none; }
h1 { font-size: 1.65rem; line-height: 1.3; font-weight: 550; letter-spacing: -.015em; margin: 0 0 1.5rem; }
h2 { font-size: 1.15rem; font-weight: 600; margin: 0 0 1rem; }
h3 { font-size: 1rem; margin: 1.5rem 0 .5rem; }
p { margin: 0 0 1.25rem; }
section { margin-top: 3rem; }
nav { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; margin: -1rem 0 2.5rem; }
nav span { color: var(--ink-muted); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }
label { display: block; margin: 1.25rem 0 .4rem; }
input, select, textarea, button { font: inherit; }
input, select, textarea { width: 100%; color: inherit; background: transparent; border: 1px solid var(--ink-muted); border-radius: 2px; padding: .6rem .7rem; }
textarea { min-height: 9rem; resize: vertical; }
button, .button { color: var(--bg); background: var(--red); border: 1px solid var(--red); border-radius: 2px; padding: .55rem 1rem; cursor: pointer; }
a.button { display: inline-block; text-decoration: none; line-height: 1.4; }
button:hover, .button:hover { background: var(--red-6); border-color: var(--red-6); }
button:disabled { opacity: .6; cursor: default; }
form > button, form > .actions { margin-top: 1.5rem; }
button.quiet { color: var(--red); background: transparent; }
button.quiet:hover { background: transparent; border-color: var(--red); }
nav button { border: 0; padding: 0; text-decoration: underline; text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
[hidden] { display: none !important; }
.status { margin-top: 1rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.error { color: var(--red); }
.small { font-size: .9rem; color: var(--ink-muted); }
code, pre { font-family: var(--font-mono); font-size: .87rem; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.output { min-height: 4rem; }
.copy-text { user-select: all; overflow-wrap: anywhere; }
dl { margin: 1rem 0; }
dt { margin-top: .6rem; font-size: .9rem; color: var(--ink-muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: .85rem; }
th, td { padding: .6rem .6rem .6rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 600; }
td code { overflow-wrap: anywhere; }
ul { padding-left: 1.25rem; }
li { margin-bottom: .75rem; }

/* Landing: text on the left half, aurora canvas fixed to the right half. */
main.landing { min-height: 100svh; display: flex; flex-direction: column; max-width: none; margin: 0; padding: 0; }
:is(.landing, .manifesto-page) .topbar { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem clamp(1rem, 4vw, 4rem) 1.25rem clamp(1rem, 7vw, 7rem); }
:is(.landing, .manifesto-page) .wordmark { display: inline-flex; align-items: center; gap: .45em; margin: 0; font-family: var(--font-mono); font-weight: 600; letter-spacing: -.02em; }
:is(.landing, .manifesto-page) .account-links { background: var(--bg); padding: .5rem .65rem; flex-wrap: nowrap; gap: 1.5rem; margin: 0; font-family: var(--font-mono); font-size: .8rem; }
:is(.landing, .manifesto-page) .account-links a { color: var(--ink); text-decoration: none; white-space: nowrap; }
:is(.landing, .manifesto-page) .account-links a:hover { text-decoration: underline; }
:is(.landing, .manifesto-page) .account-links span { color: var(--red); }
.landing .copy { position: relative; z-index: 1; width: 50%; max-width: 44rem; min-height: 0; flex: 1; display: flex; flex-direction: column; justify-content: flex-start; margin: 0; padding: clamp(1rem, 3vh, 2.5rem) 2rem 1.5rem clamp(1rem, 7vw, 7rem); }
.landing h1 { font-size: clamp(2rem, 1.2rem + 2.6vw, 2.75rem); line-height: 1.1; font-weight: 600; letter-spacing: -.025em; margin: 0 0 1rem; text-wrap: balance; }
.landing-facts { display: flex; flex-wrap: wrap; gap: .4rem 1.75rem; list-style: none; padding: 0; margin: 0 0 1.5rem; font: .8rem/1.6 var(--font-mono); color: var(--ink); }
.landing-facts li { margin: 0; }
.landing-facts span { color: var(--red); }
.landing .copy > h1, .landing-facts, .landing-ctas { flex-shrink: 0; }
.landing .use-cases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem .75rem; list-style: none; padding: 0; margin: 0; }
.landing .use-cases li { position: relative; justify-self: start; min-width: 0; margin: 0; }
.landing .use-case { display: flex; align-items: center; gap: .65rem; width: auto; max-width: 100%; min-height: 44px; padding: .65rem 0; border: 0; border-radius: 4px; background: transparent; color: var(--ink); text-align: left; font-size: .85rem; line-height: 1.4; }
.landing .use-case span { min-width: 0; overflow-wrap: anywhere; }
.use-case svg { flex-shrink: 0; color: var(--ink-muted); transition: color 120ms; }
.landing .use-case:hover, .landing .use-case:focus-visible, .tooltip-open .use-case svg, .use-case:hover svg, .use-case:focus-visible svg { color: var(--red); }
.use-case-tooltip { display: none; position: absolute; z-index: 5; left: calc(100% + 10px); top: 50%; width: min(16rem, calc(100vw - 2rem)); padding: .85rem 1rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--bg); box-shadow: 0 6px 24px #1c191714; color: var(--ink); transform: translateY(-50%); animation: tooltip-appear 120ms ease-out; }
.use-case-tooltip::before { content: ""; position: absolute; left: -5px; top: calc(50% - 5px); width: 8px; height: 8px; background: var(--bg); border-left: 1px solid var(--rule); border-bottom: 1px solid var(--rule); transform: rotate(45deg); }
.use-case-tooltip::after { content: ""; position: absolute; right: 100%; top: 0; width: 12px; height: 100%; }
.tooltip-open .use-case-tooltip { display: block; }
@keyframes tooltip-appear { from { opacity: 0; } to { opacity: 1; } }
.tooltip-label { display: block; margin-bottom: .35rem; color: var(--red); font: .75rem/1.5 var(--font-mono); }
.use-case-tooltip p { margin: 0; font-size: .875rem; line-height: 1.5; }
.tooltip-left .use-case-tooltip { left: auto; right: calc(100% + 10px); }
.tooltip-left .use-case-tooltip::before { left: auto; right: -5px; transform: rotate(225deg); }
.tooltip-left .use-case-tooltip::after { right: auto; left: 100%; }
.tooltip-below .use-case-tooltip { left: 0; right: auto; top: calc(100% + 10px); transform: translateY(2px); }
.tooltip-below.tooltip-align-end .use-case-tooltip { left: auto; right: 0; }
.tooltip-below .use-case-tooltip::before { left: 16px; right: auto; top: -5px; transform: rotate(135deg); }
.tooltip-below.tooltip-align-end .use-case-tooltip::before { left: auto; right: 16px; }
.tooltip-below .use-case-tooltip::after { right: 0; top: -12px; width: 100%; height: 12px; }
.tooltip-below.tooltip-open .use-case-tooltip { transform: translateY(0); }
.tooltip-above .use-case-tooltip { top: auto; bottom: calc(100% + 10px); }
.tooltip-above .use-case-tooltip::before { top: auto; bottom: -5px; transform: rotate(-45deg); }
.tooltip-above .use-case-tooltip::after { top: auto; bottom: -12px; }
.manifesto-page main { max-width: 42rem; padding: clamp(3rem, 7vh, 6rem) 2rem 6rem; }
.manifesto-page .manifesto { font-size: 1rem; line-height: 1.8; }
:is(.landing, .manifesto-page) .manifesto-link { position: absolute; left: 50%; transform: translateX(-50%); }
.manifesto-page .manifesto p { margin: 0 0 1.1rem; }
.manifesto-page .manifesto figure { margin: 1.25rem 0; }
.manifesto-page .manifesto .manifesto-lead { margin: 0 0 1.4rem; color: var(--red); font-size: 1.35rem; line-height: 1.4; font-weight: 550; letter-spacing: -.01em; }
.manifesto-page .manifesto .manifesto-mark { margin: 2rem 0; }
.manifesto-page .manifesto .manifesto-mark img { display: block; width: 28px; height: 28px; }
.cve-chart { color: var(--ink-muted); font-family: var(--font-mono); }
.cve-chart .cve-title { margin-bottom: .6rem; font-size: .75rem; font-weight: 500; }
.cve-chart svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.cve-chart .cve-axis { fill: var(--ink-muted); font-size: 13px; }
.cve-chart .cve-grid { fill: none; stroke: var(--rule); stroke-width: .5; vector-effect: non-scaling-stroke; }
.cve-chart stop { stop-color: var(--red); }
.cve-chart .cve-area { fill: url(#cve-fill); }
.cve-chart .cve-line, .cve-chart .cve-projection { fill: none; stroke: var(--red); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.cve-chart .cve-projection { stroke-dasharray: 1 4; }
.cve-chart .cve-cursor { pointer-events: none; }
.cve-chart .cve-crosshair { fill: none; stroke: var(--ink-muted); stroke-width: .5; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.cve-chart .cve-dot { fill: var(--red); stroke: var(--bg); stroke-width: 1.5; }
.cve-chart .cve-tooltip rect { fill: var(--bg); stroke: var(--rule); }
.cve-chart .cve-tooltip text { fill: var(--ink); font-size: 11px; }
.cve-chart figcaption { margin-top: .4rem; font-size: .65rem; line-height: 1.6; }
.cve-chart.cve-draw .cve-line { animation: cve-trace 1.2s ease-out; }
.cve-chart.cve-draw .cve-area { animation: cve-fade 1.2s ease-out; }
.cve-chart.cve-draw .cve-projection { animation: cve-fade .3s 1.1s both; }
@keyframes cve-trace { from { stroke-dasharray: 1 1; stroke-dashoffset: 1; } to { stroke-dasharray: 1 1; stroke-dashoffset: 0; } }
@keyframes cve-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .cve-chart.cve-draw .cve-line, .cve-chart.cve-draw .cve-area, .cve-chart.cve-draw .cve-projection { animation: none; }
}
.landing-ctas { width: max-content; max-width: calc(100vw - clamp(1rem, 7vw, 7rem) - 2rem); display: flex; flex-wrap: wrap; align-items: stretch; gap: .75rem; margin: 1.5rem 0 0; }
.signup-cta { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; padding: .6rem .9rem; border: 1px solid var(--ink); border-radius: 6px; background: var(--ink); color: var(--bg); text-decoration: none; font: .8rem/1.3 var(--font-mono); transition: background 120ms, border-color 120ms; }
.signup-cta:hover { background: color-mix(in srgb, var(--ink) 85%, var(--bg)); border-color: color-mix(in srgb, var(--ink) 85%, var(--bg)); }
.preview-cta { display: inline-flex; align-items: stretch; max-width: 100%; border: 1px solid color-mix(in srgb, var(--red) 45%, transparent); border-radius: 6px; overflow: hidden; color: var(--ink); text-decoration: none; font: .8rem/1.3 var(--font-mono); transition: border-color 120ms, background 120ms; }
.preview-tag { display: flex; align-items: center; padding: .6rem .75rem; background: var(--red); color: var(--bg); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.preview-text { display: flex; align-items: center; gap: .5rem; padding: .6rem .9rem; }
.preview-text span { color: var(--red); transition: transform 120ms; }
.preview-cta:hover { border-color: var(--red); background: color-mix(in srgb, var(--red) 6%, var(--bg)); }
.preview-cta:hover .preview-text span { transform: translateX(3px); }
@media (max-width: 479px) { .preview-cta { flex-direction: column; } .preview-tag { padding: .4rem .75rem; } }
@media (min-width: 900px) and (min-height: 700px) {
  main.landing { height: 100svh; min-height: 0; }
  :is(.landing, .manifesto-page) .topbar, .landing .used-by { flex-shrink: 0; }
  .landing .copy { overflow: visible; }
}
.landing .used-by { position: relative; z-index: 1; width: auto; min-width: 0; margin: auto clamp(1rem, 7vw, 7rem) 1.5rem; padding: .9rem 1.4rem 1rem; border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 8px 30px -18px color-mix(in srgb, var(--ink) 35%, transparent); background: color-mix(in srgb, var(--bg) 75%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: var(--ink-muted); }
.used-by > p { margin: 0 0 .7rem; font-size: .75rem; text-align: center; }
.logo-carousel { overflow: hidden; mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent); }
.logo-track { display: flex; width: max-content; animation: logo-scroll 38s linear infinite; }
.logo-carousel:hover .logo-track { animation-play-state: paused; }
.logo-group { display: flex; align-items: center; gap: 3rem; flex: none; list-style: none; margin: 0; padding: 0 3rem 0 0; }
.logo-group li { display: flex; align-items: center; gap: .5rem; flex: none; margin: 0; font-size: 1.1rem; font-weight: 550; line-height: 1; white-space: nowrap; }
.company-logo { display: block; flex: none; height: 20px; width: 20px; background: currentColor; mask: var(--company-logo) center / contain no-repeat; }
.logo-databricks { --company-logo: url(/static/logos/databricks.svg); }
.logo-shopify { --company-logo: url(/static/logos/shopify.svg); width: 70px; }
.logo-anduril { --company-logo: url(/static/logos/anduril.svg); width: 109px; }
.logo-replit { --company-logo: url(/static/logos/replit.svg); width: 68px; }
.logo-vercel { --company-logo: url(/static/logos/vercel.svg); }
.logo-scale { --company-logo: url(/static/logos/scale.svg); width: 106px; }
.logo-ramp { --company-logo: url(/static/logos/ramp.svg); width: 71px; }
.logo-plaid { --company-logo: url(/static/logos/plaid.svg); width: 63px; height: 24px; }
.logo-robinhood { --company-logo: url(/static/logos/robinhood.svg); }
.used-by .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@keyframes logo-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .logo-track { display: block; width: auto; animation: none; }
  .logo-group { flex-wrap: wrap; gap: 1.5rem 2rem; padding: 0; }
  .use-case-tooltip { animation: none; }
  .use-case svg { transition: none; }
  .logo-group[aria-hidden="true"] { display: none; }
}
.aurora { position: fixed; top: 0; right: 0; width: 50%; height: 100vh; height: 100dvh; pointer-events: none; z-index: 0; overflow: hidden; background: var(--bg); }
.aurora canvas { display: block; width: 100%; height: 100%; }

@media (max-width: 899px) {
  :is(.landing, .manifesto-page) .topbar { flex-wrap: nowrap; gap: .5rem; padding: 1.25rem 1rem; }
  :is(.landing, .manifesto-page) .wordmark { flex-shrink: 0; white-space: nowrap; }
  :is(.landing, .manifesto-page) .account-links { gap: .75rem; margin-left: auto; padding: 0; }
  :is(.landing, .manifesto-page) .account-links a { display: inline-flex; align-items: center; gap: .4em; min-height: 44px; }
  .landing-ctas { width: auto; max-width: 100%; }
  .landing .copy { width: 100%; max-width: none; min-height: 0; justify-content: flex-start; padding: 2.5rem 1rem 4rem; }
  .landing .used-by { margin: 1rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px)); padding: .9rem 1rem 1rem; }
  :is(.landing, .manifesto-page) .topbar { order: -2; }
  .aurora { position: relative; order: -1; width: 100%; height: 38vh; height: 38svh; }
}
@media (max-width: 379px) {
  .landing .use-cases { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 400px) { main { padding: 2rem 1.25rem 4rem; } h1 { font-size: 1.5rem; } .landing h1 { font-size: 2rem; } }

@media (max-width: 599px) {
  :is(.landing, .manifesto-page) .topbar { flex-wrap: wrap; }
  :is(.landing, .manifesto-page) .manifesto-link { position: static; order: 1; flex-basis: 100%; justify-content: center; transform: none; }
  .manifesto-page main { padding: 2.5rem 1rem 4rem; }
}
