:root {
  --bg: #0a0a0a; --ink: #f2eee6; --ink-2: #a8a29a; --ink-3: #5f5b55; --rule: #1f1e1c; --accent: #2fbf8f;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 300 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #0a0a0a; }

/* The wick: one hairline that runs the length of the page. */
.wick { position: fixed; left: 50%; top: 0; width: 1px; height: 100%; background: linear-gradient(to bottom, transparent, #2a2926 15%, #2a2926 85%, transparent); opacity: 0; transform: scaleY(0); transform-origin: top; transition: opacity 1.2s ease 0.9s, transform 2.4s cubic-bezier(.2,.7,.2,1) 0.9s; pointer-events: none; z-index: 0; }
body.in .wick { opacity: 1; transform: scaleY(1); }

.wrap { position: relative; z-index: 1; width: min(1240px, 100% - 64px); margin: 0 auto; }
@media (max-width: 640px) { .wrap { width: min(1240px, 100% - 40px); } }

/* Nav */
header { position: sticky; top: 0; z-index: 5; backdrop-filter: blur(10px); background: rgba(10,10,10,0.7); border-bottom: 1px solid transparent; transition: border-color .4s; }
header.scrolled { border-color: var(--rule); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.mark { display: flex; align-items: center; gap: 12px; font-weight: 500; letter-spacing: 0.32em; font-size: 12px; text-transform: uppercase; }
.mark svg { width: 10px; height: 26px; display: block; }
.links { display: flex; gap: 28px; font-size: 13px; color: var(--ink-2); letter-spacing: 0.02em; }
.links a { position: relative; padding: 4px 0; transition: color .3s; }
.links a:hover, .links a[aria-current] { color: var(--ink); }
.links a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%; background: var(--ink); transform: scaleX(0); transform-origin: right; transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.links a:hover::after { transform: scaleX(1); transform-origin: left; }
.enter { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: 0.06em; padding: 10px 0 10px 18px; border-left: 1px solid var(--rule); color: var(--ink); white-space: nowrap; }
.enter .arrow { display: inline-block; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.enter:hover .arrow { transform: translate(3px, -3px); }
@media (max-width: 860px) { .links { display: none; } }

/* Reveal */
.r { opacity: 0; transform: translateY(18px); transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1); }
.r.on { opacity: 1; transform: none; }
.r[data-d="1"] { transition-delay: .12s } .r[data-d="2"] { transition-delay: .24s } .r[data-d="3"] { transition-delay: .36s } .r[data-d="4"] { transition-delay: .5s }

/* Hero */
.hero { min-height: calc(100vh - 72px); display: grid; align-content: center; padding: 8vh 0 12vh; }
.eyebrow { font-size: 11px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 40px; }
h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(56px, 10.5vw, 148px); line-height: 0.96; letter-spacing: -0.02em; }
h1 em { font-style: italic; color: var(--ink); }
h1 .line { display: block; overflow: hidden; }
h1 .line span { display: block; transform: translateY(110%); transition: transform 1.4s cubic-bezier(.2,.8,.2,1); }
body.in h1 .line:nth-child(1) span { transform: none; transition-delay: .25s }
body.in h1 .line:nth-child(2) span { transform: none; transition-delay: .4s }
.lede { max-width: 600px; margin: 48px 0 0; font-size: 18px; color: var(--ink-2); line-height: 1.7; }
.cta { margin-top: 56px; display: inline-flex; align-items: center; gap: 14px; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; padding-bottom: 8px; border-bottom: 1px solid var(--ink-3); transition: border-color .4s; }
.cta:hover { border-color: var(--ink); }
.cta .arrow { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.cta:hover .arrow { transform: translateX(6px); }

/* Sections */
section { padding: 14vh 0; border-top: 1px solid var(--rule); }
.num { font-size: 11px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 36px; display: flex; align-items: center; gap: 18px; }
.num::after { content: ""; height: 1px; width: 0; background: var(--rule); transition: width 1.6s cubic-bezier(.2,.7,.2,1) .3s; }
.num.on::after { width: 120px; }
h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 6.2vw, 88px); line-height: 1.0; letter-spacing: -0.015em; }
h2 em { font-style: italic; }
.two { display: grid; grid-template-columns: 5fr 6fr; gap: 72px; align-items: center; }
.two p { max-width: 480px; font-size: 17px; color: var(--ink-2); line-height: 1.75; margin: 32px 0 0; }
.two p + p { margin-top: 18px; }
.more { display: inline-block; margin-top: 28px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); border-bottom: 1px solid var(--ink-3); padding-bottom: 6px; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; gap: 44px; } }

/* Terminal frame */
.frame { position: relative; border: 1px solid var(--rule); background: #0d0d0d; border-radius: 6px; overflow: hidden; box-shadow: 0 60px 120px -60px rgba(0,0,0,.9); will-change: transform; }
.frame .bar { display: flex; align-items: center; gap: 22px; padding: 12px 18px; border-bottom: 1px solid var(--rule); font-size: 11px; letter-spacing: 0.08em; color: var(--ink-3); }
.frame .bar b { color: var(--ink); font-weight: 500; letter-spacing: 0.02em; }
.frame .bar .on { color: var(--ink); }
.frame .bar .live { margin-left: auto; display: flex; align-items: center; gap: 7px; color: var(--ink-2); }
.frame .bar .live i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); display: inline-block; }
.frame .head { display: flex; gap: 22px; align-items: baseline; padding: 16px 18px 0; font-size: 12px; color: var(--ink-2); }
.frame .head b { font-size: 14px; color: var(--ink); font-weight: 500; letter-spacing: .04em; }
.frame .head .px { color: var(--ink); font-variant-numeric: tabular-nums; }
.frame .head .up { color: var(--accent); }
.frame svg { display: block; width: 100%; height: auto; }
.frame .foot { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); }
.frame .foot div { padding: 12px 18px; font-size: 11px; color: var(--ink-3); letter-spacing: .06em; border-right: 1px solid var(--rule); }
.frame .foot div:last-child { border-right: 0; }
.frame .foot b { display: block; color: var(--ink-2); font-weight: 400; font-size: 13px; letter-spacing: 0; margin-top: 3px; font-variant-numeric: tabular-nums; }

/* Statement */
.statement { text-align: center; }
.statement h2 { max-width: 1000px; margin: 0 auto; }
.statement p { max-width: 560px; margin: 40px auto 0; font-size: 17px; color: var(--ink-2); line-height: 1.75; }
.q { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.6vw, 30px); color: var(--ink); margin-top: 48px; }

/* Desk */
.desk .top { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 56px; flex-wrap: wrap; }
.desk .tabs { display: flex; gap: 28px; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.desk .tabs span { position: relative; padding-bottom: 8px; }
.desk .tabs span.cur { color: var(--ink); }
.desk .tabs span.cur::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink); }
.desk p { max-width: 560px; color: var(--ink-2); font-size: 17px; line-height: 1.75; margin: 28px 0 0; }
.desk .frame { margin-top: 24px; }

/* Learn-by-operating list */
.terms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 56px; border-top: 1px solid var(--rule); }
.terms div { padding: 22px 22px 22px 0; border-bottom: 1px solid var(--rule); }
.terms b { display: block; font-weight: 500; font-size: 14px; color: var(--ink); letter-spacing: .02em; }
.terms span { display: block; margin-top: 6px; font-size: 13px; color: var(--ink-2); line-height: 1.6; }
@media (max-width: 900px) { .terms { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .terms { grid-template-columns: 1fr; } }

/* Long-form pages */
.page { padding: 10vh 0 12vh; }
.page .eyebrow { margin-bottom: 24px; }
.page h1 { font-size: clamp(44px, 7vw, 96px); }
.page .lede { margin-top: 32px; }
.prose { max-width: 720px; margin-top: 64px; }
.prose h2 { font-size: clamp(30px, 3.6vw, 44px); margin: 72px 0 20px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-family: var(--sans); font-weight: 500; font-size: 17px; margin: 40px 0 10px; color: var(--ink); }
.prose p { font-size: 17px; color: var(--ink-2); line-height: 1.8; margin: 0 0 18px; }
.prose p strong { color: var(--ink); font-weight: 500; }
.prose ul, .prose ol { padding-left: 20px; color: var(--ink-2); font-size: 17px; line-height: 1.8; margin: 0 0 18px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--ink); border-bottom: 1px solid var(--ink-3); }
.prose a:hover { border-color: var(--ink); }
.prose .rule { height: 1px; background: var(--rule); margin: 56px 0; }
.prose dl { margin: 0; }
.prose dt { font-family: var(--serif); font-size: 26px; margin-top: 44px; color: var(--ink); }
.prose dd { margin: 12px 0 0; font-size: 17px; color: var(--ink-2); line-height: 1.8; }
.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; margin: 40px 0 0; }
.pipeline div { padding: 18px; border-right: 1px solid var(--rule); font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.pipeline div:last-child { border-right: 0; }
.pipeline b { display: block; font-weight: 500; color: var(--ink); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 8px; }
@media (max-width: 800px) { .pipeline { grid-template-columns: 1fr; } .pipeline div { border-right: 0; border-bottom: 1px solid var(--rule); } .pipeline div:last-child { border-bottom: 0; } }
.toc { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 40px; font-size: 13px; color: var(--ink-2); }
.toc a { border-bottom: 1px solid var(--rule); padding-bottom: 3px; }
.toc a:hover { color: var(--ink); border-color: var(--ink); }
.note { border-left: 1px solid var(--accent); padding: 4px 0 4px 18px; color: var(--ink-2); font-size: 15px; margin: 24px 0; }

footer { border-top: 1px solid var(--rule); padding: 56px 0 40px; }
.fgrid { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; font-size: 13px; color: var(--ink-3); }
.fgrid .n { color: var(--ink); letter-spacing: .32em; text-transform: uppercase; font-size: 12px; font-weight: 500; margin-bottom: 10px; }
.fgrid .l { display: flex; gap: 22px; flex-wrap: wrap; }
.fgrid .l a { color: var(--ink-2); }
.fgrid .l a:hover { color: var(--ink); }
.fgrid .d { margin-top: 12px; max-width: 640px; line-height: 1.6; }
@media (max-width: 640px) { .fgrid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .r, h1 .line span, .wick, .num::after { transition: none !important; transform: none !important; opacity: 1 !important; width: 120px; }
}
