:root {
    /* Core Brand Palette (Strictly Preserved) */
    --bg-base: #161618;
    --bg-elevated: #1d1d21;
    --bg-surface: #232329;
    --bg-surface-hover: #2a2a32;

    --accent: #f9893d;
    --accent-strong: #f96b31;
    --accent-soft: rgba(249, 137, 61, 0.14);
    --accent-border: rgba(249, 137, 61, 0.38);
    --accent-glow: rgba(249, 137, 61, 0.28);

    --text-primary: #ffffff;
    --text-secondary: #d6b88d;
    --text-muted: rgba(255, 255, 255, 0.76);
    --text-subtle: rgba(255, 255, 255, 0.56);

    --border-subtle: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.2);

    /* Layered Glass Surfaces & Specular Highlights */
    --surface-glass: linear-gradient(155deg, rgba(35, 35, 43, 0.84), rgba(22, 22, 27, 0.94));
    --surface-glass-hover: linear-gradient(155deg, rgba(44, 42, 50, 0.92), rgba(26, 25, 31, 0.98));
    --highlight-top: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    --highlight-accent: inset 0 1px 0 rgba(255, 255, 255, 0.26);

    --success: #4dccc6;
    --success-bg: rgba(77, 204, 198, 0.12);
    --error: #ff6b6b;
    --error-bg: rgba(255, 107, 107, 0.12);
    --info: #64b5f6;
    --info-bg: rgba(100, 181, 246, 0.12);

    /* Typography */
    --font-sans: "Montserratarm", "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --text-xs: 0.78rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: clamp(1rem, 0.95rem + 0.35vw, 1.15rem);
    --text-xl: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
    --text-2xl: clamp(1.5rem, 1.25rem + 1.2vw, 2.25rem);
    --text-3xl: clamp(1.85rem, 1.45rem + 2vw, 3.1rem);

    /* Layout & Spacing */
    --container-max: 1280px;
    --container-pad: clamp(1rem, 4vw, 3rem);
    --section-gap: clamp(3.75rem, 6.5vw, 6.25rem);
    --header-height: 84px;

    /* Radii & Shadows */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-pill: 999px;

    --shadow-card: 0 14px 36px rgba(0, 0, 0, 0.36), 0 2px 8px rgba(0, 0, 0, 0.22);
    --shadow-card-hover: 0 22px 48px rgba(0, 0, 0, 0.5), 0 0 28px rgba(249, 137, 61, 0.16);
    --shadow-glow: 0 8px 28px rgba(249, 137, 61, 0.28);

    /* Transitions */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 180ms;
    --duration-base: 300ms;

    /* Layers */
    --z-bg: 0;
    --z-content: 10;
    --z-header: 1000;
    --z-dropdown: 1100;
    --z-modal: 1200;
}

/* Script-Optimized Font Stacks (Zero External CDN Bloat) */
:root:lang(fa) {
    --font-sans: "Vazirmatn", "IRANSans", "Tahoma", "Noto Naskh Arabic", "DejaVu Sans", sans-serif;
}

:root:lang(ka) {
    --font-sans: "Noto Sans Georgian", "Sylfaen", "DejaVu Sans", sans-serif;
}

:root:lang(zh-Hans),
:root:lang(zh) {
    --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

:root:lang(ja) {
    --font-sans: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Meiryo", "Noto Sans CJK JP", sans-serif;
}

:root:lang(ar) {
    --font-sans: "IBM Plex Sans Arabic", "Noto Sans Arabic", "Geeza Pro", "Segoe UI", "Tahoma", "DejaVu Sans", sans-serif;
}

:root:lang(hi) {
    --font-sans: "Noto Sans Devanagari", "Kohinoor Devanagari", "Nirmala UI", "Mangal", "FreeSans", sans-serif;
}

:root:lang(ru) {
    --font-sans: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Roboto", "Noto Sans", "DejaVu Sans", sans-serif;
}

:root:lang(ko) {
    --font-sans: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", sans-serif;
}
