/* Sistem teme TM1–TM6, palete complete și hover accesibil — v0.4.3 */
html[data-theme="TM1"] {
    --button-hover-bg: #00e676;
    --button-hover-text: #0d1f18;
}

html[data-theme="TM2"] {
    --button-hover-bg: #fff685;
    --button-hover-text: #0049b7;
}

html[data-theme="TM3"] {
    --button-hover-bg: #edf756;
    --button-hover-text: #283148;
}

html[data-theme="TM4"] {
    --button-hover-bg: #a0d2eb;
    --button-hover-text: #30293d;
}

html[data-theme="TM5"] {
    color-scheme: light;
    --bg: #fbf8f2;
    --bg-soft: #dcc7aa;
    --surface: rgba(255, 253, 248, .88);
    --surface-solid: #fffdf8;
    --text: #293441;
    --muted: #637084;
    --line: rgba(107, 122, 143, .24);
    --accent: #aa4b0d;
    --accent-soft: rgba(247, 136, 47, .17);
    --accent-two: #f7882f;
    --accent-contrast: #6b7a8f;
    --brand-accent: #f7882f;
    --logo-text: #293441;
    --logo-muted: #6b7a8f;
    --button-text: #fff;
    --button-hover-bg: #f7c331;
    --button-hover-text: #293441;
    --shadow: rgba(107, 122, 143, .18);
    --console: rgba(255, 253, 248, .82);
    --error: #b42318;
    --success: #18794e;
}

html[data-theme="TM6"] {
    color-scheme: dark;
    --bg: #080a0b;
    --bg-soft: #0d1011;
    --surface: rgba(18, 21, 22, .8);
    --surface-solid: #121516;
    --text: #f4f6ef;
    --muted: #9ca39a;
    --line: rgba(255, 255, 255, .12);
    --accent: #cfdb4b;
    --accent-soft: rgba(207, 219, 75, .14);
    --accent-two: #efff75;
    --accent-contrast: #f4f6ef;
    --brand-accent: #cfdb4b;
    --logo-text: #f4f6ef;
    --logo-muted: #a9afa7;
    --button-text: #0c0f0a;
    --button-hover-bg: #efff75;
    --button-hover-text: #080a0b;
    --shadow: rgba(0, 0, 0, .3);
    --console: rgba(0, 0, 0, .24);
    --error: #ff8f84;
    --success: #70d8a2;
}

.brand-mask {
    background: linear-gradient(90deg, var(--brand-accent, var(--accent)) 0 4%, var(--logo-text) 4% 54.5%, var(--logo-muted) 54.5% 100%);
}

html[data-theme="TM1"] .nav-cta,
html[data-theme="TM1"] .primary-button {
    background: linear-gradient(135deg, #007a45, #008047);
    box-shadow: 0 0 0 1px #007a45, 0 16px 44px rgba(0, 230, 118, .18);
}

html[data-theme="TM1"] .hero h1 strong,
html[data-theme="TM2"] .hero h1 strong,
html[data-theme="TM3"] .hero h1 strong,
html[data-theme="TM4"] .hero h1 strong,
html[data-theme="TM5"] .hero h1 strong {
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
}

html[data-theme="TM1"] .hero h1 strong { background-image: linear-gradient(90deg, #007a45, #00e676 58%, #0d1f18); }
html[data-theme="TM2"] .hero h1 strong { background-image: linear-gradient(90deg, #ff1d58, #f75990 42%, #00ddff 70%, #0049b7); }
html[data-theme="TM3"] .hero h1 strong { background-image: linear-gradient(90deg, #087b8e, #51e2f5 38%, #a28089 72%, #283148); }
html[data-theme="TM4"] .hero h1 strong { background-image: linear-gradient(90deg, #8458b3, #d0bdf4 48%, #a28089 76%, #5f7f9c); }
html[data-theme="TM5"] .hero h1 strong { background-image: linear-gradient(90deg, #6b7a8f, #f7882f 40%, #f7c331 70%, #6b7a8f); }

html[data-theme="TM2"] .core {
    background: radial-gradient(circle at 38% 34%, #ff1d58 0 30%, #f75990 31% 46%, #fff685 47% 62%, #00ddff 63% 79%, #0049b7 80%);
}

html[data-theme="TM3"] .core {
    color: #283148;
    background: radial-gradient(circle at 38% 34%, #51e2f5 0 30%, #9df9ef 31% 46%, #edf756 47% 62%, #ffa8b6 63% 79%, #a28089 80%);
}

html[data-theme="TM4"] .core {
    background: radial-gradient(circle at 38% 34%, #8458b3 0 30%, #a28089 31% 46%, #d0bdf4 47% 62%, #e5eaf5 63% 79%, #a0d2eb 80%);
}

html[data-theme="TM5"] .core {
    color: #293441;
    background: radial-gradient(circle at 38% 34%, #f7c331 0 31%, #f7882f 32% 52%, #dcc7aa 53% 74%, #6b7a8f 75%);
}

.theme-current-swatch,
.theme-option-swatch,
.theme-setting-preview span {
    background: var(--swatch-gradient);
}

.theme-menu {
    min-width: 232px;
    width: 232px;
    padding: 9px;
    border-radius: 18px;
}

.theme-picker.is-open .theme-menu {
    display: grid;
    justify-items: stretch;
    gap: 4px;
}

.theme-option {
    width: 100%;
    height: auto;
    min-height: 44px;
    padding: 7px 10px;
    grid-template-columns: 24px minmax(0, 1fr);
    place-items: center start;
    gap: 10px;
    border-radius: 10px;
    text-align: left;
}

.theme-option-swatch {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
}

.theme-option-name {
    min-width: 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 750;
    line-height: 1.25;
}

.theme-option[aria-pressed="true"] .theme-option-name { color: var(--accent); }
.theme-option:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }

/* Buton secundar: aceeași prezență vizuală ca acțiunea principală. */
.text-button {
    position: relative;
    min-height: 56px;
    padding: 0 24px;
    justify-content: center;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
    border-radius: 4px;
    background: linear-gradient(135deg, var(--surface), var(--accent-soft));
    color: var(--text);
    font-weight: 800;
    box-shadow: 0 12px 34px color-mix(in srgb, var(--shadow) 72%, transparent);
    backdrop-filter: blur(12px);
}

.text-button span {
    color: var(--accent);
    font-size: 18px;
    transition: color .2s ease, transform .2s ease;
}

.text-button:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

.nav-cta,
.primary-button,
.service-cta-button,
.text-button,
.theme-menu-toggle,
.theme-option,
.menu-toggle,
.go-top {
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

@media (hover: hover) {
    html[data-theme] .nav-cta:hover,
    html[data-theme] .primary-button:hover,
    html[data-theme] .service-cta-button:hover,
    html[data-theme] .theme-menu-toggle:hover,
    html[data-theme] .go-top:hover {
        background: var(--button-hover-bg);
        color: var(--button-hover-text);
        border-color: var(--button-hover-bg);
        box-shadow: 0 16px 44px color-mix(in srgb, var(--button-hover-bg) 30%, transparent);
    }

    html[data-theme] .text-button:hover {
        background: var(--button-hover-bg);
        color: var(--button-hover-text);
        border-color: var(--button-hover-bg);
        box-shadow: 0 18px 44px color-mix(in srgb, var(--button-hover-bg) 32%, transparent);
        transform: translateY(-3px);
    }

    html[data-theme] .text-button:hover span {
        color: inherit;
        transform: translate(3px, -2px);
    }

    html[data-theme] .service-cta-button:hover strong {
        background: var(--button-hover-text);
        color: var(--button-hover-bg);
    }

    html[data-theme] .theme-option:hover {
        background: var(--button-hover-bg);
        color: var(--button-hover-text);
        border-color: var(--button-hover-bg);
    }

    html[data-theme] .theme-option:hover .theme-option-name { color: var(--button-hover-text); }

    html[data-theme] .menu-toggle:hover {
        background: var(--button-hover-bg);
        color: var(--button-hover-text);
        border-radius: 999px;
    }

    html[data-theme] .menu-toggle:hover em { color: var(--button-hover-text); }
    html[data-theme] .menu-toggle:hover .menu-icon i { background: var(--button-hover-text); }
}

@media (max-width: 860px) {
    .theme-menu {
        min-width: min(232px, calc(100vw - 32px));
        width: min(232px, calc(100vw - 32px));
    }
}
