/* =============================================================================
   BASE / RESET / SHARED PRIMITIVES
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 104px;
  color-scheme: dark;                               /* dark native scrollbars, no white overlay */
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.16) transparent; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font-family: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
.brand-mark img { border-radius: 24%; display: block; }
ul { list-style: none; }

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

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

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.26); }
::-webkit-scrollbar-corner { background: transparent; }

/* Layout helpers */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.serif { font-family: var(--font-display); }
.up { color: var(--up); }
.down { color: var(--down); }
.muted { color: var(--text-2); }

/* Eyebrow label */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px;
  border-radius: var(--r-pill);
  font-size: 14.5px; font-weight: 600;
  transition: transform .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-accent);
}
.btn-accent:hover { box-shadow: 0 14px 46px rgba(87,235,208,0.32); transform: translateY(-1px); }

.btn-ghost {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line-2);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--line-strong); background: rgba(255,255,255,0.06); }

.btn-sm { height: 38px; padding: 0 16px; font-size: 13px; }

/* Pills / tags */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 11px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.03em;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  color: var(--text-2);
}

/* Chip pos/neg */
.delta { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.delta.pos { color: var(--up); }
.delta.neg { color: var(--down); }

/* Section scaffolding */
section { position: relative; }
.section-pad { padding-block: clamp(72px, 11vw, 140px); }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
