/* ============================================================================
   SENTINEL COMMAND WALL
   ----------------------------------------------------------------------------
   The operations-room shot from ASTROC_MultiDomain_Showcase: three curved
   primary screens over a strip of operator consoles, lit from the floor.

   Built in CSS 3D rather than as a video so the panels stay crisp at any
   width, the captions stay selectable text, and the whole thing costs a few
   kilobytes instead of a hundred megabytes.
   ========================================================================= */

.swall {
    --swall-edge: rgba(120, 200, 165, 0.3);
    --swall-ink: #cfe6dc;
    position: relative;
    margin: 56px 0 8px;
    padding: 38px 0 44px;
    background:
        radial-gradient(ellipse 120% 90% at 50% 112%, rgba(46, 224, 122, 0.07), transparent 62%),
        linear-gradient(180deg, #05080d 0%, #070b11 55%, #04070b 100%);
    border: 1px solid rgba(236, 232, 223, 0.07);
    border-radius: 10px;
    overflow: hidden;
    font-family: var(--mono, 'JetBrains Mono', monospace);
}

/* Room haze, so the screens sit in a space rather than on a flat panel. */
.swall::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 52% at 50% 38%, rgba(70, 140, 255, 0.05), transparent 70%);
    pointer-events: none;
}

/* ---- header --------------------------------------------------------------- */

.swall-head {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 0 26px 26px;
}

.swall-mark {
    width: 16px;
    height: 16px;
    flex: none;
    border: 1px solid rgba(46, 224, 122, 0.6);
    transform: rotate(45deg);
}

.swall-title {
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    color: var(--swall-ink);
}

.swall-kicker {
    font-size: 0.6rem;
    letter-spacing: 0.26em;
    color: rgba(120, 200, 165, 0.85);
}

.swall-stamp {
    margin-left: auto;
    font-size: 0.58rem;
    letter-spacing: 0.2em;
    color: rgba(236, 232, 223, 0.5);
    font-variant-numeric: tabular-nums;
}

/* ---- the curved screen bank ------------------------------------------------ */

.swall-stage {
    position: relative;
    /* Tight perspective + a real rotation angle: at 1700px/13deg the curve was
       too slight to register as a video wall at all. */
    perspective: 1150px;
    perspective-origin: 50% 48%;
    padding: 0 26px;
}

.swall-screens {
    display: grid;
    grid-template-columns: 1fr 1.28fr 1fr;
    gap: 12px;
    transform-style: preserve-3d;
}

.swall-screen {
    position: relative;
    border: 1px solid var(--swall-edge);
    background: #0a0f14;
    overflow: hidden;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 760ms cubic-bezier(0.16, 1, 0.3, 1),
                transform 760ms cubic-bezier(0.16, 1, 0.3, 1);
}

.swall.is-live .swall-screen { opacity: 1; }

/* The outer two rotate inward, which is what reads as a curved video wall.
   Rotation is applied only once live, so the entry animation carries it. */
.swall.is-live .swall-screen--l { transform: rotateY(19deg) translateZ(-40px); transition-delay: 60ms; }
.swall.is-live .swall-screen--c { transform: translateZ(14px); transition-delay: 0ms; }
.swall.is-live .swall-screen--r { transform: rotateY(-19deg) translateZ(-40px); transition-delay: 120ms; }

.swall-shot {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    filter: saturate(0.72) contrast(1.06) brightness(0.74);
}

/* Screen glass: a faint scan texture and a top sheen. */
.swall-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(190, 230, 255, 0.07), transparent 28%),
        repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px);
    pointer-events: none;
}

.swall-hud {
    position: absolute;
    inset: 0;
    padding: 9px 11px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

.swall-hud-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.5rem;
    letter-spacing: 0.16em;
    color: rgba(190, 230, 212, 0.88);
}

.swall-rec { color: #ff5b4a; }
.swall-rec::before {
    content: '●';
    margin-right: 4px;
    animation: swall-rec 1.6s steps(1) infinite;
}

@keyframes swall-rec { 50% { opacity: 0.25; } }

.swall-cap {
    font-size: 0.54rem;
    font-weight: 600;
    letter-spacing: 0.17em;
    color: #e4f2ec;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95), 0 0 12px rgba(0, 0, 0, 0.8);
}

/* Reticle on the centre screen only — the source keeps the others clean. */
.swall-reticle {
    position: absolute;
    left: 50%;
    top: 46%;
    width: 54px;
    height: 54px;
    margin: -27px 0 0 -27px;
    border: 1px solid rgba(46, 224, 122, 0.55);
    pointer-events: none;
}

.swall-reticle::before,
.swall-reticle::after {
    content: '';
    position: absolute;
    background: rgba(46, 224, 122, 0.55);
}

.swall-reticle::before { left: 50%; top: -8px; bottom: -8px; width: 1px; }
.swall-reticle::after { top: 50%; left: -8px; right: -8px; height: 1px; }

/* ---- operator console strip ------------------------------------------------ */

.swall-consoles {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 9px;
    margin: 16px 26px 0;
    transform-style: preserve-3d;
    perspective: 1200px;
}

.swall-console {
    position: relative;
    border: 1px solid rgba(120, 200, 165, 0.18);
    background: #080c11;
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px) rotateX(16deg);
    transform-origin: top center;
    transition: opacity 620ms cubic-bezier(0.16, 1, 0.3, 1),
                transform 620ms cubic-bezier(0.16, 1, 0.3, 1);
}

.swall.is-live .swall-console { opacity: 1; transform: rotateX(13deg); }
.swall.is-live .swall-console:nth-child(1) { transition-delay: 180ms; }
.swall.is-live .swall-console:nth-child(2) { transition-delay: 240ms; }
.swall.is-live .swall-console:nth-child(3) { transition-delay: 300ms; }
.swall.is-live .swall-console:nth-child(4) { transition-delay: 360ms; }
.swall.is-live .swall-console:nth-child(5) { transition-delay: 420ms; }

.swall-console img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    /* The GCS captures are dark-UI screenshots averaging 13-50/255, so they
       need lifting rather than dimming or the strip reads as five dead tiles. */
    filter: saturate(0.85) brightness(1.75) contrast(1.08);
}

.swall-console::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(140, 200, 255, 0.05), rgba(0, 0, 0, 0.3));
    pointer-events: none;
}

/* Desk light under the consoles. */
.swall-deck {
    height: 1px;
    margin: 14px 26px 0;
    background: linear-gradient(90deg, transparent, rgba(120, 220, 180, 0.5), transparent);
    box-shadow: 0 0 22px rgba(46, 224, 122, 0.3);
}

/* ---- phase caption --------------------------------------------------------- */

.swall-foot {
    position: relative;
    text-align: center;
    margin-top: 24px;
    padding: 0 26px;
}

.swall-phase {
    display: inline-block;
    font-size: 0.56rem;
    letter-spacing: 0.3em;
    color: rgba(120, 200, 165, 0.9);
    padding-bottom: 7px;
    border-bottom: 1px solid rgba(120, 200, 165, 0.4);
    margin-bottom: 11px;
}

.swall-line {
    font-family: var(--display, 'Inter', sans-serif);
    font-size: clamp(1.1rem, 2.5vw, 1.72rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #f2f7f4;
    margin: 0;
}

.swall-line span { color: rgba(120, 200, 165, 0.95); }

/* ---- responsive ------------------------------------------------------------ */

@media (max-width: 900px) {
    /* Perspective on a phone turns the outer screens into slivers. Flatten the
       wall and stack it instead of shrinking an illegible 3D bank. */
    .swall-screens { grid-template-columns: 1fr; gap: 9px; }
    .swall.is-live .swall-screen--l,
    .swall.is-live .swall-screen--r { transform: none; }
    .swall-consoles { grid-template-columns: repeat(3, 1fr); }
    .swall-console:nth-child(4),
    .swall-console:nth-child(5) { display: none; }
    .swall.is-live .swall-console { transform: none; }
}

@media (max-width: 560px) {
    .swall { padding: 26px 0 30px; }
    .swall-head { padding: 0 16px 18px; }
    .swall-stage, .swall-consoles, .swall-deck, .swall-foot { padding-inline: 16px; margin-inline: 0; }
    .swall-consoles { margin: 12px 16px 0; grid-template-columns: repeat(2, 1fr); }
    .swall-console:nth-child(3) { display: none; }
    .swall-stamp { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .swall-screen,
    .swall-console {
        transition: none !important;
        opacity: 1 !important;
    }
    .swall.is-live .swall-screen--l,
    .swall.is-live .swall-screen--r { transform: none; }
    .swall.is-live .swall-console { transform: none; }
    .swall-rec::before { animation: none; }
}
