/* Core Page Reset & Lock Scroll */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    /* Absolutely prevents page scrolling */
    font-family: "Open Sans", sans-serif;
    background: #fff;
    color: rgba(38, 52, 74, .8);
    box-sizing: border-box;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

/* Master Full-Screen Flex Layout */
.contents {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    /* Ensures perfect mobile screen fit with browser UI bars */
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

section {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    justify-content: space-between;
    /* Evenly distributes heading, gallery, and button */
}

/* Tightened Header Typography */
h1.pitch {
    text-align: center;
    font-weight: 700;
    font-size: 1.4rem;
    margin: 5px 0 10px 0;
    color: #26344a;
    flex-shrink: 0;
}

/* PC Gallery Layout (In-line Rows) */
.thumbnails-gallery {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 15px;
    width: 100%;
    flex: 1;
    /* Auto-grows or shrinks to fit available vertical space */
    min-height: 0;
    /* Crucial fix: allows flex items to shrink below initial sizes */
    margin-bottom: 15px;
}

/* Scale-to-fit Gallery Images */
.thumbnails-gallery img {
    height: 100%;
    width: 23%;
    object-fit: cover;
    /* Keeps aspect ratios clean without distorting images */
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.thumbnails-gallery img:hover {
    transform: scale(1.02);
}

/* Button Formatting & Positioning */
.cta-container {
    width: 100%;
    text-align: center;
    flex-shrink: 0;
    /* Prevents the button area from getting compressed */
    padding-bottom: 5px;
}

/* Red Pulsing Attention Button */
.attention-button {
    background: #e53935;
    color: #fff;
    border: none;
    padding: 14px 40px;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.7);
    animation: pulse-glow 2s infinite;
    transition: background-color 0.2s ease;
}

.attention-button:hover {
    background: #d32f2f;
}

/* Continuous Subtle Pulse/Ripple Animation */
@keyframes pulse-glow {
    0% {
        transform: scale(0.97);
        box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.7);
    }

    70% {
        transform: scale(1.03);
        box-shadow: 0 0 0 15px rgba(229, 57, 53, 0);
    }

    100% {
        transform: scale(0.97);
        box-shadow: 0 0 0 0 rgba(229, 57, 53, 0);
    }
}

/* Mobile Layout Media Query (No Scroll / 2x2 Grid) */
@media screen and (max-width: 768px) {
    h1.pitch {
        font-size: 1.05rem;
        margin: 0 0 8px 0;
    }

    /* Arranges images as 2 side-by-side, 2 underneath */
    .thumbnails-gallery {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 8px;
        margin-bottom: 10px;
    }

    .thumbnails-gallery img {
        width: 100%;
        height: 100%;
    }

    .attention-button {
        width: 85%;
        max-width: 320px;
        padding: 12px 15px;
        font-size: 1rem;
    }
}