/* ============================================================
   BASE - Reset, typography, global styles
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

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

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--surface-base);
  background-image:
    radial-gradient(circle at 12% -20%, rgba(255, 153, 102, 0.22) 0%, rgba(255, 153, 102, 0) 42%),
    radial-gradient(circle at 92% 6%, rgba(255, 153, 102, 0.08) 0%, rgba(255, 153, 102, 0) 38%),
    linear-gradient(180deg, #0a0c10 0%, #050607 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-normal);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image: var(--noise-url);
  background-repeat: repeat;
  opacity: 0.2;
  mix-blend-mode: soft-light;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

h1 { font-size: var(--text-2xl); font-weight: 700; }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-md); font-weight: 600; }

.text-hero {
  font-size: var(--text-hero);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.text-metric {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-3xl);
  letter-spacing: -0.03em;
  line-height: 1;
}

.text-mono {
  font-family: var(--font-mono);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.text-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--text-secondary);
}

.text-caption {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--duration-micro) var(--ease-standard);
}

a:hover {
  color: var(--accent-light);
}

::selection {
  background: rgba(255, 153, 102, 0.25);
  color: #fff;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(169, 179, 195, 0.35);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(169, 179, 195, 0.52);
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(169, 179, 195, 0.4) transparent;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: var(--sp-8); }
.gap-12 { gap: var(--sp-12); }
.gap-16 { gap: var(--sp-16); }
.gap-24 { gap: var(--sp-24); }

@media (max-width: 900px) {
  body {
    background-attachment: scroll;
  }
}
