/* ============================================================
   UI UX Pro Max — Design Tokens
   Brand: uupm.cc / NextLevelBuilder
   Theme: dark-first; light-mode tokens at the bottom (opt-in).
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap");

:root {
  /* ───────── Color · Surfaces ───────── */
  --bg:            #050714;
  --bg-elev-1:     #0A0E1F;
  --bg-elev-2:     #14172B;
  --bg-glass:      rgba(20, 23, 43, 0.6);

  /* ───────── Color · Text ───────── */
  --fg:            #F8FAFC;
  --fg-muted:      #94A3B8;
  --fg-subtle:     #64748B;
  --fg-inverse:    #050714;

  /* ───────── Color · Brand ───────── */
  --primary:       #3B82F6;   /* signature blue — CTAs, links, stat numbers */
  --primary-hover: #2563EB;
  --primary-soft:  rgba(59, 130, 246, 0.12);

  --accent:        #F97316;   /* signature coral — terminal $, highlights */
  --accent-hover:  #EA580C;
  --accent-soft:   rgba(249, 115, 22, 0.12);

  --gradient-via:  #8B5CF6;   /* purple bridge in wordmark gradient */
  --gradient-via-2:#A78BFA;

  /* ───────── Color · Semantic ───────── */
  --success:       #22C55E;
  --warning:       #F59E0B;
  --danger:        #DC2626;
  --info:          var(--primary);

  /* ───────── Color · Borders ───────── */
  --border:        rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-focus:  var(--primary);

  /* ───────── Color · Glows (radial backgrounds) ───────── */
  --glow-primary:  radial-gradient(circle at 30% 50%, rgba(59, 130, 246, 0.12), transparent 50%);
  --glow-accent:   radial-gradient(circle at 70% 50%, rgba(249, 115, 22, 0.10), transparent 50%);

  /* ───────── Signature gradient (sigil — wordmark only) ───────── */
  --gradient-brand: linear-gradient(90deg, #3B82F6 0%, #6366F1 35%, #A78BFA 60%, #F97316 100%);

  /* ───────── Typography · Families ───────── */
  --font-display: "Space Grotesk", "Inter", system-ui, -apple-system, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* ───────── Typography · Size scale ───────── */
  --display-1: 4.5rem;    /* hero */
  --display-2: 3rem;      /* section title */
  --h1:        2.25rem;
  --h2:        1.5rem;
  --h3:        1.125rem;
  --body:      1rem;
  --small:     0.875rem;
  --label:     0.75rem;
  --code:      0.875rem;

  /* ───────── Typography · Line height & tracking ───────── */
  --lh-tight:  1;
  --lh-snug:   1.2;
  --lh-normal: 1.5;
  --lh-relaxed:1.6;

  --tracking-display: -0.04em;
  --tracking-tight:   -0.02em;
  --tracking-normal:  0;
  --tracking-wide:    0.08em;

  /* ───────── Spacing (8-px base) ───────── */
  --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;
  --space-24: 96px;
  --space-32: 128px;

  /* ───────── Radii ───────── */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   20px;
  --radius-2xl:  28px;
  --radius-full: 9999px;

  /* ───────── Shadows · Glow-based for dark surfaces ───────── */
  --shadow-card:  0 1px 0 0 rgba(255,255,255,0.04) inset,
                  0 8px 24px -12px rgba(0,0,0,0.40);
  --shadow-card-hover: 0 1px 0 0 rgba(255,255,255,0.08) inset,
                       0 16px 40px -16px rgba(0,0,0,0.55);
  --shadow-cta:   0 1px 0 0 rgba(255,255,255,0.16) inset,
                  0 8px 24px -8px rgba(59,130,246,0.50);
  --shadow-cta-accent: 0 1px 0 0 rgba(255,255,255,0.16) inset,
                       0 8px 24px -8px rgba(249,115,22,0.50);
  --shadow-glass: 0 1px 0 0 rgba(255,255,255,0.08) inset,
                  0 24px 48px -16px rgba(0,0,0,0.50);

  /* ───────── Motion ───────── */
  --ease-out:   cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in:    cubic-bezier(0.4, 0, 1, 1);
  --ease-inout: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast:   120ms;
  --dur-base:   200ms;
  --dur-slow:   320ms;

  /* ───────── Layout ───────── */
  --container-max: 1200px;
  --container-pad: 24px;
  --nav-max:       1100px;
}

/* ============================================================
   Semantic element styles
   ============================================================ */

html {
  font-size: 16px;
  background: var(--bg);
  color-scheme: dark;
}

body {
  font-family: var(--font-body);
  font-size: var(--body);
  line-height: var(--lh-relaxed);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* — Headings — */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--fg);
  letter-spacing: var(--tracking-tight);
  line-height: var(--lh-snug);
  text-wrap: balance;
}
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); }

/* — Hero / section display utilities — */
.display-1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 6vw, var(--display-1));
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}
.display-2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--display-2);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

/* — Body, small, label — */
p {
  font-size: var(--body);
  line-height: var(--lh-relaxed);
  color: var(--fg-muted);
  text-wrap: pretty;
}
.small  { font-size: var(--small); line-height: var(--lh-normal); color: var(--fg-muted); }
.label  {
  font-size: var(--label);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--fg-subtle);
  font-weight: 600;
}

/* — Code / mono — */
code, kbd, pre, .mono {
  font-family: var(--font-mono);
  font-size: var(--code);
  font-feature-settings: "ss01", "cv01";
}

/* — Signature gradient text utility — */
.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* — Links — */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--primary-hover); }
a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 2px; }

/* — Focus ring (universal) — */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* — Selection — */
::selection { background: var(--primary-soft); color: var(--fg); }

/* — Reduced motion — */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
