/* Banshee homepage: one screen, brand and downloads left, the program right.
   Standalone on purpose; the other pages keep styles.css. */

@font-face {
    font-family: 'MesaHL2';
    src: url('mesa-hl2.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

:root {
    --bg: #0A0E17;
    --bg-raised: #0C111B;
    --ink: #E6DFCB;
    --ink-soft: #B9B2A1;
    --ink-faded: #8E887B;
    --ink-ghost: #6E695F;
    --wordmark: #F3E2B8;
    --gold: #C9AA70;
    --rule: rgba(222, 214, 189, 0.12);
    --rule-strong: rgba(222, 214, 189, 0.26);
    --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    --gutter: clamp(28px, 3.2vw, 60px);
    --interval: 7s;
    --ease: cubic-bezier(.2, .7, .2, 1);

    /* Layered pair: the main shot and the stage's shape. */
    --main-w: 80%;
    --stage-ratio: 1.667;
    --stage-chrome: 236px;
}

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

html,
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-optical-sizing: auto;
    font-feature-settings: 'cv11', 'ss01';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
}

button {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

/* ---------- Split ---------- */

.split {
    display: grid;
    grid-template-columns: minmax(330px, 1fr) 2fr;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* ---------- Left: brand and downloads ---------- */

.split-brand {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: var(--gutter);
    background: var(--bg);
    border-right: 1px solid var(--rule);
}

.brand-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 344px;
    margin: 0 auto;
}

.wordmark {
    margin: 0 0 0.42em;
    font-family: 'MesaHL2', serif;
    font-weight: 400;
    font-size: clamp(4rem, 6.2vw, 6.5rem);
    line-height: 0.82;
    color: var(--wordmark);
    letter-spacing: 0;
}

.tagline {
    margin: 0 0 0.75rem;
    font-size: 1.3rem;
    font-weight: 450;
    line-height: 1.35;
    letter-spacing: -0.015em;
    color: var(--ink);
}

.formats {
    margin: 0 0 2.25rem;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faded);
}

.downloads {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-download {
    --btn-bg: #283058;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 16px 0 20px;
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 60%),
        var(--btn-bg);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.09),
        0 1px 2px rgba(0, 0, 0, 0.4);
    color: #F4EFE4;
    text-decoration: none;
    transition: filter 160ms ease, transform 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
}

.btn-download[data-platform="linux"] {
    --btn-bg: #781840;
}

.btn-download[data-platform="macos"] {
    --btn-bg: #2D4743;
}

.btn-label {
    font-size: 0.97rem;
    font-weight: 600;
    letter-spacing: -0.005em;
}

.btn-meta {
    margin-left: auto;
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(244, 239, 228, 0.55);
    font-feature-settings: 'tnum';
}

.btn-icon {
    width: 18px;
    height: 18px;
    flex: none;
    color: rgba(244, 239, 228, 0.85);
    transition: transform 160ms ease;
}

.btn-download:hover {
    filter: brightness(1.18);
}

.btn-download:hover .btn-icon {
    transform: translateY(2px);
}

.btn-download:active {
    transform: translateY(1px);
}

.btn-download.is-yours {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.09),
        0 0 0 1px rgba(243, 226, 184, 0.7),
        0 6px 18px -6px rgba(0, 0, 0, 0.6);
}

.btn-download.is-disabled {
    opacity: 0.6;
    cursor: default;
    filter: none;
}

.download-meta {
    margin: 1rem 0 0;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--ink-faded);
    font-feature-settings: 'tnum';
}

.download-meta .dot {
    margin: 0 0.3em;
    color: var(--ink-ghost);
}

.download-hint {
    margin: 0.45rem 0 0;
    min-height: 1.2em;
    font-size: 0.76rem;
    line-height: 1.5;
    color: var(--ink-ghost);
    visibility: hidden;
}

.download-hint.is-active {
    visibility: visible;
}

.fine {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 1.4rem;
    padding-top: 1.5rem;
    font-size: 0.76rem;
    font-weight: 500;
}

.fine a {
    color: var(--ink-ghost);
    text-decoration: none;
    transition: color 160ms ease;
}

.fine a:hover {
    color: var(--ink);
}

/* ---------- Right: the layered showcase ---------- */

.split-show {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: var(--bg-raised);
}

/* Each slide lights the panel with a blur of its own main shot. */
.show-glows {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.show-glow {
    position: absolute;
    inset: -12%;
    background: var(--glow) center / cover no-repeat;
    filter: blur(80px) saturate(1.25);
    opacity: 0;
    transition: opacity 1100ms ease;
}

.show-glow.is-active {
    opacity: 0.32;
}

.split-show::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 70% at 50% 45%, transparent 40%, rgba(10, 14, 23, 0.55) 100%);
}

.show-frame {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    width: 100%;
    padding: 40px var(--gutter) 32px;
}

.show-head,
.show-stage,
.show-controls {
    width: min(100%, calc((100dvh - var(--stage-chrome)) * var(--stage-ratio)));
    margin: 0 auto;
}

.show-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.show-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--wordmark);
}

.show-count {
    font-size: 0.78rem;
    font-weight: 500;
    font-feature-settings: 'tnum';
    color: var(--ink-ghost);
}

.show-count-now {
    color: var(--ink-soft);
}

.show-stage {
    position: relative;
    aspect-ratio: var(--stage-ratio);
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
}

.show-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 650ms ease, visibility 0s linear 650ms;
}

.show-slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 650ms ease, visibility 0s;
}

.shot {
    position: absolute;
    margin: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #0B0F1A;
    cursor: zoom-in;
}

.shot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-drag: none;
    pointer-events: none;
}

.shot--main {
    left: 0;
    top: 0;
    width: var(--main-w);
    aspect-ratio: 16 / 10;
    box-shadow:
        0 0 0 1px var(--rule-strong),
        0 30px 70px -24px rgba(0, 0, 0, 0.85),
        0 12px 24px -12px rgba(0, 0, 0, 0.6);
    transform: translateY(14px);
    transition: transform 900ms var(--ease), box-shadow 300ms ease;
}

.shot--side {
    right: 0;
    bottom: 0;
    width: var(--side-w, 38%);
    aspect-ratio: var(--side-ratio, 16 / 10);
    border-radius: 10px;
    box-shadow:
        0 0 0 1px rgba(243, 226, 184, 0.22),
        0 36px 80px -20px rgba(0, 0, 0, 0.9),
        0 14px 28px -10px rgba(0, 0, 0, 0.7);
    transform: translateX(28px);
    opacity: 0;
    transition: transform 900ms var(--ease) 120ms, opacity 650ms ease 120ms, box-shadow 300ms ease;
}

.show-slide.is-active .shot--main {
    transform: none;
}

.show-slide.is-active .shot--side {
    transform: none;
    opacity: 1;
}

.shot--main:hover {
    box-shadow:
        0 0 0 1px rgba(222, 214, 189, 0.4),
        0 30px 70px -24px rgba(0, 0, 0, 0.85),
        0 12px 24px -12px rgba(0, 0, 0, 0.6);
}

.shot--side:hover {
    box-shadow:
        0 0 0 1px rgba(243, 226, 184, 0.45),
        0 36px 80px -20px rgba(0, 0, 0, 0.9),
        0 14px 28px -10px rgba(0, 0, 0, 0.7);
}

.show-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
}

.show-step {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--rule-strong);
    border-radius: 50%;
    background: rgba(10, 14, 23, 0.4);
    color: var(--ink);
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease;
}

.show-step svg {
    width: 18px;
    height: 18px;
}

.show-step:hover {
    background: rgba(222, 214, 189, 0.08);
    border-color: var(--ink-faded);
}

.show-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.show-dot {
    position: relative;
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--rule-strong);
    overflow: hidden;
    cursor: pointer;
    transition: width 400ms var(--ease), background 200ms ease;
}

.show-dot:hover {
    background: var(--ink-faded);
}

.show-dot.is-active {
    width: 44px;
    background: var(--rule-strong);
}

.show-dot.is-active::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--wordmark);
    transform-origin: left center;
    animation: show-fill var(--interval) linear forwards;
}

.split-show.is-paused .show-dot.is-active::after {
    animation-play-state: paused;
}

@keyframes show-fill {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* ---------- Zoom ---------- */

.shot-zoom {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
}

.shot-zoom[open] {
    display: grid;
    place-items: center;
}

.shot-zoom::backdrop {
    background: rgba(5, 7, 12, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.shot-zoom-image {
    max-width: min(94vw, 2000px);
    max-height: 88dvh;
    border-radius: 12px;
    box-shadow: 0 0 0 1px var(--rule), 0 40px 80px -20px rgba(0, 0, 0, 0.9);
}

.zoom-btn {
    position: fixed;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid var(--rule-strong);
    border-radius: 50%;
    background: rgba(8, 11, 19, 0.7);
    cursor: pointer;
}

.zoom-btn svg {
    width: 20px;
    height: 20px;
}

.zoom-btn:hover {
    background: rgba(222, 214, 189, 0.12);
}

.zoom-close {
    top: 18px;
    right: 18px;
}

.zoom-prev {
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
}

.zoom-next {
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
}

/* ---------- Narrow screens: stack, same composition ---------- */

@media (max-width: 900px) {
    :root {
        --gutter: 16px;
        --main-w: 100%;
        --stage-ratio: 1.12;
    }

    .split {
        display: block;
        height: auto;
        overflow: visible;
    }

    .split-brand {
        padding: 48px var(--gutter) 28px;
        border-right: 0;
        border-bottom: 1px solid var(--rule);
    }

    .brand-body {
        max-width: 420px;
    }

    .wordmark {
        font-size: clamp(3.75rem, 18vw, 5.5rem);
    }

    .fine {
        padding-top: 2rem;
    }

    .show-frame {
        padding: 28px var(--gutter) 36px;
    }

    .show-head,
    .show-stage,
    .show-controls {
        width: 100%;
    }

    .shot--side {
        width: calc(var(--side-w, 38%) * 1.3);
    }
}

@media (prefers-reduced-motion: reduce) {
    .show-slide,
    .show-slide.is-active,
    .shot--main,
    .shot--side,
    .show-glow,
    .show-dot,
    .btn-download,
    .btn-icon {
        transition: none;
    }

    .show-dot.is-active::after {
        animation: none;
        transform: none;
    }
}
