/* ============================================================
   FRANCISCO — base.css
   Tokens + reset + typography.
   Palette drawn from the subject itself: "paper" is graph-paper
   (efficiency frontiers, periodograms), "signal" is the deep blue
   of a network trace, "pulse" is the gold used for super-efficient
   (score > 1) results throughout the papers.
   ============================================================ */

:root {
  /* --- color: surfaces --- */
  --ink:        #10151d;
  --ink-soft:   #3a4250;
  --paper:      #eceef0;
  --paper-grid: #dfe3e6;
  --surface:    #ffffff;
  --line:       #ccd2d8;
  --line-soft:  #e2e6e9;

  /* --- color: accents --- */
  --signal:        #2f4b99;
  --signal-bright: #3d63c9;
  --signal-wash:   #e8ecf7;
  --pulse:         #b8862e;
  --pulse-wash:    #f6ecd8;
  --alert:         #a4402f;

  /* --- type --- */
  --font-display: "IBM Plex Mono", ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --font-body:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-data:    ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  /* --- scale --- */
  --step-0: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
  --step-1: clamp(1.15rem, 1.05rem + 0.4vw, 1.3rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.8vw, 1.9rem);
  --step-3: clamp(2rem, 1.6rem + 1.6vw, 2.8rem);
  --step-4: clamp(2.6rem, 1.9rem + 2.8vw, 4.2rem);

  --radius: 3px;
  --container: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * , *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background:
    linear-gradient(var(--paper-grid) 1px, transparent 1px) 0 0 / 100% 32px,
    var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { margin: 0 0 1em; max-width: 68ch; }
p:last-child { margin-bottom: 0; }

a { color: var(--signal); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--signal-bright); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--pulse);
  outline-offset: 3px;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.eyebrow {
  font-family: var(--font-data);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--signal);
  display: inline-block;
}

.lede {
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 62ch;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-data);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--ink); color: var(--surface); }
.btn-primary {
  background: var(--signal);
  border-color: var(--signal);
  color: #fff;
}
.btn-primary:hover { background: var(--signal-bright); border-color: var(--signal-bright); color: #fff; }

.section {
  padding-block: clamp(48px, 8vw, 96px);
}

.section-head {
  margin-bottom: clamp(28px, 5vw, 48px);
  max-width: 68ch;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-data);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  white-space: nowrap;
}
.badge-pulse {
  border-color: var(--pulse);
  color: #8a651c;
  background: var(--pulse-wash);
}
.badge-signal {
  border-color: var(--signal);
  color: var(--signal);
  background: var(--signal-wash);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-family: var(--font-data);
  font-size: 0.85rem;
}
