/* Kid-friendly style packs: solid chrome (header/footer) vs soft page surface */

body {
    background: var(--body-bg, var(--color-background));
    color: var(--color-text);
    font-family: var(--font-sans);
    letter-spacing: var(--letter-spacing, 0);
    --radius-panel: clamp(0px, var(--radius-medium), 14px);
    --radius-control: var(--radius-small);
    --header-bg: #ffffff;
    --footer-bg: #ffffff;
    --header-shadow: 0 8px 24px rgb(15 23 42 / 6%);
    --footer-shadow: 0 -6px 20px rgb(15 23 42 / 4%);
    --chrome-border: #e8e8ee;
}

.site-header {
    background: var(--header-bg) !important;
    border-bottom: 1px solid var(--chrome-border, var(--color-border));
    box-shadow: var(--header-shadow);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.site-footer {
    background: var(--footer-bg) !important;
    border-top: 1px solid var(--chrome-border, var(--color-border));
    box-shadow: var(--footer-shadow);
}

.site-main {
    min-height: min(48vh, 520px);
}

.section:nth-of-type(even) {
    background: var(--section-alt-bg, transparent);
}

.button {
    border-radius: var(--radius-button, var(--radius-small));
    font-weight: var(--button-weight, 700);
    letter-spacing: var(--button-tracking, 0);
    text-transform: var(--button-transform, none);
    box-shadow: var(--button-shadow, 0 6px 16px rgb(0 0 0 / 10%));
    border: var(--button-border, 0);
}

.card,
.advantage-item {
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-card);
    border: var(--card-border, 1px solid var(--color-border));
    background: var(--card-bg, var(--color-surface));
}

.hero-media img,
.section-media img,
.card img,
.gallery-grid img {
    border-radius: var(--radius-media, var(--radius-medium));
}

h1,
h2,
h3,
.hero-title,
.section-title {
    font-family: var(--font-display, var(--font-sans));
    letter-spacing: var(--heading-tracking, -0.02em);
    text-transform: var(--heading-transform, none);
}

.site-nav a[aria-current="page"] {
    color: var(--color-accent);
}

/* ——— 1. Майстерня ——— */
body.style-atelier {
    --color-primary: #134e4a;
    --color-text: #1f2937;
    --color-muted: #64748b;
    --color-background: #eef8f6;
    --color-surface: #ffffff;
    --color-border: #d7ebe6;
    --color-accent: #0d9488;
    --body-bg:
        radial-gradient(circle at 12% 0%, #ccfbf1, transparent 42%),
        linear-gradient(180deg, #f0fdfa 0%, #e7f5f2 100%);
    --font-sans: "DM Sans", "Segoe UI", sans-serif;
    --font-display: "DM Sans", "Segoe UI", sans-serif;
    --radius-small: 10px;
    --radius-medium: 18px;
    --shadow-card: 0 12px 28px rgb(13 148 136 / 10%);
    --chrome-border: #d9ece8;
    --section-alt-bg: rgb(255 255 255 / 35%);
}

/* ——— 2. Казка ——— */
body.style-editorial {
    --color-primary: #7c2d12;
    --color-text: #44403c;
    --color-muted: #a8a29e;
    --color-background: #fff7ed;
    --color-surface: #ffffff;
    --color-border: #fed7aa;
    --color-accent: #ea580c;
    --body-bg: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
    --font-sans: "Nunito Sans", "Segoe UI", sans-serif;
    --font-display: "Fraunces", Georgia, serif;
    --radius-small: 12px;
    --radius-medium: 20px;
    --radius-button: 999px;
    --shadow-card: 0 14px 30px rgb(194 65 12 / 8%);
    --chrome-border: #fde68a;
    --heading-tracking: -0.03em;
    --section-alt-bg: rgb(255 255 255 / 45%);
}

body.style-editorial .hero-title {
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    font-weight: 500;
}

body.style-editorial .button {
    background: var(--color-accent);
}

/* ——— 3. Кубики ——— */
body.style-bento {
    --color-primary: #1e3a8a;
    --color-text: #1e293b;
    --color-muted: #64748b;
    --color-background: #eff6ff;
    --color-surface: #ffffff;
    --color-border: #bfdbfe;
    --color-accent: #2563eb;
    --body-bg: #eff6ff;
    --font-sans: "Outfit", "Segoe UI", sans-serif;
    --font-display: "Outfit", "Segoe UI", sans-serif;
    --radius-small: 14px;
    --radius-medium: 22px;
    --shadow-card: none;
    --card-border: 2px solid #bfdbfe;
    --chrome-border: #dbeafe;
    --section-alt-bg: transparent;
}

body.style-bento .card:nth-child(3n + 1) { background: #dbeafe; }
body.style-bento .card:nth-child(3n + 2) { background: #ffffff; }
body.style-bento .card:nth-child(3n) { background: #f0f9ff; }

body.style-bento .hero-title {
    font-weight: 800;
}

/* ——— 4. Бульбашки ——— */
body.style-glass {
    --color-primary: #4c1d95;
    --color-text: #4c1d95;
    --color-muted: #7c3aed;
    --color-background: #f5f3ff;
    --color-surface: #ffffff;
    --color-border: #ddd6fe;
    --color-accent: #8b5cf6;
    --body-bg:
        radial-gradient(ellipse 70% 50% at 8% 0%, #ddd6fe, transparent 55%),
        radial-gradient(ellipse 60% 40% at 92% 8%, #fbcfe8, transparent 50%),
        #f5f3ff;
    --font-sans: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    --font-display: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    --radius-small: 16px;
    --radius-medium: 28px;
    --shadow-card: 0 18px 40px rgb(139 92 246 / 12%);
    --card-bg: rgb(255 255 255 / 82%);
    --chrome-border: #e9e3ff;
    --button-shadow: 0 10px 24px rgb(139 92 246 / 28%);
    --section-alt-bg: rgb(255 255 255 / 30%);
}

body.style-glass .card,
body.style-glass .advantage-item {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* ——— 5. Крейда ——— */
body.style-brutal {
    --color-primary: #111827;
    --color-text: #111827;
    --color-muted: #4b5563;
    --color-background: #fef9c3;
    --color-surface: #ffffff;
    --color-border: #111827;
    --color-accent: #eab308;
    --body-bg: #fef9c3;
    --font-sans: "Space Grotesk", "Segoe UI", sans-serif;
    --font-display: "Space Grotesk", "Segoe UI", sans-serif;
    --radius-small: 0;
    --radius-medium: 0;
    --radius-media: 0;
    --radius-button: 0;
    --radius-panel: 0;
    --radius-control: 0;
    --shadow-card: 5px 5px 0 #111827;
    --card-border: 3px solid #111827;
    --chrome-border: #111827;
    --header-shadow: 0 3px 0 #111827;
    --footer-shadow: none;
    --heading-transform: none;
    --button-transform: uppercase;
    --button-tracking: 0.04em;
    --button-border: 3px solid #111827;
    --button-shadow: 4px 4px 0 #111827;
    --section-alt-bg: #fef08a;
}

body.style-brutal .button {
    background: #fde047;
    color: #111827;
}

body.style-brutal .button:hover,
body.style-brutal .button:focus-visible {
    filter: none;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #111827;
}

/* ——— 6. Цукерка ——— */
body.style-dopamine {
    --color-primary: #9d174d;
    --color-text: #831843;
    --color-muted: #db2777;
    --color-background: #fff1f2;
    --color-surface: #ffffff;
    --color-border: #fecdd3;
    --color-accent: #ec4899;
    --body-bg:
        radial-gradient(circle at 90% 0%, #fce7f3, transparent 40%),
        radial-gradient(circle at 0% 80%, #ffedd5, transparent 35%),
        #fff1f2;
    --font-sans: "Nunito", "Segoe UI", sans-serif;
    --font-display: "Nunito", "Segoe UI", sans-serif;
    --radius-small: 14px;
    --radius-medium: 26px;
    --radius-control: 999px;
    --radius-button: 999px;
    --radius-panel: 16px;
    --shadow-card: 0 14px 0 #fbcfe8;
    --card-border: 2px solid #f9a8d4;
    --chrome-border: #fecdd3;
    --button-shadow: 0 6px 0 #9d174d;
    --section-alt-bg: rgb(255 255 255 / 50%);
}

body.style-dopamine .button:hover,
body.style-dopamine .button:focus-visible {
    filter: none;
    transform: translateY(2px);
    box-shadow: 0 3px 0 #9d174d;
}

/* ——— 7. Альбом ——— */
body.style-swiss {
    --color-primary: #111827;
    --color-text: #1f2937;
    --color-muted: #6b7280;
    --color-background: #f8fafc;
    --color-surface: #ffffff;
    --color-border: #e2e8f0;
    --color-accent: #f43f5e;
    --body-bg: #f8fafc;
    --font-sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
    --font-display: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
    --radius-small: 8px;
    --radius-medium: 12px;
    --shadow-card: 0 8px 20px rgb(15 23 42 / 5%);
    --chrome-border: #e2e8f0;
    --button-transform: none;
    --section-alt-bg: #ffffff;
}

body.style-swiss .section-title::before {
    content: "";
    display: inline-block;
    width: 2rem;
    height: 0.35rem;
    background: var(--color-accent);
    margin-right: 0.65rem;
    vertical-align: middle;
    border-radius: 999px;
}

/* ——— 8. Акварель ——— */
body.style-organic {
    --color-primary: #78350f;
    --color-text: #57534e;
    --color-muted: #a8a29e;
    --color-background: #faf6f0;
    --color-surface: #fffdf9;
    --color-border: #e7d5c0;
    --color-accent: #d97706;
    --body-bg:
        radial-gradient(ellipse 55% 40% at 0% 0%, #fde68a66, transparent 60%),
        radial-gradient(ellipse 45% 35% at 100% 10%, #bbf7d055, transparent 55%),
        #faf6f0;
    --font-sans: "Nunito Sans", "Segoe UI", sans-serif;
    --font-display: "Literata", Georgia, serif;
    --radius-small: 16px;
    --radius-medium: 28px;
    --radius-media: 24px;
    --radius-button: 999px;
    --radius-control: 999px;
    --radius-panel: 18px;
    --shadow-card: 0 14px 34px rgb(120 80 40 / 10%);
    --chrome-border: #ead9c6;
    --section-alt-bg: rgb(255 253 249 / 55%);
}

/* ——— 9. Космос (soft kids night) ——— */
body.style-noir {
    --color-primary: #e0e7ff;
    --color-text: #e2e8f0;
    --color-muted: #a5b4fc;
    --color-background: #1e1b4b;
    --color-surface: #312e81;
    --color-border: #4338ca;
    --color-accent: #fbbf24;
    --body-bg:
        radial-gradient(circle at 20% 10%, #4338ca55, transparent 40%),
        radial-gradient(circle at 80% 0%, #7c3aed33, transparent 35%),
        #1e1b4b;
    --font-sans: "Manrope", "Segoe UI", sans-serif;
    --font-display: "Fredoka", "Segoe UI", sans-serif;
    --radius-small: 12px;
    --radius-medium: 20px;
    --shadow-card: 0 16px 36px rgb(0 0 0 / 28%);
    --card-bg: #312e81;
    --card-border: 1px solid #4338ca;
    --header-bg: #ffffff;
    --footer-bg: #ffffff;
    --chrome-border: #c7d2fe;
    --header-shadow: 0 10px 28px rgb(49 46 129 / 25%);
    --section-alt-bg: rgb(49 46 129 / 45%);
}

body.style-noir .site-header,
body.style-noir .site-footer,
body.style-noir .site-header .brand,
body.style-noir .site-header .site-nav a,
body.style-noir .site-footer,
body.style-noir .footer-company,
body.style-noir .footer-contacts a,
body.style-noir .lang-select select {
    color: #312e81;
}

body.style-noir .site-nav a[aria-current="page"] {
    color: #7c3aed;
}

body.style-noir .button {
    color: #1e1b4b;
    background: var(--color-accent);
}

body.style-noir .muted,
body.style-noir .lead {
    color: #c7d2fe;
}

body.style-noir .section-title,
body.style-noir .hero-title,
body.style-noir h1,
body.style-noir h2,
body.style-noir h3 {
    color: #e0e7ff;
}

/* ——— 10. Конфетті ——— */
body.style-memphis {
    --color-primary: #5b21b6;
    --color-text: #4c1d95;
    --color-muted: #7c3aed;
    --color-background: #faf5ff;
    --color-surface: #ffffff;
    --color-border: #ddd6fe;
    --color-accent: #a855f7;
    --body-bg:
        radial-gradient(circle at 12% 18%, #fde68a88 0 12px, transparent 13px),
        radial-gradient(circle at 88% 12%, #67e8f988 0 10px, transparent 11px),
        radial-gradient(circle at 70% 78%, #f9a8d488 0 14px, transparent 15px),
        #faf5ff;
    --font-sans: "Nunito", "Segoe UI", sans-serif;
    --font-display: "Syne", "Segoe UI", sans-serif;
    --radius-small: 10px;
    --radius-medium: 16px;
    --radius-button: 12px;
    --shadow-card: 6px 6px 0 #c4b5fd;
    --card-border: 2px solid #c4b5fd;
    --chrome-border: #e9d5ff;
    --button-border: 2px solid #5b21b6;
    --button-shadow: 4px 4px 0 #5b21b6;
    --section-alt-bg: transparent;
}

body.style-memphis .button {
    background: #fde68a;
    color: #5b21b6;
}

body.style-memphis .button:hover,
body.style-memphis .button:focus-visible {
    filter: none;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #5b21b6;
}

body.style-memphis .hero-title {
    font-weight: 800;
}

@media (max-width: 768px) {
    body.style-organic .hero-bleed-img,
    body.style-organic .hero-bleed-media img {
        border-radius: 0 !important;
    }

    body.style-memphis .card:nth-child(odd),
    body.style-memphis .card:nth-child(even) {
        transform: none;
    }

    .header-tools {
        gap: 0.5rem;
    }

    .nav-toggle {
        white-space: nowrap;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    body.style-memphis .card:nth-child(odd),
    body.style-memphis .card:nth-child(even) {
        transform: none;
    }
}
