:root {
  /* Palette */
  --bg: #0a0a0b;
  --bg-elev: #111114;
  --bg-elev-2: #16161a;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f4ef;
  --text-muted: rgba(245, 244, 239, 0.6);
  --text-quiet: rgba(245, 244, 239, 0.42);
  --accent: #ff7a45;
  --accent-soft: rgba(255, 122, 69, 0.16);
  --accent-glow: rgba(255, 122, 69, 0.5);
  --good: #5ce0a8;
  --warm: #ffb66c;

  /* Type */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Instrument Serif", "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --text-base: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  --display: clamp(2.75rem, 1.6rem + 5.4vw, 6.75rem);
  --display-sm: clamp(2rem, 1.4rem + 2.8vw, 3.75rem);
  --eyebrow: 0.78rem;

  /* Spacing */
  --space-section: clamp(5rem, 4rem + 4vw, 9rem);
  --space-block: clamp(2rem, 1.5rem + 1.5vw, 3.5rem);
  --container: 1240px;
  --radius: 14px;
  --radius-lg: 22px;

  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
  --duration-fast: 180ms;
  --duration-base: 320ms;
  --duration-slow: 700ms;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html, body { background: var(--bg); }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--text);
  letter-spacing: -0.005em;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

button { font: inherit; color: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
ul { padding: 0; margin: 0; list-style: none; }

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* Typography helpers */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--display);
  line-height: 0.96;
  letter-spacing: -0.02em;
  margin: 0.4em 0 0.55em;
}

.display-line {
  display: block;
}

.display em,
.display-em {
  font-style: italic;
  color: var(--accent);
}

.display-sm {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--display-sm);
  line-height: 1.02;
  letter-spacing: -0.018em;
  margin: 0 0 1rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--eyebrow);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 1.4rem;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.lede {
  font-size: clamp(1.1rem, 1rem + 0.3vw, 1.25rem);
  color: var(--text-muted);
  max-width: 36ch;
  margin: 0;
  line-height: 1.55;
}

.section-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-quiet);
  margin-bottom: 1.4rem;
}

.section-lede {
  font-size: clamp(1.05rem, 1rem + 0.2vw, 1.18rem);
  color: var(--text-muted);
  max-width: 56ch;
  line-height: 1.6;
}

kbd {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.18rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  color: var(--text);
  background: var(--bg-elev-2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.78rem 1.15rem;
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform var(--duration-fast) var(--ease-out-soft),
              background-color var(--duration-base) var(--ease-out-soft),
              color var(--duration-base) var(--ease-out-soft),
              border-color var(--duration-base) var(--ease-out-soft);
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }

.btn-lg {
  padding: 1rem 1.4rem;
  font-size: 0.98rem;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: #ff8e60;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-arrow {
  display: inline-block;
  transition: transform var(--duration-base) var(--ease-out-soft);
}
.btn:hover .btn-arrow { transform: translateX(3px); }

.link-quiet {
  font-size: 0.92rem;
  color: var(--text-muted);
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  transition: color var(--duration-fast) ease;
}
.link-quiet:hover { color: var(--text); }

/* Subtle film grain */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
