/* Site styles */
* {
    box-sizing: border-box;
}

body {
    font-family: "Nunito", sans-serif;
}

body.homepage {
    background-color: #002e5d;
    min-height: 100vh;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

body button.homepage_button {
    max-width: 100%;
    padding: 20px clamp(24px, 8vw, 100px);
    font-size: 15px;
    font-family: "Fredoka", sans-serif;
    background-color: #829cbc;
    border: 5px solid #000000;
    box-shadow: 0 8px 18px rgb(0 0 0 / 25%);
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

body button.homepage_button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 22px rgb(0 0 0 / 32%);
}

body button.homepage_button:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 4px;
}

body.main {
    min-height: 100vh;
    margin: 0;
    padding: 24px;
    background-color: #002e5d;
}

body.main h1.main_header {
    font-family: "Fredoka", sans-serif;
    color: #829cbc;
    text-align: center;
    font-size: clamp(28px, 5vw, 40px);
    margin: 0 0 24px;
}

body .gallery_photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 5px solid #000000;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgb(0 0 0 / 22%);
}

body .photo_gallery > .gallery_photo:last-child {
    grid-column: span 3;
    width: 50%;
    height: auto;
    aspect-ratio: 16 / 9;
    justify-self: center;
    align-self: center;
    object-fit: cover;
}

body .photo_gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: clamp(160px, 22vw, 250px);
    gap: clamp(14px, 2vw, 22px);
    max-width: 1100px;
    margin: 0 auto;
}

body .family_link {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    height: 50%;
    justify-self: stretch;
    align-self: center;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
    padding: 20px;
    background-color: #829cbc;
    border: 3px solid #000000;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgb(0 0 0 / 25%);
    color: #002e5d;
    font-size: clamp(1rem, 2vw, 1.4rem);
    font-family: "Fredoka", sans-serif;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

body .family_link:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 22px rgb(0 0 0 / 32%);
}

body .family_link:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 4px;
}

body.family {
    min-height: 100vh;
    margin: 0;
    background-color: #002e5d;
}

@media (max-width: 42rem) {
    body .photo_gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: clamp(140px, 38vw, 240px);
        gap: 16px;
    }

    body .family_link {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    body .photo_gallery > .gallery_photo:last-child {
        grid-column: span 2;
    }
}

@media (max-width: 22rem) {
    body.main {
        padding: 12px;
    }

    body .photo_gallery {
        grid-template-columns: minmax(0, 1fr);
        grid-auto-rows: minmax(180px, 65vw);
    }

    body .family_link {
        grid-column: 1;
    }

    body .photo_gallery > .gallery_photo:last-child {
        grid-column: span 1;
        width: 100%;
    }
}
