/* ==========================================================================
   iSada BRAND TOKENS — per Design Brief 03 (Apr 2026)
   Single source of truth for colors, spacing, typography, shadows, radius.
   ========================================================================== */

:root, [data-theme="light"] {
  /* PRIMARY (Midnight Navy) */
  --primary:        #0A1F44;
  --primary-dark:   #061228;
  --primary-light:  #1B3563;

  /* ACCENTS */
  --accent-ai:      #00D4FF;
  --accent-ai-dk:   #00A6CC;
  --accent-warm:    #FF8366;
  --accent-warm-dk: #E0654A;
  --accent-gold:    #F4B860;

  /* NEUTRALS */
  --neutral-bg:     #FAFAF7;
  --neutral-card:   #FFFFFF;
  --neutral-100:    #F1F1ED;
  --neutral-200:    #E4E4DE;
  --neutral-400:    #9B9B95;
  --neutral-700:    #4A4F5C;
  --neutral-900:    #1A1F2E;

  /* SEMANTIC */
  --success:        #1E8E5A;
  --warning:        #D97706;
  --error:          #C2453A;

  /* RGB tuples for rgba() */
  --primary-rgb:        10, 31, 68;
  --accent-ai-rgb:      0, 212, 255;
  --accent-warm-rgb:    255, 131, 102;
  --accent-gold-rgb:    244, 184, 96;
  --neutral-900-rgb:    26, 31, 46;

  /* GRADIENTS */
  --gradient-hero-mesh: radial-gradient(ellipse 80% 60% at 30% 30%, rgba(0,212,255,0.18), transparent 60%),
                        radial-gradient(ellipse 60% 50% at 80% 70%, rgba(255,131,102,0.12), transparent 60%);
  --gradient-cta-coral: linear-gradient(135deg, #FF8366 0%, #E0654A 100%);
  --gradient-glow-cyan: linear-gradient(135deg, #00D4FF 0%, #00A6CC 100%);

  /* SHADOWS (per brief) */
  --shadow-sm:   0 1px 2px rgba(10, 31, 68, 0.06);
  --shadow-md:   0 4px 16px rgba(10, 31, 68, 0.08);
  --shadow-lg:   0 12px 40px rgba(10, 31, 68, 0.12);
  --shadow-xl:   0 24px 64px rgba(10, 31, 68, 0.18);
  --shadow-glow: 0 0 32px rgba(0, 212, 255, 0.35);
  --shadow-coral-glow: 0 0 24px rgba(255, 131, 102, 0.35);

  /* RADIUS (per brief) */
  --radius-pill:  9999px;
  --radius-card:  16px;
  --radius-input: 10px;
  --radius-badge: 6px;

  /* SPACING SCALE (per brief — base 8px) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;
  --space-32: 128px;
  --space-48: 192px;

  /* SECTION PADDING (per brief) */
  --section-pad-y: 96px;          /* desktop */
  --section-pad-y-tablet: 64px;
  --section-pad-y-mobile: 48px;
  --container-max: 1280px;
  --container-pad-desktop: 48px;
  --container-pad-mobile: 24px;

  /* Z-INDEX */
  --z-base:      1;
  --z-content:   10;
  --z-sticky:    50;
  --z-nav:       100;
  --z-overlay:   200;
  --z-modal:     300;
  --z-toast:     400;
  --z-cursor:    9999;

  /* MOTION */
  --ease-default: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-micro:  240ms;
  --duration-medium: 480ms;
  --duration-hero:   800ms;
  --stagger:         60ms;
}

/* ==========================================================================
   DARK THEME OVERRIDES (used in hero, footer, dark sections)
   ========================================================================== */
[data-theme="dark"] {
  --bg:        var(--primary);
  --bg-dark:   var(--primary-dark);
  --bg-light:  var(--primary-light);
  --surface:   rgba(27, 53, 99, 0.6);
  --text:      #FFFFFF;
  --text-2:    rgba(255, 255, 255, 0.78);
  --text-3:    rgba(255, 255, 255, 0.58);
  --text-4:    rgba(255, 255, 255, 0.42);
  --border:    rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
}

/* ==========================================================================
   FONTS — Cabinet Grotesk (display) + Inter (body) + JetBrains Mono (code)
   Loaded via @import to preserve cascading.
   ========================================================================== */
@import url('https://api.fontshare.com/v2/css?f[]=cabinet-grotesk@400,500,600,700,800&f[]=satoshi@400,500,700,900&f[]=clash-display@200,300,400,500,600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ==========================================================================
   RESET (minimal — only what we always want)
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.003em;
  color: var(--neutral-700);
  background: var(--neutral-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  width: 100%;
  font-feature-settings: "ss01", "kern";
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { max-width: 100%; display: block; }
ul { list-style: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }
strong, b { font-weight: 600; color: var(--neutral-900); }

/* ==========================================================================
   TYPOGRAPHY (per brief Type Scale)
   ========================================================================== */
.font-display { font-family: 'Cabinet Grotesk', 'Inter', sans-serif; }
.font-body    { font-family: 'Inter', sans-serif; }
.font-mono    { font-family: 'JetBrains Mono', monospace; }

/* Stripe-DNA typography: ultra-light display weights, aggressive tracking, tabular nums */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Cabinet Grotesk', 'Satoshi', 'Inter', sans-serif;
  color: var(--neutral-900);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.1;
  font-feature-settings: "ss01", "tnum", "kern";
}

/* "Whispered authority" — light weight at massive sizes, aggressive negative tracking */
.t-hero    {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: clamp(48px, 7.5vw, 116px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-feature-settings: "ss01", "kern";
}
.t-h1      {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: clamp(40px, 5vw, 76px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.t-h2      {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: clamp(32px, 3.5vw, 56px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.t-h3      {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: clamp(24px, 2.4vw, 36px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.t-h4      { font-family: 'Cabinet Grotesk', sans-serif; font-size: clamp(18px, 1.5vw, 22px); font-weight: 500; line-height: 1.3; letter-spacing: -0.015em; }

.t-body-lg { font-family: 'Inter', sans-serif; font-size: clamp(18px, 1.3vw, 22px); font-weight: 400; line-height: 1.5; letter-spacing: -0.005em; }
.t-body    { font-family: 'Inter', sans-serif; font-size: 17px; font-weight: 400; line-height: 1.6; letter-spacing: -0.003em; }
.t-body-sm { font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 400; line-height: 1.55; color: var(--neutral-700); letter-spacing: 0; }
.t-caption { font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--neutral-400); }
.t-eyebrow {
  font-family: 'JetBrains Mono', 'Inter', monospace;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-ai-dk);
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.t-eyebrow::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
}
.t-eyebrow.coral { color: var(--accent-warm-dk); }
.t-eyebrow.gold { color: var(--accent-gold); }
.t-eyebrow.cyan-on-dark { color: var(--accent-ai); }

/* Tabular numerals for stats and prices */
.t-tabular, .stat-num, .price-amount, .mockup-stat-value, .num-tick {
  font-feature-settings: "tnum", "lnum";
  font-variant-numeric: tabular-nums lining-nums;
}

/* Drop-cap-style 1st letter for editorial emphasis (optional class) */
.editorial::first-letter {
  font-family: 'Cabinet Grotesk', serif;
  font-size: 4em;
  float: left;
  line-height: 0.8;
  margin: 6px 10px 0 0;
  color: var(--accent-warm);
  font-weight: 500;
}

/* Headlines on dark backgrounds get subtle cyan glow */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] .t-hero,
[data-theme="dark"] .t-h1,
[data-theme="dark"] .t-h2 {
  color: #FFFFFF;
  text-shadow: 0 1px 24px rgba(0, 212, 255, 0.15);
}

/* ==========================================================================
   LAYOUT PRIMITIVES
   ========================================================================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad-desktop);
}
.container-narrow {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 var(--container-pad-desktop);
}
.section {
  padding: var(--section-pad-y) 0;
  position: relative;
}
.section.is-dark {
  background: var(--primary);
  color: rgba(255,255,255,0.78);
}
.section.is-dark h1, .section.is-dark h2, .section.is-dark h3 { color: #FFFFFF; }
.section.is-mist  { background: var(--neutral-100); }
.section.is-card  { background: var(--neutral-card); }

/* ==========================================================================
   BUTTONS (per brief)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 200ms var(--ease-default);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn-sm { padding: 9px 18px; font-size: 14px; height: 36px; }
.btn-md, .btn { padding: 13px 24px; height: 44px; }
.btn-lg { padding: 17px 32px; font-size: 18px; height: 56px; }

/* Primary — coral pill */
.btn-primary {
  background: var(--accent-warm);
  color: #FFFFFF;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover {
  background: var(--accent-warm-dk);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.btn-primary:active { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-primary svg { transition: transform 200ms var(--ease-default); }
.btn-primary:hover svg { transform: translateX(4px); }

/* Secondary — cyan stroke */
.btn-secondary {
  background: transparent;
  color: var(--accent-ai-dk);
  border-color: var(--accent-ai-dk);
}
.btn-secondary:hover {
  background: rgba(0, 212, 255, 0.08);
  box-shadow: var(--shadow-glow);
}
[data-theme="dark"] .btn-secondary { color: var(--accent-ai); border-color: var(--accent-ai); }
[data-theme="dark"] .btn-secondary:hover { background: rgba(0, 212, 255, 0.12); }

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--neutral-900);
  position: relative;
}
[data-theme="dark"] .btn-ghost { color: rgba(255,255,255,0.85); }
.btn-ghost::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 24px; right: 24px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms var(--ease-default);
}
.btn-ghost:hover::after { transform: scaleX(1); }

/* Pulse animation on primary CTA in nav (per brief) */
.btn-pulse {
  animation: btnPulse 3s ease-in-out infinite;
}
@keyframes btnPulse {
  0%, 100% { box-shadow: var(--shadow-md), 0 0 0 0 rgba(255, 131, 102, 0.45); }
  50%      { box-shadow: var(--shadow-md), 0 0 0 8px rgba(255, 131, 102, 0); }
}

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-sm svg { width: 16px; height: 16px; }

/* ==========================================================================
   CARDS (per brief)
   ========================================================================== */
.card {
  background: var(--neutral-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  padding: var(--space-6);
  transition: all 200ms var(--ease-default);
  border: 1px solid transparent;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.card-bordered {
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   FORMS (per brief)
   ========================================================================== */
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-input);
  background: var(--neutral-card);
  color: var(--neutral-900);
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  transition: all 180ms var(--ease-default);
  outline: none;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent-ai);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.25);
}
.form-input.is-error, .form-textarea.is-error, .form-select.is-error {
  border-color: var(--error);
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--neutral-700);
  margin-bottom: 6px;
}
.form-error {
  color: var(--error);
  font-size: 14px;
  margin-top: 6px;
}
.form-help {
  color: var(--neutral-400);
  font-size: 14px;
  margin-top: 6px;
}

/* ==========================================================================
   BADGES / PILLS / CHIPS
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-badge);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--neutral-100);
  color: var(--neutral-700);
}
.badge-cyan  { background: rgba(0, 212, 255, 0.12); color: var(--accent-ai-dk); }
.badge-coral { background: rgba(255, 131, 102, 0.14); color: var(--accent-warm-dk); }
.badge-gold  { background: rgba(244, 184, 96, 0.18); color: #B07728; }
.badge-success { background: rgba(30, 142, 90, 0.12); color: var(--success); }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  background: var(--neutral-100);
  color: var(--neutral-700);
  border: 1px solid var(--neutral-200);
  transition: all 180ms var(--ease-default);
}
.pill:hover { background: var(--neutral-card); border-color: var(--accent-ai); color: var(--accent-ai-dk); }

/* ==========================================================================
   FOCUS RINGS (accessibility — per brief)
   ========================================================================== */
*:focus-visible {
  outline: 3px solid rgba(0, 212, 255, 0.5);
  outline-offset: 2px;
}

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

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
  .container, .container-narrow { padding: 0 var(--container-pad-mobile); }
  .section { padding: var(--section-pad-y-tablet) 0; }
}
@media (max-width: 768px) {
  body { font-size: 16px; }
  .section { padding: var(--section-pad-y-mobile) 0; }
}

