:root {
    color-scheme: light;
    --color-red: #8b1e2d;
    --color-green: #244b3b;
    --color-gold: #c69b42;
    --color-cream: #fffaf0;
    --color-ink: #302720;
    --color-muted: #74685d;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    color: var(--color-ink);
    background:
        linear-gradient(rgba(13, 36, 29, 0.12), rgba(13, 36, 29, 0.12)),
        url("../img/escena-navidena.svg") center / cover fixed,
        var(--color-green);
    font-family: Georgia, "Times New Roman", serif;
    opacity: 0;
    animation: page-enter 180ms ease-out forwards;
    transition: opacity 180ms ease-out;
}

@keyframes page-enter {
    to {
        opacity: 1;
    }
}

body.is-leaving {
    opacity: 0;
}

.snow-canvas {
    position: fixed;
    z-index: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.festive-lights {
    position: fixed;
    z-index: 1;
    top: 0.5rem;
    left: 50%;
    width: min(16rem, 55vw);
    height: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.55);
    background:
        radial-gradient(circle, #f2d783 0 3px, transparent 4px) 0 0 / 3.2rem 0.8rem,
        radial-gradient(circle, #bd4650 0 3px, transparent 4px) 1.6rem 0 / 3.2rem 0.8rem;
    animation: lights-twinkle 2.4s ease-in-out infinite alternate;
    transform: translateX(-50%);
}

@keyframes lights-twinkle {
    to {
        opacity: 0.55;
    }
}

.login-card {
    position: relative;
    z-index: 1;
    width: min(100%, 28rem);
    padding: clamp(1.5rem, 6vw, 2.5rem);
    border: 1px solid rgba(242, 215, 131, 0.9);
    border-radius: 1.5rem;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.72), transparent 42%),
        rgba(255, 250, 240, 0.96);
    text-align: center;
    box-shadow: 0 1.4rem 3.5rem rgba(5, 24, 18, 0.42), inset 0 0 0 5px rgba(255, 255, 255, 0.26);
}

.eyebrow {
    margin: 0 0 0.75rem;
    color: var(--color-red);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    color: var(--color-green);
    font-size: clamp(1.8rem, 7vw, 2.5rem);
    line-height: 1.12;
}

.intro {
    margin: 1rem 0 1.5rem;
    color: var(--color-muted);
    line-height: 1.55;
}

form {
    display: grid;
    gap: 0.75rem;
    text-align: left;
}

label {
    font-weight: 700;
}

input,
button {
    min-height: 2.9rem;
    border-radius: 0.55rem;
    font: inherit;
}

input {
    width: 100%;
    padding: 0.7rem 0.8rem;
    border: 1px solid #b8aa99;
    background: #fff;
}

input:focus-visible,
button:focus-visible {
    outline: 3px solid var(--color-gold);
    outline-offset: 3px;
}

button {
    margin-top: 0.4rem;
    padding: 0.7rem 1rem;
    border: 1px solid rgba(255, 242, 200, 0.35);
    color: #fff;
    background: linear-gradient(135deg, #a52a39, #741725);
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 0.35rem 0.8rem rgba(88, 18, 29, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    transition: transform 150ms ease-out;
}

button:hover {
    transform: translateY(-2px);
}

.error-message {
    padding: 0.75rem;
    border-radius: 0.5rem;
    color: #711725;
    background: #f9e3e3;
    line-height: 1.45;
}

.test-notice {
    margin: 0 0 1rem;
    padding: 0.55rem;
    border-radius: 0.4rem;
    color: #4a3510;
    background: #f5df9e;
    font-family: Arial, sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .festive-lights {
        animation: none;
    }

    button {
        transition: none;
    }
}
