/* ═══════════════════════════════════════════════════════════════════════════
   AIOX CHALLENGE — BASE STYLES
   Reset, typography, layout
   ═══════════════════════════════════════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: 'Geist', system-ui, -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

ul, ol {
  list-style: none;
}

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

/* ── Selection ── */
::selection {
  background: var(--lime);
  color: var(--bg-base);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-40);
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'TASA Orbiter Display', 'Geist', system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.display-xl {
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.display-lg {
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.display-md {
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.heading-lg {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  line-height: 1.15;
}

.heading-md {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.2;
}

.heading-sm {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.3;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.7;
}

.text-md {
  font-size: 1rem;
  line-height: 1.6;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.5;
}

.text-xs {
  font-size: 0.75rem;
  line-height: 1.4;
}

.mono {
  font-family: 'Geist Mono', 'Roboto Mono', monospace;
}

.font-display {
  font-family: 'TASA Orbiter Display', 'Geist', system-ui, sans-serif;
}

/* ── Text utilities ── */
.text-lime { color: var(--lime); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-muted { color: var(--text-muted); }

.text-gradient-neon {
  background: linear-gradient(135deg, #DDD1BB 0%, #B5AB9B 50%, #DDD1BB 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-cream {
  background: linear-gradient(135deg, #F4F4F4 0%, rgba(244, 244, 244, 0.6) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.uppercase {
  text-transform: uppercase;
}

.tracking-wide {
  letter-spacing: 0.15em;
}

.tracking-wider {
  letter-spacing: 0.25em;
}

/* ── Layout ── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-wide {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

section {
  padding: var(--space-5xl) 0;
  position: relative;
}

.section-label {
  font-family: 'Geist Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--lime);
  margin-bottom: var(--space-md);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.section-label::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--lime);
  border-radius: 50%;
  display: inline-block;
}

/* ── Grid helpers ── */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }

  section {
    padding: var(--space-4xl) 0;
  }

  .container,
  .container-wide,
  .container-narrow {
    padding: 0 var(--space-md);
  }
}

/* ── Flex helpers ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }

/* ── Divider ── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
}

/* ── Visibility ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

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