.content-container {
    position: relative;
    z-index: 1;
    /* Full page width (the page is laid out as a column so the footer stays at the bottom) */
    width: 100%;
    margin: 0 auto 4rem;
}

.hero-container {
    position: relative;
    isolation: isolate;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: clamp(600px, 94svh, 920px);
    /* 5rem: the header is always 80px tall */
    padding: calc(5rem + 2rem) 2rem 3rem;
    color: white;
    text-align: center;
}

.hero-container::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 5rem 0 0;
    background: radial-gradient(ellipse 45% 38% at center, #0009, #0006 45%, transparent), linear-gradient(180deg, #0007, #0003 48%, #0002 76%), url('/assets/images/home/hero-cool.webp') 44% 60% / cover;
    -webkit-mask-image: linear-gradient(to bottom, black 84%, transparent);
    mask-image: linear-gradient(to bottom, black 84%, transparent);
    pointer-events: none;
}

.hero-copy, .countdown-container {
    transform: translateY(-.75rem);
}

.hero-copy {
    max-width: 70rem;
    text-shadow: 0 2px 6px #000b, 0 0 24px #0005;
}

.hero-title {
    margin: 0;
    color: white;
    font-size: 4rem;
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: .035em;
    text-transform: uppercase;
}

/* "Indoor Edition": a rubber stamp under the title, on purpose unlike the white stickers
used elsewhere: inked lines, worn print (SVG filter in the page), typewriter letters, tilted. */
.indoor-stamp {
    width: 12.5rem;
    margin: 1rem auto .25rem;
    opacity: .92;
    transform: rotate(-6deg);
    filter: drop-shadow(0 2px 3px #0009);
}

.indoor-stamp svg {
    display: block;
    width: 100%;
    height: auto;
}

.countdown-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 30rem);
    margin-top: 1rem;
    color: white;
    text-shadow: 0 2px 6px #000b;
}

.clock-element-container {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: inherit;
}

.clock-element {
    font-size: 3rem;
    line-height: 1.2;
    display: flex;
    align-items: center;
}

.clock-element-label {
    height: 2.5rem;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .25rem;
    display: flex;
    align-items: center;
}

@media (min-aspect-ratio: 2 / 1) {
    .hero-container::before {
        background-position: center, center, 44% 75%;
    }
}

/* Frame: 32px side margins, at most 1200px wide; 64px from the hero and between sections (48px on phones) */
.main-container {
    width: min(calc(100% - 64px), 1200px);
    margin: 4rem auto 0;
}

.main-section {
    min-width: 0;
    margin-bottom: 4rem;
}

/* The space above the footer comes from the footer */
.main-section:last-child {
    margin-bottom: 0;
}

.main-section-header {
    display: inline-block;
    margin: 0 0 1.5rem;
    /* Padding, corners and shadow in em, like the sticker titles on the rules pages */
    padding: .33em .56em;
    border: 2px solid black;
    border-radius: .14em;
    background: white;
    color: black;
    box-shadow: .15em .15em 0 black;
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
    transform: rotate(1.5deg);
}

.main-section-part-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.main-section-part {
    position: relative;
    container-type: inline-size;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    box-sizing: border-box;
    min-width: 0;
    aspect-ratio: 16 / 9;
    /* Same frame as the year cards on the overview pages: 3px border, 6px shadow */
    border: 3px solid black;
    border-radius: .4rem;
    box-shadow: 6px 6px 0 black;
}

.main-section-part::after {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: calc(.4rem - 3px);
    background: linear-gradient(0deg, #0006, transparent 65%), var(--photo) center / cover;
    pointer-events: none;
}

.main-section-part-1 {
    --photo: url('/assets/images/gallery/2025/cover.webp');
}

.main-section-part-1::after {
    background: var(--photo) center / cover;
}

.home-gallery-lock {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border-radius: inherit;
    background: #0003;
    color: #000b;
    pointer-events: none;
}

.home-gallery-lock svg {
    width: 64px;
    height: auto;
    filter: drop-shadow(0 1px 1px #fff4);
}

.main-section-part-1:not(.is-locked) .home-gallery-lock {
    display: none;
}

.main-section-part-1 .main-section-part-link {
    position: relative;
    z-index: 1;
}

.main-section-part-2 {
    --photo: url('/assets/images/tournament/bracket-2025-cover.svg');
}

.main-section-part-2::after {
    background: var(--photo) center / cover, #666 url('/assets/images/background/background-image.webp') center / cover;
}

.main-section-part-3 {
    --photo: url('/assets/images/home/frisbee-thumbnail.webp');
}

.main-section-part-4 {
    --photo: url('/assets/images/home/joker-thumbnail.webp');
}

.main-section-part-5 {
    --photo: url('/assets/images/bingo/bingo-2025-cover.svg');
}

/* The bingo card is mostly white: a darker bottom keeps the white button readable. */
.main-section-part-5::after {
    background: linear-gradient(0deg, #000a, transparent 70%), var(--photo) center / cover;
}

/* Big year across a "What's new" tile, above the button. It scales with the tile. */
.main-section-year {
    position: absolute;
    inset: 0 0 18% 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fffd;
    font-family: "Trebuchet MS", Arial, sans-serif;
    font-size: 22cqw;
    font-weight: 900;
    line-height: 1;
    letter-spacing: .04em;
    text-shadow: 0 3px 12px #000a;
    pointer-events: none;
}

/* Tile buttons scale with their tile (cqi = 1% of the tile width): 14px text and 36px tall on a 590px desktop tile,
   never smaller than 10px text and 24px tall (minimum tap height) */
.main-section-part-link {
    font-size: max(.625rem, 2.37cqi);
    height: max(1.5rem, 6.1cqi);
    aspect-ratio: 10 / 2;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    font-family: "Trebuchet MS", Arial, sans-serif;
    letter-spacing: 0.1em;
    text-decoration: none;
    border: 2px solid white;
    border-radius: 1em;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5em;
    background-color: transparent;
    transition: background-color 0.2s, color 0.2s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.main-section-part-link:focus-visible {
    background-color: white;
    color: black;
}

@media (hover: hover) and (pointer: fine) {
    .main-section-part-link:hover {
        background-color: white;
        color: black;
    }
}

.main-section-part-link:focus-visible {
    outline: 2px solid white;
    outline-offset: 5px;
}

/* Tablet */
@media (max-width: 950px) {
    .hero-title {
        font-size: 3rem;
    }

    .indoor-stamp {
        width: 10.5rem;
        margin-top: .9rem;
    }

    .countdown-container {
        width: min(100%, 25rem);
    }

    .clock-element {
        font-size: 2.5rem;
    }

    .home-gallery-lock svg {
        width: 56px;
    }
}

/* Phone: one column of tiles */
@media (max-width: 600px) {
    .hero-title {
        font-size: 2rem;
    }

    .indoor-stamp {
        width: 8.5rem;
        margin-top: .75rem;
    }

    .countdown-container {
        width: min(100%, 20rem);
    }

    .clock-element {
        font-size: 2rem;
    }

    .clock-element-label {
        height: 2rem;
        letter-spacing: .05rem;
    }

    .main-container {
        margin-top: 3rem;
    }

    .main-section {
        margin-bottom: 3rem;
    }

    .main-section-header {
        font-size: 1.25rem;
    }

    .main-section-part-container {
        grid-template-columns: 1fr;
    }

    .home-gallery-lock svg {
        width: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .main-section-part-link {
        transition: none;
    }
}
