/* =========================================================
   reset.css — minimal reset + FLUID REM SYSTEM
   ---------------------------------------------------------
   The interface uses rem values as design pixels. Keep the
   root stable across mobile/tablet widths so adjacent devices
   never make the whole UI shrink unexpectedly.
   ========================================================= */

html {
  /* 1rem == 1px through normal mobile, tablet, and desktop widths.
     Very wide screens can scale gently, capped to avoid oversized UI. */
  font-size: clamp(1px, calc(100vw / 1440), 1.12px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: auto; /* Lenis handles smooth scroll */
}

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

html, body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, figcaption, blockquote, dl, dd {
  margin: 0;
  padding: 0;
}

body {
  font-size: 16rem;            /* equivalent to 16px @1440 */
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  html {
    overflow-x: hidden;
    overscroll-behavior-x: none;
  }

  body {
    overflow-x: hidden;
    position: relative;
    min-width: 0;
  }
}

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

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

button {
  background: none;
  border: 0;
  cursor: pointer;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.1;
}

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

/* Reduced-motion: silence transitions but keep layout */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
