/* ============================================================
   ELLEVUX · BASE  (v5 — PERSONAL PORTFOLIO, Henri Heymans style)
   Modern reset + base element styling + a11y foundations.
   body → pure black + Inter; .accent-serif → Instrument Serif italic.
   White selection; focus-visible ring in --accent (visible on black);
   skip-link; reduced-motion.
   Depends on tokens.css. Content fails OPEN: nothing here hides content.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--accent) var(--bg-soft);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-base);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select { font: inherit; color: inherit; }

button { background: none; border: none; cursor: pointer; }

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; padding: 0; }

p { text-wrap: pretty; }

/* ---- Headings: bold uppercase grotesque, tight tracking ---- */
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: var(--weight-black);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

/* ---- Italic serif accent (the signature on select words) ----
   e.g. *WORKS*, *my* 2026 *portfolio.*, *Hey!*, "Send me an e-mail".
   Resets weight/tracking so it reads as a true serif italic next to the
   bold grotesque. */
.accent-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: var(--weight-regular);
  letter-spacing: 0;
}

/* ---- Selection — white ---- */
::selection { background: var(--text); color: var(--bg); }

/* ---- Custom scrollbar (WebKit) ---- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 0;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ---- Focus visibility (a11y · WCAG 2.4.7) ----
   Acid-green ring is highly visible on pure black; an inner black halo keeps
   it readable even when the focused element is itself green. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}
:focus:not(:focus-visible) { outline: none; }

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -100%;
  z-index: var(--z-overlay);
  padding: var(--s-3) var(--s-5);
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--r-sm);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  font-size: var(--fs-label);
  transition: top var(--dur-base) var(--ease-out-expo);
}
.skip-link:focus { top: var(--s-4); }

/* ---- Screen-reader only ---- */
.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;
}

/* ---- Layout helpers ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide { max-width: var(--container-wide); }

.section {
  position: relative;
  padding-block: var(--section-y);
}

/* Reduced-motion users: no parallax / transform drift */
@media (prefers-reduced-motion: reduce) {
  [data-parallax] { transform: none !important; }
}
