/* Self-hosted variable fonts (OFL), Latin subset: @fontsource-variable 5.3.0. */
@font-face { font-family: "Inter"; src: url("/static/fonts/inter.3100e775e8.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/static/fonts/jetbrains-mono.18be452724.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0c0e10;
  --bg-2: #14171a;
  --fg: #e8eaed;
  --muted: #9aa0a6;
  --line: #23272c;
  --accent: #3ddc84;
  --accent-ink: #06210f;
  --accent-soft: rgba(61, 220, 132, .12);
  --warn: #f0b429;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
/* Line icons, Lucide (ISC, static/img/lucide.LICENSE), from templates/icons.html. */
.ico { width: 28px; height: 28px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.75;
       stroke-linecap: round; stroke-linejoin: round; }

/* nav */
nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
      backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 16px; }
.logo { font: 600 15px var(--mono); text-decoration: none; }
.logo span { color: var(--accent); }
.links { display: flex; gap: 20px; align-items: center; font: 13px var(--mono); }
.links a { text-decoration: none; color: var(--muted); }
.links a:hover { color: var(--fg); }
.links .hide-sm { display: none; }
@media (min-width: 720px) { .links .hide-sm { display: inline; } }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 8px;
       font: 500 14px var(--mono); text-decoration: none; border: 1px solid var(--line); transition: border-color var(--dur-1) var(--ease-out), background var(--dur-1) var(--ease-out), scale var(--dur-1) var(--ease-out), filter var(--dur-1) var(--ease-out); }
.btn:hover { border-color: var(--fg); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }

/* hero */
header.hero { padding: 72px 0 56px; border-bottom: 1px solid var(--line); }
.prompt { font: 13px var(--mono); color: var(--muted); margin-bottom: 20px; }
.prompt b { color: var(--accent); font-weight: 500; }
h1 { font-size: clamp(34px, 6vw, 60px); line-height: 1.05; letter-spacing: -.03em; margin: 0 0 20px; font-weight: 700; }
h1 .accent { white-space: nowrap; }
.lede { font-size: 18px; color: var(--muted); max-width: 640px; margin: 0 0 32px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 48px; font: 13px var(--mono); color: var(--muted); }
.stats b { display: block; color: var(--fg); font-size: 20px; font-weight: 600; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.5fr 1fr; gap: 56px; } }

/* portrait: green duotone + scanlines, always (a hover-to-colour effect fired whenever
   the page scrolled the photo under a resting cursor, so the green seemed to vanish at random) */
.portrait { margin: 0; max-width: 360px; width: 100%; justify-self: center; }
.portrait .frame { position: relative; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden;
                   border: 1px solid var(--line); background: var(--bg-2); }
.portrait picture { display: block; width: 100%; height: 100%; }
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%;
                filter: grayscale(1) contrast(1.2) brightness(1.05); }
.portrait .frame::after { content: ""; position: absolute; inset: 0; background: var(--accent);
                          mix-blend-mode: color; pointer-events: none; }
.portrait .frame::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
                           background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0,0,0,.12) 2px 3px); }
.portrait figcaption { display: flex; justify-content: space-between; margin-top: 10px;
                       font: 12px var(--mono); color: var(--muted); }
.portrait figcaption b { color: var(--accent); font-weight: 500; }

/* sections */
section { padding: 72px 0; border-bottom: 1px solid var(--line); }
.label { font: 12px var(--mono); color: var(--accent); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
h2 { font-size: clamp(26px, 4vw, 38px); letter-spacing: -.02em; line-height: 1.15; margin: 0 0 16px; }
h3 { font-size: 19px; margin: 0 0 8px; }
.sub { color: var(--muted); max-width: 620px; margin: 0 0 40px; }

/* router */
.router { display: grid; gap: 16px; }
@media (min-width: 720px) { .router { grid-template-columns: 1fr 1fr; } }
.route { display: block; padding: 28px; border: 1px solid var(--line); border-radius: 12px;
         text-decoration: none; background: var(--bg-2); transition: border-color var(--dur-1) var(--ease-out), background var(--dur-1) var(--ease-out), scale var(--dur-1) var(--ease-out), filter var(--dur-1) var(--ease-out); }
.route:hover { border-color: var(--accent); }
.route .ico { width: 36px; height: 36px; margin-bottom: 16px; }
.route .who { font: 12px var(--mono); color: var(--muted); }
a.route :is(h2, h3) { margin: 8px 0; font-size: 22px; letter-spacing: normal; line-height: inherit; }
.route p { margin: 0; color: var(--muted); }

/* course */
.course { display: grid; gap: 32px; }
@media (min-width: 900px) { .course { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.terminal { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg-2); }
.terminal .bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.terminal .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.terminal .bar span { margin-left: 8px; font: 12px var(--mono); color: var(--muted); }
/* Roadmap: four weeks as stations on one line, ending live in production. */
.road { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 28px; }
.road::before { content: ""; position: absolute; left: 27px; top: 28px; bottom: 28px; width: 2px;
                background: linear-gradient(var(--line), var(--accent)); }
.road li { display: flex; align-items: center; gap: 20px; position: relative; }
.road .ico { width: 56px; height: 56px; padding: 14px; border-radius: 50%; background: var(--bg-2); border: 1px solid var(--line); }
.road .live .ico { background: var(--accent); border-color: var(--accent); stroke: var(--accent-ink); }
.road .wk { font: 12px var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.road h3 { margin: 2px 0 0; font-size: 18px; }
.road p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.price-card { border: 1px solid var(--accent); border-radius: 12px; padding: 28px; background: var(--accent-soft); }
@media (min-width: 900px) { .price-card { position: sticky; top: 80px; } }
.meta { font: 13px var(--mono); color: var(--muted); margin: 4px 0 20px; }
.checks { list-style: none; padding: 0; margin: 0 0 24px; }
.checks li { padding: 6px 0 6px 26px; position: relative; font-size: 15px; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-family: var(--mono); }
.price-card .btn { width: 100%; justify-content: center; }
.fine { font: 12px var(--mono); color: var(--muted); margin-top: 12px; text-align: center; }

/* services */
.services { display: grid; gap: 16px; }
@media (min-width: 900px) { .services { grid-template-columns: repeat(3, 1fr); } }
.svc { border: 1px solid var(--line); border-radius: 12px; padding: 28px; display: flex; flex-direction: column; }
.svc .ico { width: 36px; height: 36px; margin-bottom: 16px; }
.svc .tag { font: 12px var(--mono); color: var(--muted); }
.svc h3 { margin-top: 8px; }
.svc p { color: var(--muted); font-size: 15px; margin: 0 0 24px; }
.svc .foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.svc .amount { font: 600 22px var(--mono); }
.svc .amount small { font-size: 13px; color: var(--muted); font-weight: 400; }

/* proof */
.demo-flag { display: inline-block; font: 11px var(--mono); color: var(--warn); border: 1px dashed var(--warn);
             border-radius: 4px; padding: 2px 6px; margin-left: 8px; vertical-align: middle; }
.proof { display: grid; gap: 16px; }
@media (min-width: 720px) { .proof { grid-template-columns: repeat(3, 1fr); } }
.case { border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.case .tag { font-size: 12px; margin-bottom: 12px; }
.case .big { font: 700 44px/1.1 var(--mono); color: var(--accent); letter-spacing: -.02em; }
.case h3 { margin: 8px 0 0; font-size: 16px; font-weight: 500; color: var(--muted); }
.quotes { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 720px) { .quotes { grid-template-columns: 1fr 1fr; } }
blockquote { margin: 0; padding: 24px; border-left: 2px solid var(--accent); background: var(--bg-2); border-radius: 0 12px 12px 0; }
blockquote p { margin: 0 0 12px; }
blockquote cite { font: 12px var(--mono); color: var(--muted); font-style: normal; }

/* pet projects: build time as a bar chart, 1 month = the full track */
.pets { display: grid; gap: 8px; }
.pet { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; padding: 16px 20px;
       border: 1px solid var(--line); border-radius: 12px; text-decoration: none; transition: border-color var(--dur-1) var(--ease-out), scale var(--dur-1) var(--ease-out); }
@media (min-width: 720px) { .pet { grid-template-columns: 260px 1fr 88px; } }
a.pet:hover { border-color: var(--accent); }
.pet .name { font: 600 14px var(--mono); grid-column: 1 / -1; }
@media (min-width: 720px) { .pet .name { grid-column: auto; } }
.pet .name small { display: block; font: 13px var(--sans); color: var(--muted); }
.pet .ext { color: var(--muted); }
.pet .track { display: block; height: 12px; border-radius: 6px; background: var(--bg-2); }
.pet .track i { display: block; height: 100%; border-radius: 6px; background: var(--accent); transform-origin: 0 50%; }
.pet .d30 { width: 100%; } .pet .d14 { width: 46.7%; } .pet .d7 { width: 23.3%; } .pet .d2 { width: 6.7%; min-width: 12px; }
.pet .time { font: 700 16px var(--mono); color: var(--accent); text-align: right; }

/* playbook chapters: the table of contents as tiles */
.chapters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 480px) { .chapters { grid-template-columns: repeat(4, 1fr); } }
.chapters li { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--bg-2); font-size: 13px; line-height: 1.3;
               display: flex; align-items: baseline; gap: 8px; }
.chapters b { font: 700 14px var(--mono); color: var(--accent); }
@media (min-width: 480px) { .chapters li { display: block; padding: 10px 12px; } .chapters b { display: block; font-size: 18px; } }
.chapters .skill { grid-column: 1 / -1; border-color: var(--accent); background: var(--accent-soft); display: flex; align-items: center; gap: 12px; }
.chapters .skill b { display: inline; }

/* playbook opt-in */
.playbook { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .playbook { grid-template-columns: 1.3fr 1fr; gap: 56px; } }
.playbook .sub { margin-bottom: 24px; }
.optin { border: 1px solid var(--accent); background: var(--accent-soft); border-radius: 12px; padding: 28px;
         display: flex; flex-direction: column; gap: 10px; }
.optin input { font: 15px var(--mono); padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line);
               background: var(--bg); color: var(--fg); width: 100%; }
.optin input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.optin label { font: 13px var(--mono); color: var(--muted); }
.optin label .opt { opacity: .7; }
.optin input + label { margin-top: 6px; }
.optin .btn { justify-content: center; cursor: pointer; }
.optin .btn[disabled] { opacity: .6; cursor: wait; }
.optin .err { margin: 0; min-height: 1em; font: 12px var(--mono); color: var(--warn); }
.optin .fine { margin: 0; text-align: left; }

/* about */
.about { max-width: 760px; }
.about p { margin: 0 0 16px; }
.domains { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.domains span { font: 12px var(--mono); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; color: var(--muted); }

/* guides: straight links to the articles, a name and one line each; the tiles share the contact links' look */
.guides { display: grid; gap: 12px; }
@media (min-width: 720px) { .guides { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .guides { grid-template-columns: repeat(3, 1fr); } }
.guides b { display: block; font: 600 14px var(--mono); }
.guides span { font-size: 14px; color: var(--muted); }

/* faq */
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::after { content: "+"; font-family: var(--mono); color: var(--accent); transition: rotate var(--dur-4) var(--ease-snappy); }
details[open] summary::after { rotate: 45deg; }
details p { color: var(--muted); margin: 12px 0 0; max-width: 720px; }

/* contact */
.contact { display: grid; gap: 12px; }
@media (min-width: 720px) { .contact { grid-template-columns: repeat(2, 1fr); } }
.contact a, .guides a { border: 1px solid var(--line); border-radius: 10px; padding: 18px; text-decoration: none; transition: border-color var(--dur-1) var(--ease-out), background var(--dur-1) var(--ease-out), scale var(--dur-1) var(--ease-out), filter var(--dur-1) var(--ease-out); }
.contact a:hover, .guides a:hover { border-color: var(--accent); }
.contact .k { font: 12px var(--mono); color: var(--muted); display: block; }
.contact .v { font: 500 14px var(--mono); word-break: break-all; }
footer { padding: 32px 0 48px; font: 12px var(--mono); color: var(--muted); }
.quotes-label { margin-top: 56px; }
.quotes-note { margin-bottom: 24px; }
/* Pull quotes: one line each, big quote mark (home and course page). */
.quotes.pull { margin-top: 0; }
@media (min-width: 900px) { .quotes.pull { grid-template-columns: repeat(4, 1fr); } }
.pull blockquote { border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; }
.pull blockquote::before { content: "\201C"; font: 700 56px/.8 var(--sans); color: var(--accent); }
.pull blockquote p { font-size: 17px; font-weight: 600; line-height: 1.35; flex: 1; }

/* ---------- motion (tokens and keyframes: motion.css; moments: docs/01-design.md) ---------- */
/* Shared across pages: the View Transition carries these between home, course and playbook. */
.logo { view-transition-name: logo; }
.portrait .frame { view-transition-name: portrait; }

/* Press: a quick dip, at touch. */
.btn:active, .route:active, a.pet:active, .contact a:active, .guides a:active { scale: .97; }

/* Clickable cards that aren't buttons lift toward the pointer: only with a real mouse,
   never on touch (a tap would leave it stuck), and with no travel under reduced motion. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .route, a.pet, .contact a, .guides a {
    transition: translate var(--dur-2) var(--ease-out), border-color var(--dur-1) var(--ease-out), scale var(--dur-1) var(--ease-out);
  }
  .route:hover, a.pet:hover, .contact a:hover, .guides a:hover { translate: 0 -4px; }
}

/* A field filled in wrong: yellow outline always; a short shake unless motion is reduced. */
.optin input[aria-invalid="true"] { border-color: var(--warn); }
.optin input[aria-invalid="true"]:focus { outline-color: var(--warn); }
@media (prefers-reduced-motion: no-preference) {
  .shake { animation: shake-x var(--dur-4) var(--ease-out); }
}

@media (prefers-reduced-motion: no-preference) {
  /* Headline: words land one by one on a bouncy spring, once per page load. */
  .words .w { display: inline-block; animation: word-in var(--dur-6) var(--ease-bouncy) both; }
  .words .w:nth-of-type(2) { animation-delay: calc(var(--dur-step) * 1); }
  .words .w:nth-of-type(3) { animation-delay: calc(var(--dur-step) * 2); }
  .words .w:nth-of-type(4) { animation-delay: calc(var(--dur-step) * 3); }
  .words .w:nth-of-type(5) { animation-delay: calc(var(--dur-step) * 4); }
  .words .w:nth-of-type(n+6) { animation-delay: calc(var(--dur-step) * 5); }

  /* The rest of the hero follows the headline. */
  .hero .prompt { animation: fade-in var(--dur-3) var(--ease-out) both; }
  .hero .lede, .hero .meta-row { animation: rise var(--dur-5) var(--ease-smooth) both; animation-delay: calc(var(--dur-step) * 4); }
  .hero .cta-row { animation: rise var(--dur-5) var(--ease-smooth) both; animation-delay: calc(var(--dur-step) * 6); }
  .hero .stats { animation: rise var(--dur-5) var(--ease-smooth) both; animation-delay: calc(var(--dur-step) * 8); }
  .hero .portrait { animation: rise var(--dur-5) var(--ease-smooth) both; animation-delay: calc(var(--dur-step) * 3); }
}

/* Scroll-linked, CSS only. Browsers without scroll timelines show everything at once. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* The bar under the menu appears once the page scrolls. */
    nav { border-bottom-color: transparent; }
    nav::after { content: ""; position: absolute; inset: auto 0 0; height: 1px; background: var(--line); opacity: 0;
                 animation: shade-in linear both; animation-timeline: scroll(root); animation-range: 0 64px; }

    /* Sections rise into view as you reach them. */
    section .label, section h2, section .sub,
    .router > *, .playbook > *, .course > *, .services > *, .proof > *, .quotes > *, .pets > *,
    .about > *, .guides > *, details, .contact > *, .chapters li, .road li, .fit > div, .stack > div, .how > div, .teacher > *,
    .final .price-card, .excluded, .search-case, .pay-grid > * {
      animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 70%;
    }

    /* Result numbers stamp in when their card is half in view. */
    .case .big { display: inline-block; animation: stamp linear both; animation-timeline: view(); animation-range: entry 40% cover 35%; }

    /* Build-time bars grow from zero as their row comes in: the shrinking time is the point. */
    .pet .track i { animation: bar-grow linear both; animation-timeline: view(); animation-range: entry 30% cover 40%; }
  }
}

/* FAQ: the answer slides open under its question. */
@media (prefers-reduced-motion: no-preference) {
  details[open] > p { animation: answer-in var(--dur-3) var(--ease-out); }
}

/* ---------- footer, consent banner, Turnstile ---------- */
footer a, .linklike { color: var(--muted); }
footer a:hover, .linklike:hover { color: var(--fg); }
.linklike { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }

/* Consent banner (analytics.js): bottom right, slides up once on first visit. */
.consent { position: fixed; z-index: 20; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: min(420px, calc(100% - 32px));
           padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
           font-size: 14px; color: var(--muted); }
.consent[hidden] { display: none; }
.consent p { margin: 0 0 12px; }
.consent a { color: var(--fg); }
.consent-actions { display: flex; justify-content: flex-end; gap: 8px; }
.consent .btn { padding: 8px 14px; }
@media (prefers-reduced-motion: no-preference) {
  .consent { transition: translate var(--dur-5) var(--ease-smooth), opacity var(--dur-3) var(--ease-out),
                         display var(--dur-3) allow-discrete; }
  @starting-style { .consent:not([hidden]) { translate: 0 120%; opacity: 0; } }
}

/* Turnstile's box: empty until the widget renders; most visitors never see a challenge. */
.turnstile:empty { display: none; }
.turnstile { min-height: 0; }

/* Honeypot: a field people never see or reach; bots that fill it are dropped (api/leads). */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
