@font-face {
    font-family: SuisseBPIntl;
    src: url('../assets/etkin-ui/fonts/SuisseBPIntl-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: SuisseBPIntl;
    src: url('../assets/etkin-ui/fonts/SuisseBPIntl-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Sometype;
    src: url('../assets/etkin-ui/fonts/Sometype-Mono.woff2') format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --contents-bg: #f2f0e9;
    --poster-gap: clamp(.75rem, 1.45vw, 1.5rem);
    --poster-ease: cubic-bezier(.4, 0, 0, 1);
    --poster-side-space: clamp(7.25rem, 8vw, 9rem);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 20rem;
    color: #111;
    background: var(--contents-bg);
}

body.contents-page {
    --etkin-grid-line: rgba(21, 22, 22, .2);
    min-width: 20rem;
    margin: 0;
    color: #111;
    background: var(--contents-bg);
    font-family: SuisseBPIntl, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.contents-page .etkin-grid-lines {
    z-index: 2;
}

.contents-page .poster-stage {
    position: relative;
    z-index: 3;
}

.contents-brand {
    position: absolute;
    top: 1rem;
    left: 50%;
    z-index: 20;
    display: block;
    width: clamp(2.5rem, 3.2vw, 3rem);
    transform: translateX(-50%);
}

.js .contents-brand {
    opacity: 0;
    transform: translate(-50%, -180%);
    animation: contents-brand-enter 900ms cubic-bezier(.16, 1, .3, 1) 180ms forwards;
    will-change: opacity, transform;
}

.contents-brand img {
    display: block;
    width: 100%;
    height: auto;
}

.contents-brand:focus-visible {
    outline: 2px solid #111;
    outline-offset: .35rem;
}

@keyframes contents-brand-enter {
    70% {
        opacity: 1;
        transform: translate(-50%, 8%);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.skip-link {
    position: fixed;
    top: .75rem;
    left: 50%;
    z-index: 100;
    padding: .7rem 1rem;
    color: #fff;
    background: #111;
    font-family: Sometype, monospace;
    font-size: .75rem;
    text-decoration: none;
    transform: translate(-50%, -220%);
    transition: transform 180ms ease;
}

.skip-link:focus {
    transform: translate(-50%, 0);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.poster-stage {
    display: grid;
    min-height: 100svh;
    place-items: center;
    padding: 1rem var(--poster-side-space);
}

.poster-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--poster-gap);
    width: min(100%, 227svh);
    margin-inline: auto;
}

.poster-card {
    --accent: #db3b5d;
    --card-pad: clamp(1.25rem, 2.1vw, 2.4rem);
    position: relative;
    isolation: isolate;
    aspect-ratio: 50 / 66;
    overflow: hidden;
    color: #fff;
    background: #fff;
    container-type: inline-size;
}

.poster-card__link {
    position: absolute;
    inset: 0;
    z-index: 4;
    cursor: pointer;
}

.poster-card__link:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: -3px;
}

.poster-card--news {
    --accent: #2f53d9;
}

.poster-card--unknown {
    --accent: #4cb630;
}

.poster-card__art {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: #151515;
    transform: translateY(0);
    transition: transform 550ms var(--poster-ease);
}

.poster-card__glyph {
    position: absolute;
    display: block;
    color: var(--accent);
    font-weight: 700;
    line-height: .72;
    letter-spacing: -.11em;
    user-select: none;
    will-change: transform;
}

.poster-card__inner {
    position: relative;
    z-index: 2;
    display: flex;
    height: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding: var(--card-pad) var(--card-pad) clamp(3.2rem, 8cqi, 5.1rem);
    transition: color 450ms linear;
}

.poster-card__title {
    position: relative;
    width: 100%;
    min-height: 2.85em;
    margin: 0;
    font-size: clamp(3rem, 14.7cqi, 5rem);
    font-weight: 400;
    line-height: .95;
    letter-spacing: -.035em;
}

.poster-card__title-face {
    position: absolute;
    inset: 0 auto auto 0;
    display: block;
}

.poster-card__title-face:first-child {
    animation: title-primary 6.4s steps(1, end) infinite;
}

.poster-card__title-face--alternate {
    opacity: 0;
    animation: title-switch 6.4s steps(1, end) infinite;
}

.poster-card--blog .poster-card__title-face:first-child {
    font-weight: 700;
}

.poster-card--blog .poster-card__title-face--alternate {
    font-weight: 400;
    font-style: italic;
}

.poster-card--news .poster-card__title {
    font-family: Sometype, monospace;
    font-weight: 400;
    letter-spacing: -.07em;
}

.poster-card--news .poster-card__title-face--alternate {
    font-family: SuisseBPIntl, Arial, sans-serif;
    font-weight: 700;
    font-style: italic;
}

.poster-card--unknown .poster-card__title {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    letter-spacing: -.08em;
}

.poster-card--unknown .poster-card__title-face--alternate {
    font-weight: 400;
    font-style: italic;
}

.poster-card__description {
    max-width: 25rem;
    margin: 1.55rem 0 0;
    font-size: clamp(1rem, 4.35cqi, 1.45rem);
    line-height: 1.3;
    letter-spacing: -.025em;
}

.poster-card__open {
    display: inline-flex;
    width: clamp(3.75rem, 15.6cqi, 4.75rem);
    height: clamp(3.75rem, 15.6cqi, 4.75rem);
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: .2rem;
    margin-top: 1.25rem;
    color: #111;
    background: #fff;
    border: 1px solid #fff;
    border-radius: 50%;
    font-family: Sometype, monospace;
    font-size: clamp(.66rem, 2.7cqi, .86rem);
    font-weight: 700;
    white-space: nowrap;
    transition: color 450ms linear, background-color 450ms linear, border-color 450ms linear;
}

.poster-card__open i {
    font-size: .7em;
    font-style: normal;
}

.poster-card__footer {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 3;
    min-height: clamp(1.65rem, 6cqi, 2rem);
    margin: 0;
    padding: .24rem var(--card-pad) .22rem;
    color: #fff;
    background: var(--accent);
    font-size: clamp(.72rem, 3.15cqi, 1rem);
    line-height: 1.2;
}

.poster-card:hover,
.poster-card:focus-within {
    color: #111;
}

.poster-card:hover .poster-card__art,
.poster-card:focus-within .poster-card__art {
    transform: translateY(100%);
}

.poster-card:hover .poster-card__open,
.poster-card:focus-within .poster-card__open {
    color: #fff;
    background: #111;
    border-color: #111;
}

.poster-card--blog .poster-card__glyph--blog-a {
    top: 22%;
    right: -12%;
    font-size: 77cqi;
    animation: blog-a 8s var(--poster-ease) infinite alternate;
}

.poster-card--blog .poster-card__glyph--blog-b {
    bottom: -7%;
    left: -13%;
    font-size: 52cqi;
    animation: blog-b 9s var(--poster-ease) infinite alternate;
}

.poster-card--blog .poster-card__glyph--blog-c {
    top: 24%;
    left: 15%;
    color: transparent;
    font-size: 62cqi;
    -webkit-text-stroke: 2px var(--accent);
    transform: rotate(-9deg);
    animation: blog-c 7s var(--poster-ease) infinite alternate;
}

.poster-card--news .poster-card__glyph {
    color: transparent;
    font-family: Sometype, monospace;
    font-weight: 400;
    -webkit-text-stroke: clamp(1px, .42cqi, 2px) var(--accent);
}

.poster-card--news .poster-card__glyph--news-a {
    top: 22%;
    left: -11%;
    font-size: 67cqi;
    transform: skewX(-13deg);
    animation: news-a 7.5s var(--poster-ease) infinite alternate;
}

.poster-card--news .poster-card__glyph--news-b {
    top: 46%;
    right: -45%;
    font-size: 56cqi;
    animation: news-b 9s var(--poster-ease) infinite alternate;
}

.poster-card--news .poster-card__glyph--news-c {
    bottom: -8%;
    left: -10%;
    color: var(--accent);
    font-family: SuisseBPIntl, Arial, sans-serif;
    font-size: 61cqi;
    font-weight: 700;
    -webkit-text-stroke: 0;
    animation: news-c 8.5s var(--poster-ease) infinite alternate;
}

.poster-card--unknown .poster-card__glyph {
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
}

.poster-card--unknown .poster-card__glyph--unknown-a {
    top: 13%;
    right: -15%;
    font-size: 96cqi;
    transform: rotate(8deg);
    animation: unknown-a 7s var(--poster-ease) infinite alternate;
}

.poster-card--unknown .poster-card__glyph--unknown-b {
    top: 38%;
    left: -18%;
    font-size: 58cqi;
    white-space: nowrap;
    transform: rotate(-7deg);
    animation: unknown-b 9s var(--poster-ease) infinite alternate;
}

.poster-card--unknown .poster-card__glyph--unknown-c {
    right: 2%;
    bottom: -18%;
    color: transparent;
    font-size: 82cqi;
    -webkit-text-stroke: 2px var(--accent);
    animation: unknown-c 8s var(--poster-ease) infinite alternate;
}

.js .poster-card {
    opacity: 0;
    transform: translateY(2.5rem);
    animation: card-enter 780ms var(--poster-ease) forwards;
}

.js .poster-card:nth-child(2) {
    animation-delay: 90ms;
}

.js .poster-card:nth-child(3) {
    animation-delay: 180ms;
}

@keyframes card-enter {
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes title-switch {
    0%, 42%, 100% { opacity: 0; }
    48%, 84% { opacity: 1; }
}

@keyframes title-primary {
    0%, 42%, 100% { opacity: 1; }
    48%, 84% { opacity: 0; }
}

@keyframes blog-a {
    to { transform: translate(-5%, 4%) scale(1.08); }
}

@keyframes blog-b {
    to { transform: translate(7%, -2%) scale(.94); }
}

@keyframes blog-c {
    to { transform: translate(4%, 8%) rotate(2deg); }
}

@keyframes news-a {
    to { transform: translate(8%, 3%) skewX(4deg); }
}

@keyframes news-b {
    to { transform: translate(-8%, -3%) scale(1.06); }
}

@keyframes news-c {
    to { transform: translate(4%, -4%); }
}

@keyframes unknown-a {
    to { transform: translate(-7%, 4%) rotate(-4deg); }
}

@keyframes unknown-b {
    to { transform: translate(8%, -5%) rotate(4deg); }
}

@keyframes unknown-c {
    to { transform: translate(-5%, -6%) scale(1.06); }
}

@media (max-width: 760px) {
    .poster-stage {
        display: block;
        padding: 5.25rem .65rem .65rem;
    }

    .poster-grid {
        grid-template-columns: minmax(0, 1fr);
        width: min(100%, 32rem);
        margin-inline: auto;
    }

    .poster-card {
        --card-pad: clamp(1.25rem, 7vw, 2rem);
    }

    .poster-card__title {
        font-size: clamp(3rem, 15cqi, 4.65rem);
    }

    .poster-card__description {
        font-size: clamp(1rem, 4.5cqi, 1.3rem);
    }
}

@media (min-width: 761px) and (max-width: 999px) {
    .poster-stage {
        padding-top: 5.25rem;
        padding-right: clamp(1rem, 3vw, 2rem);
        padding-left: clamp(1rem, 3vw, 2rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .js .contents-brand {
        opacity: 1;
        transform: translateX(-50%);
        animation: none !important;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        transition-delay: 0ms !important;
    }
}
