/*
 * Brakanda theme system
 * Contract: exactly 6 themes, applied with html[data-theme="<slug>"].
 * No arbitrary component colors below this line; consume semantic tokens only.
 */

:root,
html[data-theme="light"] {
    color-scheme: light;
    --theme-font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --theme-font-size-xs: 0.75rem;
    --theme-font-size-sm: 0.875rem;
    --theme-font-size-md: 1rem;
    --theme-font-size-lg: 1.125rem;
    --theme-font-size-xl: 1.5rem;
    --theme-font-size-2xl: 2rem;
    --theme-line-height-tight: 1.2;
    --theme-line-height-base: 1.6;
    --theme-weight-regular: 400;
    --theme-weight-medium: 500;
    --theme-weight-semibold: 600;
    --theme-weight-bold: 700;
    --theme-space-1: 0.25rem;
    --theme-space-2: 0.5rem;
    --theme-space-3: 0.75rem;
    --theme-space-4: 1rem;
    --theme-space-5: 1.5rem;
    --theme-space-6: 2rem;
    --theme-radius-sm: 4px;
    --theme-radius-md: 8px;
    --theme-radius-lg: 12px;
    --theme-shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06);
    --theme-shadow-md: 0 8px 24px rgba(17, 24, 39, 0.10);
    --theme-shadow-lg: 0 18px 44px rgba(17, 24, 39, 0.14);
    --theme-color-bg: #ffffff;
    --theme-color-surface: #f7f8f5;
    --theme-color-surface-raised: #ffffff;
    --theme-color-primary: #008060;
    --theme-color-primary-hover: #00684f;
    --theme-color-primary-soft: #dff3ed;
    --theme-color-secondary: #2f6f5e;
    --theme-color-text: #111827;
    --theme-color-text-muted: #6b7280;
    --theme-color-text-inverse: #ffffff;
    --theme-color-border: #dfe3e8;
    --theme-color-success: #008060;
    --theme-color-warning: #b7791f;
    --theme-color-danger: #d72c0d;
    --theme-focus-ring: rgba(0, 128, 96, 0.18);
    --theme-button-radius: var(--theme-radius-sm);
    --theme-card-radius: var(--theme-radius-md);
    --theme-form-radius: var(--theme-radius-sm);
    --theme-navbar-bg: var(--theme-color-surface-raised);
    --theme-modal-bg: var(--theme-color-surface-raised);
    --primary-color: var(--theme-color-primary);
    --primary-hover: var(--theme-color-primary-hover);
    --primary-light: var(--theme-color-primary-soft);
    --secondary-color: var(--theme-color-secondary);
    --text-primary: var(--theme-color-text);
    --text-secondary: var(--theme-color-text-muted);
    --text-light: var(--theme-color-text-muted);
    --text-on-primary: var(--theme-color-text-inverse);
    --bg-white: var(--theme-color-bg);
    --bg-light: var(--theme-color-surface);
    --bg-gray: var(--theme-color-surface);
    --bg-border: var(--theme-color-border);
    --accent-success: var(--theme-color-success);
    --accent-error: var(--theme-color-danger);
    --accent-warning: var(--theme-color-warning);
    --shadow-sm: var(--theme-shadow-sm);
    --shadow-md: var(--theme-shadow-md);
    --shadow-lg: var(--theme-shadow-lg);
    --radius-sm: var(--theme-radius-sm);
    --radius-md: var(--theme-radius-md);
    --radius-lg: var(--theme-radius-lg);
    --font-primary: var(--theme-font-family);
    --bs-primary: var(--theme-color-primary);
    --primary-rgb: 0, 128, 96;
    --bs-primary-rgb: 0, 128, 96;
    --bs-body-bg: var(--theme-color-bg);
    --bs-body-color: var(--theme-color-text);
    --bs-border-color: var(--theme-color-border);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --theme-color-bg: #121417;
    --theme-color-surface: #1d2228;
    --theme-color-surface-raised: #252b33;
    --theme-color-primary: #00c896;
    --theme-color-primary-hover: #31ddb3;
    --theme-color-primary-soft: #123d33;
    --theme-color-secondary: #65d6ad;
    --theme-color-text: #f4f6f8;
    --theme-color-text-muted: #a8b0ba;
    --theme-color-text-inverse: #08110e;
    --theme-color-border: #38414c;
    --theme-color-success: #00c896;
    --theme-color-warning: #f6ad55;
    --theme-color-danger: #ff6b6b;
    --theme-focus-ring: rgba(0, 200, 150, 0.22);
    --theme-navbar-bg: var(--theme-color-surface);
    --theme-modal-bg: var(--theme-color-surface-raised);
    --primary-rgb: 0, 200, 150;
    --bs-primary-rgb: 0, 200, 150;
}

html[data-theme="elegant"] {
    color-scheme: light;
    --theme-color-bg: #fdf8f0;
    --theme-color-surface: #f5ecdf;
    --theme-color-surface-raised: #fffaf3;
    --theme-color-primary: #8b6914;
    --theme-color-primary-hover: #684f0f;
    --theme-color-primary-soft: #efe2bf;
    --theme-color-secondary: #6f4e37;
    --theme-color-text: #21170d;
    --theme-color-text-muted: #735f48;
    --theme-color-text-inverse: #fffaf3;
    --theme-color-border: #dac9ad;
    --theme-color-success: #4a7c59;
    --theme-color-warning: #b7791f;
    --theme-color-danger: #9f2a1d;
    --theme-focus-ring: rgba(139, 105, 20, 0.18);
    --theme-radius-sm: 2px;
    --theme-radius-md: 4px;
    --theme-radius-lg: 8px;
    --primary-rgb: 139, 105, 20;
    --bs-primary-rgb: 139, 105, 20;
}

html[data-theme="modern"] {
    color-scheme: light;
    --theme-color-bg: #ffffff;
    --theme-color-surface: #f4f6fb;
    --theme-color-surface-raised: #ffffff;
    --theme-color-primary: #5c6ac4;
    --theme-color-primary-hover: #4959bd;
    --theme-color-primary-soft: #eceffd;
    --theme-color-secondary: #00848e;
    --theme-color-text: #202a36;
    --theme-color-text-muted: #637381;
    --theme-color-text-inverse: #ffffff;
    --theme-color-border: #dfe3e8;
    --theme-color-success: #108043;
    --theme-color-warning: #c05717;
    --theme-color-danger: #de3618;
    --theme-focus-ring: rgba(92, 106, 196, 0.18);
    --primary-rgb: 92, 106, 196;
    --bs-primary-rgb: 92, 106, 196;
}

html[data-theme="minimal"] {
    color-scheme: light;
    --theme-color-bg: #ffffff;
    --theme-color-surface: #f6f6f6;
    --theme-color-surface-raised: #ffffff;
    --theme-color-primary: #111111;
    --theme-color-primary-hover: #000000;
    --theme-color-primary-soft: #eeeeee;
    --theme-color-secondary: #4b5563;
    --theme-color-text: #111111;
    --theme-color-text-muted: #6f6f6f;
    --theme-color-text-inverse: #ffffff;
    --theme-color-border: #dedede;
    --theme-color-success: #1f7a4d;
    --theme-color-warning: #a16207;
    --theme-color-danger: #b91c1c;
    --theme-focus-ring: rgba(17, 17, 17, 0.16);
    --theme-radius-sm: 0;
    --theme-radius-md: 2px;
    --theme-radius-lg: 4px;
    --theme-shadow-sm: none;
    --theme-shadow-md: 0 1px 0 var(--theme-color-border);
    --theme-shadow-lg: 0 8px 28px rgba(17, 17, 17, 0.10);
    --primary-rgb: 17, 17, 17;
    --bs-primary-rgb: 17, 17, 17;
}

html[data-theme="bold"] {
    color-scheme: dark;
    --theme-color-bg: #0f0f10;
    --theme-color-surface: #1a1a1c;
    --theme-color-surface-raised: #242427;
    --theme-color-primary: #ff4d00;
    --theme-color-primary-hover: #ff6a2a;
    --theme-color-primary-soft: #3b1a0d;
    --theme-color-secondary: #ffbe00;
    --theme-color-text: #f7f7f7;
    --theme-color-text-muted: #b7b7bd;
    --theme-color-text-inverse: #111111;
    --theme-color-border: #3a3a40;
    --theme-color-success: #22c55e;
    --theme-color-warning: #ffbe00;
    --theme-color-danger: #ff5c5c;
    --theme-focus-ring: rgba(255, 77, 0, 0.22);
    --theme-radius-sm: 6px;
    --theme-radius-md: 8px;
    --theme-radius-lg: 10px;
    --theme-navbar-bg: #080808;
    --theme-modal-bg: var(--theme-color-surface-raised);
    --primary-rgb: 255, 77, 0;
    --bs-primary-rgb: 255, 77, 0;
}

html[data-theme] body {
    background: var(--theme-color-bg);
    color: var(--theme-color-text);
    font-family: var(--theme-font-family);
    font-size: var(--theme-font-size-md);
    line-height: var(--theme-line-height-base);
}

html[data-theme] a {
    color: var(--theme-color-primary);
}

html[data-theme] a:hover {
    color: var(--theme-color-primary-hover);
}

html[data-theme] .bg-primary {
    background-color: var(--theme-color-primary) !important;
    color: var(--theme-color-text-inverse) !important;
}

html[data-theme] .text-muted {
    color: var(--theme-color-text-muted) !important;
}

html[data-theme] .navbar,
html[data-theme] .offcanvas,
html[data-theme] .dropdown-menu {
    background-color: var(--theme-navbar-bg) !important;
    color: var(--theme-color-text);
    border-color: var(--theme-color-border);
}

html[data-theme] .nav-link,
html[data-theme] .dropdown-item,
html[data-theme] .navbar-brand {
    color: var(--theme-color-text) !important;
}

html[data-theme] .nav-link:hover,
html[data-theme] .nav-link.active,
html[data-theme] .dropdown-item:hover,
html[data-theme] .dropdown-item.active {
    background-color: var(--theme-color-primary-soft);
    color: var(--theme-color-primary) !important;
}

html[data-theme] .card,
html[data-theme] .product-card,
html[data-theme] .feature-card,
html[data-theme] .testimonial-card,
html[data-theme] .step-card {
    background-color: var(--theme-color-surface-raised);
    border-color: var(--theme-color-border);
    border-radius: var(--theme-card-radius);
    box-shadow: var(--theme-shadow-sm);
    color: var(--theme-color-text);
}

html[data-theme] .modal-content {
    background-color: var(--theme-modal-bg);
    border-color: var(--theme-color-border);
    border-radius: var(--theme-radius-lg);
    color: var(--theme-color-text);
}

html[data-theme] .modal-header,
html[data-theme] .modal-footer,
html[data-theme] .table,
html[data-theme] hr {
    border-color: var(--theme-color-border);
}

html[data-theme] .form-control,
html[data-theme] .form-select,
html[data-theme] input,
html[data-theme] textarea,
html[data-theme] select {
    background-color: var(--theme-color-surface-raised);
    border-color: var(--theme-color-border);
    border-radius: var(--theme-form-radius);
    color: var(--theme-color-text);
}

html[data-theme] .form-control:focus,
html[data-theme] .form-select:focus,
html[data-theme] input:focus,
html[data-theme] textarea:focus,
html[data-theme] select:focus {
    background-color: var(--theme-color-surface-raised);
    border-color: var(--theme-color-primary);
    box-shadow: 0 0 0 3px var(--theme-focus-ring);
    color: var(--theme-color-text);
}

html[data-theme] .btn-primary,
html[data-theme] .btn-success {
    background-color: var(--theme-color-primary);
    border-color: var(--theme-color-primary);
    border-radius: var(--theme-button-radius);
    color: var(--theme-color-text-inverse);
    font-weight: var(--theme-weight-semibold);
}

html[data-theme] .btn-primary:hover,
html[data-theme] .btn-success:hover {
    background-color: var(--theme-color-primary-hover);
    border-color: var(--theme-color-primary-hover);
    color: var(--theme-color-text-inverse);
}

html[data-theme] .btn-outline-primary {
    border-color: var(--theme-color-primary);
    color: var(--theme-color-primary);
}

html[data-theme] .btn-outline-primary:hover {
    background-color: var(--theme-color-primary);
    color: var(--theme-color-text-inverse);
}

html[data-theme] footer,
html[data-theme] footer.bg-dark {
    background-color: var(--theme-color-surface) !important;
    border-top: 1px solid var(--theme-color-border);
    color: var(--theme-color-text) !important;
}

html[data-theme] footer .text-white,
html[data-theme] footer a.text-white,
html[data-theme] .bg-primary .text-white,
html[data-theme] .bg-primary a.text-white {
    color: var(--theme-color-text-inverse) !important;
}

html[data-theme] footer .text-white,
html[data-theme] footer a.text-white {
    color: var(--theme-color-text) !important;
}

html[data-theme] .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--theme-color-text);
    --bs-table-border-color: var(--theme-color-border);
    --bs-table-hover-bg: var(--theme-color-surface);
    color: var(--theme-color-text);
}

html[data-theme] .badge.bg-danger {
    background-color: var(--theme-color-danger) !important;
}

html[data-theme] .platform-stats-bar,
html[data-theme] .newsletter,
html[data-theme] .revenue-cta,
html[data-theme] .step-icon-wrap {
    background: var(--theme-color-primary) !important;
    color: var(--theme-color-text-inverse) !important;
}

html[data-theme="dark"] img,
html[data-theme="bold"] img {
    color-scheme: light;
}

html[data-theme] * {
    transition-property: background-color, border-color, color, box-shadow;
    transition-duration: 120ms;
    transition-timing-function: ease;
}
