/* ═══════════════════════════════════════════════════════════════════════════
   Zypherius home — showcase, cut demo, before/after
   Real output from the product: stills, generated clips, editor clips.
   Loaded after home.css, so it can lean on the same tokens and section rhythm.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────
   HERO — real clip inside the phone
   ───────────────────────────────────────────────────────────────────────── */
.phone-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #0c0c16;
}

.phone-sound {
    position: absolute;
    right: 12px;
    bottom: 14px;
    z-index: 4;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(10, 10, 18, 0.62);
    backdrop-filter: blur(8px);
    color: #fff;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.phone-sound:hover { background: rgba(20, 20, 34, 0.86); transform: scale(1.06); }
.phone-sound .icon-on { display: none; }
.phone-sound.is-on .icon-on { display: block; }
.phone-sound.is-on .icon-off { display: none; }
.phone-sound.is-on { border-color: rgba(74, 222, 128, 0.55); color: #4ade80; }

/* Fanned clips beside the phone now carry real frames */
.side-clip img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.side-clip .sc-veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(3, 0, 20, 0) 45%, rgba(3, 0, 20, 0.72) 100%);
}

/* home.css colours the score by which side it sits on. These are real scores,
   so the colour follows the number instead of the position. */
.side-clip .sc-hook.is-high { color: #4ade80; }
.side-clip .sc-hook.is-mid { color: #fbbf24; }

/* ─────────────────────────────────────────────────────────────────────────
   SHOWCASE
   ───────────────────────────────────────────────────────────────────────── */
.showcase {
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: var(--space-20) var(--space-6);
}

.sw-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-8);
    flex-wrap: wrap;
    margin-bottom: var(--space-8);
}

.sw-head .section-sub { margin-bottom: 0; max-width: 56ch; }

.sw-count {
    font-size: var(--text-sm);
    color: var(--text-muted);
    white-space: nowrap;
    padding-bottom: 4px;
}

.sw-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: var(--space-8);
}

.sw-pill {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    letter-spacing: -0.01em;
    padding: 9px 16px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.sw-pill:hover {
    background: rgba(255, 255, 255, 0.09);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.sw-pill.is-on {
    background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.sw-pill:active { transform: translateY(1px); }

.sw-grid {
    column-count: 4;
    column-gap: var(--space-4);
}

.sw-card {
    position: relative;
    display: block;
    break-inside: avoid;
    margin: 0 0 var(--space-4);
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: #0d0b1a;
    cursor: zoom-in;
    transition: transform 0.28s var(--ease-smooth), border-color 0.28s ease, box-shadow 0.28s ease;
}

.sw-card img,
.sw-card video {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.5s var(--ease-smooth);
}

.sw-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
}

.sw-card:hover img,
.sw-card:hover video { transform: scale(1.035); }

.sw-card:focus-visible {
    outline: 2px solid #a5b4fc;
    outline-offset: 3px;
}

.sw-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 34px 14px 12px;
    font-size: var(--text-xs);
    background: linear-gradient(180deg, rgba(3, 0, 20, 0) 0%, rgba(3, 0, 20, 0.86) 70%);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.24s ease, transform 0.24s ease;
    pointer-events: none;
}

.sw-card:hover .sw-meta,
.sw-card:focus-visible .sw-meta { opacity: 1; transform: translateY(0); }

.sw-cat { color: #fff; font-weight: var(--font-semibold); letter-spacing: -0.01em; }
.sw-model { color: var(--text-secondary); }

.sw-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    background: rgba(10, 10, 18, 0.66);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 11px;
    font-weight: var(--font-semibold);
    color: #fff;
    letter-spacing: 0.02em;
}

.sw-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.9);
}

.sw-card.is-hidden { display: none; }

.sw-foot {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    flex-wrap: wrap;
    margin-top: var(--space-8);
}

.sw-note {
    font-size: var(--text-sm);
    color: var(--text-muted);
    max-width: 62ch;
}

@media (max-width: 1100px) { .sw-grid { column-count: 3; } }
@media (max-width: 760px)  { .sw-grid { column-count: 2; } }
@media (max-width: 460px)  { .sw-grid { column-count: 1; } }

/* ─────────────────────────────────────────────────────────────────────────
   LIGHTBOX
   ───────────────────────────────────────────────────────────────────────── */
.lb {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: none;
    background: rgba(3, 0, 20, 0.9);
    backdrop-filter: blur(16px);
}

.lb.is-open { display: block; animation: lb-in 0.22s ease both; }

@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }

.lb-backdrop { position: absolute; inset: 0; }

.lb-panel {
    position: relative;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: var(--space-8);
    align-items: center;
    padding: 64px var(--space-6) var(--space-6);
}

.lb-media {
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: calc(100vh - 128px);
}

.lb-media img,
.lb-media video {
    max-width: 100%;
    max-height: calc(100vh - 128px);
    width: auto;
    height: auto;
    border-radius: 14px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
    background: #0d0b1a;
}

.lb-info {
    align-self: center;
    max-height: calc(100vh - 128px);
    overflow-y: auto;
}

.lb-kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--space-4);
}

.lb-label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.lb-model {
    font-size: var(--text-xs);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #c7d2fe;
    white-space: nowrap;
}

.lb-prompt-title {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.lb-prompt {
    font-size: var(--text-sm);
    line-height: 1.65;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: var(--space-4);
    user-select: text;
}

.lb-copy {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 9px 14px;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.lb-copy:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.24); }
.lb-copy.is-done { color: #4ade80; border-color: rgba(74, 222, 128, 0.4); }

.lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(10, 10, 18, 0.6);
    backdrop-filter: blur(8px);
    color: #fff;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease;
    z-index: 2;
}

.lb-nav:hover { background: rgba(30, 30, 52, 0.9); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

.lb-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(10, 10, 18, 0.6);
    backdrop-filter: blur(8px);
    color: #fff;
    cursor: pointer;
    z-index: 3;
    transition: background 0.18s ease;
}

.lb-close:hover { background: rgba(30, 30, 52, 0.9); }

.lb-count {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.lb-nav:focus-visible,
.lb-close:focus-visible,
.lb-copy:focus-visible,
.sw-pill:focus-visible,
.phone-sound:focus-visible,
.ba-range:focus-visible + .ba-handle {
    outline: 2px solid #a5b4fc;
    outline-offset: 3px;
}

@media (max-width: 900px) {
    .lb-panel {
        grid-template-columns: minmax(0, 1fr);
        align-content: start;
        gap: var(--space-4);
        padding: 60px var(--space-4) var(--space-6);
        overflow-y: auto;
    }
    .lb-media,
    .lb-media img,
    .lb-media video { max-height: 52vh; }
    .lb-nav { top: auto; bottom: 18px; transform: none; }
}

/* ─────────────────────────────────────────────────────────────────────────
   CUT DEMO — one take in, clips out
   ───────────────────────────────────────────────────────────────────────── */
.cut {
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: var(--space-20) var(--space-6);
}

.cut-stage {
    display: grid;
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    gap: var(--space-10);
    align-items: start;
    margin-top: var(--space-10);
}

.cut-source {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
}

.cut-source video,
.cut-source img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: #0d0b1a;
}

.cut-source-body { padding: var(--space-4) var(--space-5) var(--space-5); }

.cut-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: var(--font-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.cut-source-title {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: 6px;
}

.cut-source-desc {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.6;
}

/* Clip pinned left, the verdict and the op list read down the right. */
.cut-out {
    display: grid;
    grid-template-columns: minmax(0, 232px) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: var(--space-7);
    align-items: start;
}

.cut-clips {
    grid-column: 1;
    grid-row: 1 / span 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-5);
}

.cut-clip {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    transition: transform 0.28s var(--ease-smooth), border-color 0.28s ease;
}

.cut-clip:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.18); }

.cut-clip video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    background: #0d0b1a;
    cursor: pointer;
    transition: filter 0.25s ease;
}

/* Clicking a clip holds it. Desaturating says so on its own; the play badge
   is the nicer version for browsers that can select on a child's state. */
.cut-clip video.is-held,
.phone-video.is-held { filter: saturate(0.5) brightness(0.62); }

.cut-clip:has(video.is-held)::after,
.phone-screen:has(.phone-video.is-held)::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    transform: translate(-38%, -50%);
    border-left: 20px solid rgba(255, 255, 255, 0.92);
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.55));
    pointer-events: none;
    z-index: 3;
}

.cut-score {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 6px 11px;
    border-radius: var(--radius-full);
    background: rgba(10, 10, 18, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(74, 222, 128, 0.45);
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.cut-score b {
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    color: #4ade80;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}

.cut-score.is-mid { border-color: rgba(251, 191, 36, 0.45); }
.cut-score.is-mid b { color: #fbbf24; }

.cut-reason {
    grid-column: 2;
    grid-row: 1;
    padding: var(--space-4) var(--space-5);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.03);
    font-size: var(--text-sm);
    line-height: 1.65;
    color: var(--text-muted);
}

.cut-reason b {
    display: block;
    color: var(--text-primary);
    font-weight: var(--font-semibold);
    margin-bottom: 4px;
}

.cut-ops {
    grid-column: 2;
    grid-row: 2;
    list-style: none;
    margin: var(--space-5) 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.cut-ops li {
    position: relative;
    padding-left: 26px;
    font-size: var(--text-sm);
    line-height: 1.55;
    color: var(--text-secondary);
}

/* Ticks are drawn, not typed, so they keep their weight at every size. */
.cut-ops li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.42em;
    width: 13px;
    height: 7px;
    border-left: 2px solid rgba(74, 222, 128, 0.85);
    border-bottom: 2px solid rgba(74, 222, 128, 0.85);
    border-radius: 1px;
    transform: rotate(-45deg);
}

@media (max-width: 1080px) {
    .cut-out { grid-template-columns: minmax(0, 200px) minmax(0, 1fr); column-gap: var(--space-6); }
}

@media (max-width: 860px) {
    .cut-stage { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
    .cut-source { max-width: 320px; }
    .cut-out { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; }
    .cut-clips { grid-column: 1; grid-row: 1; max-width: 232px; }
    .cut-reason { grid-column: 1; grid-row: 2; margin-top: var(--space-6); }
    .cut-ops { grid-column: 1; grid-row: 3; }
}

/* ─────────────────────────────────────────────────────────────────────────
   BEFORE / AFTER
   ───────────────────────────────────────────────────────────────────────── */
.fixit {
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: var(--space-20) var(--space-6);
}

.ba-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-10);
}

.ba-item {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
}

.ba {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(45deg, rgba(255, 255, 255, 0.045) 25%, transparent 25%) -10px 0 / 20px 20px,
        linear-gradient(-45deg, rgba(255, 255, 255, 0.045) 25%, transparent 25%) -10px 0 / 20px 20px,
        linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.045) 75%) -10px 0 / 20px 20px,
        linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.045) 75%) -10px 0 / 20px 20px,
        #16132a;
    touch-action: pan-y;
}

.ba img {
    display: block;
    width: 100%;
    height: auto;
}

.ba-after {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: inset(0 0 0 var(--pos, 50%));
}

.ba-range {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
    -webkit-appearance: none;
    appearance: none;
    background: none;
}

.ba-range::-webkit-slider-thumb { -webkit-appearance: none; width: 44px; height: 100%; }
.ba-range::-moz-range-thumb { width: 44px; height: 100%; border: none; background: transparent; }

.ba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--pos, 50%);
    width: 2px;
    margin-left: -1px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

.ba-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    background: rgba(10, 10, 18, 0.55);
    backdrop-filter: blur(6px);
}

.ba-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 15px;
    height: 9px;
    transform: translate(-50%, -50%);
    z-index: 1;
    background:
        linear-gradient(90deg, #fff 0 3px, transparent 3px 6px, #fff 6px 9px) no-repeat left center / 9px 9px;
    clip-path: polygon(0 50%, 35% 0, 35% 100%, 65% 0, 65% 100%, 100% 50%);
}

.ba-tag {
    position: absolute;
    bottom: 12px;
    padding: 5px 11px;
    border-radius: var(--radius-full);
    background: rgba(10, 10, 18, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 11px;
    font-weight: var(--font-semibold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    pointer-events: none;
}

.ba-tag-before { left: 12px; }
.ba-tag-after { right: 12px; }

.ba-body { padding: var(--space-4) var(--space-5) var(--space-5); }

.ba-title {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: 4px;
}

.ba-desc {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.6;
}

.ba-model {
    display: inline-block;
    margin-top: 10px;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: rgba(99, 102, 241, 0.16);
    border: 1px solid rgba(99, 102, 241, 0.32);
    color: #c7d2fe;
}

/* ─────────────────────────────────────────────────────────────────────────
   MOTION OFF
   ───────────────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .sw-card,
    .sw-card img,
    .sw-card video,
    .cut-clip,
    .lb.is-open { transition: none; animation: none; }
    .sw-card:hover { transform: none; }
    .sw-card:hover img,
    .sw-card:hover video { transform: none; }
    .cut-clip:hover { transform: none; }
    .sw-meta { opacity: 1; transform: none; }
}
