/* Tieners (template-parts/shows/tieners.php).
   The flyer's misregistered print: Anton in yellow with magenta and cyan
   plates shifted behind it; photos carry the same plates. The ground runs from
   afternoon to night, as the last day of school does; between the photos, the
   group chat of the hangout. */

.tn {
    --yellow: #ffe14d;
    --magenta: #ff2d87;
    --cyan: #00b7ff;
    --afternoon: #fff6d6;
    --violet: #5c2a92;
    --night: #0d0a1c;
    --tn-ink: #1a0b24;
    --plate: 0.45rem;

    --show-accent: var(--magenta);
    --show-accent-ink: var(--paper);
    --show-accent-text: #c4005f;
    --ghost-hover: var(--yellow);
    --ghost-hover-ink: var(--tn-ink);

    color: var(--tn-ink);
}

/* The flyer's offset print, for the title and the turn. */
.tn-title,
.tn-turn {
    font-family: 'Anton', var(--font-sans);
    font-weight: 400;
    line-height: 0.92;
    text-transform: uppercase;
    color: var(--yellow);
    text-shadow:
        -0.035em -0.025em 0 var(--magenta),
        0.04em 0.035em 0 var(--cyan);
}

/* ---------- Hero: the selfie, the title on the seam ---------- */

.tn-hero {
    position: relative;
    z-index: 1;
    min-height: 82svh;
    display: flex;
    align-items: flex-end;
}

.tn-hero-photo {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.tn-hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 30%;
}

.tn-hero-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgb(0 0 0 / 0.55), transparent 25%),
        linear-gradient(to top, var(--afternoon) 0%, rgb(255 246 214 / 0.35) 18%, transparent 40%);
}

.tn-hero-text {
    position: relative;
}

/* Half on the photo, half on the afternoon. */
.tn-title {
    margin-bottom: -0.45em;
    font-size: clamp(5.5rem, 26vw, 17rem);
    letter-spacing: 0.01em;
}

/* ---------- The day: afternoon to night ---------- */

.tn-day {
    position: relative;
    padding-top: var(--space-3xl);
    background: linear-gradient(to bottom,
            var(--afternoon) 0%,
            var(--yellow) 16%,
            var(--magenta) 38%,
            var(--violet) 58%,
            var(--night) 78%,
            #07060f 100%);
}

.tn-meta {
    font-size: var(--text-sm);
    font-weight: 600;
}

.tn-story {
    position: relative;
}

.tn-story-text {
    max-width: 40rem;
    margin-top: var(--space-md);
}

.tn-story-text p {
    margin-bottom: var(--space-md);
    line-height: 1.7;
}

.tn-story-text p:first-child {
    font-family: 'Anton', var(--font-sans);
    font-size: var(--text-2xl);
    line-height: 1.05;
    text-transform: uppercase;
}

/* ---------- Scenes: the chat and the photos ---------- */

.tn-scene {
    position: relative;
    display: grid;
    gap: var(--space-md);
    margin-top: var(--space-3xl);
}

.tn-scene--night {
    color: var(--paper);
}

.tn-chat {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-width: 22rem;
    list-style: none;
}

.tn-bubble {
    max-width: 85%;
    padding: 0.55rem 0.9rem;
    border-radius: 1.1rem;
    font-size: var(--text-base);
    font-weight: 500;
    line-height: 1.3;
    color: var(--tn-ink);
    box-shadow: 0 0.3rem 0.8rem rgb(0 0 0 / 0.15);
}

.tn-bubble--in {
    align-self: flex-start;
    border-bottom-left-radius: 0.3rem;
    background: var(--paper);
}

.tn-bubble--out {
    align-self: flex-end;
    border-bottom-right-radius: 0.3rem;
    background: var(--yellow);
}

/* Photos with the flyer's plates shifted behind them. */
.tn-photo {
    position: relative;
    display: block;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
    box-shadow:
        calc(-1 * var(--plate)) calc(-1 * var(--plate)) 0 var(--magenta),
        var(--plate) var(--plate) 0 var(--cyan);
    transition: box-shadow var(--duration-normal) ease;
}

.tn-photo:hover {
    --plate: 0.2rem;
}

.tn-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tn-photo--large {
    aspect-ratio: 3 / 2;
}

.tn-photo--small {
    justify-self: end;
    width: 62%;
    aspect-ratio: 3 / 2;
    margin-top: -3.5rem;
}

.tn-scene--left .tn-photo--small {
    justify-self: start;
}

/* The turn, in the night, over the last photo. */
.tn-turn {
    font-size: clamp(2.5rem, 9vw, 6rem);
    text-align: center;
}

/* ---------- Marker doodles: small, in corners ---------- */

.tn-doodle {
    position: absolute;
    pointer-events: none;
}

.tn-doodle--star {
    right: var(--gutter);
    bottom: -2rem;
    width: 3rem;
    transform: rotate(12deg);
}

.tn-doodle--crown {
    left: 0;
    top: -2.5rem;
    width: 3.5rem;
    transform: rotate(-10deg);
}

.tn-doodle--check {
    right: 0;
    top: -1.5rem;
    width: 3rem;
}

/* ---------- Credits, as on the flyer ---------- */

.tn-about {
    display: grid;
    gap: var(--space-lg);
    margin-top: var(--space-3xl);
    color: var(--paper);
}

.tn-credits {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2xs) var(--space-md);
    font-size: var(--text-sm);
    text-transform: uppercase;
}

.tn-credits strong {
    color: var(--yellow);
}

.tn-all .btn--ghost {
    color: var(--paper);
}

.tn-all .btn--ghost:hover {
    color: var(--ghost-hover-ink);
}

/* ---------- The fixed block, falling into the review ---------- */

.tn-info {
    position: relative;
    z-index: 1;
    margin-top: var(--space-2xl);
    margin-bottom: calc(-1 * var(--space-2xl));
}

.tn-info .show-info {
    box-shadow: 0 1.5rem 3rem rgb(0 0 0 / 0.35);
    border-top: 4px solid var(--magenta);
}

.show-design + .foyer {
    padding-top: calc(var(--space-2xl) + var(--space-lg));
}

/* ---------- Desktop ---------- */

@media (min-width: 1024px) {
    .tn {
        --plate: 0.6rem;
    }

    .tn-hero {
        min-height: 100svh;
    }

    .tn-day {
        padding-top: var(--space-4xl);
    }

    .tn-story {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        column-gap: var(--space-md);
    }

    .tn-meta,
    .tn-story-text {
        grid-column: 1 / 8;
    }

    .tn-story-text p:first-child {
        font-size: var(--text-4xl);
    }

    .tn-scene {
        grid-template-columns: repeat(12, 1fr);
        column-gap: var(--space-md);
        align-items: start;
        margin-top: var(--space-4xl);
    }

    .tn-chat {
        grid-column: 1 / 5;
        grid-row: 1;
        align-self: center;
    }

    .tn-photo--large {
        grid-column: 6 / 13;
        grid-row: 1;
    }

    /* The small photo lies over the large one's bottom corner, away from the chat. */
    .tn-photo--small {
        grid-column: 5 / 9;
        grid-row: 1;
        align-self: end;
        width: auto;
        margin: 0 0 -5rem;
    }

    .tn-scene--left .tn-chat {
        grid-column: 9 / 13;
    }

    .tn-scene--left .tn-photo--large {
        grid-column: 1 / 8;
    }

    .tn-scene--left .tn-photo--small {
        grid-column: 5 / 9;
    }

    .tn-chat {
        max-width: 26rem;
    }

    .tn-bubble {
        font-size: var(--text-lg);
    }

    /* The turn: centred, over the last photo. */
    .tn-scene--turn .tn-turn {
        grid-column: 1 / -1;
        grid-row: 1;
        align-self: end;
        z-index: 1;
        margin-bottom: -0.4em;
    }

    .tn-scene--turn .tn-photo--large {
        grid-column: 3 / 11;
        grid-row: 2;
    }
}
