/* =========================================================
   FONTS
   ========================================================= */

@font-face {
    font-family: "Fonetika Mono";
    src: url("./fonts/FonetikaMono-Regular-Trial.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --black: #000000;
    --white: #ffffff;
    --pink: #ff1493;
    --progress: #cbd3dc;

    /*
       Intentional empty space between major sections.
    */
    --major-gap: 310px;
}


/* =========================================================
   RESET
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    overflow-x: hidden;
    background: var(--white);
    color: var(--black);
    font-family: "Fonetika Mono", monospace;
}

button,
a {
    font: inherit;
}

::selection {
    background: var(--pink);
    color: var(--white);
}


/* =========================================================
   FIXED HEADER + FOOTER
   ========================================================= */

.site-header,
.site-footer {
    position: fixed;
    left: 0;
    width: 100%;
    z-index: 5000;
    display: flex;
    justify-content: center;
    background: var(--white);
    font-family: "DM Sans", Arial, sans-serif;
}

.site-header {
    top: 0;
    min-height: 74px;
    align-items: flex-start;
    padding: 25px 20px 18px;
    pointer-events: none;
}

.site-footer {
    bottom: 0;
    min-height: 70px;
    align-items: flex-end;
    padding: 15px 20px 24px;
}

.site-header p,
.site-footer p {
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 21px;
    font-weight: 400;
    line-height: 1;
}

.site-footer p {
    cursor: pointer;
    transition: color 180ms ease;
}

.site-footer p:hover,
.site-footer p:focus-visible {
    color: var(--pink);
    outline: none;
}


/* =========================================================
   PAGE
   ========================================================= */

.site-content {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 36px 145px;
}

section {
    width: 100%;
    scroll-margin-top: 90px;
}


/* =========================================================
   HOT-PINK HOVER
   ========================================================= */

main h1,
main h2,
main p,
main a {
    transition: color 180ms ease;
}

main h1:hover,
main h2:hover,
main p:hover,
main a:hover,
main a:focus-visible {
    color: var(--pink);
}

main a {
    color: var(--black);
}

main a:visited {
    color: var(--black);
}

main a:hover,
main a:focus-visible {
    color: var(--pink);
    outline: none;
}


/* =========================================================
   INTRO
   ========================================================= */

.intro {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 95px 20px 105px;
    text-align: center;
}

.typing-line {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    max-width: 100%;
}

.main-heading,
#typing-text {
    font-family: "Fonetika Mono", monospace;
    font-size: 38.6px;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: 0;
}

#typing-text {
    min-height: 46px;
    white-space: nowrap;
}

.typing-cursor,
.final-typing-cursor,
.meanwhile-typing-cursor {
    display: inline-block;
    flex: 0 0 auto;
    margin-left: 4px;
    font-family: "Fonetika Mono", monospace;
    animation: cursor-blink 720ms steps(1) infinite;
}

.typing-cursor {
    font-size: 38.6px;
    line-height: 1;
}

.typing-cursor.is-hidden,
.final-typing-cursor.is-hidden,
.meanwhile-typing-cursor.is-hidden {
    visibility: hidden;
    animation: none;
}

@keyframes cursor-blink {
    0%,
    46% {
        opacity: 1;
    }

    47%,
    100% {
        opacity: 0;
    }
}


/* =========================================================
   CURRENT PROGRESS
   ========================================================= */

.current-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 185px;
    padding-bottom: 0;
    text-align: center;
}

.transparency-text {
    font-family: "Fonetika Mono", monospace;
    font-size: 16.6px;
    line-height: 1.55;
}

.progress-area {
    width: min(520px, 72vw);
    margin-top: 55px;
}

.progress-bar {
    width: 100%;
    height: 45px;
    overflow: hidden;
    border: 1.5px solid var(--black);
    background: var(--white);
}

.progress-fill {
    width: 0;
    height: 100%;
    border-right: 1.5px solid transparent;
    background: var(--progress);
}

.progress-fill.is-animated {
    width: 23%;
    border-right-color: var(--black);
    transition:
        width 950ms ease,
        border-color 100ms ease 850ms;
}

.progress-label {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.2;
    text-align: left;
}


/* =========================================================
   OUR PROGRESS
   ========================================================= */

.our-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 78px;
    padding-bottom: 0;
    text-align: center;
}

.our-progress h2 {
    font-size: 24.6px;
    font-weight: 400;
    line-height: 1.2;
}

.prototype-button {
    min-width: 365px;
    margin-top: 28px;
    padding: 14px 38px;
    border: 1px solid var(--black);
    border-radius: 0;
    background: var(--black);
    color: var(--white);
    font-family: "Fonetika Mono", monospace;
    font-size: 19px;
    font-weight: 400;
    line-height: 1.2;
    cursor: pointer;
    transition:
        color 180ms ease,
        border-color 180ms ease,
        background-color 180ms ease;
}

.prototype-button:hover,
.prototype-button:focus-visible {
    border-color: var(--pink);
    background: var(--pink);
    color: var(--white);
    outline: none;
}


/* =========================================================
   MEANWHILE YOU WAIT
   ========================================================= */

.meanwhile {
    display: flex;
    flex-direction: column;
    align-items: center;

    /*
       The large empty space belongs here:
       prototype button → MEANWHILE YOU WAIT.
    */
    padding-top: var(--major-gap);

    padding-bottom: 0;
    text-align: center;
}

.meanwhile-typing-line {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    max-width: 100%;
}

.meanwhile .main-heading,
#meanwhile-typing-text {
    display: inline;
    min-height: 44px;
    font-family: "Fonetika Mono", monospace;
    font-size: 36.6px;
    font-weight: 400;
    line-height: 1.2;
}

.meanwhile-typing-cursor {
    font-size: 36.6px;
    line-height: 1;
}

#meanwhile-reveal-content {
    width: 100%;
}

.did-you-know {
    margin-top: 38px;
    font-size: 16.6px;
    line-height: 1.4;
}

.fact-links {
    width: min(890px, 88vw);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 45px;
    margin: 38px auto 0;
}

.fact-links a {
    color: var(--black);
    font-size: 16.6px;
    line-height: 1.65;
    text-align: center;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.more-reading-link {
    display: inline-block;
    margin-top: 56px;
    color: var(--black);
    font-size: 19px;
    line-height: 1.25;
    text-align: center;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}


/* =========================================================
   MEANWHILE STAGGERED REVEAL
   ========================================================= */

.meanwhile-reveal-item {
    opacity: 0;
    transform: translateY(22px);
    pointer-events: none;
}

.meanwhile-reveal-item.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    transition:
        opacity 650ms ease,
        transform 650ms ease,
        color 180ms ease;
}


/* =========================================================
   FINAL STORY
   ========================================================= */

.this-is-why {
    /*
       Same deliberate empty space:
       SOME MORE READING → final heading.
    */
    padding-top: var(--major-gap);

    padding-bottom: 70px;
    text-align: center;
}

.final-heading-line {
    width: min(850px, 86vw);
    min-height: 92px;
    margin: 0 auto;
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.final-heading-line h2 {
    display: inline;
    font-size: 24.6px;
    font-weight: 400;
    line-height: 1.5;
}

.final-typing-cursor {
    font-size: 24.6px;
    line-height: 1;
}


/* =========================================================
   BACKSTORY STAGGERED REVEAL
   ========================================================= */

.about-copy {
    width: min(770px, 84vw);
    margin: 55px auto 0;
    visibility: hidden;
}

.about-copy.is-ready {
    visibility: visible;
}

.about-copy p {
    margin-bottom: 25px;
    font-size: 12px;
    line-height: 1.65;
    text-align: left;

    opacity: 0;
    transform: translateY(22px);
}

.about-copy p.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 650ms ease,
        transform 650ms ease,
        color 180ms ease;
}


/* =========================================================
   PROTOTYPE MODAL
   ========================================================= */

.prototype-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 55px;
    background: rgba(255, 255, 255, 0.97);

    visibility: hidden;
    opacity: 0;

    transition:
        visibility 0s linear 260ms,
        opacity 260ms ease;
}

.prototype-overlay.active {
    visibility: visible;
    opacity: 1;

    transition:
        visibility 0s linear 0s,
        opacity 260ms ease;
}

.prototype-image-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prototype-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    transform: scale(0.98);
    transition: transform 260ms ease;
}

.prototype-overlay.active .prototype-image {
    transform: scale(1);
}

.close-prototype {
    position: fixed;
    top: 20px;
    right: 28px;
    z-index: 9100;
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    color: var(--black);
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    transition: color 180ms ease;
}

.close-prototype:hover,
.close-prototype:focus-visible {
    color: var(--pink);
    outline: none;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {
    :root {
        --major-gap: 220px;
    }

    .site-content {
        padding-right: 24px;
        padding-left: 24px;
    }

    #typing-text,
    .main-heading,
    .typing-cursor {
        font-size: 33px;
    }

    #typing-text {
        white-space: normal;
    }

    .meanwhile .main-heading,
    #meanwhile-typing-text,
    .meanwhile-typing-cursor {
        font-size: 32px;
    }

    .progress-area {
        width: min(500px, 80vw);
    }

    .fact-links {
        width: 90vw;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {
    :root {
        --major-gap: 145px;
    }

    .site-header {
        min-height: 60px;
        padding-top: 19px;
    }

    .site-footer {
        min-height: 58px;
        padding-bottom: 17px;
    }

    .site-header p,
    .site-footer p {
        font-size: 17px;
    }

    .site-content {
        padding-right: 18px;
        padding-bottom: 110px;
        padding-left: 18px;
    }

    .intro {
        padding-top: 80px;
        padding-bottom: 85px;
    }

    #typing-text,
    .main-heading,
    .typing-cursor {
        max-width: 94vw;
        font-size: 27px;
        line-height: 1.25;
    }

    #typing-text {
        white-space: normal;
    }

    .current-progress {
        padding-top: 105px;
    }

    .transparency-text {
        font-size: 13px;
    }

    .progress-area {
        width: 82vw;
        margin-top: 42px;
    }

    .progress-bar {
        height: 38px;
    }

    .progress-label {
        font-size: 10px;
    }

    .our-progress {
        margin-top: 62px;
    }

    .our-progress h2 {
        font-size: 21px;
    }

    .prototype-button {
        min-width: 0;
        width: min(365px, 86vw);
        padding: 13px 15px;
        font-size: 14px;
    }

    .meanwhile .main-heading,
    #meanwhile-typing-text,
    .meanwhile-typing-cursor {
        font-size: 27px;
    }

    .did-you-know {
        margin-top: 30px;
        font-size: 13px;
    }

    .fact-links {
        width: 88vw;
        gap: 37px;
        margin-top: 31px;
    }

    .fact-links a {
        font-size: 12px;
        line-height: 1.7;
    }

    .more-reading-link {
        margin-top: 46px;
        font-size: 16px;
    }

    .final-heading-line {
        width: 88vw;
        min-height: 85px;
    }

    .final-heading-line h2,
    .final-typing-cursor {
        font-size: 20px;
    }

    .about-copy {
        width: 88vw;
        margin-top: 42px;
    }

    .about-copy p {
        font-size: 11px;
        line-height: 1.7;
    }

    .prototype-overlay {
        padding: 45px 14px 20px;
    }

    .close-prototype {
        top: 12px;
        right: 14px;
    }
}