/* Modern CSS reset — Josh Comeau style + additions */

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

* { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; -moz-tab-size: 4; tab-size: 4; }

html, body { height: 100%; }

/* Horizontal overflow guard — applied to wrapper, NOT body/html.
   Both body and html overflow:hidden/clip make iOS Safari treat them as containing block
   for position:fixed descendants — which breaks the mobile menu overlay (renders inline).
   See `.page-wrap` in components.css. */

body {
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
}

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

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

p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; hyphens: auto; }

#root, #app { isolation: isolate; }

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; }

table { border-collapse: collapse; border-spacing: 0; }

button { background: none; border: none; cursor: pointer; color: inherit; }

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

:focus:not(:focus-visible) { outline: none; }

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

/* 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;
}

/* Reduced motion — global override */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}

/* ============================================================
   Native iOS Safari scroll — no snap, no contain, no content-visibility.
   Page scrolls naturally, rubber-band bounce restored, no inner-box feel.
   2026-05-10: removed scroll-snap (zacep between sections), overscroll-
   behavior:contain (cropped feel top/bottom), content-visibility (jank
   on section enter), scroll-snap-align on hero. Lighthouse score traded
   for honest mobile feel.
   ============================================================ */
@media (max-width: 1023px) {
  body {
    background: var(--bg, #0A0807);
    -webkit-overflow-scrolling: touch;
  }
}
