/* ============================================================
   Swiss layer — Work: Signage + Performance (see BRAND.md).
   Loaded after the inline <style> in index.html and after style.css,
   so equal-specificity rules here win. The card frame / info column
   comes from swiss/work-cards.css; this file only handles what is
   specific to these two categories.
   ============================================================ */


/* ------------------------------------------------------------
   SIGNAGE — the neon sign
   The sign is the toy: its tubes keep their light (glow + flicker).
   Everything around it goes flat: a plain black wall, no ambient
   gradients, no floor blush, no corner bolts. Signage = design,
   so the tubes are --fill-design.
   ------------------------------------------------------------ */

.case-study-card[data-category="signage"] .cs-coming-badge::before {
    background: var(--fill-design);
}

.cs-neon-scene {
    --neon: var(--fill-design);
    --neon-glow: color-mix(in srgb, var(--fill-design) 55%, transparent);
    --neon-haze: color-mix(in srgb, var(--fill-design) 22%, transparent);
    /* A wall at night: black in both themes (a flat poster block on white paper). */
    background: var(--on-fill);
    border-left-color: transparent !important;
    cursor: default;
}

.neon-bg {
    min-height: 460px;
    padding: clamp(28px, 4vw, 64px);
    justify-content: flex-start;
    align-items: flex-end;
}

.neon-bg::before,
.neon-floor-glow {
    display: none;
}

/* Plug + cable: a thin flat line dropping from the top edge to the sign,
   the one Bauhaus bar in the scene. */
.neon-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: calc(clamp(28px, 4vw, 64px) + 34px);
    width: 2px;
    height: calc(100% - clamp(28px, 4vw, 64px) - 48px);
    background: var(--text-tertiary);
    opacity: 0.6;
    pointer-events: none;
}

.neon-board-frame {
    padding: clamp(22px, 2.4vw, 36px) clamp(26px, 3vw, 48px) clamp(26px, 2.8vw, 40px);
    align-items: flex-start;
    gap: 0;
    background: var(--on-fill); /* covers the cable where it meets the sign */
    z-index: 1;
    transition: transform 0.5s var(--ease-spring);
}

/* The outer tube: square corners, coloured light. */
.neon-board-frame::before {
    border-radius: 0;
    border: 2px solid var(--neon);
    box-shadow:
        0 0 6px var(--neon-glow),
        0 0 22px var(--neon-haze),
        inset 0 0 14px var(--neon-haze);
    animation: swissNeonFrame 5s ease-in-out infinite;
}

/* No bolts — the frame hangs from its cable. */
.neon-board-frame::after {
    display: none;
}

/* Lettering: one grotesk, bold and tight, lowercase like the rest of the site. */
.neon-line {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.6rem, 5.4vw, 5.25rem);
    letter-spacing: -0.045em;
    line-height: 0.92;
    text-transform: lowercase;
    text-align: left;
    padding-right: 0.06em;
}

.neon-line.n1,
.neon-line.n3 {
    color: var(--neon);
    text-shadow:
        0 0 2px var(--neon),
        0 0 10px var(--neon-glow),
        0 0 30px var(--neon-haze);
}

.neon-line.n1 { animation: neonFlickerA 6.5s infinite; }
.neon-line.n3 { animation: neonFlickerA 7.5s infinite 0.4s; }

/* The middle word is an unlit tube: outline only, it catches a spark now and then. */
.neon-line.n2 {
    color: transparent;
    -webkit-text-stroke: 1.5px var(--neon);
    text-shadow: none;
    animation: swissNeonSpark 9s infinite 0.8s;
}

@keyframes swissNeonFrame {
    0%, 17%, 22%, 24%, 52%, 56%, 100% { opacity: 1; }
    19%, 23%, 54%                     { opacity: 0.35; }
}

@keyframes swissNeonSpark {
    0%, 44%, 50%, 100% { color: transparent; text-shadow: none; }
    45%, 47%, 49%      { color: var(--neon); text-shadow: 0 0 10px var(--neon-glow), 0 0 30px var(--neon-haze); }
    46%, 48%           { color: transparent; text-shadow: none; }
}

/* Hover: the power steadies — every tube on, the sign gives a small springy lift. */
@media (hover: hover) {
    .cs-neon-scene:hover .neon-board-frame { transform: translateY(-6px); }
    .cs-neon-scene:hover .neon-line,
    .cs-neon-scene:hover .neon-board-frame::before { animation: none; opacity: 1; }
    .cs-neon-scene:hover .neon-line.n2 {
        color: var(--neon);
        -webkit-text-stroke: 0;
        text-shadow:
            0 0 2px var(--neon),
            0 0 10px var(--neon-glow),
            0 0 30px var(--neon-haze);
    }
}

@media (max-width: 700px) {
    .cs-neon-scene { min-height: 0; }
    .neon-bg {
        min-height: 300px;
        padding: 20px;
    }
    .neon-bg::after { left: calc(20px + 26px); height: calc(100% - 20px - 40px); }
    .neon-line { font-size: clamp(2.2rem, 13vw, 3.4rem); }
    .neon-board-frame { padding: 18px 22px 22px; }
}

@media (prefers-reduced-motion: reduce) {
    .neon-line,
    .neon-board-frame::before { animation: none; }
    .neon-board-frame { transition: none; }
    .cs-neon-scene:hover .neon-board-frame { transform: none; }
}


/* ------------------------------------------------------------
   PERFORMANCE — video cards
   Posters stay as they are (content). The chrome goes flat:
   no bronze, no rounded frames, no gradient veils, no shadows.
   The play control is a Bauhaus square in --fill-dance carrying a
   black triangle, flush to the frame's bottom-left corner.
   ------------------------------------------------------------ */

.case-study-card[data-category="performance"] .cs-description em {
    color: var(--text-primary);
}

.case-study-card[data-category="performance"] .cs-collab {
    border-left-color: var(--fill-dance);
}

/* Frame */
.cs-companion-clip {
    border: 0;
    border-radius: 0;
    background: var(--bg-card);
    overflow: hidden;
}

.case-study-card[data-category="performance"] .case-study-demo {
    background: var(--bg-card);
}

/* Poster: full strength, no veil. A slow, small push-in on hover. */
.cs-companion-poster {
    opacity: 1;
    transition: transform 0.6s var(--ease-out);
}

.cs-companion-play::after {
    display: none;
}

.cs-companion-play:hover .cs-companion-poster {
    opacity: 1;
    transform: scale(1.025);
}

.cs-companion-play:focus-visible {
    outline: 2px solid var(--text-primary);
    outline-offset: 3px;
}

/* Play: flat square + triangle, flush bottom-left. */
.cs-companion-play-icon {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 56px;
    height: 56px;
    background: var(--fill-dance);
    color: var(--on-fill);
    border-radius: 0;
    box-shadow: none;
    transform-origin: 0 100%;
    transition: transform 0.45s var(--ease-spring);
}

.cs-companion-play-icon svg {
    width: 20px;
    height: 20px;
    transform: translateX(1px);
    transition: transform 0.45s var(--ease-spring);
}

.cs-companion-play:hover .cs-companion-play-icon {
    background: var(--fill-dance);
    transform: scale(1.18);
}

.cs-companion-play:hover .cs-companion-play-icon svg {
    transform: translateX(4px);
}

.cs-companion-play:active .cs-companion-play-icon {
    transform: scale(1.05);
    transition-duration: 0.12s;
}

/* The two highlight pieces get a larger square. */
.case-study-card[data-category="performance"] .case-study-demo .cs-companion-play-icon {
    width: clamp(64px, 6vw, 88px);
    height: clamp(64px, 6vw, 88px);
}

.case-study-card[data-category="performance"] .case-study-demo .cs-companion-play-icon svg {
    width: 26px;
    height: 26px;
}

/* ---- Arangetram: a row of three tiles with captions underneath ---- */
.case-study-card.cs-companion-card {
    padding: 14px 0 0;
}

/* Eyebrow reads like the other cards' "NN  Category" line. */
.cs-companion-eyebrow {
    margin: 0 0 clamp(24px, 3vw, 40px);
    gap: 14px;
    align-items: baseline;
    font-family: var(--font-body);
    font-size: var(--fs-label);
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-tertiary);
}

.cs-companion-eyebrow::before {
    content: counter(cs, decimal-leading-zero);
    width: auto;
    height: auto;
    background: none;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.cs-companion-row {
    gap: var(--col-gap);
    row-gap: clamp(28px, 3vw, 40px);
}

/* Room under each tile for its caption. */
.cs-companion-card .cs-companion-clip {
    overflow: visible;
    margin-bottom: 3.4em;
}

.cs-companion-card .cs-companion-play {
    overflow: hidden;
}

/* Caption: under the picture, quiet, left-aligned to the frame. */
.cs-companion-label {
    top: 100%;
    bottom: auto;
    left: 0;
    right: 0;
    padding-top: 10px;
    gap: 2px;
    border-top: 1px solid var(--text-primary);
    margin-top: 0;
    pointer-events: none;
}

.cs-companion-label-title {
    font-family: var(--font-body);
    font-size: var(--fs-small);
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-primary);
    text-shadow: none;
    line-height: 1.3;
}

.cs-companion-label-credit {
    font-family: var(--font-body);
    font-size: var(--fs-label);
    color: var(--text-tertiary);
    text-shadow: none;
    line-height: 1.35;
}

/* While a tile plays in its frame the caption stays put (only the button goes). */
.cs-companion-clip.is-playing .cs-companion-label {
    display: flex;
}

/* ---- Arangetram lightbox: a full-screen poster flood ---- */
.arangetram-lightbox {
    background: var(--fill-dance);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.arangetram-lightbox-stage {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: var(--on-fill);
    animation: swissLightboxStage 0.5s var(--ease-out);
}

@keyframes swissLightboxStage {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: none; opacity: 1; }
}

/* Close: a black square in the corner with a pink cross. */
.arangetram-lightbox-close {
    top: 0;
    right: 0;
    width: 56px;
    height: 56px;
    background: var(--on-fill);
    border: 0;
    border-radius: 0;
    color: var(--fill-dance);
    transition: transform 0.45s var(--ease-spring);
}

.arangetram-lightbox-close svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    transition: transform 0.45s var(--ease-spring);
}

.arangetram-lightbox-close:hover {
    background: var(--on-fill);
    transform: none;
}

.arangetram-lightbox-close:hover svg {
    transform: rotate(90deg);
}

.arangetram-lightbox-close:focus-visible {
    outline: 2px solid var(--on-fill);
    outline-offset: 3px;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    /* Stacked: the highlight frame takes the video's own 16:9 instead of a tall crop. */
    .case-study-card[data-category="performance"] .case-study-demo .cs-companion-clip {
        min-height: 0;
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 600px) {
    .case-study-card.cs-companion-card { padding: 14px 0 0; }
    .cs-companion-play-icon { width: 48px; height: 48px; }
    .case-study-card[data-category="performance"] .case-study-demo .cs-companion-play-icon {
        width: 56px;
        height: 56px;
    }
    .arangetram-lightbox { padding: 64px 12px 12px; }
    .arangetram-lightbox-close { top: 0; right: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .cs-companion-poster,
    .cs-companion-play-icon,
    .cs-companion-play-icon svg,
    .arangetram-lightbox-close,
    .arangetram-lightbox-close svg { transition: none; }
    .cs-companion-play:hover .cs-companion-poster,
    .cs-companion-play:hover .cs-companion-play-icon,
    .cs-companion-play:hover .cs-companion-play-icon svg,
    .arangetram-lightbox-close:hover svg { transform: none; }
    .arangetram-lightbox-stage { animation: none; }
}
