/* Tokens copied verbatim from pcar-buddy src/styles/global.css. Change them
   there first, then copy outward. */
:root {
  --c-bg: #fcfcfb;
  --c-surface: #ffffff;
  --c-surface-2: #f4f4f2;
  --c-ink: #16161a;
  --c-ink-2: #55595f;
  --c-ink-3: #8b9098;
  --c-rule: #e6e6e3;
  --c-rule-2: #d2d2ce;
  --c-accent: #c1121f;
  --c-accent-soft: #fdeced;
  --c-crit: #b3261e;
  --c-major: #9a6100;
  --c-minor: #5b6470;
  --c-ok: #1f6f43;
  --c-src: #067647;
  --c-src-none: #8b9098;
  --shadow-card: 0 1px 2px rgb(16 16 26 / 0.04);
  --c-hero: #131316;
  --c-hero-ink: #f7f7f5;
  --c-hero-ink-2: #a2a6ad;
  --c-hero-rule: #2c2c33;
}

:root[data-theme='dark'] {
  --c-bg: #0e0e11;
  --c-surface: #16161a;
  --c-surface-2: #1d1d22;
  --c-ink: #f0f0ee;
  --c-ink-2: #a8adb5;
  --c-ink-3: #6f757e;
  --c-rule: #26262c;
  --c-rule-2: #34343c;
  --c-accent: #ff5a5f;
  --c-accent-soft: #2a1416;
  --c-crit: #ff6b60;
  --c-major: #e0a33a;
  --c-minor: #8d97a5;
  --c-ok: #4cc38a;
  --c-src: #3ddc97;
  --c-src-none: #6f757e;
  --shadow-card: 0 1px 2px rgb(0 0 0 / 0.4);
  --c-hero: #08080a;
  --c-hero-ink: #f7f7f5;
  --c-hero-ink-2: #9aa0a8;
  --c-hero-rule: #26262c;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --c-bg: #0e0e11;
    --c-surface: #16161a;
    --c-surface-2: #1d1d22;
    --c-ink: #f0f0ee;
    --c-ink-2: #a8adb5;
    --c-ink-3: #6f757e;
    --c-rule: #26262c;
    --c-rule-2: #34343c;
    --c-accent: #ff5a5f;
    --c-accent-soft: #2a1416;
    --c-crit: #ff6b60;
    --c-major: #e0a33a;
    --c-minor: #8d97a5;
    --c-ok: #4cc38a;
    --c-src: #3ddc97;
    --c-src-none: #6f757e;
    --shadow-card: 0 1px 2px rgb(0 0 0 / 0.4);
    --c-hero: #08080a;
    --c-hero-ink: #f7f7f5;
    --c-hero-ink-2: #9aa0a8;
    --c-hero-rule: #26262c;
  }
}

/* Self-hosted fonts, same files and ranges as pcar-buddy src/styles/fonts.css. */
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url('fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url('fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url('fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url('fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--c-bg); color-scheme: light; -webkit-text-size-adjust: 100%; }
:root[data-theme='dark'] { color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) { color-scheme: dark; } }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 0.875rem;
  line-height: 1.45rem;
  font-feature-settings: 'cv05' 1, 'ss01' 1;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--c-accent); color: #fff; }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, p { margin: 0; }
svg { display: block; }

.mono, .num { font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace; font-variant-numeric: tabular-nums; }
.label {
  font-size: 0.6875rem;
  line-height: 1rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--c-ink-3);
  font-weight: 500;
}
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }

/* ---- header (pcarbuddy.com chrome) ---------------------------------------- */
header {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid var(--c-rule);
  background: color-mix(in srgb, var(--c-bg) 90%, transparent);
  backdrop-filter: blur(4px);
}
header .wrap { display: flex; align-items: center; gap: 24px; height: 48px; max-width: 1400px; }
.wordmark { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.wordmark span { color: var(--c-accent); }
.head-right { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.navlink { border-radius: 4px; padding: 4px 8px; font-size: 0.8125rem; color: var(--c-ink-2); transition: background 0.12s; white-space: nowrap; }
.navlink:hover { background: var(--c-surface-2); }
#theme-toggle {
  margin-left: 4px; display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: 4px; border: 1px solid var(--c-rule); background: none; color: var(--c-ink-2); cursor: pointer;
}
#theme-toggle:hover { background: var(--c-surface-2); }

/* ---- chips (outlined, 4px radius; never filled) --------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--c-rule-2); border-radius: 4px;
  padding: 6px 12px; font-size: 0.8125rem; color: var(--c-ink);
  background: var(--c-surface); transition: border-color 0.12s, color 0.12s;
}
a.chip:hover { border-color: var(--c-accent); }
.chip-lg { padding: 10px 16px; font-size: 0.875rem; font-weight: 500; }
.chip[aria-disabled='true'] { cursor: default; }
.chip .soon { color: var(--c-ink-3); font-weight: 400; }

/* ---- sections ------------------------------------------------------------- */
section { border-top: 1px solid var(--c-rule); padding: 56px 0; }
section.hero { border-top: 0; padding: 56px 0 48px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.sec-head h2 { font-size: 1.5rem; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; margin-top: 6px; max-width: 22ch; }

.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 4fr 7fr; gap: 40px; } }
.hero h1 { font-size: 2.5rem; line-height: 1.02; font-weight: 600; letter-spacing: -0.03em; text-wrap: balance; }
@media (min-width: 640px) { .hero h1 { font-size: 3.5rem; } }
.hero .sub { margin-top: 16px; color: var(--c-ink-2); font-size: 1rem; line-height: 1.5rem; max-width: 34ch; }
.hero .ctas { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }

.card {
  border: 1px solid var(--c-rule); border-radius: 4px; background: var(--c-surface);
  box-shadow: var(--shadow-card);
}

/* Org chart */
.org { width: 100%; height: auto; overflow: visible; }
.org .node { fill: var(--c-surface); stroke: var(--c-rule-2); }
.org .node-you { fill: var(--c-surface-2); stroke: var(--c-ink-3); }
.org .staff { fill: var(--c-surface-2); stroke: var(--c-rule); }
.org .wire { stroke: var(--c-rule-2); fill: none; }
.org .wire-live { stroke: var(--c-ink-3); fill: none; stroke-dasharray: 3 5; animation: flow 1.6s linear infinite; }

.org .t1 { fill: var(--c-ink); font: 600 14px 'Inter', sans-serif; }
.org .t2 { fill: var(--c-ink-3); font: 500 10.5px 'JetBrains Mono', monospace; }
.org .t3 { fill: var(--c-ink-2); font: 500 9.5px 'Inter', sans-serif; letter-spacing: 0.06em; text-transform: uppercase; }
.org .icon { stroke: var(--c-ink-2); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
@keyframes flow { to { stroke-dashoffset: -16; } }
@media (prefers-reduced-motion: reduce) { .org .wire-live { animation: none; } }

/* Stat strip */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats .num { display: block; margin-top: 4px; font-size: 1.5rem; line-height: 2rem; font-weight: 500; }
.stats small { display: block; color: var(--c-ink-3); font-size: 0.75rem; line-height: 1.1rem; margin-top: 2px; }

/* Steps */
.steps { display: grid; gap: 16px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { padding: 20px; }
.step svg { width: 100%; height: auto; margin-bottom: 16px; }
.step .row { display: flex; align-items: baseline; gap: 10px; }
.step .n { color: var(--c-ink-3); }
.step h3 { font-size: 0.9375rem; font-weight: 600; }

/* Shared illustration strokes */
.ill .box { fill: var(--c-surface-2); stroke: var(--c-rule-2); }
.ill .box-w { fill: var(--c-surface); stroke: var(--c-rule-2); }
.ill .ln { stroke: var(--c-ink-3); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ill .ln-strong { stroke: var(--c-ink); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ill .bar { fill: var(--c-rule-2); }
.ill .bar-strong { fill: var(--c-ink-3); }
.ill .tx { fill: var(--c-ink); font: 600 11px 'Inter', sans-serif; }
.ill .tm { fill: var(--c-ink-3); font: 500 10px 'JetBrains Mono', monospace; }
.ill .tm-ink { fill: var(--c-ink-2); font: 500 10px 'JetBrains Mono', monospace; }
.ill .absent { fill: none; stroke: var(--c-rule-2); stroke-dasharray: 4 4; }
.ill .absent-tx { fill: var(--c-ink-3); font: 500 10px 'JetBrains Mono', monospace; }

/* Ownership diagram */
.own { display: grid; gap: 24px; align-items: center; }
@media (min-width: 960px) { .own { grid-template-columns: 7fr 5fr; gap: 48px; } }
.own svg { width: 100%; height: auto; }
.facts { display: grid; gap: 0; }
.fact { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--c-rule); }
.fact:first-child { border-top: 0; }
.fact svg { width: 20px; height: 20px; margin-top: 1px; }
.fact b { display: block; font-weight: 600; }
.fact span { color: var(--c-ink-2); font-size: 0.8125rem; }

/* Companies + conversation */
.duo { display: grid; gap: 16px; }
@media (min-width: 900px) { .duo { grid-template-columns: 1fr 1fr; } }
.panel { padding: 20px; }
.panel .label { margin-bottom: 14px; }
.tree { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.8125rem; line-height: 1.75rem; color: var(--c-ink-2); }
.tree .d { color: var(--c-ink); font-weight: 500; }
.tree .i { color: var(--c-ink-3); }
.tree svg { display: inline-block; vertical-align: -3px; margin-right: 8px; }

.chat { display: grid; gap: 12px; }
.msg { display: grid; grid-template-columns: 30px 1fr; gap: 10px; }
.av {
  width: 30px; height: 30px; border-radius: 4px; display: grid; place-items: center;
  font: 600 10px 'JetBrains Mono', monospace; border: 1px solid var(--c-rule-2); background: var(--c-surface-2); color: var(--c-ink-2);
}
.av.you { background: var(--c-surface); }
.msg .who { font-size: 0.75rem; color: var(--c-ink-3); }
.msg .who b { color: var(--c-ink); font-weight: 600; margin-right: 6px; }
.msg p { margin-top: 2px; }
.delegated { margin-left: 40px; display: flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--c-ink-3); }
.meta { margin-left: 40px; display: flex; flex-wrap: wrap; gap: 6px; }
.meta .chip { padding: 2px 8px; font-size: 0.6875rem; font-family: 'JetBrains Mono', monospace; color: var(--c-ink-2); }

/* Channels */
.channels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 760px) { .channels { grid-template-columns: repeat(4, 1fr); } }
.channel { padding: 18px; display: grid; gap: 14px; }
.channel svg { width: 36px; height: 36px; }
.channel .top { display: flex; justify-content: space-between; align-items: flex-start; }
.channel h3 { font-size: 0.875rem; font-weight: 600; }
/* "Later" is lighter, not a different hue, and says so in words. */
.channel.later { background: transparent; border-style: dashed; box-shadow: none; }
.channel.later h3, .channel.later svg { opacity: 0.55; }
.status { font-size: 0.6875rem; letter-spacing: 0.07em; text-transform: uppercase; font-weight: 500; }
.status.now { color: var(--c-ink); }
.status.later { color: var(--c-ink-3); }

/* Closing */
.closing { text-align: center; padding: 72px 0; }
.closing h2 { font-size: 2rem; line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; }
.closing .ctas { margin-top: 24px; display: flex; justify-content: center; }

footer { border-top: 1px solid var(--c-rule); padding: 20px 0 32px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--c-ink-3); font-size: 0.75rem; }
