/* Layered on top of Pico CSS (pico.min.css) */

body {
    background-image: url('assets/john-cleese-ministry-of-silly-walks-people-suit-wallpaper.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    min-height: 100vh;
}

/* Darken the wallpaper so text stays readable */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: -1;
}

header.container {
    text-align: center;
    padding-block: 3rem 1rem;
}

main.container {
    max-width: 1000px;
}

section {
    margin-bottom: 2.5rem;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--pico-grid-column-gap);
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.75rem;
    aspect-ratio: 1 / 1;
    padding: 1.25rem;
    border-radius: var(--pico-border-radius);
    background: color-mix(in srgb, var(--pico-card-background-color) 85%, transparent);
    backdrop-filter: blur(6px);
    box-shadow: var(--pico-card-box-shadow);
    text-decoration: none;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.card:hover,
.card:focus-visible {
    background: var(--pico-card-background-color);
    transform: translateY(-4px) scale(1.02);
}

.card h3 {
    margin: 0 0 0.25rem;
    font-size: 1.15rem;
    color: var(--pico-h3-color);
}

.card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--pico-muted-color);
}

.icon {
    flex: 0 0 auto;
    width: 4.5rem;
    height: 4.5rem;
    object-fit: contain;
}

/* Mobile: one tile per row, icon on the left */
@media (max-width: 600px) {
    .cards {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .card {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        aspect-ratio: auto;
        gap: 1rem;
        padding: 0.9rem 1rem;
    }

    .card:hover,
    .card:focus-visible {
        transform: none;
    }

    .icon {
        width: 3rem;
        height: 3rem;
    }

    .card h3 {
        font-size: 1.05rem;
        margin-bottom: 0.1rem;
    }

    .card p {
        font-size: 0.85rem;
    }
}
