:root {
    --background-default: #e2e9ec;
    --background-white: #ffffff;
    --cta-primary: #ffc500;
    --cta-hover: #ffd64b;
    --brand-yellow: #ffb800;
    --hero-dark: #1a1f28;
    --hero-dark-2: #2a3140;
    --text-dark: #1a202c;
    --text-ink: #071426;
    --text-muted: #5f636b;
    --accent-blue: #17496a;
    --font: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font);
    background: var(--background-default);
    color: var(--text-dark);
}

/* Shared site header (all pages) */
.site-header {
    background: var(--background-white);
    color: var(--text-ink);
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: 0 1px 0 rgba(7, 20, 38, 0.06);
}

.site-header-inner {
    max-width: none;
    width: 100%;
    margin: 0 auto;
    padding: 0.85rem clamp(1.25rem, 4vw, 4rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.brand-logo {
    display: block;
    height: 28px;
    width: auto;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    color: var(--text-ink);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    transition: color 160ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
    color: #3a4658;
    outline: none;
}

.nav-link.has-caret::after {
    content: "";
    display: inline-block;
    margin-left: 0.35rem;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--text-ink);
    vertical-align: middle;
}

.site-utils {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.lang-switch {
    position: relative;
    flex-shrink: 0;
}

.lang-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 40px;
    margin: 0;
    padding: 0.35rem 0.45rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-ink, #071426);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background-color 160ms ease;
}

.lang-switch-btn:hover,
.lang-switch-btn:focus-visible {
    background: #f2f4f7;
    outline: none;
}

.lang-switch-code {
    line-height: 1;
}

.lang-switch-caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    margin-top: 1px;
    transition: transform 160ms ease;
}

.lang-switch.is-open .lang-switch-caret {
    transform: rotate(180deg);
}

.lang-switch-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    z-index: 50;
    min-width: 9.5rem;
    margin: 0;
    padding: 0.35rem;
    list-style: none;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(26, 32, 44, 0.12);
}

.lang-switch-menu[hidden] {
    display: none;
}

.lang-switch-option {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    color: var(--text-ink, #071426);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
}

.lang-switch-option-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
}

.lang-switch-option:hover,
.lang-switch-option:focus-visible {
    background: #f2f4f7;
    outline: none;
}

.lang-switch-option.is-active {
    background: #f7f8fa;
}

.util-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 160ms ease;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-ink, #071426);
    cursor: pointer;
    flex-shrink: 0;
}

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 160ms ease, opacity 160ms ease;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
    background: rgba(7, 20, 38, 0.06);
    outline: none;
}

body.nav-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

body.nav-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

body.nav-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.util-btn:hover,
.util-btn:focus-visible {
    background: #f2f4f7;
    outline: none;
}

.util-btn img {
    display: block;
}

/* Legacy alias used by older markup */
.header-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-blue);
    text-decoration: none;
    letter-spacing: 0.04em;
}

.btn-primary {
    display: inline-block;
    background: var(--cta-primary);
    color: var(--text-dark);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    padding: 0.85rem 2.25rem;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    transition: background-color 200ms ease, transform 200ms ease;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: var(--cta-hover);
    outline: none;
}

.btn-primary:active {
    transform: scale(0.98);
}

.site-footer {
    text-align: center;
    padding: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========== Homepage ========== */
.home-page {
    background: var(--hero-dark);
    color: #fff;
}

.promo-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--brand-yellow);
    color: var(--text-ink);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.7rem 1.25rem;
    text-align: center;
    transition: filter 160ms ease;
}

.promo-bar:hover,
.promo-bar:focus-visible {
    filter: brightness(1.05);
    outline: none;
}

.promo-bar strong {
    font-weight: 800;
}

.promo-arrow {
    font-weight: 700;
}

.home-hero {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-color: #151a22;
    background-image:
        linear-gradient(
            105deg,
            rgba(21, 26, 34, 0.96) 0%,
            rgba(21, 26, 34, 0.88) 34%,
            rgba(21, 26, 34, 0.35) 58%,
            rgba(21, 26, 34, 0.12) 100%
        ),
        url("../images/Schufa score hero.jpg");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: cover;
}

.home-hero-inner {
    max-width: none;
    width: 100%;
    margin: 0 auto;
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    padding: 2.5rem clamp(1.25rem, 4vw, 4rem) 3rem;
}

.home-hero-copy {
    position: relative;
    z-index: 2;
    max-width: 34rem;
    animation: home-fade-up 700ms ease both;
}

.hero-accent {
    display: block;
    width: 48px;
    height: 4px;
    background: var(--brand-yellow);
    border-radius: 2px;
    margin-bottom: 1.25rem;
}

.hero-title {
    font-size: clamp(2.2rem, 4.6vw, 3.6rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.hero-title span {
    display: block;
}

.hero-title-accent {
    color: var(--brand-yellow);
}

.hero-lead {
    font-size: 1.05rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
    max-width: 28rem;
    margin-bottom: 1.75rem;
}

.hero-cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.hero-cta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    color: var(--text-ink);
    text-decoration: none;
    border-radius: 14px;
    padding: 0.85rem 0.95rem;
    min-height: 72px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.hero-cta:hover,
.hero-cta:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
    outline: none;
}

.cta-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--brand-yellow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cta-icon img {
    display: block;
    width: 20px;
    height: auto;
}

.cta-label {
    flex: 1;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.25;
}

.cta-arrow {
    flex-shrink: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-ink);
}

@keyframes home-fade-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 980px) {
    .site-header-inner {
        position: relative;
        flex-wrap: wrap;
        gap: 0.5rem 0.65rem;
        padding: 0.75rem 1rem;
    }

    .brand-logo {
        height: 24px;
    }

    .site-utils {
        display: none;
    }

    .lang-switch {
        margin-left: auto;
    }

    .lang-switch-btn {
        min-height: 38px;
        padding: 0.3rem 0.4rem;
        font-size: 0.9rem;
    }

    .lang-switch-menu {
        right: 0;
        min-width: 10rem;
    }

    .nav-toggle {
        display: inline-flex;
        margin-left: 0;
    }

    .site-nav {
        display: none;
        order: 3;
        flex: 1 0 100%;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        padding: 0.35rem 0 0.5rem;
        border-top: 1px solid #e5e7eb;
    }

    body.nav-open .site-nav {
        display: flex;
    }

    .site-nav .nav-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.85rem 0.15rem;
        border-bottom: 1px solid #eef1f4;
        font-size: 1rem;
        font-weight: 600;
        color: var(--text-ink, #071426);
    }

    .site-nav .nav-link:last-child {
        border-bottom: none;
    }

    .home-hero {
        background-position: 70% center;
    }

    .home-hero-inner {
        min-height: auto;
        padding-top: 2rem;
        padding-bottom: 2.5rem;
    }

    .home-hero-copy {
        max-width: 36rem;
    }
}

@media (max-width: 560px) {
    .site-header-inner {
        padding: 0.7rem 0.9rem;
    }

    .brand-logo {
        height: 22px;
    }

    .lang-switch-btn {
        min-height: 36px;
        gap: 0.3rem;
        font-size: 0.88rem;
    }

    .lang-switch-caret {
        border-left-width: 3.5px;
        border-right-width: 3.5px;
        border-top-width: 4.5px;
    }

    .promo-bar {
        font-size: 0.85rem;
        padding: 0.65rem 1rem;
    }

    .home-hero {
        background-image:
            linear-gradient(
                180deg,
                rgba(21, 26, 34, 0.92) 0%,
                rgba(21, 26, 34, 0.82) 55%,
                rgba(21, 26, 34, 0.7) 100%
            ),
            url("../images/Schufa score hero.jpg");
        background-position: center top;
    }

    .hero-cta-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: clamp(1.9rem, 9vw, 2.4rem);
    }
}
