:root {
    /* Main colors */
    --color-navy: #010247;
    --color-white: #ffffff;
    --color-green: #104735;
    --color-green-dark: #08291f;
    --color-green-deep: #092f25;
    --color-burgundy: #741f32;
    --color-burgundy-mid: #581526;
    --color-burgundy-dark: #3d0d1b;

    /* Gold */
    --color-gold: #c9a44c;
    --color-gold-light: #f4d889;
    --color-gold-border: rgba(201, 164, 76, 0.45);

    /* Text colors */
    --color-muted-green: #b9cec1;
    --color-muted-pink: #f0dce0;
    --color-muted-rose: #e0c3ca;

    /* Decorative colors */
    --color-shadow: rgba(0, 0, 0, 0.25);

    /* Fonts */
    --font-body: 'Montserrat', sans-serif;
    --font-heading: 'Berkshire Swash', cursive;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-navy);
    color: var(--color-white);
    font-size: 15px;
    margin: 0
}

main {
    padding: 25px;
}

h1,
h2 {
    font-family: var(--font-heading);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

h1 {
    font-size: 50px;
}

h2 {
    font-size: 30px;
    color: var(--color-gold-light);
    margin: 5px 0 15px;
}

section {
    margin-top: 25px;
    border: 2px solid var(--color-gold);
    border-radius: 25px;
    padding: 15px 30px;
    box-shadow:
        0 8px 25px var(--color-shadow),
        inset 0 0 25px rgba(201, 164, 76, 0.04);
}

button {
    padding: 14px;
    margin-top: 8px;

    color: var(--color-white);

    border: 1px solid var(--color-gold);
    border-radius: 15px;

    font-size: 20px;
    font-weight: bold;

    cursor: pointer;
    transition: filter 0.2s ease, transform 0.2s ease;
}

button:hover {
    filter: brightness(1.12)
}

button:active {
    transform: scale(0.99)
}

input:focus-visible,button:focus-visible {
    outline: 2px solid var(--color-green);
    outline-offset: -2px;
}

.red-section {
    background: linear-gradient(145deg,
            var(--color-burgundy) 0%,
            var(--color-burgundy-mid) 55%,
            var(--color-burgundy-mid) 100%);
}

.green-section {
    background: linear-gradient(145deg, var(--color-green) 0%, var(--color-green-deep) 65%, var(--color-green-dark) 100%);
}

.green-button {
    background: linear-gradient(145deg, var(--color-green) 0%, var(--color-green-deep) 85%);
}

.red-button {
    background: linear-gradient(145deg, var(--color-burgundy) 0%, var(--color-burgundy-mid) 85%);
}

.snowflakes-div {
    display: block;
    text-align: center;
    top: 15px;
    left: 0;
    width: 100%;
    font-size: 22px;
    opacity: 0.75;
    pointer-events: none;
}

/* Snow layer above the site, but below nothing interactive */
.snowfall {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
}

.snowflake {
    position: absolute;
    top: -30px;
    left: 0;
    line-height: 1;
    pointer-events: none;
    will-change: transform;
    text-shadow: 0 0 8px rgb(180 220 255 / 45%);
    animation: snow-fall linear forwards;
    z-index: 999;
}

.rudi-alert {
    margin: 20px auto 15px;
    padding: 18px 22px;
    max-width: 600px;

    background: linear-gradient(135deg,
            rgba(201, 164, 76, 0.16),
            rgba(116, 31, 50, 0.65));

    border: 1px solid var(--color-gold);
    border-left: 5px solid var(--color-gold-light);
    border-radius: 14px;

    color: var(--color-gold-light);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.6;
    text-align: center;

    box-shadow:
        0 5px 15px var(--color-shadow),
        inset 0 0 12px rgba(201, 164, 76, 0.05);

    animation: maintenanceFadeIn 0.4s ease-out;

}

/* Keep the alert hidden when the HTML hidden attribute is set */
.rudi-alert[hidden] {
    display: none;
}

#map {
    height: clamp(300px, 60vh, 600px);
    width: 100%;
}

/* statistics-section */

#statistics-section .stats-subtitle {
    margin: 0 auto 30px;
    text-align: center;
}

#statistics-section .stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
}

#statistics-section .stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 20px 15px;

    border: 1px solid var(--color-gold-border);
    border-radius: 20px;
    background-color: var(--color-burgundy);

    text-align: center;
}

/* Featured kilometers card */

#statistics-section .stat-card-featured {
    border: 2px solid var(--color-gold);
}


#statistics-section .stat-icon {
    display: block;
    margin-bottom: 10px;
    font-size: 35px;
    line-height: 1.2;
}

/* Statistic labels */

#statistics-section .stat-label {
    margin-bottom: 5px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Statistic values */

#statistics-section .stat-value {
    color: var(--color-gold-light);
    font-size: 35px;
    font-weight: bold;
}

/* Last location */

#statistics-section .stat-location {
    max-width: 100%;
    font-size: clamp(15px, 2vw, 35px);
    overflow-wrap: anywhere;
}

/* Place kilometers above the other statistics */
#statistics-section .stat-card-featured {
    grid-column: 1 / -1;
}

/* Mobile layout */
@media (max-width: 600px) {
    section {
        padding: 7px 15px;
    }

    h1 {
        font-size: 35px;
    }

    h2 {
        font-size: 22px;
    }

    #maintenance_alert {
        margin: 15px 0;
        padding: 14px 16px;
        font-size: 14px;
        border-radius: 12px;
    }
}

@keyframes snow-fall {
    from {
        transform: translate3d(0, -5vh, 0) rotate(0deg);
    }

    to {
        transform:
            translate3d(var(--drift), 110vh, 0) rotate(var(--rotation));
    }
}

@media (prefers-reduced-motion: reduce) {
    button {
        transition: none;
    }
    .snowfall {
        display: none;
    }
}

/* Subtle entrance animation */
@keyframes maintenanceFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}