/* ============================================================
   base.css — Reset, Body, Global Elements & Cursor
   Depends on: tokens.css
   ============================================================ */

/* ── RESET ───────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}
body {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  transition:
    background var(--dur-base) ease,
    color var(--dur-base) ease;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: pointer;
  font-family: inherit;
}
svg {
  display: block;
}

/* ── SKIP LINK ───────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  background: var(--accent);
  color: #fff;
  padding: var(--s3) var(--s5);
  border-radius: var(--r-sm);
  z-index: 9999;
}
.skip-link:focus {
  left: var(--s4);
  top: var(--s4);
}

/* ── NOISE TEXTURE ───────────────────────────────────────── */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px 128px;
}

/* ── CUSTOM CURSOR (desktop only) ────────────────────────── */
@media (pointer: fine) {
  * {
    cursor: none !important;
  }
  .cursor {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 8999;
  }
  .cursor-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    position: absolute;
    transform: translate(-50%, -50%);
    transition: transform var(--dur-fast) ease;
  }
  .cursor-ring {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    position: absolute;
    transform: translate(-50%, -50%);
    opacity: 0.55;
    transition:
      width var(--dur-base) var(--ease-expo),
      height var(--dur-base) var(--ease-expo),
      opacity var(--dur-base) ease,
      border-color var(--dur-base) ease;
  }
  body.cursor-hover .cursor-ring {
    width: 54px;
    height: 54px;
    opacity: 0.85;
    border-color: var(--accent-hi);
  }
}

/* ── LAYOUT CONTAINER ────────────────────────────────────── */
.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

/* ── REDUCED MOTION ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .scroll-behavior {
    scroll-behavior: auto;
  }
}
