
/* todo  Hausfont einbinden */

:root {
    /* redirect timing */
    --redirect-delay: 10;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden; /* never scroll */
}

body {
    display: flex;
    min-height: 100vh;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.5;

    /* background image behavior */
    background-position: 50% 0%;
    background-repeat: no-repeat;
    background-size: auto 105% ;
    animation: bg-pan calc(var(--redirect-delay) * 3s) linear forwards;
}

@keyframes bg-pan {
    from {
        background-position: 50% 0%;
        background-size: auto 100% ;
    }
    to {
        background-position: 65% 0%;
        background-size: auto 110% ;
    }
}

.app {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;

    /* subtle overlay for readability */
    background: radial-gradient(circle at top left, rgba(0, 0, 0, 0.9) 0, rgba(0, 0, 0, 0.7) 50%, rgba(0, 0, 0, 0.85) 100%);
}

.btn-login-submit {
    background: var(--primary);
    border: solid 1px var(--primary);
    height: 36px;
    width: 100px;
    border-radius: var(--radius-sm);
    margin-top: 1rem;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}

.site-main-login,
.site-main {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--header-height) 2.5rem 1.5rem;
}

.site-main-login {
    text-align: center;
}

.content-container {
    max-width: 560px;
    text-align: center;

    /* Startzustand */
    opacity: 0;
    transform: translateY(24px);
    transition: none;
}

/* wenn Seite geladen ist */
html.is-loaded .content-container {
    animation: content-reveal-y 0.7s cubic-bezier(0.24, 0.82, 0.22, 1) forwards;
}

@keyframes content-reveal-y {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.headline {
    margin: 0 0 0.5rem;
    font-size: 2rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.lead {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.86);
}

.lead strong {
    font-weight: 600;
}

.lead a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 0.05rem;
}

.lead a:hover {
    border-bottom-color: var(--primary);
}

.countdown-text {
    margin: 0;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.8;
}


.progress-bar {
    position: fixed;
    left: 0;
    bottom: 0;
    height: 2px;
    background: rgba(255,255,255,0.4);
    z-index: 3;
    width: 100%;
}
.progress-bar:before {
    content: "";
    width: 0%;
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--primary);
}
body.start-redirect .progress-bar:before  {
    animation: progress-fill calc(var(--redirect-delay) * 1s) linear forwards;
}

@keyframes progress-fill {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}


@media (min-width: 768px) {


    body {
        display: flex;
        min-height: 100vh;
        background-color: var(--background);
        color: var(--text);
        line-height: 1.5;

        /* background image behavior */
        background-position: 100% 30%;
        background-repeat: no-repeat;
        background-size: 105% auto;
        animation: bg-pan calc(var(--redirect-delay) * 3s) linear alternate-reverse infinite;
    }

    @keyframes bg-pan {
        from {
            background-position: 100% 30%;
            background-size: 105% auto;
        }
        to {
            background-position: 20% 30%;
            background-size: 115% auto;
        }
    }

    .site-main {
        justify-content: flex-start;
    }
    .site-main-login {
        justify-content: center;
    }
    .content-container {
        text-align: left;
        margin-left: 6vw;
    }

    .site-main-login .content-container {
        text-align: center;
        margin-left: 0;
    }

    .headline {
        font-size: 2.4rem;
    }

    .lead {
        font-size: 1rem;
    }
}

/* Fallback für Nutzer mit reduced motion */
@media (prefers-reduced-motion: reduce) {
    .content-container {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

.login-error {
    color: var(--error-color);
    margin-bottom: 1rem;
}
