@font-face {
    font-family: 'Cooper Hewitt';
    src: url('../fonts/CooperHewitt-Book.woff2') format('woff2');
    font-weight: 400;
}

@font-face {
    font-family: 'Cooper Hewitt';
    src: url('../fonts/CooperHewitt-Semibold.woff2') format('woff2');
    font-weight: 600;
}

:root {
    --app-font: 'Cooper Hewitt', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow: hidden;

    font-family: var(--app-font);
    color: #242220;

    background:
        radial-gradient(
            circle at 50% 45%,
            #ffffff 0%,
            #fbfaf9 55%,
            #f3f1ef 100%
        );
}


/* =========================
   DOLLAR BACKGROUND
   ========================= */

.dollar-background {
    position: fixed;
    inset: 0;

    z-index: 0;
    pointer-events: none;

    background-image: url("../images/dollar.png");
    background-repeat: repeat;

    /*
       Your image already contains the whitespace
       between the dollar signs.
    */
    background-size: 120px auto;

    transform: rotate(-45deg) scale(1.25);

    opacity: 0.32;

    animation: dollarPan 60s linear infinite;

    /*
       Fade the pattern toward the center/top
       so it doesn't compete with the branding.
    */
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.15) 20%,
        black 45%,
        black 100%
    );

    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.15) 20%,
        black 45%,
        black 100%
    );
}


@keyframes dollarPan {
    from {
        background-position: 0 0;
    }

    to {
        background-position: -220px -220px;
    }
}


/* =========================
   BRANDING
   ========================= */

.brand-container {
    position: relative;

    z-index: 1;

    min-height: 100vh;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;

    /*
       Slightly above dead-center.
    */
    transform: translateY(-4vh);
}


.brand-container h1 {
    margin: 0;

    font-size: clamp(3rem, 6vw, 5rem);

    font-weight: 600;

    letter-spacing: -0.045em;

    line-height: 1;
}


.brand-container p {
    margin: 14px 0 0;

    font-size: clamp(1rem, 1.5vw, 1.2rem);

    font-weight: 400;

    color: #66615e;

    letter-spacing: 0.01em;
}

.start-button {
    position: relative;
    bottom: 42vh;
    left: 50%;

    width: min(500px, 80vw);
    height: 50px;

    border: none;
    border-radius: 14px;

    background: #242220;
    color: white;

    font-family: var(--app-font);
    font-size: 1.1rem;
    font-weight: 600;

    cursor: pointer;

    z-index: 10;

    transform: translateX(-50%);

    transition:
        width 1s cubic-bezier(0.65, 0, 0.35, 1),
        height 1s cubic-bezier(0.65, 0, 0.35, 1),
        bottom 1s cubic-bezier(0.65, 0, 0.35, 1),
        border-radius 1s cubic-bezier(0.65, 0, 0.35, 1),
        transform 1s cubic-bezier(0.65, 0, 0.35, 1);
}


/* Normal hover */

.start-button:hover {
    transform: translateX(-50%) translateY(-2px);
}


/* =========================
   TRANSITION
   ========================= */

.start-button.expand {
    animation: startTransition 1.8s forwards;
}


/* Hide text once the button reaches the corner */

.start-button.expand span {
    animation: hideButtonText 0.2s forwards;
    animation-delay: 0.85s;
}


/* =========================
   ANIMATION
   ========================= */

@keyframes startTransition {

    /* 0% — starts in the center */
    0% {
        transform: translateX(-50%);
    }

    /* 35% — slowly falls straight down */
    35% {
        transform: translateX(-50%) translateY(40vh);
    }

    /* 45% — clings at the bottom */
    45% {
        transform: translateX(-50%) translateY(40vh);
    }

    /* 55% — expands horizontally across the bottom */
    55% {
        transform:
            translateX(-50%)
            translateY(40vh)
            scaleX(3);
    }

    /* 65% — starts moving upward, still centered */
    65% {
        transform:
            translateX(-50%)
            translateY(40vh)
            scaleX(3);
    }

    /* 100% — continues upward while expanding to fill screen */
    100% {
        transform:
            translateX(-50%)
            translateY(0)
            scaleX(40)
            scaleY(40);
    }
}


@keyframes hideButtonText {

    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}