/* ============================================================
   KroLead — Design Tokens & Base
   Aurora/Dark-First Premium Design System
   ============================================================ */

/* ============================================================
   LIGHT MODE (DEFAULT)
   ============================================================ */
:root {
    /* ---- Colors ---- */
    --bg-base: #fafafa;
    --bg-surface: #f4f4f5;
    --bg-elevated: #e4e4e7;
    --bg-card: rgba(0, 0, 0, 0.02);
    --bg-card-hover: rgba(0, 0, 0, 0.05);
    --bg-secondary: #f4f4f5;
    --border: rgba(0, 0, 0, 0.06);
    --border-hover: rgba(0, 0, 0, 0.12);
    --border-subtle: rgba(0, 0, 0, 0.04);
    --border-light: rgba(0, 0, 0, 0.08);
    --text-primary: #09090b;
    --text-secondary: #71717a;
    --text-muted: #a1a1aa;

    /* ---- Accent Colors ---- */
    --accent-primary: #6366f1;
    --accent-indigo: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #ec4899;
    --accent-pink: #ec4899;
    --accent-success: #10b981;
    --accent-green: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --accent-red: #ef4444;
    --accent-cyan: #06b6d4;

    /* ---- Gradients ---- */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-purple: linear-gradient(135deg, #6366f1, #8b5cf6);
    --gradient-aurora: linear-gradient(135deg, #6366f1 0%, #818cf8 25%, #c084fc 50%, #f472b6 75%, #fb923c 100%);
    --gradient-subtle: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.04));

    /* ---- Typography ---- */
    --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;

    /* ---- Radii ---- */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;

    /* ---- Shadows ---- */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);
    --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.12);
    --shadow-glow-lg: 0 0 80px rgba(99, 102, 241, 0.18);

    /* ---- Easing ---- */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

    /* ---- Component Tokens ---- */
    --navbar-bg: rgba(250, 250, 250, 0.8);
    --phone-bg: #18181b;
    --phone-screen-bg: #09090b;
    --phone-border: rgba(255, 255, 255, 0.1);
    --floating-card-bg: rgba(255, 255, 255, 0.9);
    --download-card-bg: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e1b4b 100%);
    --download-text: rgba(255, 255, 255, 0.7);
}

/* ============================================================
   DARK MODE
   ============================================================ */
[data-theme="dark"] {
    --bg-base: #09090b;
    --bg-surface: #18181b;
    --bg-elevated: #27272a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-secondary: #111113;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --border-subtle: rgba(255, 255, 255, 0.04);
    --border-light: rgba(255, 255, 255, 0.06);
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    --accent-primary: #818cf8;
    --accent-indigo: #818cf8;
    --accent-secondary: #c084fc;
    --accent-tertiary: #f472b6;
    --accent-pink: #f472b6;
    --accent-success: #34d399;
    --accent-green: #34d399;
    --accent-warning: #fbbf24;
    --accent-danger: #f87171;
    --accent-red: #f87171;
    --accent-cyan: #22d3ee;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(129, 140, 248, 0.15);
    --shadow-glow-lg: 0 0 80px rgba(129, 140, 248, 0.2);

    --navbar-bg: rgba(9, 9, 11, 0.8);
    --phone-bg: #27272a;
    --floating-card-bg: rgba(24, 24, 27, 0.9);
}

/* ============================================================
   CSS RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    background: var(--bg-base);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-primary);
}

/* ---- Selection ---- */
::selection {
    background: var(--accent-primary);
    color: #fff;
}

/* ---- Custom Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(161, 161, 170, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(161, 161, 170, 0.5);
}

/* ---- Container ---- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
}

/* ---- Visually hidden (accessibility) ---- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---- body lock for overlays ---- */
body.menu-open {
    overflow: hidden;
}

body.has-mobile-sticky-cta {
    padding-bottom: 70px;
}
