/**
 * ==============================================================================
 * RankHawn Master Design Tokens (Single Source of Truth)
 * RankHawn-Inspired Fluid Clamp Typography & OKLCH Color Palette
 * ==============================================================================
 */

:root {
  /* ---------------------------------------------------------------------------
     1. Surfaces & Canvas Hierarchy (Deep Obsidian Slate)
     --------------------------------------------------------------------------- */
  --surface-base:             oklch(0.12 0.015 255);   /* #0B0F17: Main page background */
  --surface-subtle:           oklch(0.15 0.018 255);   /* #121822: Secondary sections & card bases */
  --surface-raised:           oklch(0.19 0.022 255);   /* #1B2330: Hover states, active tabs */
  --surface-elevated:         oklch(0.23 0.025 255);   /* #242E3E: Floating modals, drawers, tooltips */
  --surface-overlay:          oklch(0.08 0.012 255 / 0.85); /* Backdrop modal mask */

  /* ---------------------------------------------------------------------------
     2. Border & Divider Hierarchy
     --------------------------------------------------------------------------- */
  --border-subtle:            oklch(0.20 0.015 255);   /* Structural page dividers */
  --border-default:           oklch(0.26 0.020 255);   /* Resting card boundaries */
  --border-active:            oklch(0.38 0.030 255);   /* Hovered card boundary */
  --border-focus:             #0066ff;                  /* Brand accent focus outline */
  --border-glass:             oklch(0.98 0.005 90 / 0.08); /* Subtle glass highlight on dark cards */

  /* ---------------------------------------------------------------------------
     3. Brand Accent: Electric Blue (#0066FF Baseline) & Tech Teal (#00FFCC)
     --------------------------------------------------------------------------- */
  --accent-primary:           #0066ff;                  /* Conversion CTAs, links & active states */
  --accent-hover:             #0052cc;                  /* Hover state */
  --accent-active:            #0047b3;                  /* Pressed state */
  --accent-subtle:            rgba(0, 102, 255, 0.10);  /* Badge & card tint */
  --accent-glow:              rgba(0, 102, 255, 0.28);  /* Focused button glow */
  --accent-text:              #66a3ff;                  /* High-legibility accent text on dark */

  /* Secondary Brand Accents */
  --color-accent-teal:        #00ffcc;
  --color-accent-teal-subtle: rgba(0, 255, 204, 0.08);
  --color-accent-teal-glow:   rgba(0, 255, 204, 0.25);

  /* ---------------------------------------------------------------------------
     4. Functional & Semantic Accents
     --------------------------------------------------------------------------- */
  --accent-emerald:           oklch(0.72 0.18 150);    /* High-yield stats, active pulses */
  --accent-emerald-subtle:    oklch(0.20 0.06 150);    /* Metric pill backgrounds */
  --accent-emerald-glow:      oklch(0.72 0.18 150 / 0.3);

  --accent-cyan:              oklch(0.75 0.15 210);    /* Tech highlight */
  --accent-cyan-subtle:       oklch(0.20 0.05 210);

  --accent-warning:           oklch(0.78 0.16 80);     /* Amber indicator */
  --accent-warning-subtle:    oklch(0.22 0.06 80);

  --accent-error:             oklch(0.65 0.22 25);     /* Ruby red error text & borders */
  --accent-error-subtle:      oklch(0.20 0.08 25);     /* Error message container background */

  /* Text Colors */
  --color-text-primary:       #ffffff;
  --color-text-secondary:     #94a3b8;
  --color-text-tertiary:      #64748b;
  --text-primary:             #ffffff;
  --text-secondary:           #cbd5e1;
  --text-tertiary:            #94a3b8;
  --text-muted:               #64748b;

  /* ---------------------------------------------------------------------------
     5. Typography Families (Single Point of Modification)
     --------------------------------------------------------------------------- */
  --font-heading: 'Neue Montreal', '__montreal_a78db3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body:    'Neue Montreal', '__montreal_a78db3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Font Weights */
  --fw-regular:   400;
  --fw-medium:    500;
  --fw-semibold:  600;
  --fw-bold:      700;
  --fw-black:     800;

  /* ---------------------------------------------------------------------------
     6. Fluid Typography Scales (Continuous Clamp Curves)
     --------------------------------------------------------------------------- */
  --text-display: clamp(2.5rem, 4.8vw, 4.5rem);             /* Display Hero scale */
  --text-h1:      clamp(2.1rem, 3.8vw, 3.4rem);             /* 34px -> 54px - Matches perfect H1 */
  --text-h2:      clamp(1.65rem, 2.8vw, 2.45rem);           /* 26px -> 39px - Proportionally stepped H2 */
  --text-h3:      clamp(1.25rem, 1.2vw + 0.2rem, 1.75rem);   /* 20px -> 28px */
  --text-h4:      clamp(1.125rem, 0.8vw + 0.15rem, 1.375rem);/* 18px -> 22px */
  --text-h5:      clamp(1.0rem, 0.4vw + 0.1rem, 1.125rem);   /* 16px -> 18px */
  --text-h6:      0.875rem;                                  /* 14px */
  
  --text-lead:    clamp(1.125rem, 0.5vw + 0.95rem, 1.3125rem);/* 18px -> 21px */
  --text-body:    1.0rem;                                    /* 16px */
  --text-sm:      0.875rem;                                  /* 14px */
  --text-xs:      0.75rem;                                   /* 12px Floor */

  /* RankHawn-Inspired Letter Spacing */
  --tracking-display: -0.04em;
  --tracking-h1:      -0.035em;
  --tracking-h2:      -0.025em;
  --tracking-h3:      -0.02em;
  --tracking-body:     0.00em;
  --tracking-eyebrow: +0.06em;

  /* Line Heights */
  --leading-display: 1.05;
  --leading-h1:      1.10;
  --leading-h2:      1.15;
  --leading-h3:      1.25;
  --leading-body:    1.60;

  /* ---------------------------------------------------------------------------
     7. Spacing System (8-Point Modular Rhythm)
     --------------------------------------------------------------------------- */
  --space-1:   0.25rem;  /* 4px */
  --space-2:   0.5rem;   /* 8px */
  --space-3:   0.75rem;  /* 12px */
  --space-4:   1.0rem;   /* 16px */
  --space-5:   1.25rem;  /* 20px */
  --space-6:   1.5rem;   /* 24px */
  --space-8:   2.0rem;   /* 32px */
  --space-10:  2.5rem;   /* 40px */
  --space-12:  3.0rem;   /* 48px */
  --space-16:  4.0rem;   /* 64px */
  --space-20:  5.0rem;   /* 80px */
  --space-24:  6.0rem;   /* 96px */

  --space-xs:  0.5rem;
  --space-sm:  0.75rem;
  --space-md:  1.0rem;
  --space-lg:  1.5rem;
  --space-xl:  2.0rem;
  --space-2xl: 3.0rem;
  --space-3xl: 4.5rem;
  --space-4xl: 6.0rem;

  /* ---------------------------------------------------------------------------
     8. Layout Containers & Grid Constraints
     --------------------------------------------------------------------------- */
  --container-narrow: 840px;
  --container-max:    1240px;
  --container-wide:   1440px;
  --container-pad:    clamp(1.25rem, 4vw, 2.5rem);
  --container-gutter: clamp(1.0rem, 3vw, 2.0rem);

  /* ---------------------------------------------------------------------------
     9. Border Radii
     --------------------------------------------------------------------------- */
  --radius-xs:   3px;
  --radius-sm:   6px;     /* Form inputs, tag pills */
  --radius-md:   10px;    /* Buttons, interactive controls */
  --radius-lg:   16px;    /* Standard cards, bento cells */
  --radius-xl:   24px;    /* Hero matrix card, modal shells */
  --radius-pill: 9999px;  /* Live status pill, micro badges */

  /* ---------------------------------------------------------------------------
     10. Elevation Shadows & Accent Glows
     --------------------------------------------------------------------------- */
  --shadow-sm:   0 1px 2px oklch(0 0 0 / 0.35);
  --shadow-md:   0 4px 12px oklch(0 0 0 / 0.45);
  --shadow-lg:   0 12px 32px oklch(0 0 0 / 0.60);
  --shadow-glow: 0 4px 20px oklch(0.68 0.22 42 / 0.35);

  /* ---------------------------------------------------------------------------
     11. Transitions & Motion Physics
     --------------------------------------------------------------------------- */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast:   150ms;
  --duration-normal: 250ms;
  --duration-slow:   400ms;

  /* ---------------------------------------------------------------------------
     12. Z-Index Stacking Context Scale
     --------------------------------------------------------------------------- */
  --z-negative: -1;
  --z-base:      1;
  --z-raised:    10;
  --z-sticky:    100;    /* Site Header */
  --z-backdrop:  500;    /* Mobile Drawer & Modal Backdrops */
  --z-drawer:    600;    /* Slide-out Navigation Drawer */
  --z-modal:     700;    /* Conversion Popups / Lightboxes */

  /* ---------------------------------------------------------------------------
     13. Global Mobile Design System Tokens (<= 768px)
     --------------------------------------------------------------------------- */
  --mob-h1:            clamp(2rem, 6vw, 2.375rem);      /* 32-38px */
  --mob-h2:            clamp(1.625rem, 5vw, 1.875rem);  /* 26-30px */
  --mob-h3:            clamp(1.25rem, 4vw, 1.5rem);     /* 20-24px */
  --mob-body:          0.9375rem;                       /* 15px */
  --mob-supporting:    0.875rem;                        /* 14px */
  --mob-nav-heading:   1.0625rem;                       /* 17px semibold */
  --mob-nav-sub:       0.9375rem;                       /* 15px */
  --mob-tag:           0.75rem;                         /* 12px */
  --mob-leading-body:  1.55;                            /* 1.5-1.6 */
  --mob-pad-x:         clamp(1rem, 4.2vw, 1.25rem);     /* 16-20px */
  --mob-card-pad:      clamp(1.25rem, 4.5vw, 1.5rem);   /* 20-24px */
  --mob-section-gap:   clamp(2.5rem, 8vw, 3.5rem);      /* 40-56px */
  --mob-card-gap:      clamp(1rem, 4vw, 1.5rem);        /* 16-24px */
  --mob-border:        1px;                             /* Standard 1px border */
  --mob-btn-height:    46px;                            /* 44-48px */
  --mob-header-height: 66px;                            /* 64-72px */
  --mob-touch-target:  44px;                            /* 44x44px min */
  --mob-card-radius:   20px;                            /* 16-24px */
  --mob-curve-radius:  clamp(3rem, 12vw, 4rem);         /* 48-64px */
}
