@font-face {
    font-family: "Montez fallback";
    src: local("Arial");
    size-adjust: 73.1654%;
    ascent-override: 122.1948%;
    descent-override: 56.5927%;
    line-gap-override: 0%;
    font-style: normal;
    font-weight: 400;
}

@font-face {
    font-display: swap;
    font-family: "Montez";
    font-style: normal;
    font-weight: 400;
    src: url(https://fonts.gstatic.com/s/montez/v25/845ZNMk5GoGIX8lW07rf.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

::selection {
    background-color: #47166d;
}

a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

button,
main a {
    background: transparent;
    border-radius: 28px;
    border-width: 0;
    cursor: pointer;
    display: block;
    margin: 0;
    outline: 0;
    overflow: hidden;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #323032;
    color: #e8eaed;
    font-family: "Montez", "Montez fallback";
    font-size: 32px;
    font-style: normal;
    font-weight: 400;
    margin: 16px;
    text-align: center;
}

body>* {
    margin: 64px auto;
}

dialog {
    aspect-ratio: 1;
    background: transparent;
    border-width: 0;
    cursor: pointer;
    max-height: min(calc(100% - 32px), 768px);
    max-width: min(calc(100% - 32px), 768px);
    opacity: 0;
    overscroll-behavior: contain;
    padding: 0;
    transition: display 600ms allow-discrete, opacity 600ms cubic-bezier(0.05, 0.7, 0.1, 1.0), overlay 600ms allow-discrete;
    user-select: none;
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.68) url(assets/close-icon.svg) no-repeat right 8px top 8px;
    overscroll-behavior: contain;
    overflow: hidden;
    opacity: 0;
    transition: display 600ms allow-discrete, opacity 600ms cubic-bezier(0.05, 0.7, 0.1, 1.0), overlay 600ms allow-discrete;
}

dialog:open,
dialog:open::backdrop {
    opacity: 1;
}

h1 {
    font-size: inherit;
    font-weight: inherit;
    margin: 0;
}

header {
    max-width: 500px;
}

img {
    display: block;
    height: 100%;
    object-fit: cover;
    transition: opacity 400ms cubic-bezier(0.05, 0.7, 0.1, 1.0);
    width: 100%;
}

main {
    display: grid;
    flex-wrap: wrap;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    justify-content: center;
    max-width: 992px;
}

main>a {
    background: #000000 url(assets/instagram-icon.svg) no-repeat center center;
    aspect-ratio: 1;
    background-size: 48px 48px;
}

main>button {
    background: #000000 url(assets/zoom-in-icon.svg) no-repeat center center;
    aspect-ratio: 1;
    pointer-events: none;
}

main>a:active>img,
main>a:focus-visible>img,
main>a:hover>img,
main>button:active>img,
main>button:focus-visible>img,
main>button:hover>img {
    opacity: 0.32;
}

@media (min-width: 1024px) {

    header {
        font-size: 51px;
        max-width: 800px;
    }

    main>a {
        grid-column: 2;
        grid-row: 2;
    }

    main>button {
        pointer-events: auto;
    }

}

@media print {

    body:has(dialog:open)>footer,
    body:has(dialog:open)>header,
    body:has(dialog:open)>main>:not(dialog) {
        display: none;
    }

    body,
    dialog::backdrop,
    main>a,
    main>button {
        background: #ffffff;
        color: #000000;
    }

}

@starting-style {

    dialog::backdrop,
    dialog:open {
        opacity: 0;
    }

}