/* Top Performance Vietnam — Design Tokens */

:root {
    /* Brand palette */
    --color-slate-950: #0f172a;
    --color-slate-900: #1e293b;
    --color-slate-800: #334155;
    --color-slate-700: #475569;
    --color-slate-600: #64748b;
    --color-slate-500: #94a3b8;
    --color-slate-400: #cbd5e1;
    --color-slate-300: #e2e8f0;
    --color-slate-200: #f1f5f9;
    --color-slate-100: #f8fafc;
    --color-stone-50: #fafaf9;
    --color-stone-100: #f5f5f4;
    --color-stone-200: #e7e5e4;
    --color-stone-800: #292524;
    --color-brand-orange: #ef5719;
    --color-hero-title: #ff9a56;
    --text-on-hero: #ffffff;
    --color-copper: #c17f59;
    --color-copper-light: #d4a574;
    --color-copper-dark: #a66542;
    --color-sage: #5b8a72;
    --color-sage-light: #7aa892;
    --color-sage-muted: #e8f0eb;

    /* Semantic surfaces (light) */
    --bg-surface: var(--color-stone-50);
    --bg-elevated: #ffffff;
    --bg-muted: var(--color-stone-100);
    --bg-inverse: var(--color-slate-900);
    --bg-accent-subtle: #f7f0eb;

    --text-primary: var(--color-slate-900);
    --text-secondary: var(--color-slate-700);
    --text-tertiary: var(--color-slate-600);
    --text-muted: var(--color-slate-500);
    --text-inverse: #ffffff;
    --text-accent: var(--color-copper-dark);

    --border-subtle: var(--color-stone-200);
    --border-default: var(--color-slate-300);
    --border-strong: var(--color-slate-400);

    /* Legacy aliases (backward compat) */
    --primary-color: var(--color-slate-900);
    --secondary-color: var(--color-slate-700);
    --accent-color: var(--color-copper);
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-light: var(--text-tertiary);
    --bg-primary: var(--bg-elevated);
    --bg-secondary: var(--bg-muted);
    --bg-light: var(--bg-muted);
    --bg-dark: var(--color-slate-950);
    --bg-green: var(--color-sage-muted);
    --border-light: var(--border-subtle);
    --border-medium: var(--border-default);

    /* Hero overlay */
    --hero-overlay: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.82) 0%,
        rgba(30, 41, 59, 0.65) 50%,
        rgba(15, 23, 42, 0.75) 100%
    );
    --hero-stat-bg: rgba(255, 255, 255, 0.08);
    --hero-stat-border: rgba(255, 255, 255, 0.15);

    /* Header */
    --header-bg: rgba(250, 250, 249, 0.88);
    --header-bg-scrolled: rgba(250, 250, 249, 0.96);
    --header-border: var(--border-subtle);

    /* Typography */
    --font-display: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-xs: clamp(0.7rem, 0.65rem + 0.15vw, 0.75rem);
    --font-size-sm: clamp(0.8rem, 0.75rem + 0.2vw, 0.875rem);
    --font-size-base: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
    --font-size-lg: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
    --font-size-xl: clamp(1.1rem, 1rem + 0.4vw, 1.25rem);
    --font-size-2xl: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
    --font-size-3xl: clamp(1.5rem, 1.25rem + 1vw, 1.875rem);
    --font-size-4xl: clamp(1.875rem, 1.5rem + 1.5vw, 2.25rem);
    --font-size-5xl: clamp(2.25rem, 1.75rem + 2vw, 3rem);
    --font-size-hero: clamp(2rem, 1.5rem + 2.5vw, 3.75rem);

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    --spacing-4xl: 5rem;
    --spacing-5xl: 6rem;
    --section-padding: clamp(4rem, 8vw, 7rem);
    --container-max: 1280px;
    --container-padding: clamp(1rem, 5vw, 2rem);
    --header-height: 72px;

    /* Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.25rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08);
    --shadow-xl: 0 24px 48px rgba(15, 23, 42, 0.12);
    --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(15, 23, 42, 0.04);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;
    --transition-theme: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;

    /* Z-index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;

    /* Breakpoints (reference) */
    --bp-sm: 480px;
    --bp-md: 768px;
    --bp-lg: 1024px;
    --bp-xl: 1280px;

    color-scheme: light;
}

[data-theme="dark"] {
    --color-hero-title: #ef5719;
    --text-on-hero: #ffffff;
    --bg-surface: #0b1120;
    --bg-elevated: #161f33;
    --bg-muted: #1c2740;
    --bg-footer: #060a14;
    --bg-inverse: var(--color-stone-50);
    --bg-accent-subtle: #2a221c;

    --text-primary: var(--color-slate-100);
    --text-secondary: var(--color-slate-300);
    --text-tertiary: var(--color-slate-400);
    --text-muted: var(--color-slate-500);
    --text-inverse: var(--color-slate-900);
    --text-accent: var(--color-copper-light);

    --primary-color: var(--color-slate-100);
    --secondary-color: var(--color-slate-300);
    --accent-color: var(--color-copper-light);
    --bg-primary: var(--bg-elevated);
    --bg-secondary: var(--bg-muted);
    --bg-light: var(--bg-muted);
    --border-subtle: rgba(148, 163, 184, 0.18);
    --border-default: rgba(148, 163, 184, 0.28);
    --border-strong: rgba(148, 163, 184, 0.45);
    --border-light: var(--border-subtle);
    --border-medium: var(--border-default);

    --hero-overlay: linear-gradient(
        135deg,
        rgba(2, 6, 23, 0.9) 0%,
        rgba(15, 23, 42, 0.8) 50%,
        rgba(2, 6, 23, 0.88) 100%
    );
    --hero-stat-bg: rgba(255, 255, 255, 0.06);
    --hero-stat-border: rgba(255, 255, 255, 0.1);

    --header-bg: #161f33;
    --header-bg-scrolled: #1a2438;
    --header-border: var(--border-default);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.35);
    --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.45);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.15);

    color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
    :root {
        --transition-fast: 0ms;
        --transition-normal: 0ms;
        --transition-slow: 0ms;
        --transition-theme: none;
    }
}
