
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
    --color-bg: #efefef;
    --color-text: #1c1c1c;
    --color-accent: #32ff00;
    --color-muted: #6f6f6f;
    --color-placeholder: #c3c3c3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
}

.portfolio-page {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 32px 24px 120px;
}

.portfolio-intro {
    margin-bottom: 40px;
    text-align: center;
}

.portfolio-intro .portfolio-title {
    margin: 0 auto;
}

.portfolio-kicker {
    font-size: clamp(1rem, 1.6vw, 1.5rem);
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: -0.03em;
    color: var(--color-text);
}

.portfolio-title {
    max-width: 12ch;
    font-size: clamp(4rem, 7vw, 9rem);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: var(--color-text);
}

.portfolio-highlight {
    display: inline;
    background: var(--color-accent);
    color: var(--color-text);
    font-size: 0.7em;
    padding: -0.92em 0.12em;

    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;

    line-height: 1.25;
}

.interact-item {
    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 28px;
    border-radius: 18px;
    background: #e8e8e8;
    overflow: hidden;
    text-align: center;
}

.interact-title {
    position: relative;
    display: inline-block;
    font-size: 0.7em;
    font-weight: inherit;
    line-height: 1.25;
    letter-spacing: inherit;
    color: var(--color-text);
}

.interact-item:nth-child(1):hover .interact-title,
.interact-item:nth-child(1):focus-within .interact-title {
    animation: insightFocus 0.62s ease both;
}

.interact-title--word-war {
    display: inline-flex;
    gap: 0.16em;
    overflow: visible;
    white-space: nowrap;
}

.word-war-word,
.word-war-war {
    display: inline-block;
    transform-origin: center;
}

.interact-item:nth-child(2):hover .word-war-word,
.interact-item:nth-child(2):focus-within .word-war-word {
    animation: wordKnock 0.86s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.interact-item:nth-child(2):hover .word-war-war,
.interact-item:nth-child(2):focus-within .word-war-war {
    animation: warRetaliate 0.86s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.interact-item:nth-child(3):hover .interact-title,
.interact-item:nth-child(3):focus-within .interact-title {
    animation: blitzPress 0.78s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.interact-item:nth-child(4) .interact-title {
    transform-origin: 18% 18%;
    transition: transform 0.24s ease;
}

.interact-item:nth-child(4):hover .interact-title,
.interact-item:nth-child(4):focus-within .interact-title {
    transform: rotate(-4deg);
}

.interact-item:nth-child(5):hover .interact-title,
.interact-item:nth-child(5):focus-within .interact-title {
    animation: blitzBlink 0.48s steps(1, end) 2;
}

.interact-title--mood-board {
    white-space: nowrap;
}

.mood-speaker {
    display: inline-block;
    transform-origin: center;
}

.interact-item:nth-child(6):hover .mood-speaker,
.interact-item:nth-child(6):focus-within .mood-speaker {
    animation: moodVibrato 0.18s ease-in-out infinite;
}

.interact-item:nth-child(6):hover .mood-speaker--right,
.interact-item:nth-child(6):focus-within .mood-speaker--right {
    animation-delay: 0.045s;
}

@keyframes insightFocus {
    0% {
        filter: blur(0);
        text-shadow: none;
        transform: translateX(0);
    }

    28% {
        filter: blur(5px);
        text-shadow: -8px 0 0 rgba(28, 28, 28, 0.12);
        transform: translateX(-2px);
    }

    62% {
        filter: blur(1px);
        text-shadow: 7px 0 0 rgba(28, 28, 28, 0.16);
        transform: translateX(1px);
    }

    100% {
        filter: blur(0);
        text-shadow: none;
        transform: translateX(0);
    }
}

@keyframes wordKnock {
    0% {
        transform: translateX(0);
        text-shadow: none;
    }

    24% {
        transform: translateX(0.42em) rotate(-2deg);
        text-shadow: 5px 0 0 rgba(28, 28, 28, 0.12);
    }

    42% {
        transform: translateX(1.08em) rotate(1deg);
        text-shadow: 8px 0 0 rgba(28, 28, 28, 0.1);
    }

    58% {
        transform: translateX(0.92em) rotate(1deg);
        text-shadow: none;
    }

    72% {
        transform: translateX(-0.18em) rotate(-3deg);
        text-shadow: -4px 0 0 rgba(28, 28, 28, 0.12);
    }

    100% {
        transform: translateX(0);
        text-shadow: none;
    }
}

@keyframes warRetaliate {
    0% {
        opacity: 1;
        transform: translateX(0);
        text-shadow: none;
    }

    24% {
        opacity: 0.82;
        transform: translateX(0.4em) rotate(4deg);
        text-shadow: 4px 0 0 rgba(28, 28, 28, 0.1);
    }

    42% {
        opacity: 0.45;
        transform: translateX(1.18em) rotate(8deg);
        text-shadow: 10px 0 0 rgba(28, 28, 28, 0.1);
    }

    58% {
        opacity: 1;
        transform: translateX(0.58em) rotate(3deg);
        text-shadow: none;
    }

    72% {
        opacity: 1;
        transform: translateX(-0.24em) rotate(-5deg);
        text-shadow: -5px 0 0 rgba(28, 28, 28, 0.12);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
        text-shadow: none;
    }
}

@keyframes blitzBlink {
    0%,
    100% {
        opacity: 1;
        text-shadow: none;
    }

    20% {
        opacity: 0.35;
        text-shadow: 3px 0 0 rgba(28, 28, 28, 0.25);
    }

    40% {
        opacity: 1;
        text-shadow: -3px 0 0 rgba(28, 28, 28, 0.2);
    }

    60% {
        opacity: 0.45;
        text-shadow: 2px 0 0 rgba(28, 28, 28, 0.22);
    }

    80% {
        opacity: 1;
    }
}

@keyframes blitzPress {
    0%,
    100% {
        transform: scale(1);
        text-shadow: none;
    }

    12% {
        transform: scale(0.86);
        text-shadow: 0 3px 0 rgba(28, 28, 28, 0.12);
    }

    24% {
        transform: scale(1);
        text-shadow: none;
    }

    38% {
        transform: scale(0.84);
        text-shadow: 0 4px 0 rgba(28, 28, 28, 0.12);
    }

    50% {
        transform: scale(1);
        text-shadow: none;
    }

    66% {
        transform: scale(0.88);
        text-shadow: 0 2px 0 rgba(28, 28, 28, 0.12);
    }

    78% {
        transform: scale(1.02);
    }
}

@keyframes moodVibrato {
    0%,
    100% {
        transform: scale(1) translateX(0);
    }

    25% {
        transform: scale(1.18, 0.86) translateX(-2px);
    }

    50% {
        transform: scale(0.88, 1.18) translateX(2px);
    }

    75% {
        transform: scale(1.14, 0.9) translateX(-1.5px);
    }
}

/* Interact list */

.interact-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
}

.interact-item.mobile-only-play {
    display: none;
}

.interact-item {
    display: flex;
    flex-direction: column;
    align-items: center;

    min-height: 260px;

    padding: 28px;
    border-radius: 18px;
    background: #e8e8e8;
    color: var(--color-text);
    text-decoration: none;
    text-align: center;

    transition:
        background 0.28s ease,
        box-shadow 0.28s ease,
        transform 0.28s ease;
}

.interact-item:hover,
.interact-item:focus-within {
    background: var(--color-accent);
    transform: translateY(-4px);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.1);
}

.interact-item--disabled,
.interact-item--disabled:hover,
.interact-item--disabled:focus-within {
    background: #e1e1e1;
    color: rgba(28, 28, 28, 0.38);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.interact-content {
    flex: 1;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.interact-item .portfolio-title {
    max-width: none;
    font-size: clamp(3.25rem, 6vw, 7.25rem);
    line-height: 0.9;
    margin-bottom: 12px;
    text-align: center;
}

.interact-item .portfolio-kicker {
    max-width: 28ch;
    margin: 0 auto 10px;
    color: var(--color-text);
    text-align: center;
}

.interact-item--disabled .interact-title,
.interact-item--disabled .portfolio-kicker {
    color: rgba(28, 28, 28, 0.38);
}

.interact-cta {
    align-self: center;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: var(--color-text);
    text-decoration: none;

    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.03em;

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

.mobile-play-description {
    display: none;
}

.mobile-play-arrow-icon {
    display: none;
}

.interact-item:hover .interact-cta,
.interact-item:focus-within .interact-cta {
    transform: translateX(6px);
    opacity: 0.7;
}

.cta-arrow {
    display: inline-block;
    width: 0.9em;
    height: 0.9em;
    margin-left: 0.3em;
    object-fit: contain;
    vertical-align: -0.08em;
    transition: transform 0.25s ease;
}

.interact-item:hover .cta-arrow,
.interact-item:focus-within .cta-arrow {
    transform: translateX(6px);
}


/* Responsive */

@media (max-width: 768px) {
    .portfolio-page {
        padding: 24px 16px 120px;
    }

    .portfolio-intro {
        margin-bottom: 36px;
    }

    .interact-list {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .interact-item .portfolio-title {
        font-size: clamp(3.5rem, 16vw, 6rem);
    }

    .interact-item .portfolio-kicker {
        max-width: 30ch;
    }

    .interact-list {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 1024px) {
    .interact-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .portfolio-page {
        min-height: 100svh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 18px calc(104px + env(safe-area-inset-bottom));
        overflow-x: hidden;
    }

    .portfolio-intro {
        display: none;
    }

    .interact-list {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
        width: 100%;
        max-width: 680px;
        margin: 0 auto;
        padding: 0;
        overflow: visible;
        transform: translateY(3px);
    }

    .interact-item {
        display: none;
    }

    .interact-item.mobile-play-feature {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-content: end;
        align-items: start;
        justify-content: stretch;
        grid-column: 1 / -1;
        column-gap: 16px;
        min-height: 136px;
        padding: 18px 0 20px;
        border-bottom: 2px solid #d0d0d0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        color: var(--color-text);
        transform: none;
        overflow: visible;
    }

    .interact-item.mobile-play-half {
        grid-column: 1 / -1;
        min-height: 136px;
        padding: 18px 0 20px;
    }

    .mobile-play-insight {
        order: 1;
    }

    .mobile-play-fastlane {
        order: 2;
    }

    .mobile-play-tapsmash {
        order: 3;
    }

    .mobile-play-mockdelivery {
        order: 4;
    }

    .mobile-play-sidequest {
        order: 5;
    }

    .mobile-play-brightside {
        order: 6;
    }

    .interact-item.mobile-play-feature:hover,
    .interact-item.mobile-play-feature:focus-within {
        background: transparent;
        box-shadow: none;
        transform: none;
    }

    .mobile-play-feature .interact-content {
        grid-column: 1;
        align-self: start;
        width: auto;
        min-width: 0;
        min-height: 0;
        padding: 0;
        border-radius: 0;
        background: transparent;
        color: var(--color-text);
        box-shadow: none;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 8px;
        text-align: left;
    }

    .mobile-play-feature .portfolio-title {
        margin: 0;
        font-size: clamp(3rem, 12vw, 5.2rem);
        line-height: 0.9;
        letter-spacing: -0.05em;
        text-align: left;
    }

    .mobile-play-half .portfolio-title {
        font-size: clamp(3rem, 12vw, 5.2rem);
        line-height: 0.9;
    }

    .mobile-play-feature .interact-title {
        color: var(--color-text);
    }

    .interact-item.mobile-play-insight:hover .interact-title,
    .interact-item.mobile-play-insight:focus-within .interact-title,
    .interact-item.mobile-play-insight:active .interact-title {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .mobile-play-feature .interact-content .portfolio-kicker {
        display: block;
        max-width: 24ch;
        margin: 0;
        color: var(--color-text);
        font-size: 1.3rem;
        font-weight: 500;
        line-height: 1.14;
        letter-spacing: -0.03em;
        text-align: left;
    }

    .mobile-play-half .interact-content .portfolio-kicker {
        max-width: 24ch;
        font-size: 1.3rem;
        line-height: 1.14;
    }

    .mobile-play-description {
        display: none;
    }

    .mobile-play-feature .interact-cta {
        display: inline-flex;
        grid-column: 2;
        align-self: flex-start;
        justify-self: end;
        width: auto;
        height: auto;
        min-width: 0;
        min-height: 0;
        align-items: center;
        justify-content: center;
        gap: 0;
        margin-top: clamp(1rem, 3.4vw, 1.55rem);
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: var(--color-text);
        font-size: 0;
        line-height: 1;
        opacity: 1;
        transform: none;
    }

    .mobile-play-cta-text {
        display: none;
    }

    .mobile-play-half .interact-cta {
        width: auto;
        height: auto;
        min-width: 0;
        min-height: 0;
        border-width: 0;
    }

    .mobile-play-feature .cta-arrow {
        display: block;
        font-size: clamp(2rem, 8vw, 3.2rem);
        line-height: 1;
        transform: translateY(-1px);
    }

    .mobile-play-half .cta-arrow {
        font-size: clamp(2rem, 8vw, 3.2rem);
    }

    .mobile-play-arrow-icon {
        display: block;
        width: clamp(2rem, 7vw, 2.8rem);
        height: clamp(2rem, 7vw, 2.8rem);
        object-fit: contain;
    }

    .mobile-play-feature:hover .interact-cta,
    .mobile-play-feature:focus-within .interact-cta {
        opacity: 1;
        transform: none;
    }
}
