/* =========================================================
   QuantsInfra — Design Tokens & Base
   ========================================================= */

:root {
  /* Color */
  --ink: #0E1626;
  --ink-soft: #16213A;
  --paper: #F7F7F3;
  --paper-dim: #EFEEE7;
  --line: #DEDCD2;
  --slate: #3B4A63;
  --slate-soft: #64738C;
  --teal: #14A69D;
  --teal-deep: #0C7A73;
  --teal-light: #5ED3CA;
  --amber: #D98E2B;
  --white: #FFFFFF;

  /* Type */
  --font-display: "Space Grotesk", "IBM Plex Sans", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;

  /* Scale (1.25 ratio) */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1:  clamp(1.25rem, 1.15rem + 0.4vw, 1.4rem);
  --step-2:  clamp(1.6rem, 1.4rem + 0.8vw, 1.95rem);
  --step-3:  clamp(2.05rem, 1.7rem + 1.4vw, 2.75rem);
  --step-4:  clamp(2.6rem, 2rem + 2.4vw, 3.9rem);
  --step-5:  clamp(3.2rem, 2.3rem + 3.6vw, 5.2rem);

  /* Layout */
  --content-max: 1200px;
  --text-max: 68ch;
  --radius-sm: 6px;
  --radius-md: 10px;
  --nav-h: 88px;
  --shadow-sm: 0 1px 2px rgba(14,22,38,0.04), 0 1px 1px rgba(14,22,38,0.03);
  --shadow-md: 0 8px 24px rgba(14,22,38,0.08), 0 2px 6px rgba(14,22,38,0.04);
  --shadow-lg: 0 20px 48px rgba(14,22,38,0.14), 0 6px 16px rgba(14,22,38,0.06);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root { color-scheme: light; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
svg { display: block; }

a {
  color: inherit;
  text-decoration: none;
}

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

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

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: var(--step-1);
  color: var(--slate);
  max-width: var(--text-max);
}

.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.section {
  padding-block: clamp(3.5rem, 8vw, 7rem);
}

.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }

.section--ink {
  background: var(--ink);
  color: var(--paper);
}
.section--ink h1, .section--ink h2, .section--ink h3, .section--ink h4 {
  color: var(--paper);
}
.section--ink .lede { color: #B7C0D1; }

.section--dim { background: var(--paper-dim); }

.grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step--1);
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.18s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--teal);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(14,22,38,0.06), 0 6px 16px rgba(20,166,157,0.22);
}
.btn--primary:hover {
  background: var(--teal-light);
  box-shadow: 0 2px 4px rgba(14,22,38,0.08), 0 10px 24px rgba(20,166,157,0.3);
  transform: translateY(-1px);
}
.btn--primary:active { transform: translateY(0); }

.btn--ghost-light {
  background: transparent;
  color: var(--paper);
  border-color: rgba(247,247,243,0.35);
}
.btn--ghost-light:hover { border-color: var(--teal-light); color: var(--teal-light); }

.btn--ghost-dark {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost-dark:hover { border-color: var(--teal-deep); color: var(--teal-deep); }

.btn--block { width: 100%; justify-content: center; }

/* Eyebrow-style label used sparingly, sentence case (not tracked caps) */
.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--teal-deep);
  background: rgba(20,166,157,0.08);
  border: 1px solid rgba(20,166,157,0.22);
  padding: 0.32rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}
.section--ink .kicker {
  color: var(--teal-light);
  background: rgba(94,211,202,0.12);
}

hr.rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}
