/* ==========================================================================
   Futurision Novum — Base Reset, Typography, Browser Surfaces & Motion
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--text-1);
  background: var(--void);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  transition: background 0.35s var(--ease-smooth), color 0.35s var(--ease-smooth);
}

/* Browser surfaces — themed deliberately */
::selection { background: var(--selection-bg); color: var(--selection-text); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: var(--radius-pill);
}

input, textarea, select { caret-color: var(--accent); font: inherit; line-height: 1.5; color: inherit; }
button { font: inherit; line-height: 1.4; color: inherit; cursor: pointer; }

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

/* Typography Hierarchy */
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--text-1);
  text-wrap: balance;
}
h1 {
  font-size: var(--text-hero);
  font-weight: 700;
  letter-spacing: -0.032em;
  line-height: 1.08;
}
h2 { font-size: var(--text-3xl); line-height: 1.22; letter-spacing: -0.028em; }
h3 { font-size: var(--text-2xl); line-height: 1.32; }
h4 { font-size: var(--text-xl); line-height: 1.35; }

p { margin: 0; color: var(--text-2); max-width: 68ch; }
p + p { margin-top: var(--sp-4); }

a {
  color: inherit;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.24em;
}
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { max-width: 100%; display: block; }

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.tabular { font-variant-numeric: tabular-nums; }

.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;
}

.skip-link {
  position: fixed; top: -100px; left: var(--gutter); z-index: 300;
  padding: var(--sp-3) var(--sp-5);
  background: var(--accent); color: var(--text-on-accent);
  font-weight: 600; text-decoration: none; border-radius: var(--radius-pill);
  transition: top var(--dur-fast) ease;
}
.skip-link:focus { top: var(--sp-4); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* SVG monoline system */
.icon-svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-svg--lg { width: 22px; height: 22px; }

/* ─── Scroll-Driven Optical Choreography ───
   Elements stay visible by default (never trapped invisible).
   Sections gain subtle optical focus & scale elevation on entry. */
[data-reveal] {
  transition:
    transform var(--dur-reveal) var(--ease-out),
    opacity var(--dur-reveal) var(--ease-out);
  will-change: transform;
}
[data-reveal="staged"] {
  transform: translate3d(0, 22px, 0) scale(0.985);
}
[data-reveal="visible"] {
  transform: translate3d(0, 0, 0) scale(1);
}

[data-delay="1"] { transition-delay: 0.05s; }
[data-delay="2"] { transition-delay: 0.11s; }
[data-delay="3"] { transition-delay: 0.17s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-reveal="staged"],
  [data-reveal="visible"] {
    transform: none !important;
    transition: none !important;
  }
}

/* ─── Scroll Progress Hairline ─── */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px; z-index: 220;
  background: transparent; pointer-events: none;
}
.scroll-progress__bar {
  height: 100%; width: 100%;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(var(--scroll-progress, 0));
  will-change: transform;
}
