/* Base: reset, document defaults, typography and shared utilities. */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night) var(--gradient-sky) fixed;
  color: var(--text);
  font: 400 var(--step-0)/1.65 var(--font-sans);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.022em; font-weight: 640; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

a { color: inherit; text-decoration-color: rgba(201, 207, 245, 0.4); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 6px; }

::selection { background: rgba(155, 92, 255, 0.45); color: #fff; }

.container { width: min(100% - 2 * var(--gutter), var(--content)); margin-inline: auto; }

.eyebrow {
  font: 600 var(--step--1)/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.serif { font-family: var(--font-serif); font-weight: 420; letter-spacing: -0.01em; }

.lead { font-size: var(--step-1); line-height: 1.55; color: var(--text-muted); }

.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill);
  background: var(--moonlight); color: var(--night); font-weight: 600;
}
.skip-link:focus { top: var(--space-4); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Reveal-on-scroll: content is visible by default; JS opts in to the animation. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
