/* A drawn line, coloured exposure and the collective's own photograph. */
.punch-home {
    --home-blue: #8faaf0;
    --home-rose: #ba949b;
    --home-violet: #8060b8;
}
.punch-home #punch-main { overflow-x: clip; }
.punch-home .punch-home-content {
    position: relative;
    background: linear-gradient(180deg, var(--punch-bg), #18212c 38%, #1d1b2b 64%, var(--punch-bg));
}
.punch-home :is(.crew, .artists-teaser, .punch-news) { position: relative; isolation: isolate; background: transparent; }
.home-scene {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: clip;
    pointer-events: none;
    user-select: none;
    color: var(--home-blue);
    content-visibility: auto;
}
.home-scene-depth { position: absolute; inset: -30px 0; }
.home-scene::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../img/home-grain.svg') repeat;
    opacity: .065;
    mix-blend-mode: soft-light;
}
.home-trace { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.home-trace path { vector-effect: non-scaling-stroke; }
.home-ribbon { stroke: currentColor; stroke-width: 52px; opacity: .075; }
.home-line { stroke: currentColor; stroke-width: 1.2px; opacity: .4; }
.home-line-rose { stroke: var(--home-rose); opacity: .5; }
.home-line-secondary { opacity: .2; }
.home-signal {
    stroke: currentColor;
    stroke-width: 2px;
    stroke-linecap: round;
    stroke-dasharray: .065 .935;
    stroke-dashoffset: .16;
    opacity: .85;
    /* A static highlight keeps the line without repainting the full SVG every frame. */
}
.home-scrawl { stroke: currentColor; stroke-width: 3px; opacity: .45; }

/* Keep the face and headline clear; the colour lives at the photograph's edges. */
.punch-home .punch-hero { overflow: clip; }
.punch-home .punch-hero-picture { transform: scale(1.045); }
.punch-home .punch-hero-picture img {
    opacity: 1;
    filter: saturate(1.13) contrast(1.035);
}
.punch-home .punch-hero-shade {
    background: linear-gradient(180deg, #15191f42, #15191f65 35%, #15191f52 57%, var(--punch-bg) 100%),
        radial-gradient(ellipse at 48% 46%, #15191f55, transparent 66%);
}
.home-scene-hero { z-index: -1; mask-image: linear-gradient(#000 0 85%, transparent); }
.home-exposure {
    position: absolute;
    inset: -12%;
    background: radial-gradient(ellipse at 6% 43%, #5b88cd75, transparent 47%),
        radial-gradient(ellipse at 97% 23%, #984a785a, transparent 43%),
        linear-gradient(120deg, transparent 44%, #a8bcf012 49%, transparent 56%);
    mix-blend-mode: screen;
}
.home-trace-hero { translate: 0 12px; }
.home-trace-hero .home-ribbon { stroke-width: 68px; opacity: .08; }
.home-trace-hero .home-line { opacity: .52; }
.home-wave { position: absolute; bottom: 12%; right: 7%; height: 56px; display: flex; align-items: center; gap: 7px; rotate: -12deg; color: #a5bce1; opacity: .45; }
.home-wave i { display: block; width: 2px; height: var(--wave-height); background: currentColor; animation: home-wave 3.3s var(--wave-delay) ease-in-out infinite alternate; }
.punch-home .punch-hero h1 { text-shadow: 0 3px 32px #10182466; }

/* The field belongs to the active member, rather than to the carousel frame. */
.home-scene-crew { color: var(--home-crew-color, #8aaeb8); mask-image: linear-gradient(180deg, transparent, #000 9% 88%, transparent); }
.home-crew-field {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 7% 44%, color-mix(in srgb, currentColor 20%, transparent), transparent 58%),
        radial-gradient(ellipse at 100% 15%, color-mix(in srgb, currentColor 10%, transparent), transparent 48%);
}
.home-trace-crew .home-ribbon { stroke-width: 74px; opacity: .055; }
.punch-home :is(.crew-stage, .home-stage-fade) {
    background: linear-gradient(120deg, color-mix(in srgb, var(--home-crew-color, #8aaeb8) 9%, var(--punch-surface)), var(--punch-surface) 72%);
    border-color: color-mix(in srgb, var(--home-crew-color, #8aaeb8) 19%, transparent);
    box-shadow: 0 32px 80px -48px color-mix(in srgb, var(--home-crew-color, #8aaeb8) 25%, transparent);
}
.home-stage-fade { position: absolute; inset: -1px; z-index: -1; border: 1px solid; border-radius: inherit; pointer-events: none; }
.punch-home .crew-visual::before { background: radial-gradient(ellipse at 50% 60%, color-mix(in srgb, var(--crew-accent) 20%, transparent), transparent 68%); }

/* The same drawn line becomes loose pencil and ink around the artwork. */
.punch-home .artists-teaser { overflow: visible; }
.home-scene-artists { inset: -70px calc((min(100vw, 1392px) - 100vw) / 2) -90px; color: #a393ce; mask-image: linear-gradient(180deg, transparent, #000 12% 85%, transparent); }
.home-ink-field {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 76% 58%, #8054a52e, transparent 48%),
        radial-gradient(ellipse at 41% 73%, #80475b22, transparent 40%);
}
.home-trace-artists .home-ribbon { stroke-width: 32px; opacity: .08; }
.home-trace-artists .home-line { opacity: .33; }
.home-pencil { stroke: var(--home-violet); stroke-width: 5px; opacity: .32; }
.punch-home .artists-teaser-pictures img { box-shadow: 0 15px 42px #090d193d; }

/* Film edges stay behind the news, where there is room for them. */
.home-scene-news { color: #849cc4; mask-image: linear-gradient(180deg, transparent, #000 5% 89%, transparent); }
.home-news-field { position: absolute; inset: 0; background: radial-gradient(ellipse at 100% 12%, #344d7430, transparent 57%); }
.home-film { stroke: currentColor; stroke-width: 1px; opacity: .14; }
.home-film-perforation { stroke-width: 7px; stroke-dasharray: 12 16; }
.home-trace-news .home-line { opacity: .2; }

/* Only small details animate; the full-screen photograph and colour fields stay cached. */
.punch-home .home-scene * { animation-play-state: paused; }
.punch-home.home-motion-on .home-scene.is-in-view * { animation-play-state: running; }
.punch-home.home-page-hidden .home-scene * { animation-play-state: paused !important; }
.punch-home.home-motion-off :is(.home-scene-depth, .punch-hero-picture, .artists-teaser-pictures > a) { translate: none; transform: none; }
.punch-home.home-motion-off .home-signal { opacity: 0; }
.punch-home.home-motion-off .home-scene-crew, .punch-home.home-motion-off .crew-stage { transition: none; }

/* Promote only the small artwork layers while visible, never the full-screen backgrounds. */
@media (min-width: 701px) and (hover: hover) and (pointer: fine) {
    .punch-home.home-motion-on .artists-teaser.home-scene-visible .artists-teaser-pictures > a { will-change: translate; }
}

@keyframes home-wave { from { transform: scaleY(.45); } to { transform: scaleY(1); } }

@media (max-width: 700px) {
    .punch-home .punch-home-content { background: linear-gradient(180deg, var(--punch-bg), #18212c 32%, #1d1b2b 63%, var(--punch-bg)); }
    .punch-home .punch-hero-picture { transform: scale(1.025); }
    .home-scene-hero { top: var(--punch-mobile-header); }
    .home-exposure { background: radial-gradient(ellipse at 0 19%, #6a99e44a, transparent 55%), radial-gradient(ellipse at 100% 22%, #a5527329, transparent 45%); }
    .home-trace-hero { width: 900px; max-width: none; left: -320px; opacity: .75; }
    .home-trace-hero .home-scrawl { display: none; }
    .home-wave { right: 6%; bottom: 4%; height: 35px; gap: 5px; opacity: .27; }
    .home-scene-crew .home-trace { width: 900px; left: -250px; }
    .home-crew-field { background: radial-gradient(ellipse at 0 40%, color-mix(in srgb, currentColor 16%, transparent), transparent 75%); }
    .home-scene-artists { inset: -30px 0 -40px; }
    .home-trace-artists { width: 850px; left: -390px; }
    .home-film { opacity: .12; }
    .home-scene-news .home-trace { width: 900px; left: -360px; }
}
@media (prefers-reduced-motion: reduce) {
    .punch-home .home-scene *, .punch-home .punch-hero-picture img { animation: none !important; transition: none !important; }
    .punch-home :is(.home-scene-depth, .artists-teaser-pictures > a) { translate: none !important; }
    .punch-home .punch-hero-picture { transform: none !important; }
    .punch-home .home-signal { display: none; }
}
@media (forced-colors: active) { .home-scene { display: none; } }
