/* ---------- intro animation ----------------- */

body {
    overflow: hidden;
}

main.scroll {
    pointer-events: none;
}

#intro {
    position: fixed;
    inset: 0;
    z-index: 9999;
    overflow: hidden;
    pointer-events: none;
    animation: introFadeOut .2s ease forwards 7.1s;
}

#intro::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--color-orange);
    transform: translateY(0);
    z-index: 0;
    animation: introDock 1.2s cubic-bezier(.2, .9, .2, 1) forwards 6.1s;
}

#intro>* {
    position: relative;
    z-index: 1;
}

@keyframes introDock {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    60% {
        transform: translateY(calc(-100% + 26px + var(--creativity-top)));
        opacity: 1;
    }

    100% {
        transform: translateY(-100%);
        opacity: 0;
    }
}

@keyframes introFadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

#intro div {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    font-weight: 700;
    overflow: hidden;
    opacity: 0;
    font-size: clamp(16px, 4vw, 64px);
}

#intro .design,
#intro .build,
#intro .grow {
    opacity: 0;
    font-weight: 700;
    font-size: clamp(16px, 4vw, 64px);
    transform: scale(14);
    animation: textInOut 1.2s cubic-bezier(.22, .61, .36, 1) forwards;
}

#intro .design {
    animation-delay: 0.3s;
}

#intro .build {
    animation-delay: 1.4s;
}

#intro .grow {
    animation-delay: 2.4s;
}

@keyframes textInOut {
    0% {
        opacity: 0;
        transform: scale(16);
    }

    35% {
        opacity: 0.1;
        transform: scale(12);
    }

    65% {
        opacity: 1;
        transform: scale(0.98);
    }

    90% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: scale(1.02);
    }
}

:root {
    --creativity-top: 110px;
}

#intro .creativity {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-left: -8px;
    margin-top: 12px;
    white-space: nowrap;
    gap: 20px;
    /* letter-spacing: 0.6em;
    word-spacing: 1.4em; */
    will-change: transform, opacity, gap;
    animation:
        creativityReveal 2.5s cubic-bezier(.22, .8, .22, 1) forwards 3.5s,
        creativityDock .8s cubic-bezier(.2, .9, .2, 1) forwards 6.1s,
        fadeOut 0.4s ease forwards 6.7s;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

@keyframes creativityReveal {
    0% {
        opacity: 0;
        gap: 20px;
        transform: scale(5);
    }

    20% {
        opacity: 0.2;
        gap: 18px;
        transform: scale(1.5);
    }

    100% {
        opacity: 1;
        gap: 0;
        transform: scale(1);
    }
}

@keyframes creativityDock {
    0% {
        transform: translateY(0);
        font-size: clamp(14px, 3.8vw, 64px);
    }

    100% {
        transform: translateY(calc(-50vh + var(--creativity-top)));
        font-size: 14px;
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@media (max-width: 767px) {
    #intro .creativity {
        margin-left: 0;
    }
}

/* ---------- header / navbar ----------------- */

nav {
    position: sticky;
    top: 0;
    z-index: 999;
    height: var(--creativity-top);
    width: 100%;
    padding-top: var(--space-s);
    padding-bottom: var(--space-s);
    margin-bottom: 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
}

nav::before {
    content: "";
    position: absolute;
    inset: 0;
    /* background: linear-gradient(to bottom,
            rgba(255, 255, 255, 1) 0%,
            rgba(255, 255, 255, 0.85) 65%,
            rgba(255, 255, 255, 0.6) 80%,
            rgba(255, 255, 255, 0) 100%); */
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* nav.dark-mode::before {
    background: transparent;
} */

nav.dark-mode,
nav.dark-mode .download-icon {
    color: white !important;
}

nav.dark-mode path {
    fill: black !important;
}

nav.dark-mode .nav-center img {
    filter: brightness(0) invert(1);
}

nav.dark-mode .mobile-only img {
    filter: invert(1) contrast(1.05) brightness(1.05);
}

nav .nav-center img {
    opacity: 1;
    transition: opacity 0.1s ease ;
}

nav.mini .nav-center img {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.1s ease, visibility 0.1s ease 0.1s;
}

nav>div,
nav a {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.nav-left {
    justify-content: flex-start;
}

.nav-center {
    justify-content: center;
}

.nav-right {
    justify-content: flex-end;
}

.nav-logo {
    width: auto;
    display: block;
    padding-top: 10px;
    height: 60px;
}

.download-icon {
    width: auto;
    display: block;
    height: 48px;
    color: var(--color-onyx);
}

@keyframes navMini {
    to {
        height: calc(var(--creativity-top) - 2 * (var(--space-s)) + 22px);
        padding-top: 8px;
        padding-bottom: 14px;
        margin-bottom: calc(2 * (var(--space-s)) - 22px);
    }
}

@keyframes navLogoMini {
    to {
        height: 50px;
    }
}

@keyframes navIconMini {
    to {
        height: 40px;
    }
}

nav.mini::before {
    opacity: 1;
}

nav.mini {
    animation: navMini 0.3s ease forwards;
}

nav.mini .nav-logo {
    animation: navLogoMini 0.3s ease forwards;
}

nav.mini .download-icon {
    animation: navIconMini 0.3s ease forwards;
}

nav.back::before {
    opacity: 0;
}

nav.back {
    animation: navMini 0.3s ease reverse forwards;
}

nav.back .nav-logo {
    animation: navLogoMini 0.3s ease reverse forwards;
}

nav.back .download-icon {
    animation: navIconMini 0.3s ease reverse forwards;
}

nav.mini.back {
    animation-direction: normal;
}

nav.mini.back .nav-logo {
    animation-direction: normal;
}

nav.mini.back .download-icon {
    animation-direction: normal;
}

nav a.visit-tab {
    --x: 50%;
    --y: 50%;
    position: absolute;
    right: 0;
    top: min(280px, calc(100vh - 250px));
    z-index: 99;
    display: inline-block;
    overflow: hidden;
    background: var(--color-onyx);
}

nav a.visit-tab::before {
    content: "";
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 12px;
    height: 12px;
    background: var(--color-orange);
    border-radius: 100%;
    transform: translate(-50%, -50%) scale(0);
    transform-origin: center;
    transition: transform 0.3s ease-out;
    z-index: 0;
    pointer-events: none;
}

nav a.visit-tab:hover::before {
    transform: translate(-50%, -50%) scale(50);
    border-radius: 0%;
}

nav a.visit-tab img {
    position: relative;
    z-index: 1;
    display: block;
    width: clamp(32px, 3vw, 38px);
}

/* nav a.visit-tab {
    position: absolute;
    right: 0;
    top: min(280px, calc(100vh - 250px));
    z-index: 99;
    display: inline-block;
    overflow: hidden;
    background: var(--color-onyx);
}

nav a.visit-tab::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--color-orange);
    transform: translateX(100%);
    transition: all 0.3s ease-out;
    z-index: 0;
    border-radius: 100%;
}

nav a.visit-tab:hover::before {
    transform: translateX(0);
    border-radius: 0;
}

nav a.visit-tab img {
    position: relative;
    z-index: 1;
    display: block;
    width: clamp(32px, 3vw, 38px);
} */

@media (max-width: 767px) {
    .nav-logo {
        width: 140px;
    }

    nav {
        display: flex;
        justify-content: space-between;
        gap: var(--space-s);
    }
}

/* ---------- main ---------------------------- */

main .creativity {
    font-size: 14px;
    position: absolute;
    top: var(--creativity-top);
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    text-align: center;
    opacity: 1;
    transition: opacity 0.1s ease;
}

main.mini .creativity {
    opacity: 0;
}

main section {
    width: 100%;
    position: relative;
}

.mobile-visit-tab {
    position: absolute;
    z-index: 99;
    top: 100vh;
    top: 100dvh;
    left: 50%;
    transform: translate(-50%, -100%);
    background: var(--color-onyx);
    transition: all 0.2s ease;
}

.mobile-visit-tab:hover {
    background: var(--color-orange);
}

.mobile-visit-tab img {
    width: 250px;
    max-width: 70vw;
    height: fit-content;
}

/* ---------- section-level ------------------- */

/* ---------- section 1 ---------- */
#s1 {
    padding-top: 0;
    background: linear-gradient(to bottom, white 80%, transparent 100%);
}

.hero {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero img {
    display: block;
    width: 100%;
    min-width: 1440px;
    height: auto;
    min-height: 860px;
    object-fit: cover;
    margin-top: calc(-1 * var(--creativity-top));
}

.hero .text {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-left: min(8.5vw, 123px);
}

.hero .text>* {
    opacity: 0;
    /* text-shadow:
        0 0 10px rgba(255, 255, 255, .8),
        0 0 20px rgba(255, 255, 255, .7),
        0 0 30px rgba(255, 255, 255, .6),
        0 0 40px rgba(255, 255, 255, .5); */
}

.hero h1:first-of-type {
    margin-left: max(-17vw, -246px);
    transform: translateX(-50vw);
    transition: transform 0.6s ease 0.1s, opacity 0.6s ease 0.1s;
}

.hero h1:nth-of-type(2) {
    margin-top: -6%;
    margin-bottom: -13%;
    transform: translateX(40vw);
    transition: transform 0.57s ease 0.1s, opacity 0.6s ease 0.1s;
}

.hero h1:nth-of-type(3) {
    margin-left: min(12vw, 180px);
    transform: translateX(50vw);
    transition: transform 0.6s ease 0.1s, opacity 0.6s ease 0.1s;
}

.hero p {
    transition: opacity 0.6s ease 0.3s;
}

.hero h1.enter {
    transform: translateX(0);
    opacity: 1;
}

@media (min-width: 768px) {
    .hero p {
        margin-left: max(-17vw, -246px);
    }
}

@media (min-width: 1200px) {
    .hero p {
        padding-left: 3px;
        margin-top: -2vw;
        transform: translateY(-100%);
    }
}

.hero p.enter {
    opacity: 1;
}

/* .hero .text>*.enter {
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0),
        0 0 20px rgba(255, 255, 255, 0),
        0 0 30px rgba(255, 255, 255, 0),
        0 0 40px rgba(255, 255, 255, 0);
} */

@media (max-width: 1100px) {
    .hero p {
        margin-top: calc(100px - 10vw);
    }
}

@media (max-width: 767px) {
    .hero {
        text-align: center;
        width: 100%;
        margin: 0;
    }

    .hero .text {
        margin: 0;
        width: 100%;
    }

    .hero h1 {
        margin: 0 !important;
        line-height: 100%;
    }

    .hero p {
        margin: auto;
        margin-top: 12px;
    }

    .hero h1:nth-of-type(3) {
        margin-top: -12px !important;
    }

}

/* ---------- section 2 ---------- */

#s2 {
    position: relative;
    height: 300vh;
    margin-top: -100vh;
    margin-top: -100dvh;
}

#s2 .s2-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

#s2 .s2-sticky::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(to bottom, white 0%, transparent 50%, transparent 80%, white 100%);
    z-index: 10;
}

#s2 h3 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    width: max-content;
    max-width: 90%;
    text-align: center;
    pointer-events: none;
}

#s2 .pill {
    position: absolute;
    left: 0;
    top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    padding: 16px 26px;
    background: #111;
    color: #fff;
    border-radius: 999px;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
    will-change: transform;
}

#s2 .pill::before,
#s2 .pill::after {
    content: none !important;
    display: none !important;
}

#s2 .s2-next-btn {
    position: absolute;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%) translateY(16px);
    z-index: 30;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #111;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.35s ease,
        transform 0.35s ease,
        visibility 0.35s ease;
}

#s2 .s2-next-btn.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

#s2 .s2-next-btn__text {
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
}

#s2 .s2-next-btn__arrow {
    display: inline-block;
    font-size: 22px;
    line-height: 1;
    animation: s2BounceDown 1.4s ease-in-out infinite;
}

@keyframes s2BounceDown {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(8px);
    }
}

@media (max-width: 1000px) {
    #s2 .pill {
        margin-left: calc((100% - 320px) / 4);
    }
}

/* ------- sections 3 to 5 ------- */

section.case {
    display: flex;
    position: relative;
    overflow: hidden;
}

section.case .background {
    position: absolute;
    inset: 0;
}

section.case .background::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(to bottom,
            rgba(36, 36, 36, 0) 57%,
            rgba(36, 36, 36, 1) 100%);
}

section.case .background video {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

section.case .content .left {
    width: 40%;
    flex: 0 1 auto;
}

section.case .content .right {
    width: 57%;
    flex: 1 0 auto;
}

.service-pills div {
    padding: 3px 15px 2px;
    white-space: nowrap;
    background: #fff;
    border-radius: 100px;
}

@media (min-width: 1001px) {
    .mobile-case-btn {
        display: none;
    }

    .cursor-btn {
        position: absolute;
        top: 0;
        left: 0;
        width: 140px;
        height: 140px;
        padding: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        color: #fff;
        background: rgba(254, 80, 0, 0.9);
        border: 0;
        border-radius: 50%;
        opacity: 0;
        filter: blur(6px);
        backdrop-filter: blur(8px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        will-change: transform, opacity, filter;
        transition:
            opacity 0.2s ease,
            filter 0.28s ease;
    }

    .cursor-btn.is-visible {
        opacity: 1;
        filter: blur(0);
    }

    .cursor-btn.is-leaving {
        opacity: 0;
        filter: blur(5px);
    }

    #casesWrapper {
        position: relative;
        width: 100%;
        height: 450vh;
    }

    #casesWrapper section {
        width: 100%;
        height: 100vh;
        position: -webkit-sticky;
        position: sticky;
        inset: 0;
        overflow: hidden !important;
        padding-top: 0;
        padding-bottom: 0;
    }

    section.case .background::after,
    section.case .background video {
        height: 100vh;
    }

    section.case>.content>div {
        padding-top: var(--space-m);
        padding-bottom: var(--space-m);
    }

    section.case>.content {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        display: flex;
        align-items: flex-end;
        padding-left: var(--site-x-padding); padding-right: var(--site-x-padding);
    }

}

@media (max-width: 1200px) {
    section.case .background::after {
        background: linear-gradient(to bottom,
                rgba(0, 0, 0, 0) 40%,
                rgba(0, 0, 0, 1) 100%);
    }
}

@media (max-width: 1000px) {
    section.case .background video {
        min-width: 500px;
        margin-left: min(calc(100% - 500px) / 2, 0px);
        height: auto;
        object-fit: contain;
        position: relative;
        transition:
            transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
            opacity 0.8s ease,
            filter 0.8s ease;
        will-change: transform, opacity, filter;
    }

    section.case>.content {
        margin-top: max(56.25vw, 281.25px);
    }

    section.case>.content>div {
        transition:
            transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.2s,
            opacity 0.6s ease 0.2s;
        will-change: transform, opacity;
    }

    section.case.is-before .background video,
    section.case.is-exiting .background video,
    section.case.is-after .background video,
    section.case.is-entering .background video {
        transform: scale(1.02);
        opacity: 0.5;
        filter: blur(1px);
    }

    section.case.is-active .background video {
        transform: scale(1);
        opacity: 1;
        filter: blur(0);
    }

    section.case.is-before>.content>div,
    section.case.is-exiting>.content>div {
        transform: translateY(24px);
        opacity: 0;
    }

    section.case.is-after>.content>div,
    section.case.is-entering>.content>div {
        transform: translateY(48px);
        opacity: 0;
    }

    section.case.is-active>.content>div {
        transform: translateY(0);
        opacity: 1;
    }

    .mobile-case-btn {
        display: inline-flex;
        width: 160px;
        height: 48px;
        padding: 14px;
        background: var(--color-orange);
        color: white;
        border-radius: 50px;
        line-height: 1;
        white-space: nowrap;
    }

    section.case .background {
        height: fit-content;
        overflow: hidden;
        margin-top: 50px;
    }

    section.case .background::after {
        background: linear-gradient(to bottom,
        rgba(var(--color-onyx-rgb), 1) 0%,
        rgba(var(--color-onyx-rgb), 0) 20%,
                rgba(var(--color-onyx-rgb), 0) 20%,
                rgba(var(--color-onyx-rgb), 1) 100%);
    }

    section.case .content {
        flex-direction: column;
        gap: var(--space-s);
    }

    section.case .content .left,
    section.case .content .right {
        width: 100%;
    }

    .cursor-btn {
        display: none !important;
    }
}

/* ---------- section 6 ---------- */

#s6 .pill {
    position: absolute;
    top: 0;
    left: 0;
    white-space: nowrap;
    will-change: transform;
    padding: 12px 28px;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    /* Safari */
    -ms-user-select: none;
    /* old Edge */
}

.logo-scroller-container {
    overflow: hidden;
}

.logo-track {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: max-content;
    animation: logo-scroll 50s linear infinite;
    will-change: transform;
}

.scroller-logo {
    display: block;
    height: 101px;
    flex: 0 0 auto;
}

.meet-wp .grab-deck {
    position: absolute;
    top: 0;
    right: 0;
}

.meet-wp .grab-deck svg circle,
.meet-wp .grab-deck .btn {
    transition: all 0.3s ease;
}

.meet-wp .grab-deck:hover svg circle {
    color: var(--color-orange);
}

.meet-wp .grab-deck:hover .btn {
    background-color: var(--color-orange);
    color: white;
}

#pills-container {
    width: 100%;
    height: 400px;
    position: relative;
    overflow: hidden;
    margin-top: -250px;
}

@keyframes logo-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@media (max-width: 1024px) {
    #pills-container {
        height: clamp(
            400px,
            calc(400px + (1024px - 100vw) * 0.0977),
            500px
        );
    }

    .meet-wp .grab-deck {
        margin-top: 12px;
        position: relative;
        top: initial;
        right: initial;
    }

}

/* ---------- section 7 ---------- */

#s7 form button {
    transition: all 0.3s ease;
}

#s7 form button:hover {
    background: var(--color-onyx);
    color: white;
}