:root {
    --aura-dark: #1B0332;
    --aura-light: #fefbf5;
    --aura-accent: #9831B8;
    --bg-primary: var(--aura-light);
    --bg-secondary: var(--aura-light);
    --card-bg: var(--aura-light);
    --card-strong: var(--aura-light);
    --text-main: var(--aura-dark);
    --text-light: var(--aura-light);
    --text-muted: rgba(27, 3, 50, 0.8);
    --accent: var(--aura-accent);
    --accent-deep: var(--aura-accent);
    --accent-soft: rgba(152, 49, 184, 0.08);
    --border-subtle: rgba(152, 49, 184, 0.36);
    --glow: none;
}

:root.dark {
    --bg-primary: var(--aura-dark);
    --bg-secondary: var(--aura-dark);
    --card-bg: var(--aura-dark);
    --card-strong: #140126;
    --text-main: var(--aura-light);
    --text-light: var(--aura-light);
    --text-muted: rgba(254, 251, 245, 0.78);
    --accent: var(--aura-accent);
    --accent-deep: #c951d5;
    --accent-soft: rgba(201, 81, 213, 0.12);
    --border-subtle: rgba(201, 81, 213, 0.34);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg-primary);
    color: var(--text-main);
    transition: background-color 0.35s ease, color 0.35s ease;
}

body.home-page,
body.about-page {
    font-family: 'Space Grotesk', sans-serif;
}

body.content-page {
    font-family: 'Inter', sans-serif;
}

body.content-page:not(.consent-page) > main,
body.about-page > main {
    padding-top: calc(var(--site-header-height, 4.45rem) + 2.5rem);
}

.display-font {
    font-family: 'Fraunces', serif;
}

.eyebrow {
    letter-spacing: 0.24em;
    text-shadow:
        0 0 0.2rem var(--bg-primary),
        0 0 0.7rem var(--bg-primary),
        0 0 1.45rem var(--bg-primary),
        0 0 2.4rem var(--bg-primary),
        0 0 3.4rem var(--bg-primary);
}

.lang-toggle {
    border-radius: 9999px;
    padding: 0.3rem 0.65rem;
    line-height: 1;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-toggle.is-active {
    background: var(--accent);
    color: var(--text-light);
}

header.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition:
        background-color 0.45s ease,
        border-color 0.45s ease,
        backdrop-filter 0.45s ease;
    background: color-mix(in srgb, var(--aura-light) 96%, rgba(152, 49, 184, 0.08)) !important;
    backdrop-filter: blur(18px);
}

header.site-header::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -120vh;
    bottom: 0;
    z-index: -1;
    background: var(--bg-primary);
    pointer-events: none;
}

.header-actions {
    flex-shrink: 0;
    align-items: center;
}

.header-control,
.header-back-link {
    min-height: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--accent) !important;
    background: color-mix(in srgb, var(--aura-light) 88%, rgba(152, 49, 184, 0.08));
    color: var(--text-main) !important;
    box-shadow: 0 12px 34px rgba(152, 49, 184, 0.08);
    overflow: hidden;
}

.header-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    padding: 0 1.25rem;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background-color 0.22s ease,
        color 0.22s ease,
        box-shadow 0.22s ease;
}

.header-back-link:hover {
    background: var(--accent);
    color: var(--aura-light) !important;
    box-shadow: 0 10px 22px rgba(152, 49, 184, 0.18);
}

.header-language-switch,
.header-theme-toggle {
    min-width: 6.2rem;
    padding: 0.25rem;
    border-radius: 9999px;
    position: relative;
}

.header-theme-toggle {
    gap: 0.2rem;
}

.header-language-switch::before,
.header-theme-toggle::before {
    content: '';
    position: absolute;
    top: 0.25rem;
    bottom: 0.25rem;
    left: 0.25rem;
    width: calc((100% - 0.5rem) / 2);
    border-radius: 9999px;
    background: var(--accent);
    box-shadow: 0 8px 18px rgba(152, 49, 184, 0.2);
    transform: translateX(0);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.header-language-switch[data-lang='de']::before,
.header-language-switch:has(.lang-toggle[data-lang-toggle='de'].is-active)::before,
.header-theme-toggle[data-theme='dark']::before {
    transform: translateX(100%);
}

.header-language-switch .lang-toggle,
.header-theme-toggle .theme-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.7rem;
    height: 2.15rem;
    border-radius: 9999px;
    padding: 0 0.72rem;
    position: relative;
    z-index: 1;
    line-height: 1;
    font-weight: 800;
    color: color-mix(in srgb, var(--text-main) 88%, transparent);
    transition:
        background-color 0.22s ease,
        color 0.22s ease,
        box-shadow 0.22s ease;
}

.header-language-switch .lang-toggle.is-active,
.header-theme-toggle[data-theme='light'] .theme-option-light,
.header-theme-toggle[data-theme='dark'] .theme-option-dark {
    color: var(--aura-light);
}

.header-language-switch .lang-toggle:not(.is-active):hover,
.header-theme-toggle[data-theme='light'] .theme-option-dark:hover,
.header-theme-toggle[data-theme='dark'] .theme-option-light:hover {
    color: var(--accent);
}

:root.dark header.site-header {
    background: color-mix(in srgb, var(--aura-dark) 94%, var(--aura-light) 6%) !important;
}

:root.dark .header-control,
:root.dark .header-back-link {
    background: color-mix(in srgb, var(--aura-dark) 86%, var(--aura-light) 7%);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.16);
}

.site-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.site-footer-inner {
    width: 100%;
    max-width: 88rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    gap: 0.75rem;
    text-align: center;
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.25rem 0.75rem;
}

.site-footer-links a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer-links a:hover {
    color: var(--accent-deep);
    text-decoration: underline;
}

.ui-card {
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    box-shadow: none;
}

.hero-text {
    background-image: none !important;
    background-clip: border-box !important;
    -webkit-background-clip: border-box !important;
    -webkit-text-fill-color: currentColor !important;
    color: var(--text-main) !important;
}

@media (max-width: 768px) {
    header.site-header > div {
        flex-wrap: nowrap;
    }

    .header-actions {
        justify-content: flex-start;
        gap: 0.5rem;
    }

    .header-back-link {
        display: none;
    }

    .header-control {
        min-height: 2.45rem;
        height: 2.45rem;
    }

    .header-language-switch,
    .header-theme-toggle {
        min-width: 5.6rem;
    }

    .header-language-switch .lang-toggle,
    .header-theme-toggle .theme-option {
        min-width: 2.35rem;
        height: 1.9rem;
        padding: 0 0.55rem;
    }
}
