/* ==========================================================================
   BASE.CSS — Design Tokens, Reset, Typography, Utilities
   ========================================================================== */

/* --------------------------------------------------------------------------
   TOKENS (CSS Custom Properties)
   -------------------------------------------------------------------------- */
:root {
  /* Colors */
  --color-bg: #0b1020;
  --color-bg-alt: #070a14;
  --color-surface: rgba(255, 255, 255, 0.06);
  --color-surface-hover: rgba(255, 255, 255, 0.08);
  --color-text: rgba(255, 255, 255, 0.92);
  --color-text-muted: rgba(255, 255, 255, 0.72);
  --color-text-muted2: rgba(255, 255, 255, 0.6);
  --color-border: rgba(255, 255, 255, 0.12);
  --color-border-subtle: rgba(255, 255, 255, 0.08);

  /* Accent */
  --color-accent: #facc15;
  --color-accent-alt: #f59e0b;
  --color-accent-subtle: rgba(250, 204, 21, 0.14);
  --color-focus: rgba(250, 204, 21, 0.55);

  /* Status */
  --color-success: #22c55e;
  --color-error: #ef4444;

  /* Typography */
  --font-family: Outfit, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --font-size-xs: 12px;
  --font-size-sm: 13px;
  --font-size-base: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-size-3xl: 28px;
  --font-size-4xl: clamp(32px, 4vw, 48px);
  --font-size-5xl: clamp(36px, 5vw, 56px);

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  --line-height-tight: 1.1;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.65;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* Layout */
  --max-width: 1120px;
  --max-width-narrow: 720px;
  --container-padding: 20px;

  /* Borders & Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 24px 80px rgba(0, 0, 0, 0.45);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
  --transition-slow: 0.3s ease;

  /* Z-index scale */
  --z-dropdown: 10;
  --z-sticky: 20;
  --z-header: 30;
  --z-modal: 40;
  --z-toast: 50;
}

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

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image:
    radial-gradient(900px 500px at 25% 10%, rgba(250, 204, 21, 0.18), transparent 60%),
    radial-gradient(900px 500px at 75% 20%, rgba(245, 158, 11, 0.14), transparent 60%),
    linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img {
  height: auto;
}

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

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

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: -0.02em;
}

/* --------------------------------------------------------------------------
   TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1 {
  font-size: var(--font-size-5xl);
  font-weight: var(--font-weight-extrabold);
  letter-spacing: -0.03em;
}

h2 {
  font-size: var(--font-size-3xl);
}

h3 {
  font-size: var(--font-size-xl);
}

h4 {
  font-size: var(--font-size-lg);
}

p {
  color: var(--color-text-muted);
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-alt));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-muted {
  color: var(--color-text-muted);
}

.text-muted2 {
  color: var(--color-text-muted2);
}

.text-sm {
  font-size: var(--font-size-sm);
}

.text-xs {
  font-size: var(--font-size-xs);
}

.text-center {
  text-align: center;
}

/* --------------------------------------------------------------------------
   LAYOUT UTILITIES
   -------------------------------------------------------------------------- */
.container {
  width: min(var(--max-width), calc(100% - var(--container-padding) * 2));
  margin-inline: auto;
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.section {
  padding-block: var(--space-16);
}

.section--alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
  border-top: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--space-3);
  z-index: var(--z-toast);
  background: var(--color-bg);
  color: var(--color-text);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  font-weight: var(--font-weight-semibold);
}

.skip-link:focus {
  left: var(--space-3);
  outline: 3px solid var(--color-focus);
  text-decoration: none;
}

/* Focus visible for keyboard users */
:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* --------------------------------------------------------------------------
   MISC UTILITIES
   -------------------------------------------------------------------------- */
.hidden {
  display: none !important;
}

.stack {
  display: grid;
  gap: var(--space-3);
}

.stack--lg {
  gap: var(--space-5);
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.divider {
  height: 1px;
  background: var(--color-border-subtle);
  margin-block: var(--space-5);
}

