/* ========================================================================
   The Rundown — base styles
   Sibling palette to howdyrunner.com with extra motion-friendly tokens.
   ======================================================================== */

:root {
  /* Inherited from HowdyRunner */
  --black: #1a1a1a;
  --dark: #2d2d2d;
  --gray: #777;
  --light-gray: #bbb;
  --warm-bg: #EFF3F5;
  --warm-bg-2: #E4EAED;
  --cream: #F6F8F9;
  --white: #fff;
  --rust: #3A7D96;
  --rust-light: #4A94B0;
  --rust-soft: rgba(58, 125, 150, 0.08);
  --rust-glow: rgba(58, 125, 150, 0.35);
  --sage: #7B8F9B;
  --warm-brown: #6B8490;

  /* Rundown-specific accents — for the "tool/scanner" feel */
  --scan: #FF6B3D;          /* warm orange — the active scanning color */
  --scan-soft: rgba(255, 107, 61, 0.12);
  --scan-glow: rgba(255, 107, 61, 0.4);
  --heat-low: #4A94B0;
  --heat-mid: #F4A261;
  --heat-high: #E63946;
  --confidence-high: #2A9D8F;
  --confidence-mid: #E9C46A;
  --confidence-low: #B0B0B0;

  /* Type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* Layout */
  --max-w: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(26, 26, 26, 0.05), 0 1px 3px rgba(26, 26, 26, 0.06);
  --shadow: 0 4px 24px rgba(26, 26, 26, 0.06), 0 12px 48px rgba(26, 26, 26, 0.08);
  --shadow-lg: 0 24px 80px rgba(26, 26, 26, 0.18);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--black);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

::selection { background: var(--scan); color: var(--white); }

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; font-family: inherit; background: none; color: inherit; }
img, svg { max-width: 100%; display: block; }
input, textarea { font-family: inherit; font-size: inherit; }

/* ========== Type scale ========== */

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rust);
}

.display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--black);
}

.display em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--rust);
}

h2.section-h {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  color: var(--dark);
  max-width: 56ch;
}

.muted { color: var(--gray); }
.tiny { font-size: 0.78rem; letter-spacing: 0.04em; }
.mono { font-family: var(--font-mono); font-size: 0.85rem; }

/* ========== Buttons ========== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.01em;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .25s var(--ease);
  white-space: nowrap;
  user-select: none;
}

.btn-primary {
  background: var(--black);
  color: var(--cream);
  box-shadow: var(--shadow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: var(--rust);
}
.btn-primary .arrow { transition: transform .35s var(--ease); }
.btn-primary:hover .arrow { transform: translateX(4px); }

.btn-ghost {
  background: transparent;
  color: var(--black);
  border: 1.5px solid rgba(26, 26, 26, 0.15);
}
.btn-ghost:hover {
  border-color: var(--black);
  background: var(--white);
}

.btn-scan {
  background: var(--scan);
  color: var(--white);
  box-shadow: 0 8px 24px var(--scan-glow);
}
.btn-scan:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px var(--scan-glow);
}

/* ========== Layout ========== */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  transition: background .4s var(--ease), box-shadow .4s var(--ease);
}
.nav.scrolled {
  background: rgba(246, 248, 249, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

.nav-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.nav-brand .by {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--gray);
  text-transform: uppercase;
}
.nav-brand a:hover .by { color: var(--rust); }

.nav-cta {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--dark);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-cta:hover { color: var(--rust); }

/* ========== Reveal animations (hooked from JS) ========== */

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
[data-reveal].in {
  opacity: 1;
  transform: none;
}
[data-reveal-delay="1"] { transition-delay: .08s; }
[data-reveal-delay="2"] { transition-delay: .16s; }
[data-reveal-delay="3"] { transition-delay: .24s; }
[data-reveal-delay="4"] { transition-delay: .32s; }
[data-reveal-delay="5"] { transition-delay: .40s; }

/* ========== Utilities ========== */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.chip-confidence-high { background: rgba(42, 157, 143, 0.12); color: var(--confidence-high); }
.chip-confidence-mid  { background: rgba(233, 196, 106, 0.18); color: #B58809; }
.chip-confidence-low  { background: rgba(176, 176, 176, 0.18); color: #555; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
