/* ─────────────────────────────────────────────────────────────────────────
   base.css — element defaults, typography primitives, a11y utilities
   ───────────────────────────────────────────────────────────────────── */

body {
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--f-body);
  font-size: var(--t-base);
  line-height: var(--lh-body);
  font-feature-settings: "cv05" 1, "ss01" 1;
  overflow-x: hidden;
}

/* One barely-there wash at the top. Minimalism means the page is mostly
   paper — this exists only so the hero doesn't start as a hard white edge. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(100% 52% at 50% -12%, rgb(91 70 229 / 0.055), transparent 62%),
    var(--c-bg);
  pointer-events: none;
}

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

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

/* ── Utilities ───────────────────────────────────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: var(--s-3);
  left: var(--s-3);
  z-index: 200;
  padding: var(--s-3) var(--s-5);
  background: var(--c-accent);
  color: var(--c-on-accent);
  font-family: var(--f-mono);
  font-size: var(--t-sm);
  border-radius: var(--r-md);
  transform: translateY(-160%);
  transition: transform var(--d-base) var(--e-out);
}
.skip-link:focus-visible { transform: none; }

/* ── Reveal-on-scroll ────────────────────────────────────────────────── */

.js .reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition:
    opacity var(--d-slow) var(--e-out),
    transform var(--d-slow) var(--e-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
  will-change: auto;
}

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

/* ── Type primitives ─────────────────────────────────────────────────── */

em { font-style: normal; color: var(--c-accent); }
