/*
 * ═══════════════════════════════════════════════════════════════
 * BLAMI DESIGN TOKENS — v2.0
 * Emerald Neon + Glassmorphism + Vercel-inspired minimalism
 * ═══════════════════════════════════════════════════════════════
 * Single source of truth. Shared by frontend/ and admin/.
 * ═══════════════════════════════════════════════════════════════
 */

:root {
  /* ═══════════════════════════════════════════════════════════
     TYPOGRAPHY
     ═══════════════════════════════════════════════════════════ */
  --font: 'Geist', system-ui, -apple-system, sans-serif;
  --font-mono: 'Geist Mono', 'Cascadia Code', 'Fira Code', monospace;

  /* ═══════════════════════════════════════════════════════════
     PALETTE — Negro Abismo + Esmeralda Neon
     ═══════════════════════════════════════════════════════════ */

  /* Background layers */
  --bg-abyss: oklch(3% 0.002 160);
  --bg-surface: oklch(7% 0.002 155);
  --bg-elevated: oklch(11% 0.003 155);
  --bg-glass: oklch(8% 0.002 155 / 0.65);

  /* Legacy aliases for background (used by index.html inline styles) */
  --paper: var(--bg-abyss);
  --paper-2: var(--bg-surface);

  /* Text — monochromatic */
  --text: oklch(96% 0 0);
  --text-secondary: oklch(70% 0 0);
  --text-muted: oklch(48% 0 0);

  /* Legacy aliases (used by converso.js and inline styles) */
  --muted: var(--text-muted);
  --ink: var(--text);
  --ink-2: var(--text-secondary);
  --card: var(--bg-glass);

  /* Accent — Emerald Neon (single source of color) */
  --accent: oklch(72% 0.22 155);
  --accent-glow: oklch(72% 0.22 155 / 0.45);
  --accent-ambient: oklch(72% 0.22 155 / 0.12);
  --accent-soft: oklch(72% 0.22 155 / 0.06);

  /* Secondary accent (kept emerald, no more teal/purple/gold drift) */
  --accent2: oklch(62% 0.25 155);

  /* Legacy accent aliases (used by index.html inline styles) */
  --glow: var(--accent-glow);
  --emit: var(--accent-ambient);

  /* Semantic — minimal usage, only badges/alerts */
  --success: oklch(65% 0.15 150);
  --success-soft: oklch(65% 0.15 150 / 0.08);
  --warning: oklch(75% 0.12 85);
  --warning-soft: oklch(75% 0.12 85 / 0.08);
  --danger: oklch(60% 0.18 22);
  --danger-soft: oklch(60% 0.18 22 / 0.08);
  --info: oklch(70% 0.08 230);
  --info-soft: oklch(70% 0.08 230 / 0.08);

  /* ═══════════════════════════════════════════════════════════
     BORDERS — Glass subtle
     ═══════════════════════════════════════════════════════════ */
  --border: oklch(100% 0 0 / 0.06);
  --border-hover: oklch(100% 0 0 / 0.12);
  --border-active: oklch(72% 0.22 155 / 0.30);

  /* Legacy alias for border (used by index.html inline styles) */
  --rule: var(--border);

  /* ═══════════════════════════════════════════════════════════
     SPACING — 4pt scale
     ═══════════════════════════════════════════════════════════ */
  --sp-xs: 8px;
  --sp-sm: 12px;
  --sp-md: 20px;
  --sp-lg: 32px;
  --sp-xl: 48px;
  --sp-2xl: 72px;
  --sp-3xl: 104px;
  --sp-4xl: 140px;

  /* ═══════════════════════════════════════════════════════════
     TYPOGRAPHY SCALE
     ═══════════════════════════════════════════════════════════ */
  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-lg: 18px;
  --text-xl: 24px;
  --text-2xl: 32px;
  --text-3xl: 44px;
  --text-hero: clamp(3rem, 6vw + 1rem, 6rem);

  /* ═══════════════════════════════════════════════════════════
     RADII
     ═══════════════════════════════════════════════════════════ */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;

  /* ═══════════════════════════════════════════════════════════
     SHADOWS / GLOW
     ═══════════════════════════════════════════════════════════ */
  --glow-sm: 0 0 12px var(--accent-glow);
  --glow-md: 0 0 28px var(--accent-glow);
  --glow-lg: 0 0 60px oklch(72% 0.22 155 / 0.25);
  --glow-xl: 0 0 100px oklch(72% 0.22 155 / 0.15);
  --shadow-sm: 0 1px 2px oklch(0% 0 0 / 0.4);
  --shadow-md: 0 4px 16px oklch(0% 0 0 / 0.5);
  --shadow-lg: 0 8px 40px oklch(0% 0 0 / 0.6);

  /* ═══════════════════════════════════════════════════════════
     MOTION
     ═══════════════════════════════════════════════════════════ */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 450ms;

  /* ═══════════════════════════════════════════════════════════
     Z-INDEX
     ═══════════════════════════════════════════════════════════ */
  --z-backdrop: -1;
  --z-base: 1;
  --z-nav: 80;
  --z-sidebar: 90;
  --z-modal: 100;
  --z-toast: 110;
  --z-overlay: 200;
}

/* ═══════════════════════════════════════════════════════════
   RESET + BASE
   ═══════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-abyss);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
}

::selection {
  background: var(--accent-soft);
  color: var(--accent);
}

::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════
   TYPOGRAPHY UTILITIES
   ═══════════════════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.display-hero {
  font-family: var(--font);
  font-size: var(--text-hero);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.neon-text {
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent-glow);
}

.mono-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════
   AMBIENT GLOW UTILITIES
   ═══════════════════════════════════════════════════════════ */
.ambient-glow-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  pointer-events: none;
  z-index: var(--z-backdrop);
  background: radial-gradient(
    ellipse 900px 500px at 50% 0%,
    var(--accent-ambient),
    transparent 70%
  );
}

.ambient-glow-center {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-backdrop);
  background: radial-gradient(
    ellipse 600px 400px at 50% 50%,
    var(--accent-ambient),
    transparent 70%
  );
}

/* ═══════════════════════════════════════════════════════════
   BLUEPRINT GRID — signature background
   ═══════════════════════════════════════════════════════════ */
.blueprint-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-backdrop);
  background-image:
    linear-gradient(oklch(72% 0.22 155 / 0.03) 1px, transparent 1px),
    linear-gradient(90deg, oklch(72% 0.22 155 / 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, black 30%, transparent 70%);
}

/* ═══════════════════════════════════════════════════════════
   SECTION DIVIDER — subtle gradient rule
   ═══════════════════════════════════════════════════════════ */
.section-rule {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: var(--sp-2xl) 0;
}

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