/* Tokens, reset and type. The palette carries over from the fusion prototype. */
:root {
  --accent: #7FD4FF;
  --accent-rgb: 127, 212, 255;
  --violet: #B3A6FF;
  --violet-rgb: 179, 166, 255;
  --ink: #E6ECFF;
  --body: #B9C7EE;
  --muted: #9DB0D8;
  --faint: #8397C4;
  --rule: rgba(157, 184, 255, 0.14);
  --display: 'Chakra Petch', 'Arial Narrow', sans-serif;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --serif: 'Instrument Serif', Georgia, serif;
  /* the small uppercase mono labels, in three tiers: what a section or card is (1), its details and
     controls (2), and the instruments' readings (3). Mono set as running text (captions, tooltips,
     tags) sits outside the scale */
  --label-1: 12.5px;
  --label-2: 11px;
  --label-3: 10px;
  --track-label: 0.14em;
  --track-micro: 0.12em;
  --gutter: clamp(20px, 4.4vw, 64px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: #010309;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  background: #010309 linear-gradient(172deg, #000105 0%, #01040E 30%, #030B22 62%, #020718 82%, #000105 100%);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: rgba(var(--accent-rgb), 0.35); color: #fff; }

/* Scrollbar: a hairline track with a glowing signal-gradient thumb. Chromium and Safari
   use the ::-webkit-scrollbar rules; Firefox gets the standard properties. */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #010309; box-shadow: inset 1px 0 0 rgba(157, 184, 255, 0.1); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--violet));
  border: 3px solid #010309;
  border-radius: 6px;
  box-shadow: inset 0 0 6px rgba(var(--accent-rgb), 0.6);
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #B5E7FF, #CFC6FF); }
::-webkit-scrollbar-corner { background: #010309; }
@supports (-moz-appearance: none) {
  html { scrollbar-color: rgba(var(--accent-rgb), 0.7) #010309; scrollbar-width: thin; }
}

a { color: #9FDDFF; text-decoration: none; }
a:hover { color: #EAF7FF; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

h1, h2, h3 { margin: 0; font-family: var(--display); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

h1 {
  font-weight: 700;
  font-size: clamp(46px, 6.4vw, 104px);
  line-height: 0.94;
  letter-spacing: -0.025em;
}
h2 {
  font-weight: 600;
  font-size: clamp(34px, 4.4vw, 64px);
  line-height: 1;
  letter-spacing: -0.015em;
}
h3 { font-weight: 600; font-size: clamp(28px, 2.6vw, 38px); line-height: 1.05; }

/* The one soft voice in a hard-edged system: an italic serif with the signal gradient. */
h1 em, h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  padding-right: 0.06em;
  background: linear-gradient(95deg, #F2FAFF 0%, var(--accent) 45%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 28px rgba(var(--accent-rgb), 0.35));
}
h1 em { font-size: 1.08em; }

.kicker {
  font-family: var(--mono);
  font-size: var(--label-1);
  letter-spacing: var(--track-label);
  color: var(--accent);
}

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 200;
  padding: 10px 14px; background: var(--accent); color: #010614;
  font-family: var(--mono); font-size: 13px;
}
.skip:focus { top: 16px; color: #010614; }

/* Scroll reveals (only when JS is running). */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
}
.js [data-reveal].in { opacity: 1; transform: none; }
.js .hero [data-reveal]:nth-child(3) { transition-delay: 0.25s; }
.js .hero [data-reveal]:nth-child(4) { transition-delay: 0.4s; }
.js .hero [data-reveal]:nth-child(5) { transition-delay: 0.55s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { transform: none; transition: opacity 0.4s linear; }
}
