/* =========================
   ENGAGE
========================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;

    width: 100%;
    height: 100%;
}

body {
    font-family: "Hoefler Text", "Times New Roman", serif;

    margin: 0;

    background: white;

    overflow-x: hidden;

    overflow-y: auto;
}


/* =========================
   MAIN CONTAINER
========================= */

.engage {
    position: relative;

    width: 100%;

    height: 100vh;
    min-height: 100vh;

    overflow: hidden;

    touch-action: none;

    background: white;
}


/* =========================
   TITLE
========================= */

.engage h1 {
    position: absolute;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    margin: 0;

    font-size: clamp(2rem, 4vw, 4rem);

    font-weight: normal;

    letter-spacing: 0.04em;

    z-index: 5;

    pointer-events: none;
}


/* =========================
   INSTRUCTION
========================= */

.instruction {
    position: absolute;

    top: calc(50% + 80px);
    left: 50%;

    transform: translateX(-50%);

    margin: 0;

    font-size: 0.9rem;

    opacity: 0.5;

    z-index: 5;

    pointer-events: none;
}


/* =========================
   WORD FIELD
========================= */

.word-field {
    position: absolute;

    inset: 0;

    z-index: 4;

    pointer-events: none;
}


/* =========================
   FLOATING WORDS
========================= */

.floating-word {
    position: absolute;

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

    font-weight: normal;

    white-space: nowrap;

    user-select: none;

    pointer-events: none;

    /*
     * JavaScript controls the movement.
     */

    transition: none;
}


/* =========================
   STARTING POSITIONS
========================= */

.word-1 {
    left: 15%;
    top: 25%;
}

.word-2 {
    left: 75%;
    top: 20%;
}

.word-3 {
    left: 20%;
    top: 70%;
}

.word-4 {
    left: 78%;
    top: 68%;
}

.word-5 {
    left: 48%;
    top: 15%;
}

/* =========================
   CAUGHT MESSAGE
========================= */

.caught-message {
    position: absolute;

    left: 50%;
    bottom: 12%;

    transform: translateX(-50%);

    width: min(600px, 80vw);

    text-align: center;

    opacity: 0;

    z-index: 10;

    pointer-events: none;

    transition:
        opacity 1.2s ease;
}


.caught-message.visible {
    opacity: 1;

    pointer-events: auto;
}


/* =========================
   FOUND TEXT
========================= */

.found-text {
    margin: 0;

    font-size: 1.2rem;

    font-weight: normal;
}


/* =========================
   CONTACT INFORMATION
========================= */

.contact-info {
    margin-top: 35px;

    opacity: 0;

    transform: translateY(15px);

    transition:
        opacity 1.2s ease 1s,
        transform 1.2s ease 1s;
}


.caught-message.visible .contact-info {
    opacity: 1;

    transform: translateY(0);
}


.contact-info p {
    margin: 0 0 18px 0;

    font-size: 1.05rem;

    line-height: 1.5;
}


/* =========================
   INSTAGRAM LINK
========================= */

.contact-info a {
    color: inherit;

    text-decoration: underline;

    text-decoration-thickness: 1px;

    text-underline-offset: 4px;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 700px) {

    .caught-message {
        width: 82vw;

        bottom: 10%;
    }


    .found-text {
        font-size: 1.1rem;
    }


    .contact-info {
        margin-top: 28px;
    }


    .contact-info p {
        font-size: 1rem;

        line-height: 1.45;
    }

}


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

.contact-section {
    position: relative;

    min-height: 100vh;

    padding: 140px 10vw 120px;

    display: flex;

    justify-content: center;

    align-items: flex-start;

    background: white;
}


/* =========================
   CONTACT CONTENT
========================= */

.contact-content {
    width: min(650px, 85vw);

    text-align: center;

    opacity: 0;

    transform: translateY(30px);

    transition:
        opacity 1.2s ease,
        transform 1.2s ease;
}


.contact-section.revealed .contact-content {
    opacity: 1;

    transform: translateY(0);
}


.contact-content h2 {
    margin: 0 0 25px;

    font-size: clamp(2rem, 5vw, 4rem);

    font-weight: normal;

    letter-spacing: 0.04em;
}


.contact-content .found-text {
    margin: 0;

    font-size: 1.2rem;
}


.contact-content .contact-info {
    margin-top: 35px;

    opacity: 1;

    transform: none;
}


.contact-content .contact-info p {
    margin: 0 0 18px;

    font-size: 1.05rem;

    line-height: 1.5;
}


.contact-content a {
    color: inherit;

    text-decoration: underline;

    text-decoration-thickness: 1px;

    text-underline-offset: 4px;
}


//* =========================
   REVEALED ENGAGE STATE
========================= */

.engage.revealed {
    min-height: 100vh;
}


/*
 * Once the visitor has found you,
 * the giant title becomes smaller.
 */

/* =========================
   REVEALED ENGAGE
========================= */


.engage.revealed h1 {

    top: 45px;

    left: 6vw;

    transform: none;

    font-size: 1.25rem;

    letter-spacing: 0.08em;

    transition:
        top 1.2s ease,
        left 1.2s ease,
        transform 1.2s ease,
        font-size 1.2s ease;
}

/*
 * "find me" disappears.
 */

.engage.revealed .instruction {
    opacity: 0;

    transition:
        opacity 0.6s ease;
}


/*
 * The words stay alive.
 *
 * They don't disappear.
 */

.engage.revealed .word-field {
    opacity: 1;
}


/*
 * The temporary "okay, you found me"
 * appears in the first screen.
 */

.engage.revealed .caught-message {
    opacity: 1;

    pointer-events: none;
}


/* =========================
   CONTACT SECTION
========================= */

.contact-section {

    position: relative;

    width: 100%;

    min-height: 55vh;

    padding:
        70px 10vw
        100px;

    display: flex;

    justify-content: center;

    align-items: flex-start;

    background: white;

    box-sizing: border-box;
}


.contact-content {

    width: min(650px, 85vw);

    margin-top: 0;

    text-align: center;

    opacity: 0;

    transform: translateY(30px);

    transition:
        opacity 1.2s ease,
        transform 1.2s ease;
}


.contact-section.revealed .contact-content {
    opacity: 1;

    transform: translateY(0);
}


/* =========================
   CONTACT TEXT
========================= */

.contact-content h2 {
    margin: 0 0 25px;

    font-size:
        clamp(2rem, 5vw, 4rem);

    font-weight: normal;

    letter-spacing: 0.04em;
}


.contact-content .found-text {
    margin: 0;

    font-size: 1.2rem;
}


.contact-content .contact-info {

    margin-top: 0;

    opacity: 1;

    transform: none;
}


.contact-content .contact-info p {

    margin:
        0 0 18px;

    font-size: 1.05rem;

    line-height: 1.5;
}


.contact-content a {
    color: inherit;

    text-decoration: underline;

    text-decoration-thickness: 1px;

    text-underline-offset: 4px;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 700px) {

    .engage.revealed h1 {
        top: 50px;

        left: 8vw;

        font-size: 1.5rem;
    }


    .contact-section {
        min-height: 100svh;

        padding:
            100px
            9vw
            80px;
    }


    .contact-content {
        width: 82vw;
    }


    .contact-content h2 {
        font-size: 2.3rem;
    }


    .contact-content .found-text {
        font-size: 1.1rem;
    }


    .contact-content .contact-info p {
        font-size: 1rem;

        line-height: 1.5;
    }


}