/* =========================================================
   BASE & RESET
   ========================================================= */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  background: var(--color-midnight);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  letter-spacing: -0.005em;
  overflow-x: hidden;
  min-height: 100vh;

  background-image:
    radial-gradient(ellipse 1200px 800px at 80% -10%, rgba(63, 208, 255, 0.08), transparent 60%),
    radial-gradient(ellipse 900px 700px at 10% 110%, rgba(15, 191, 159, 0.06), transparent 60%),
    linear-gradient(180deg, var(--color-midnight-deep) 0%, var(--color-midnight) 50%, var(--color-midnight-deep) 100%);
  background-attachment: fixed;
}

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

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

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

ul,
ol {
  list-style: none;
}

::selection {
  background: var(--color-cyan);
  color: var(--color-midnight);
}

/* Focus rings — accessible but subtle */
:focus-visible {
  outline: 1px solid var(--color-cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Custom scrollbar (desktop) */
@media (hover: hover) {
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  ::-webkit-scrollbar-track {
    background: var(--color-midnight-deep);
  }
  ::-webkit-scrollbar-thumb {
    background: rgba(63, 208, 255, 0.18);
    border-radius: var(--radius-pill);
  }
  ::-webkit-scrollbar-thumb:hover {
    background: rgba(63, 208, 255, 0.32);
  }
}

/* Lenis required */
html.lenis {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}

/* 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: auto !important;
  }
}
