/* ============================================================================
   Who Is Wilson? — design tokens and base components
   ----------------------------------------------------------------------------
   Extracted from the design canvas (warm technical editorial direction),
   2026-09-03. Values are lifted from the artboards, not rounded to a grid.

   Include in a page head, in this order:

     <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
     <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Serif:wght@600;700&family=IBM+Plex+Mono:wght@400;500&display=swap">
     <link rel="stylesheet" href="/assets/wilson.css">

   The five existing marketing pages still carry their own inline <style> and are
   NOT yet converted — that is the design refresh, done separately. New pages
   should use this file so they are built in the new style once rather than twice.

   If a Content-Security-Policy is ever added to whoiswilson.com it must allow
   fonts.googleapis.com (style-src) and fonts.gstatic.com (font-src), or the
   faces fail silently and everything falls back to the system stack.
   ========================================================================= */

:root {
  /* ── Ink: text on light ─────────────────────────────────────────────── */
  --ink:            #2b2320;   /* headings, primary text */
  --ink-muted:      #5d534e;   /* body copy, list items */
  --ink-faint:      #8a7f78;   /* captions, disclaimers, metadata */

  /* ── Paper: light surfaces ──────────────────────────────────────────── */
  --paper:          #faf8f7;   /* page background */
  --paper-sunk:     #f2ece8;   /* recessed panels, footer */
  --surface:        #ffffff;   /* cards sitting on paper */
  --rule:           #e8e2de;   /* hairlines, card borders */
  --rule-strong:    #d4c8be;   /* secondary button borders */

  /* ── Brand ──────────────────────────────────────────────────────────── */
  --brand:          #8B2500;   /* primary actions, accents on light */
  --brand-hover:    #6d1d00;

  /* ── Night: the dark band and code panels ───────────────────────────── */
  --night:          #1c1512;   /* dark section background */
  --night-raised:   #241b17;   /* panel on top of night */
  --night-rule:     #3a2c25;
  --night-rule-2:   #4a3d36;
  --on-night:       #faf8f7;   /* headings on night */
  --on-night-muted: #a89a92;   /* body on night */
  --code:           #d9cfc8;   /* code text on night */

  /* Accents used only on dark surfaces — the brand rust is too dark to read
     against --night, so --ember carries the accent role there. */
  --ember:          #e08a5a;   /* step numbers, code keywords, accent on night */
  --leaf:           #9dbf8a;   /* correct answer, success */

  /* ── Type ───────────────────────────────────────────────────────────── */
  --font-display: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --font-sans:    "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --fs-display: 62px;   /* hero h1, desktop */
  --fs-h1:      42px;
  --fs-h2:      38px;
  --fs-h3:      22px;
  --fs-h4:      17px;
  --fs-lead:    19px;   /* hero subhead, section lead-in */
  --fs-body:    16px;
  --fs-sm:      15px;   /* card body — the most used size in the design */
  --fs-xs:      13px;   /* eyebrows, metadata */
  --fs-2xs:     12px;

  --lh-tight:  1.04;    /* display headings */
  --lh-snug:   1.3;
  --lh-body:   1.6;
  --lh-relaxed: 1.75;   /* code blocks */

  /* ── Space ──────────────────────────────────────────────────────────── */
  --space-1:   4px;
  --space-2:   8px;
  --space-3:   12px;
  --space-4:   16px;
  --space-5:   20px;
  --space-6:   24px;
  --space-8:   32px;
  --space-11:  44px;
  --space-16:  64px;
  --space-20:  80px;   /* page gutter, desktop */

  --radius-sm: 4px;    /* buttons */
  --radius-md: 6px;    /* small cards, list rows */
  --radius-lg: 8px;    /* cards, code panels */
  --radius-xl: 10px;   /* large feature panels */

  --shadow-panel: 0 24px 48px -24px rgba(28, 21, 18, 0.45);
  --measure: 34em;     /* comfortable line length for body copy */
}

/* ── Base ─────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); font-weight: 700; }
h2 { font-size: var(--fs-h2); font-weight: 700; }
h3 { font-size: var(--fs-h3); font-weight: 600; }
h4 { font-size: var(--fs-h4); font-weight: 600; }

p  { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }

code, pre { font-family: var(--font-mono); }

/* ── Layout ───────────────────────────────────────────────────────────── */

.wl-container { max-width: 1200px; margin: 0 auto; padding-inline: var(--space-20); }
.wl-section   { padding-block: var(--space-16); }
.wl-stack     { display: flex; flex-direction: column; gap: var(--space-5); }
.wl-row       { display: flex; align-items: center; gap: var(--space-4); }
.wl-measure   { max-width: var(--measure); }

/* Use gap-based layout throughout — margins between siblings do not survive
   direct manipulation in the canvas editor, and wrap badly at small widths. */
.wl-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-8); }
.wl-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }

@media (max-width: 900px) {
  .wl-grid-2, .wl-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .wl-container { padding-inline: var(--space-5); }
  :root { --fs-display: 38px; --fs-h1: 30px; --fs-h2: 27px; --fs-h3: 19px; }
}

/* ── Components ───────────────────────────────────────────────────────── */

.wl-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

.wl-btn {
  display: inline-block;
  font-size: var(--fs-body);
  font-weight: 600;
  padding: 15px 28px;      /* ≥44px hit target */
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
}
.wl-btn-primary { background: var(--brand); color: #fff; }
.wl-btn-primary:hover { background: var(--brand-hover); color: #fff; }
.wl-btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
  font-weight: 500;
}
.wl-btn-secondary:hover { background: var(--paper-sunk); color: var(--ink); }

.wl-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}
.wl-card p, .wl-card li { font-size: var(--fs-sm); color: var(--ink-muted); }

.wl-note {
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-6);
  font-size: var(--fs-sm);
  color: var(--ink-muted);
}

/* Dark band — a full-bleed section that inverts the palette. */
.wl-night { background: var(--night); color: var(--on-night); }
.wl-night h1, .wl-night h2, .wl-night h3, .wl-night h4 { color: var(--on-night); }
.wl-night p, .wl-night li { color: var(--on-night-muted); }
.wl-night a { color: var(--ember); }
.wl-night a:hover { color: #f0a173; }
.wl-step-number { font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500; color: var(--ember); }

/* Code panel — the quiz format is the product's differentiator, so it gets a
   deliberate treatment rather than a default <pre>. */
.wl-code {
  background: var(--night);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  overflow-x: auto;
}
.wl-code pre {
  margin: 0;
  font-size: var(--fs-xs);
  line-height: var(--lh-relaxed);
  color: var(--code);
  white-space: pre-wrap;
}
.wl-code .tok-key     { color: var(--ember); }
.wl-code .tok-correct { color: var(--leaf); }
.wl-code .tok-meta    { color: var(--ink-faint); }
.wl-code-filename {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--ink-faint);
  padding-bottom: var(--space-3);
}

/* ============================================================================
   Page chrome — shared by the content pages (howto, ai-quiz-questions, faq,
   pricing, privacy).

   These use the class names the existing markup already carries (.container,
   .btn, .tip, .type-card …) so a page converts by swapping its inline <style>
   for a link to this file, with no changes to its body. Ported from the
   original rules, re-expressed in tokens.
   ========================================================================= */

.container { max-width: 900px; margin: 0 auto; padding-inline: var(--space-5); }

/* ── Nav ──────────────────────────────────────────────────────────────── */
.site-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-4) var(--space-8);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.nav-brand {
  display: flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
  color: var(--ink); letter-spacing: -0.01em;
}
.nav-brand:hover { color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: var(--space-6); flex-wrap: wrap; }
.nav-links a { font-size: var(--fs-sm); color: var(--ink-muted); }
.nav-links a:hover { color: var(--brand); }
.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* .btn is the legacy name the content pages use; same treatment as
   .wl-btn-primary so buttons match across the site. */
.btn {
  display: inline-block;
  background: var(--brand); color: #fff;
  font-size: var(--fs-sm); font-weight: 600;
  padding: 12px 22px; border-radius: var(--radius-sm);
}
.btn:hover { background: var(--brand-hover); color: #fff; }

/* A .btn sitting inside the nav must keep its own colour. `.nav-links a`
   (0,1,1) otherwise beats `.btn` (0,1,0) and paints the label --ink-muted on
   rust — a 1.19:1 contrast ratio, effectively invisible. The original inline
   CSS hid this with `color: #fff !important`; this scopes to the nav instead,
   so .btn-outline (used on pricing, never in the nav) is unaffected. */
.nav-links a.btn, .nav-links a.btn:hover { color: #fff; }

/* ── Page hero ────────────────────────────────────────────────────────── */
.page-hero {
  text-align: center;
  padding-block: var(--space-16) var(--space-8);
  border-bottom: 1px solid var(--rule);
}
.page-hero h1 { font-size: var(--fs-h1); }
.page-hero p {
  color: var(--ink-muted); font-size: var(--fs-lead);
  max-width: 34em; margin: var(--space-4) auto 0;
}

.jump-links { display: flex; justify-content: center; gap: var(--space-3); flex-wrap: wrap; padding-top: var(--space-6); }
.jump-link {
  padding: 9px 16px; font-size: var(--fs-xs); font-weight: 500;
  color: var(--brand); background: var(--paper-sunk);
  border: 1px solid var(--rule); border-radius: 999px;
}
.jump-link:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ── Prose ────────────────────────────────────────────────────────────── */
.content { padding-block: var(--space-11) var(--space-16); }
.content h2 { margin-top: var(--space-11); margin-bottom: var(--space-4); }
.content h3 { margin-top: var(--space-8); margin-bottom: var(--space-3); }
.content p  { margin-bottom: var(--space-4); color: var(--ink-muted); }
.content ul, .content ol { margin: 0 0 var(--space-4) var(--space-5); }
.content li { margin-bottom: var(--space-2); color: var(--ink-muted); }

/* ── Code ─────────────────────────────────────────────────────────────── */
.content pre {
  background: var(--night); color: var(--code);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  overflow-x: auto;
  font-size: var(--fs-xs); line-height: var(--lh-relaxed);
  margin: var(--space-4) 0 var(--space-6);
}
p code, li code {
  background: var(--paper-sunk); color: var(--brand);
  padding: 2px 6px; border-radius: var(--radius-sm); font-size: 0.9em;
}
/* Syntax roles, re-mapped from the original VS Code palette onto the warm
   scheme — the blues and greens clashed with everything around them. */
pre .hl-comment { color: var(--ink-faint); }
pre .hl-key     { color: var(--ember); }
pre .hl-string  { color: var(--leaf); }
pre .hl-heading { color: var(--ember); font-weight: 700; }
pre .hl-option  { color: var(--on-night-muted); }

/* ── Callout ──────────────────────────────────────────────────────────── */
/* Was a left-border accent bar; now a plain bordered panel, consistent with
   .wl-note and the rest of the refreshed design. */
.tip {
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-6);
  margin: var(--space-5) 0;
}
.tip p { margin: 0; font-size: var(--fs-sm); color: var(--ink-muted); }
.tip strong { color: var(--ink); }

/* ── Numbered steps ───────────────────────────────────────────────────── */
.steps-list { list-style: none; padding: 0; counter-reset: step-counter; margin-left: 0; }
.steps-list li {
  counter-increment: step-counter;
  padding: var(--space-3) 0 var(--space-3) var(--space-11);
  position: relative;
}
.steps-list li::before {
  content: counter(step-counter);
  position: absolute; left: 0; top: 10px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand); color: #fff;
  font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}

/* ── Cards in prose ───────────────────────────────────────────────────── */
.type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); margin: var(--space-4) 0 var(--space-6); }
.type-card { background: var(--paper-sunk); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: var(--space-5); }
.type-card h4 { color: var(--brand); margin-bottom: var(--space-1); }
.type-card p { font-size: var(--fs-sm); color: var(--ink-muted); margin: 0; }

/* ── Footer ───────────────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--rule); background: var(--paper-sunk); padding-block: var(--space-8); }
footer p { font-size: var(--fs-xs); color: var(--ink-faint); text-align: center; margin-top: var(--space-4); }
.footer-links { display: flex; gap: var(--space-6); flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: var(--fs-xs); color: var(--ink-muted); }
.footer-links a:hover { color: var(--brand); }

/* ── Entrance animation ───────────────────────────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.animate { opacity: 0; animation: fadeUp 0.6s ease forwards; }
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  .animate, .animate-delay-1, .animate-delay-2 { animation: none; opacity: 1; }
}

@media (max-width: 900px) {
  .site-nav { padding: var(--space-4) var(--space-5); }
  .nav-links { gap: var(--space-4); }
  .type-grid { grid-template-columns: minmax(0, 1fr); }
}
