/* ==========================================================================
   Glacier — reset, typography, layout primitives.
   ========================================================================== */

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

html {
  /* Fluid root size — every rem scales with the viewport. */
  font-size: clamp(15px, 0.6vw + 13px, 19px);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--s-5));
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  background: var(--bg-0);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.is-locked { overflow: hidden; }

/* ---------------------------------------------- the aurora (Exodus mesh) -- */
/* Big, soft, saturated colour blobs drifting behind everything. This is the
   signature look — no technical grid, just light. */
body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(38% 40% at 14% 6%,  color-mix(in srgb, var(--azure) 60%, transparent) 0%, transparent 62%),
    radial-gradient(36% 42% at 88% 2%,  color-mix(in srgb, var(--cyan)  62%, transparent) 0%, transparent 60%),
    radial-gradient(40% 44% at 78% 72%, color-mix(in srgb, var(--pink)  52%, transparent) 0%, transparent 62%),
    radial-gradient(42% 46% at 20% 88%, color-mix(in srgb, var(--deep)  50%, transparent) 0%, transparent 64%),
    radial-gradient(30% 34% at 50% 40%, color-mix(in srgb, var(--teal)  32%, transparent) 0%, transparent 60%);
  filter: saturate(1.15);
  opacity: .9;
  animation: aurora 26s ease-in-out infinite alternate;
}

/* A gentle vignette so the centre reads calm and edges hold depth. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 8%, transparent 40%, color-mix(in srgb, var(--bg-0) 82%, transparent) 100%);
}

/* --par-x / --par-y are set by the pointer-parallax in site.js and default to
   zero, so the drift is identical when nothing is driving them. */
:root { --par-x: 0px; --par-y: 0px; }

@keyframes aurora {
  0%   { transform: translate3d(var(--par-x), var(--par-y), 0) scale(1); }
  50%  { transform: translate3d(calc(2.5% + var(--par-x)), calc(2% + var(--par-y)), 0) scale(1.06); }
  100% { transform: translate3d(calc(-2% + var(--par-x)), calc(-1.5% + var(--par-y)), 0) scale(1.03); }
}

:root[data-theme="light"] body::before { opacity: .5; filter: saturate(1.05); }
:root[data-theme="light"] body::after  {
  background: radial-gradient(120% 90% at 50% 6%, transparent 45%, color-mix(in srgb, var(--bg-0) 70%, transparent) 100%);
}

/* -------------------------------------------------------------- elements -- */

img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; color: inherit; }

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--bg-1) inset;
  caret-color: var(--text);
  transition: background-color 9999s ease-out 0s;
}

/* ------------------------------------------------------------ typography -- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: var(--tr-h2);
  text-wrap: balance;
}

.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-display);
  letter-spacing: var(--tr-display);
  line-height: 1.0;
}

/* Small pill label above section headings. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: var(--tr-eyebrow);
  color: var(--ice);
  background: var(--wash-cyan);
  border: var(--hairline) solid var(--line);
  padding: 6px 14px;
  border-radius: var(--r-pill);
}

.gradient-text {
  background: var(--grad-sheen);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

p { text-wrap: pretty; }
.muted { color: var(--muted); }
.mono  { font-family: var(--font-mono); }

/* --------------------------------------------------------------- layout -- */

.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s-5);
}
@media (max-width: 1200px) { .wrap { padding-inline: clamp(16px, 4vw, 40px); } }

.section { padding-block: var(--s-9); }
@media (max-width: 680px) { .section { padding-block: var(--s-8); } }

.section-head { max-width: 680px; margin-bottom: var(--s-8); }
.section-head .eyebrow { margin-bottom: var(--s-4); }
.section-head h2 { font-size: var(--fs-h2); margin-bottom: var(--s-4); }
.section-head p  { color: var(--muted); font-size: 1.08rem; }
.section-head--center { max-width: 720px; margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { margin-inline: auto; }

.head-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-8);
}
.head-row .section-head { margin-bottom: 0; }

/* ------------------------------------------------------------ utilities -- */

.is-hidden { display: none !important; }
.contents { display: contents; }
.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;
}

.i {
  width: 1em; height: 1em;
  fill: none; stroke: currentColor;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
  flex: none; vertical-align: -0.14em;
}
.i-fill { fill: currentColor; stroke: none; }

/* ---------------------------------------------------------------- focus -- */

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: var(--r-sm); }
:focus:not(:focus-visible) { outline: none; }

.skip {
  position: absolute; left: var(--s-4); top: -200px; z-index: 300;
  padding: var(--s-3) var(--s-4);
  background: var(--bg-2);
  border: var(--hairline) solid var(--cyan);
  border-radius: var(--r-sm);
}
.skip:focus { top: var(--s-3); }

/* ------------------------------------------------------------ scrollbar -- */

* { scrollbar-width: thin; scrollbar-color: var(--bg-3) transparent; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb {
  background: var(--bg-3);
  border-radius: var(--r-pill);
  border: 3px solid var(--bg-0);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--cyan); background-clip: padding-box; }

/* -------------------------------------------------------- reduced motion -- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  body::before { animation: none; }
  .ticker-track { animation-play-state: paused !important; }
}
