/* ------------------------------------------------------------------
   Reset + typographie de base
   ------------------------------------------------------------------ */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--line-strong) transparent;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.68;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-synthesis-weight: none;
  /* Inter : jeu « disambiguation » — un I capital et un l minuscule
     distinguables, indispensable pour « type Ia », « ΛCDM », etc. */
  font-feature-settings: 'ss02' 1, 'cv05' 1;
  overflow-x: clip;
}

/* Voile de fond : deux « feuillets » de couleur qui se croisent. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(90rem 52rem at 12% -12%, rgba(157, 140, 255, 0.13), transparent 62%),
    radial-gradient(70rem 45rem at 96% 6%, rgba(255, 180, 84, 0.085), transparent 60%),
    radial-gradient(95rem 60rem at 48% 108%, rgba(79, 227, 208, 0.07), transparent 65%),
    var(--bg-deep);
}

/* Grain très léger pour casser les dégradés sur les grands aplats. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: -0.022em;
  font-weight: 600;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-5);
  letter-spacing: -0.038em;
}
h2 {
  font-size: var(--step-3);
  letter-spacing: -0.03em;
}
h3 {
  font-size: var(--step-1);
  line-height: 1.24;
  letter-spacing: -0.018em;
}
h4 {
  font-size: var(--step-0);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--geo-soft);
  text-decoration-color: color-mix(in srgb, var(--geo) 45%, transparent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  transition: color var(--dur-1) var(--ease);
}
a:hover {
  color: var(--geo);
}

strong,
b {
  color: var(--ink);
  font-weight: 600;
}

em {
  font-style: italic;
  color: var(--ink);
}

code,
kbd,
samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

ul,
ol {
  padding-left: 1.15em;
}

li {
  margin-block: 0.38em;
}
li::marker {
  color: var(--ink-4);
}

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

button,
input,
select {
  font: inherit;
  color: inherit;
}

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

::selection {
  background: color-mix(in srgb, var(--neg) 45%, transparent);
  color: #fff;
}

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

.skip-link {
  position: fixed;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  border-radius: var(--r-sm);
  background: var(--surface-solid);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform var(--dur-2) var(--ease-out);
}
.skip-link:focus-visible {
  transform: none;
}
