/* =====================================================================
   Next Wave — Colors & Type
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap');

:root {
  /* ---- Brand colors (raw) — Orange theme ---- */
  --nw-violet-50:  #F5F3FF;
  --nw-violet-100: #EDE9FE;
  --nw-violet-200: #DDD6FE;
  --nw-violet-300: #C9B9F8;
  --nw-violet-400: #A78BFA;   /* PRIMARY */
  --nw-violet-500: #784CFC;
  --nw-violet-600: #5B2FE0;
  --nw-violet-700: #4520B5;

  --nw-indigo-400: #A78BFA;
  --nw-indigo-500: #784CFC;
  --nw-indigo-600: #4F46E5;

  /* ---- Slate / canvas ---- */
  --nw-slate-50:  #F8FAFC;
  --nw-slate-100: #F1F5F9;
  --nw-slate-200: #E2E8F0;
  --nw-slate-300: #CBD5E1;
  --nw-slate-400: #94A3B8;
  --nw-slate-500: #64748B;
  --nw-slate-600: #475569;
  --nw-slate-700: #334155;
  --nw-slate-800: #1E293B;
  --nw-slate-900: #0F172A;    /* CANVAS */
  --nw-slate-950: #020617;

  /* ---- Semantic ---- */
  --nw-success: #22C55E;
  --nw-warn:    #F59E0B;
  --nw-error:   #F43F5E;
  --nw-info:    var(--accent);

  /* ---- Surface system (DARK MODE = default) ---- */
  --bg:           var(--nw-slate-900);
  --bg-elevated:  rgba(255, 255, 255, 0.04);
  --surface-1:    rgba(255, 255, 255, 0.04);
  --surface-2:    rgba(255, 255, 255, 0.08);
  --surface-3:    rgba(255, 255, 255, 0.12);
  --hairline:     rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.16);

  /* ---- Foreground (semantic) ---- */
  --fg-1:  #F8FAFC;            /* primary text */
  --fg-2:  #CBD5E1;            /* secondary text */
  --fg-3:  #94A3B8;            /* tertiary / muted */
  --fg-4:  #64748B;            /* placeholder / disabled */

  /* =====================================================================
     PALETTE SWAP POINT — edit the values below to recolor the site.
     The hex tokens drive plain color/background/border usage;
     the *-rgb triplets drive rgba() usage (opacities, glows, soft fills).
     Both must be updated in lockstep to swap the brand colour.
     ===================================================================== */
  --accent:            #A78BFA;
  --accent-rgb:        167, 139, 250;
  --accent-strong:     #784CFC;
  --accent-strong-rgb: 120, 76, 252;
  --accent-soft:       #C9B9F8;
  --accent-soft-rgb:   201, 185, 248;
  --accent-deep:       #5B2FE0;   /* darker accent — used in ambient mesh gradients */
  --accent-deep-rgb:   91, 47, 224;
  --accent-text:       #0F0220;   /* text colour when sitting on a filled accent (e.g. primary button) */
  --accent-bg-deep:    #1E1640;   /* deepest accent-tinted dark, used as CTA gradient base */
  --link:              var(--accent);

  /* ---- Type ---- */
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Geist Mono', 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  --font-display: var(--font-sans);

  /* ---- Type scale ---- */
  --fs-xs:    12px;
  --fs-sm:    14px;
  --fs-base:  16px;
  --fs-md:    18px;
  --fs-lg:    20px;
  --fs-xl:    24px;
  --fs-2xl:   32px;
  --fs-3xl:   48px;
  --fs-4xl:   64px;
  --fs-5xl:   80px;
  --fs-6xl:   112px;

  --lh-tight:  1.05;
  --lh-snug:   1.2;
  --lh-normal: 1.5;
  --lh-relaxed: 1.7;

  --tracking-tight: -0.03em;
  --tracking-snug:  -0.015em;
  --tracking-normal: 0;
  --tracking-wide:  0.02em;

  /* ---- Spacing (4px base) ---- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;
  --sp-32: 128px;

  /* ---- Radii ---- */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-2xl: 28px;
  --r-pill: 999px;

  /* ---- Shadows ---- */
  --shadow-sm: 0 1px 2px rgba(15, 12, 30, 0.20),
               0 1px 1px rgba(15, 12, 30, 0.10);
  --shadow-md: 0 8px 24px rgba(15, 12, 30, 0.30),
               0 2px 6px rgba(15, 12, 30, 0.20);
  --shadow-lg: 0 24px 64px rgba(15, 12, 30, 0.45),
               0 8px 16px rgba(15, 12, 30, 0.25);
  --shadow-glow: 0 0 40px rgba(var(--accent-rgb), 0.35);
  --shadow-glow-strong: 0 0 60px rgba(var(--accent-rgb), 0.55), 0 0 0 1px rgba(var(--accent-rgb), 0.4);
  --shadow-inner-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.06);

  /* ---- Motion ---- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in:  cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 150ms;
  --dur:      250ms;
  --dur-slow: 400ms;
  --dur-hero: 800ms;

  /* ---- Layout ---- */
  --container: 1280px;
  --gutter: 80px;
  --gutter-mobile: 24px;
}

/* ===== Light mode (opt-in) ============================================ */
[data-theme="light"] {
  --bg:           #FAFAF9;
  --bg-elevated:  #FFFFFF;
  --surface-1:    rgba(15, 23, 42, 0.03);
  --surface-2:    rgba(15, 23, 42, 0.06);
  --surface-3:    rgba(15, 23, 42, 0.10);
  --hairline:     rgba(15, 23, 42, 0.08);
  --hairline-strong: rgba(15, 23, 42, 0.16);

  --fg-1: #0F172A;
  --fg-2: #334155;
  --fg-3: #64748B;
  --fg-4: #94A3B8;
}

/* ===== Base / reset ================================================== */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ===== Semantic typography =========================================== */
.h-display, .h1-hero {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, var(--fs-5xl));
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  margin: 0;
}

.h1 {
  font-family: var(--font-display);
  font-size: var(--fs-4xl);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  margin: 0;
}

.h2 {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: 600;
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-tight);
  margin: 0;
}

.h3 {
  font-family: var(--font-sans);
  font-size: var(--fs-2xl);
  font-weight: 600;
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-snug);
  margin: 0;
}

.h4 {
  font-family: var(--font-sans);
  font-size: var(--fs-xl);
  font-weight: 600;
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-snug);
  margin: 0;
}

.h5 {
  font-family: var(--font-sans);
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: var(--lh-snug);
  margin: 0;
}

.body-lg {
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  color: var(--fg-2);
}

.body {
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--fg-2);
}

.body-sm {
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
  color: var(--fg-3);
}

.caption, .eyebrow {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--fg-3);
}

.code, code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: var(--r-sm);
  border: 1px solid var(--hairline);
}

.stat-num {
  font-family: var(--font-mono);
  font-size: var(--fs-4xl);
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  font-feature-settings: "tnum";
}

/* ===== Common components (foundational) ============================== */
.glass {
  background: var(--surface-1);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-inner-highlight);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-md);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1;
  border: 1px solid var(--hairline);
  background: var(--surface-2);
  color: var(--fg-1);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.btn:hover { transform: translateY(-1px); background: var(--surface-3); border-color: var(--hairline-strong); }
.btn:active { transform: translateY(0); filter: brightness(0.96); }

.btn--primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: var(--accent-text);
  border-color: rgba(255,255,255,0.18);
  box-shadow: var(--shadow-glow);
  font-weight: 600;
}
.btn--primary:hover {
  background: linear-gradient(180deg, var(--accent-soft), var(--accent));
  box-shadow: var(--shadow-glow-strong);
}

.btn--ghost {
  background: transparent;
  border-color: var(--hairline);
}
