@import url(root.css);

.page.home .hero {
    width: 100%;
    height: 100vh;
    position: relative;
    background: transparent;
    overflow: visible;
}

#hero-smoke {
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    z-index: 0;
    pointer-events: none;
}

#hero-smoke canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-tagline {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    opacity: 0.7;
    color: var(--text-color);
    white-space: nowrap;
}

.hero-cta {
    position: absolute;
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    padding: 0.7em 2em;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-color);
    border: 1.5px solid var(--primary-color);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    transition: background 200ms ease, color 200ms ease;
    pointer-events: auto;
}

.hero-cta:hover {
    background: var(--primary-color);
    color: var(--light-color);
}

/* Hero */

.page.home .hero .role-cycle {
    width: 100%;
    height: 100vh;
    z-index: 10;
    position: relative;
}

.page.home .hero #hero-name {
    --circle-size: 400px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -52%);
    z-index: 0;
    font-weight: 700;
    font-size: 17vw;
    line-height: calc(var(--circle-size) * 1.5);
    text-align: center;
    letter-spacing: 0.055em;
    overflow-wrap: break-word;
    background-image: radial-gradient(closest-side, color-mix(in srgb, var(--secondary-color) 14%, transparent) 80%, transparent 100%);
    background-position: 50% 53%;
    background-repeat: no-repeat;
    background-size: var(--circle-size) var(--circle-size);
    transition: font-size 200ms ease-in-out, line-height 200ms ease-in-out;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page.home .hero #hero-circle {
    width: 400px;
    height: 400px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    background: none;
}

.page.home .hero #hero-message {
    width: 130%;
    height: 50%;
    z-index: 3;
    transform: translate(-5%, 60%);
}

.page.home .hero #hero-message > * {
    font-weight: 700;
    font-size: 3.2em;
    line-height: 1em;
    letter-spacing: 0.025em;
    transition: font-size 200ms ease-in-out;
}

.page.home .hero #hero-roles {
    width: 90%;
    height: 58px;
    line-height: 58px;
    list-style: none;
    overflow: hidden;
}

.page.home .hero #hero-roles li {
    width: fit-content;
    height: 100%;
    margin-bottom: 30px;
    position: relative;
    top: 0;
    font-size: 3rem;
    font-weight: 700;
    animation: cycle 12s steps(4) infinite;
}

.page.home .hero .hero-role-cover {
    width: fit-content;
    height: 100%;
    position: relative;
    left: 0;
    animation: reveal 3s steps(var(--letter-count)) infinite;
}

.page.home .hero .hero-role {
    width: 100%;
    height: 100%;
    position: relative;
    left: 0;
    animation: children 3s steps(var(--letter-count)) infinite;
}

.page.home .hero .word {
    transition: font-size 200ms ease-in-out;
}

.page.home .hero letter {
    visibility: hidden;
}

.page.home .hero letter.show-letter {
    visibility: visible;
}

.page.home .hero .hero-period {
    width: 15px;
    height: 15px;
    position: absolute;
    left: 1px;
    top: 33px;
    display: inline-block;
    border-radius: 50%;
    background-color: var(--secondary-color);
}


/*-------------------Animations--------------------------*/

/* Hero */
@keyframes reveal {
    40%,
    60% {
        left: 100%;
    }
    100% {
        left: 0;
    }
}

@keyframes children {
    40%,
    60% {
        left: -100%;
    }
    100% {
        left: 0;
    }
}

@keyframes cycle {
    100% {
        top: calc(-88px * 4);
    }
}

/* ================ Media Queries =====================*/

/* tablets */
@media screen and (max-width: 896px) {
    .page.home .hero #hero-name {
        --circle-size: 300px;
        line-height: calc(var(--circle-size) * 1.5);
    }

    .page.home .hero #hero-circle {
        width: 300px;
        height: 300px;
    }

    .page.home .hero #hero-message > * {
        font-size: 2.2em;
    }

    .page.home .hero .word {
        font-size: 0.7em;
    }
}

/* small phones */
@media screen and (max-width: 519px) {
    .page.home .hero #hero-name {
        --circle-size: 220px;
        font-size: 22vw;
        line-height: calc(var(--circle-size) * 1.5);
    }

    .page.home .hero #hero-circle {
        width: 220px;
        height: 220px;
    }

    .page.home .hero #hero-message > * {
        font-size: 1.8em;
    }

    .page.home .hero #hero-roles li {
        font-size: 2.2rem;
    }

    .page.home .hero .word {
        font-size: 0.6em;
    }

    .page.home .hero .hero-period {
        width: 10px;
        height: 10px;
        top: 25px;
    }

    .hero-tagline {
        font-size: 0.6rem;
        letter-spacing: 0.2em;
    }

    .hero-cta {
        padding: 0.6em 1.5em;
        font-size: 0.75rem;
    }

    .page.home {
        overflow: visible;
    }
}
