body {
    font-family: "freight-text-pro", "Georgia", "Times", serif;
    margin: 0px;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-color: #000;
    color: #111;
}

.down-arrow {
    animation: bounce 2s infinite;
    font-size: 2rem;
    /* Increase the size of the down arrow */
    font-weight: bold;
    /* Make the arrow bold */
    color: #111;
    /* Change the color to a shade of green */
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-5px);
    }

    60% {
        transform: translateY(-2px);
    }
}


h1 {
    text-align: center;
}


.background-img {
    background-size: cover;
    background-position: center;
    height: auto;
    width: 50vw;
    /* Use viewport width to take up 80% of screen width */
    border: 4px solid #000;
    /* Add border */
    margin: 0 auto;
    /* Center the image */
    box-sizing: border-box;
    /* Include border in the element's total width and height */
    display: block;
    /* Ensure the image is treated as a block element */
    margin-bottom: 0px;
}

.image-credit {
    font-size: 1rem;
    font-style: italic;
    color: #111;
    text-align: center;
    margin-top: 15px;
    background-color: rgba(255, 255, 255, 0.92);
    width: 280px;
    margin-left: auto;
    margin-right: auto;
    padding: 5px;
    font-family: "freight-text-pro", "Georgia", "Times", serif;
}

#caption {
    position: fixed;
    bottom: 15px;
    right: 15px;
    z-index: 1;
    background-color: rgba(255, 255, 255, 0.92);
    padding: 10px;
    font-family: "freight-text-pro", "Georgia", "Times", serif;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    pointer-events: none;
}

.caption.visible {
    opacity: 1;
    pointer-events: auto;
}

#byline {
    font-size: 0.8rem;
}

#byline .author {
    background-color: #111;
    color: white;
    padding: 0.2rem;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
    border-radius: 0.4rem;
    font-weight: bold;
    line-height: 1.5rem;
    white-space: nowrap;
}

.author a {
    color: inherit;
    text-decoration: inherit;
}

a {
    color: #111;
}

#jump-button {
    border-radius: 12px;
    padding: 10px 20px;
    font-size: 16px;
    color: black;
    background-color: #f7f7f7;
    border: rgb(59, 59, 59) 2px solid;
    cursor: pointer;
    margin-bottom: 22px;
}

.jump-link {
    text-decoration: underline;
    cursor: pointer;
}

#herald-logo {
    max-width: 300px;
    display: block;
    margin: 0 auto;
}

#credit {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 1;
    background-color: rgba(255, 255, 255, 0.92);
    padding: 10px;
    font-family: "freight-text-pro", "Georgia", "Times", serif;
}

#heading {
    min-height: 15rem;
    text-align: center;
    padding: 2rem 2.2rem 2.2rem 2.2rem;
    background-color: rgba(255, 255, 255, 0.92);
    /* Light grey background */
    min-width: 300px;
    width: 32%;
    /* Limit the width */
    margin: 0 auto;
    /* Center the element horizontally */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    /* Center the element vertically and horizontally */
}

#heading h3 {
    font-size: 2rem;
    font-family: "freight-text-pro", "Georgia", "Times", serif;
    font-optical-sizing: auto;
    font-weight: 800;
    font-style: normal;
    padding: 0;
    margin-top: 16px;
    margin-bottom: 22px;
}

.description {
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 400;
    max-width: 350px;
    text-align: center;
    margin: 0 auto;
    margin-top: 10px;
}

#heading p {
    text-align: left;
    font-style: italic;
    font-family: "freight-text-pro", "Georgia", "Times", serif;
}

.article {
    background-color: rgba(255, 255, 255, 0.92);
    padding: 20px;
    margin: 20px 0;
    line-height: 1.6;
    max-width: 70%;
    /* Limit the width */
    margin-left: auto;
    margin-right: auto;
    /* Center the element horizontally */
    font-size: 1.5rem;
}

.chart {
    background-color: rgba(255, 255, 255, 0.92);
    padding: 20px;
    margin: 20px 0;
    max-width: 70%;
    margin-left: auto;
    margin-right: auto;
}

#brown {
    color: #111;
    animation: fadeToBrown 2s forwards;
}

@keyframes fadeToBrown {
    to {
        color: #111;
    }
}

.big-numbers,
.data-box {
    text-align: center;
    padding: 20px;
    margin: 20px 0;
    margin-left: auto;
    margin-right: auto;
    background-color: rgba(255, 255, 255, 0.92);
    z-index: 10;
    position: relative;
    max-width: 70%;
    font-family: "freight-text-pro", "Georgia", "Times", serif;
    box-shadow: black;
}

.big-numbers h2,
.data-box h2 {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.5em;
    margin-top: 0.2em;
}

.number-container,
.data-box .number-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5em;
    margin-left: 15px;
    margin-right: 15px;
}

.number-item,
.data-box .number-item {
    flex: 1 1 200px;
    text-align: center;
    padding: 0.5em 0;
    margin: .5rem 0;
    border: 1px solid #d1d1d1;
    background: #fafafa;
    width: 55px;
    height: 180px;
}

.number-item h3 {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 0.3em;
    margin-top: 0.5em;
}

.number-item p {
    font-size: 1rem;
    font-weight: bold;
    margin-left: 10px;
    margin-right: 10px;
}

.number-item.item1 {
    background-color: #4E3629;
    border: 1px solid #6b4733;
    color: white;
}

.number-item.item2 {
    background-color: #A51C30;
    border: 1px solid #c52039;
    color: white;
}

.number-item.item3 {
    background-color: white;
    color: #4E3629;
}

.stripe-transition {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    display: block;
    margin: 0;
    padding: 0;
}

.background-img-fill {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    object-position: left top;
    display: block;
    margin: 0;
    padding: 0;
}

#transition-smoother {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
}

.flash-image {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    z-index: -1;
}

.flash-image.visible {
    opacity: 1;
}

.caption {
    font-family: "freight-text-pro", "Georgia", "Times", serif;
    font-size: 1.5rem;
    text-align: center;
    z-index: 1000;
    /* Increased z-index */
    background-color: rgba(255, 255, 255, 0.92);
    /* Added black background */
    margin-left: auto;
    margin-right: auto;
    width: 40%;
    line-height: 1.6;
    /* Make the background full width */
    padding: 15px;
    /* Add padding for better readability */
    box-sizing: border-box;
    /* Ensure padding doesn't affect width */
}

@media (max-width: 1200px) {
    #games-flex {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    #heading {
        width: 50%;
        max-width: 50%;
    }

    #heading h3 {
        font-size: 2rem;
    }

    #herald-logo {
        width: 300px;
    }

    #article {
        max-width: 70%;
    }

}

@media (max-width: 768px) {
    .team {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 10px;
        text-align: center;
    }

    .team-checkbox {
        display: none;
    }

    #genderSelect {
        width: 100%;
    }

    #heading {
        max-width: 70%;
        width: 70%;
        padding: 1rem;
    }

    #heading h3 {
        font-size: 1.7rem;
    }

    #heading h4 {
        font-size: 1.3rem;
        font-style: italic;
    }

    #herald-logo {
        max-width: 100%;
    }

    table {
        font-size: 0.9rem;
    }

    .background-img {
        width: 80vw;
    }

    .article {
        max-width: 80%;
    }

    .big-numbers,
    .data-box {
        max-width: 80%;
    }

    .chart {
        max-width: 80%;
    }

    .image-credit {
        width: 150px;
    }

    .caption {
        width: 70%;
    }

    .stripe-transition {
        opacity: 0;
        height: 80vh;
    }

    #needsLessHeight {
        height: 25vh;
    }

    #needsMoreHeight {
        height: 100vh;
    }

    body {
        background-image: none !important;
    }
    
    .full-screen-bg {
        display: none;
    }

    .spacer {
        height: 100vh;
    }

    #credit {
        display: none;
    }
}
.step .article {
    box-sizing: border-box;
    width: 34%;
    margin: 30vh 8%;
}

.article > :first-child {
    margin-top: 0;
}

.article > :last-child {
    margin-bottom: 0;
}

.step[data-side="morales"] .article {
    border: 10px solid #639CCF;
}

.step[data-side="morales"] .article h3 {
    color: #639CCF;
}

.step[data-side="smiley"] .article {
    margin-left: 58%;
    border: 10px solid #E8AA5A;
}

.step[data-side="smiley"] .article h3 {
    color: #E8AA5A;
}

.slide {
    height: 100vh;
}

.slide img,
.slide p {
    position: fixed;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.slide img {
    top: 0;
    left: 0;
    width: 50%;
    height: 100vh;
    object-fit: contain;
    z-index: -1;
}

.slide p {
    z-index: -1;
    bottom: 15px;
    right: 15px;
    margin: 0;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.92);
}

.step[data-side="smiley"] .slide img {
    left: 50%;
}

.step[data-side="morales"] .slide p {
    right: auto;
    left: 15px;
}

.slide.active img,
.slide.active p {
    opacity: 1;
}

.slide.snap p {
    transition: none;
}

.slide p:empty {
    display: none;
}

#intro {
    box-sizing: border-box;
    width: 84%;
    max-width: none;
    margin: 0 8% 10vh;
}

#clock {
    position: sticky;
    top: 20px;
    margin: 0 auto;
    width: 80px;
    height: 80px;
    border: 3px solid #111;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.92);
    z-index: 1;
}

#clock .label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

#clock .morales {
    right: calc(100% + 20px);
    color: #639CCF;
}

#clock .smiley {
    left: calc(100% + 20px);
    color: #E8AA5A;
}

#clock.labels .label {
    opacity: 1;
}

#clock .hand {
    position: absolute;
    bottom: 50%;
    left: calc(50% - 2px);
    width: 4px;
    background-color: #111;
    transform-origin: bottom;
}

#clock.ready .hand {
    transition: transform 0.5s;
}

#clock::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    margin: -4px;
    border-radius: 50%;
    background-color: #111;
}

#clock .hour {
    height: 25%;
}

#clock .minute {
    height: 40%;
}

#clock span {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-weight: bold;
    color: white;
}

@media (max-width: 768px) {
    .step[data-side] .article {
        width: 84%;
        max-width: none;
        margin: 10vh 8%;
    }

    .step[data-side] .slide img {
        left: 0;
        width: 100%;
    }

    #clock,
    .extra {
        display: none;
    }
}
