/* BACKGROUNDS & CRT EFFECTS */
.bg-grid {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none;
    background-image: 
        radial-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
    background-size: 20px 20px, 100px 100px, 100px 100px; background-position: 0 0; opacity: 0.4;
}

.crt-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.2));
    background-size: 100% 4px; z-index: 9999; pointer-events: none; animation: flicker 0.15s infinite;
}

.crt-overlay::before {
    content: " "; display: block; position: absolute; top: 0; left: 0; bottom: 0; right: 0; background: rgba(18, 16, 16, 0.1); opacity: 0; z-index: 2;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.4'/%3E%3C/svg%3E");
    animation: grain 2s steps(10) infinite;
}

/* GLOBAL KEYFRAMES */
@keyframes flicker { 0% { opacity: 0.95; } 50% { opacity: 0.9; } 100% { opacity: 0.95; } }
@keyframes grain {
    0%, 100% { transform:translate(0, 0) } 10% { transform:translate(-5%, -10%) } 20% { transform:translate(-15%, 5%) }
    30% { transform:translate(7%, -25%) } 40% { transform:translate(-5%, 25%) } 50% { transform:translate(-15%, 10%) }
    60% { transform:translate(15%, 0%) } 70% { transform:translate(0%, 15%) } 80% { transform:translate(3%, 35%) } 90% { transform:translate(-10%, 10%) }
}
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.3; } 100% { opacity: 1; } }

/* =========================================
   FLUID VISUALIZATION COMPONENTS
========================================= */
/* VIZ-01: MEAN REVERSION OSCILLOSCOPE */
.viz-ssm { container-type: inline-size; width: 100%; height: 100%; background: #050505; position: relative; overflow: hidden; display: flex; align-items: center; }
.ssm-line { width: 100%; height: 2px; background: rgba(255, 255, 255, 0.1); position: absolute; }
.ssm-wave { position: absolute; left: 0; top: 0; width: 200%; height: 100%; fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: ssm-dash 3s linear infinite, ssm-move 4s linear infinite; opacity: 0.8; }
.ssm-overlay-text { position: absolute; bottom: clamp(4px, 2.5cqi, 10px); right: clamp(4px, 2.5cqi, 10px); font-family: var(--font-pixel); color: var(--accent); font-size: clamp(0.55rem, 4cqi, 0.8rem); background: rgba(0,0,0,0.7); padding: 2px 5px; border: 1px solid var(--accent); }
@keyframes ssm-dash { to { stroke-dashoffset: 0; } }
@keyframes ssm-move { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* VIZ-02: OPTIONS GAMMA WALLS */
.viz-gex { container-type: inline-size; width: 100%; height: 100%; background: #080808; display: flex; align-items: flex-end; justify-content: center; gap: clamp(2px, 1.5cqi, 4px); padding: clamp(10px, 6cqi, 20px); position: relative; border-bottom: 2px solid #333; }
.gex-bar { width: clamp(4px, 2.5cqi, 8px); background: #0088ff; animation: gex-breathe 2s infinite ease-in-out; box-shadow: 0 0 5px #0088ff; position: relative; }
.gex-bar.put { background: var(--accent); box-shadow: 0 0 5px var(--accent); animation-delay: 0.5s; }
.gex-center-line { position: absolute; bottom: 0; left: 50%; height: 100%; width: 1px; border-left: 1px dashed #555; }
@keyframes gex-breathe { 0%, 100% { height: var(--h); opacity: 0.5; } 50% { height: calc(var(--h) * 1.2); opacity: 1; } }

/* VIZ-03: CNN KERNEL SCANNER */
.viz-cnn { container-type: inline-size; width: 100%; height: 100%; background: #050505; display: grid; grid-template-columns: repeat(10, 1fr); grid-template-rows: repeat(5, 1fr); gap: 1px; position: relative; overflow: hidden; padding: 1px; }
.cnn-pixel { background: #111; transition: background 0.2s; }
.cnn-pixel:nth-child(odd) { background: #161616; }
.cnn-pixel:nth-child(3n) { background: #1a1a1a; }
.cnn-pixel:nth-child(7n) { background: #202020; }
.cnn-pixel:nth-child(5n):hover { background: #444; }
.cnn-scanner { position: absolute; z-index: 10; pointer-events: none; width: 30%; height: 60%; border: 2px solid #ff0033; box-shadow: 0 0 15px #ff0033, inset 0 0 20px rgba(255, 0, 50, 0.1); background: rgba(255, 0, 50, 0.05); animation: cnn-stride 4s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite; }
.cnn-scanner::after { content: "KERNEL_3x3"; position: absolute; bottom: clamp(-18px, -5cqi, -12px); left: 0; font-size: clamp(6px, 2.5cqi, 9px); color: #ff0033; font-family: var(--font-mono); white-space: nowrap; letter-spacing: 1px; text-shadow: 0 0 4px #ff0033; }
@keyframes cnn-stride { 0% { left: 0%; top: 0%; border-color: #ff0033; } 20% { left: 70%; top: 0%; } 40% { left: 70%; top: 40%; border-color: #fff; } 50% { border-color: #ff0033; } 60% { left: 0%; top: 40%; } 80% { left: 0%; top: 0%; border-color: #fff; } 100% { left: 0%; top: 0%; border-color: #ff0033; } }

/* STARTUP SEQUENCE */
#intro-layer { 
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 99999; 
    background-color: #050505; color: #f0f0f0; display: flex; 
    font-family: 'Courier New', Courier, monospace; 
    overflow-y: auto; overflow-x: hidden; 
}
#frame-grid { 
    display: grid; grid-template-columns: 50px 1fr 50px; 
    grid-template-rows: 50px auto auto auto 1fr auto 50px; 
    width: 100%; min-height: 100%; max-width: 1600px; margin: auto; 
    border: 1px solid #ffffff; position: relative; 
}
.corner-box { display: flex; align-items: center; justify-content: center; border: 1px solid #ffffff; font-size: 1.2rem; background: #050505; z-index: 10; }
.border-left { border-left: 1px solid #ffffff; position: relative; }
.border-right { border-right: 1px solid #ffffff; position: relative; }
.hash-pattern-v { background-image: repeating-linear-gradient(180deg, #ffffff, #ffffff 1px, transparent 1px, transparent 4px); width: 100%; height: 100%; opacity: 0.2; }
.top-bar { grid-column: 2; grid-row: 1; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; border-bottom: 1px solid #ffffff; font-size: 0.7rem; letter-spacing: 1px; text-transform: uppercase; }
.bottom-bar { grid-column: 2; grid-row: 6; display: flex; align-items: center; justify-content: center; border-top: 1px solid #ffffff; font-size: 0.7rem; letter-spacing: 2px; text-transform: uppercase; padding: 15px; }
.title-section { grid-column: 2; grid-row: 2; border-bottom: 1px solid #ffffff; padding: 3rem 1rem; display: flex; align-items: center; justify-content: center; }
.intro-hero-title { width: 100%; text-align: center; font-family: 'Times New Roman', Times, serif; font-size: clamp(2rem, 4.5vw, 5rem); line-height: 1.1; letter-spacing: -1px; font-weight: 400; text-transform: uppercase; color: #f0f0f0; margin: 0; }
.intro-info-grid { grid-column: 2; grid-row: 3; display: grid; grid-template-columns: 2fr 2fr 1fr; border-bottom: 1px solid #ffffff; }
.intro-cell { padding: 15px 20px; font-size: 0.7rem; line-height: 1.5; border-right: 1px solid #ffffff; display: flex; align-items: center; text-transform: uppercase; color: #f0f0f0; }
.intro-cell:last-child { border-right: none; }
.btn-intro-enter { width: 100%; height: 100%; background: transparent; color: #fff; border: none; font-family: 'Courier New', Courier, monospace; font-weight: bold; font-size: 0.9rem; cursor: pointer; text-transform: uppercase; letter-spacing: 2px; transition: all 0.2s; }
.btn-intro-enter:hover { background: #fff; color: #000; }
.intro-visual-container { 
    grid-column: 2; grid-row: 4 / 6; position: relative; display: flex; 
    align-items: center; justify-content: center; overflow: hidden; 
    background: radial-gradient(#1a1a1a 1px, transparent 1px); background-size: 30px 30px; 
    min-height: 300px; container-type: inline-size; 
}
.side-text { position: absolute; top: 50%; transform: translateY(-50%); writing-mode: vertical-rl; text-orientation: mixed; font-size: 0.6rem; letter-spacing: 3px; color: #555; text-transform: uppercase; }
.st-left { left: 20px; transform: translateY(-50%) rotate(180deg); }
.st-right { right: 20px; }
.logo-r { position: absolute; bottom: 30px; right: 40px; width: 60px; height: 60px; border: 1px solid #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: 'Times New Roman', serif; font-size: 2.5rem; color: #fff; pointer-events: none; z-index: 20; }
.logo-r::after { content: "®"; font-size: 0.8rem; position: absolute; top: 0; right: -12px; font-family: monospace; }
.flag-wrapper { 
    font-size: min(9px, 1.5cqi); 
    width: 60em; 
    height: 32em; 
    display: flex; 
    position: relative; 
    transform-origin: center; 
    --flag-bg: radial-gradient(circle, #fff 0.15em, transparent 0.2em), linear-gradient(#000, #000), repeating-linear-gradient(180deg, #fff, #fff 1.3em, transparent 1.3em, transparent 2.6em); 
}
.flag-segment { 
    height: 100%; 
    background-color: #000; 
    background-image: var(--flag-bg); 
    background-repeat: repeat, no-repeat, no-repeat; 
    -webkit-mask-image: radial-gradient(black 0.15em, transparent 0.2em); 
    mask-image: radial-gradient(black 0.15em, transparent 0.2em); 
    -webkit-mask-size: 0.4em 0.4em; 
    mask-size: 0.4em 0.4em; 
    animation: wave-y 3s ease-in-out infinite alternate; 
}
@keyframes wave-y { 0% { transform: translateY(calc(var(--amp) * -1)); } 100% { transform: translateY(var(--amp)); } }
#intro-layer.fade-out { opacity: 0; transform: scale(1.1); transition: all 0.8s cubic-bezier(0.65, 0, 0.35, 1); pointer-events: none; }

:root {
    --bg-card: #0a0a0a;
    --term-cyan: #ff3c00; 
    --term-dim: #331100;   
    --term-alert: #ff0033; 
    --term-vector: #0088ff;
    --font-pixel: 'VT323', monospace;
    
    /* FLUID WIDTH: Scales smoothly within bounds */
    --card-width: clamp(260px, 100%, 320px);
    --card-ratio: 2.5 / 3.5;
    --radius: 14px;
    --hud-primary: #ff3c00; 
    --hud-dark: #3b0e00;
    --hud-black: #080808;
}

/* =========================================
   MODAL SYSTEM CORE
========================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 5, 5, 0.95); z-index: 10000; display: flex;
    justify-content: center; align-items: center; backdrop-filter: blur(8px);
    opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-content {
    width: 90vw; height: 85vh; border: 2px solid var(--accent); background: #000;
    position: relative; display: flex; flex-direction: column;
    box-shadow: 0 0 30px rgba(255, 60, 0, 0.2); transform: scale(0.98);
    transition: transform 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-header {
    background: var(--accent); color: #000; padding: 0.5rem 1rem; display: flex;
    justify-content: space-between; align-items: center; font-weight: 700; letter-spacing: 2px;
    border-bottom: 2px solid var(--accent);
}
.modal-body {
    flex-grow: 1; padding: 1rem; position: relative; overflow-y: auto; 
    background-image: 
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%; scrollbar-width: none; -ms-overflow-style: none;
}
.modal-body::-webkit-scrollbar { display: none; }
.modal-body iframe { width: 100%; height: 100%; border: none; display: block; }
.close-btn {
    background: #000; color: var(--accent); border: none; padding: 2px 10px;
    font-family: var(--font-mono); cursor: pointer; text-transform: uppercase; font-weight: bold;
}
.close-btn:hover { background: #fff; color: #000; }
.modal-content::before { content: "WARNING: LIVE ENVIRONMENT"; position: absolute; bottom: -25px; left: 0; color: var(--accent); font-size: 0.7rem; font-family: var(--font-mono); }
.modal-content::after { content: "SEC_PROTOCOLS: ACTIVE"; position: absolute; bottom: -25px; right: 0; color: var(--text-dim); font-size: 0.7rem; font-family: var(--font-mono); }

/* =========================================
   MEDIA SHOWCASE & FLUID GRID
========================================= */
/* FLUID GRID: Prevents rigid blowouts using minmax */
.media-showcase { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 35%); gap: 2rem; color: var(--text-main); align-items: start; }
.video-section { position: -webkit-sticky; position: sticky; top: 0; z-index: 10; }
.video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; background: #000; border: 1px solid var(--grid-line); width: 100%; }
.video-wrapper iframe, .video-wrapper video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.gallery-section { position: relative; z-index: 2; }
.gallery-section h4 { margin-bottom: 1rem; color: var(--accent); font-family: var(--font-display); text-align: center; }
.gallery-scroll { display: flex; flex-direction: column; gap: 2rem; padding: 10px 20px; overflow: visible; align-items: center; }

.desc-box {
    position: relative; margin-top: 1.5rem; padding: 1.5rem; border: 1px solid var(--grid-line);
    background: rgba(0, 0, 0, 0.6); background-image: radial-gradient(#222 1px, transparent 1px); background-size: 4px 4px;
}
.desc-corner { position: absolute; width: 12px; height: 12px; border-color: var(--accent); border-style: solid; transition: all 0.3s ease; }
.desc-corner.tl { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.desc-corner.tr { top: -1px; right: -1px; border-width: 2px 2px 0 0; }
.desc-corner.bl { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; }
.desc-corner.br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.desc-box:hover .desc-corner { width: 20px; height: 20px; }
.desc-label { position: absolute; top: -10px; left: 20px; background: var(--bg-color); border: 1px solid var(--accent); color: var(--accent); font-family: var(--font-pixel); font-size: 1rem; padding: 0 8px; letter-spacing: 1px; }
.desc-content { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-main); line-height: 1.6; text-transform: none; }
.desc-content strong { color: #fff; text-transform: uppercase; }
.desc-line { height: 1px; width: 100%; background: repeating-linear-gradient(90deg, var(--text-dim), var(--text-dim) 4px, transparent 4px, transparent 8px); margin: 1rem 0; opacity: 0.5; }
.desc-meta { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--text-dim); font-family: var(--font-display); letter-spacing: 1px; }

/* =========================================
   SNAPSHOT CARDS ARCHITECTURE (FLUID/CQI)
========================================= */
.snapshot-card { container-type: inline-size; width: var(--card-width); aspect-ratio: var(--card-ratio); perspective: 1200px; flex-shrink: 0; --term-cyan: #ff3c00; --term-dim: #331100; }
.snapshot-card:nth-child(3) { --term-cyan: var(--term-vector); --term-dim: #002244; }
.snapshot-card.alert { --term-cyan: var(--term-alert); --term-dim: #440000; }
.card-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); border-radius: var(--radius); }
.snapshot-card:hover .card-inner { transform: rotateY(180deg); }
.front, .back { position: absolute; inset: 0; backface-visibility: hidden; background-color: var(--bg-card); border: 2px solid var(--term-cyan); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 10px 30px -10px rgba(0,0,0,0.8); }
.back { transform: rotateY(180deg); }
.snapshot-card.alert .front, .snapshot-card.alert .back { box-shadow: 0 0 20px rgba(255, 0, 50, 0.15); }

.ui-header { border-bottom: 2px solid var(--term-cyan); padding: 8px; display: flex; justify-content: space-between; align-items: center; background: repeating-linear-gradient(45deg, var(--term-dim), var(--term-dim) 1px, transparent 1px, transparent 4px); }

/* FLUID TYPOGRAPHY: Scale proportionally matching inline container width (cqi) */
.header-title { font-family: var(--font-pixel); font-size: clamp(1.2rem, 8cqi, 1.8rem); line-height: 0.8; text-transform: uppercase; letter-spacing: 2px; color: var(--term-cyan); }
.header-stat { background: var(--term-cyan); color: #000; font-family: var(--font-pixel); font-size: clamp(1rem, 6cqi, 1.4rem); padding: 0 6px; }

.ui-console { padding: 8px; font-size: clamp(0.45rem, 3cqi, 0.6rem); border-bottom: 1px dashed var(--term-cyan); line-height: 1.4; color: #888; }
.ui-console span { display: block; }
.ui-console span:first-child { color: var(--term-cyan); font-weight: bold; }

.ui-viewport { flex-grow: 1; margin: 10px; border: 2px solid var(--term-cyan); position: relative; overflow: hidden; background: #000; }
.readout-list { list-style: none; padding: 15px; margin: 0; height: 100%; display: flex; flex-direction: column; justify-content: center; background: radial-gradient(circle at center, #1a0505 0%, #000 100%); }
.readout-item { display: flex; align-items: center; margin-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.2); padding-bottom: 4px; }
.readout-item:last-child { border-bottom: none; margin-bottom: 0; }
.readout-sym { color: var(--term-cyan); font-family: 'Times New Roman', serif; font-style: italic; font-weight: bold; font-size: clamp(0.9rem, 5cqi, 1.1rem); width: clamp(25px, 10cqi, 35px); flex-shrink: 0; text-align: center; margin-right: 8px; }
.readout-desc { font-family: var(--font-mono); font-size: clamp(0.55rem, 3.5cqi, 0.65rem); color: #ccc; line-height: 1.2; }

.ui-footer { border-top: 2px solid var(--term-cyan); padding: 10px; font-size: clamp(0.55rem, 3.5cqi, 0.7rem); background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.5)); }
.bracket-box { border: 1px solid var(--term-cyan); padding: 5px; margin-bottom: 5px; position: relative; color: #ccc; }
.bracket-box::before { content: "[ INSIGHT SUMMARY ]"; position: absolute; top: -8px; left: 10px; background: var(--bg-card); padding: 0 5px; font-family: var(--font-pixel); color: var(--term-cyan); font-size: clamp(0.6em, 4cqi, 0.8em); }
.vert-strip { position: absolute; right: 0; top: 0; bottom: 0; width: clamp(18px, 8cqi, 24px); border-left: 2px solid var(--term-cyan); display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; text-orientation: mixed; font-size: clamp(0.45rem, 3cqi, 0.6rem); letter-spacing: 2px; color: #000; background: var(--term-cyan); }

.back-grid { width: 100%; height: 100%; padding: 20px; background-image: linear-gradient(var(--term-dim) 1px, transparent 1px), linear-gradient(90deg, var(--term-dim) 1px, transparent 1px); background-size: 20px 20px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.back-desc { font-size: clamp(0.75rem, 4cqi, 0.85rem); line-height: 1.6; color: #bbb; text-align: left; border-left: 2px solid var(--term-cyan); padding-left: clamp(10px, 4.5cqi, 15px); margin: 10px; }
.back-title { font-family: var(--font-pixel); font-size: clamp(1.5rem, 10cqi, 2rem); color: var(--term-cyan); margin-bottom: 1rem; border-bottom: 1px dashed var(--term-cyan); width: 100%; text-align: center; padding-bottom: 5px; }

/* =========================================
   SOMMA HUD MODULE (FLUID/CQI)
========================================= */
.somma-scene { container-type: inline-size; width: 100%; aspect-ratio: 16 / 9; perspective: 2500px; }
.somma-card { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1); box-shadow: 0 0 50px rgba(255, 60, 0, 0.15); }
.somma-card.is-flipped { transform: rotateY(180deg); }
.somma-face { position: absolute; inset: 0; backface-visibility: hidden; background: #000; border: 1px solid #333; overflow: hidden; pointer-events: none; z-index: 0; }
.somma-face.active-side { pointer-events: auto; z-index: 10; }
.somma-face.back-face { transform: rotateY(180deg); }
.somma-face iframe { position: absolute; top:0; left:0; width:100%; height:100%; border:none; z-index:1; pointer-events:none; }
.somma-face.active-side iframe { pointer-events: auto; }

.hud-overlay { position: absolute; inset: 0; z-index: 20; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; padding: 20px; font-family: var(--font-display); text-transform: uppercase; transition: all 0.6s ease; background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(255, 60, 0, 0.05) 50%, rgba(0,0,0,0.4) 100%); }
.hud-scanlines { position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, transparent 0px, transparent 2px, rgba(0, 0, 0, 0.5) 3px); z-index: 2; pointer-events: none; opacity: 0.6; }
.hud-overlay.playing { padding: 0; }
.hud-overlay.playing .hud-top, .hud-overlay.playing .hud-bottom, .hud-overlay.playing .hud-middle { opacity: 0; transform: scaleY(0); }

.hud-top { display: flex; height: 15%; border-bottom: 2px solid var(--hud-primary); background: rgba(0,0,0,0.7); backdrop-filter: blur(5px); transition: 0.5s; transform-origin: top; }
.hud-logo-box { width: 15%; border-right: 2px solid var(--hud-primary); display: flex; align-items: center; justify-content: center; }

/* HUD Responsive Container typography mapped relative to scene width */
.hud-logo-symbol { font-size: clamp(1.5rem, 8cqi, 3rem); font-weight: 900; line-height: 0.8; letter-spacing: -5px; color: var(--hud-primary); }
.hud-title-box { flex-grow: 1; display: flex; align-items: center; padding-left: 2rem; }
.striped-text { font-family: var(--font-display); font-weight: 900; font-size: clamp(1.2rem, 5cqi, 2.25rem); line-height: 1; letter-spacing: 2px; background: repeating-linear-gradient(to bottom, var(--hud-primary) 0px, var(--hud-primary) 3px, transparent 3px, transparent 6px); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 5px var(--hud-primary)); }

.hud-middle { height: 40px; margin-top: 4px; border-top: 1px solid var(--hud-primary); border-bottom: 1px solid var(--hud-primary); display: flex; align-items: center; background: rgba(0, 59, 36, 0.3); transition: 0.5s; overflow: hidden; }
.dot-matrix-text { font-family: var(--font-pixel); font-size: clamp(1rem, 4cqi, 2rem); letter-spacing: 4px; width: 100%; text-align: center; white-space: nowrap; color: var(--hud-primary); }
.dot-matrix-text::before, .dot-matrix-text::after { content: "["; margin: 0 20px; }
.dot-matrix-text::after { content: "]"; }
.hud-spacer { flex-grow: 1; position: relative; }
.hud-spacer::before, .hud-spacer::after { content: ""; position: absolute; bottom: 10px; width: 20px; height: 20px; border-bottom: 3px solid var(--hud-primary); }
.hud-spacer::before { left: 0; border-left: 3px solid var(--hud-primary); }
.hud-spacer::after { right: 0; border-right: 3px solid var(--hud-primary); }

.hud-bottom { display: grid; grid-template-columns: 40% 60%; border-top: 2px solid var(--hud-primary); background: rgba(0,0,0,0.8); min-height: 100px; transition: 0.5s; transform-origin: bottom; }
.hud-mission-box, .hud-stats-box { padding: 1rem; display: flex; flex-direction: column; justify-content: center; }
.hud-mission-box { border-right: 1px solid var(--hud-primary); }
.hud-mission-box h2 { font-size: clamp(1.2rem, 5cqi, 2rem); line-height: 0.9; color: var(--hud-primary); margin-bottom: 5px; }
.hud-sub-label { background: var(--hud-primary); color: #000; font-family: var(--font-mono); font-size: clamp(0.55rem, 2cqi, 0.8rem); padding: 2px 5px; width: fit-content; font-weight: bold; }
.stat-row { display: flex; justify-content: space-between; border-bottom: 1px dashed rgba(255, 60, 0, 0.3); margin-bottom: 4px; font-size: clamp(0.55rem, 2cqi, 0.8rem); opacity: 0.8; color: var(--hud-primary); }

.hud-btn { position: absolute; z-index: 50; font-family: var(--font-mono); font-weight: bold; font-size: clamp(0.6rem, 2cqi, 0.8rem); text-transform: uppercase; letter-spacing: 1px; cursor: pointer; transition: all 0.2s ease; box-shadow: 0 0 10px rgba(255, 60, 0, 0.2); background: rgba(0, 10, 0, 0.8); color: var(--hud-primary); border: 1px solid var(--hud-primary); display: flex; align-items: center; justify-content: center; padding: 0 16px; }
.hud-btn span { pointer-events: none; }
.hud-btn:hover { background: var(--hud-primary); color: #000; box-shadow: 0 0 20px var(--hud-primary); }
.btn-watch { top: 20px; right: 20px; height: 36px; width: clamp(100px, 20cqi, 170px); border-bottom: none; z-index: 51; }
.btn-flip { top: 56px; right: 20px; height: 36px; width: clamp(100px, 20cqi, 170px); border-top: 1px solid rgba(255, 60, 0, 0.3); }

#face-back { --hud-primary: #0088ff; }
#face-back .hud-overlay { background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0, 136, 255, 0.05) 50%, rgba(0,0,0,0.4) 100%); }
#face-back .hud-btn { box-shadow: 0 0 10px rgba(0, 136, 255, 0.2); background: rgba(0, 5, 15, 0.8); }
#face-back .hud-btn:hover { box-shadow: 0 0 20px #0088ff; }
#face-back .stat-row { border-bottom: 1px dashed rgba(0, 136, 255, 0.3); }
#face-back .btn-flip { border-top: 1px solid rgba(0, 136, 255, 0.3); }

/* =========================================
   PDF RENDERER
========================================= */
#pdf-viewer-container { width: 100%; height: 100%; overflow-y: auto; background-color: var(--bg-color); display: flex; flex-direction: column; align-items: center; padding: 2rem 0; position: relative; scrollbar-width: none; -ms-overflow-style: none; }
#pdf-viewer-container::-webkit-scrollbar { display: none; }
.pdf-canvas { max-width: 95%; height: auto; margin-bottom: 20px; border: 1px solid var(--grid-line); box-shadow: 0 0 15px rgba(0,0,0,0.8); filter: invert(92%) sepia(100%) saturate(500%) hue-rotate(350deg) contrast(1.2); transition: opacity 0.3s ease; opacity: 0; }
.pdf-canvas.loaded { opacity: 0.9; }
.pdf-loading-text { font-family: var(--font-mono); color: var(--accent); margin-top: 20%; animation: flicker 1s infinite; }

/* =========================================
   RESPONSIVE LAYOUT / MOBILE VIEW
========================================= */
@media (max-width: 1100px) {
    .media-showcase { grid-template-columns: 1fr; gap: 1rem; }
    .video-section { position: relative; top: 0; margin-bottom: 2rem; }
    .modal-content { height: 95vh; width: 95vw; }
    
    /* Converts grid to horizontal native scroll snapping for cards on mobile */
    .gallery-scroll { 
        flex-direction: row; 
        overflow-x: auto; 
        justify-content: flex-start; 
        padding-bottom: 20px; 
        scroll-snap-type: x mandatory; 
    }
    .snapshot-card { scroll-snap-align: center; margin-right: 15px; }
}

@media (max-width: 1024px) {
    .intro-hero-title { font-size: 2.5rem; }
    .intro-info-grid { grid-template-columns: 1fr; }
    .intro-cell { border-right: none; border-bottom: 1px solid #fff; padding: 10px; }
    .logo-r { display: none; }
}

@media (max-width: 600px) {
    #frame-grid { grid-template-columns: 10px 1fr 10px; grid-template-rows: 40px auto auto auto 1fr auto 40px; }
    .intro-hero-title { font-size: 1.8rem; padding: 0; }
    .intro-info-grid { grid-template-columns: 1fr; }
    .intro-cell { border-right: none; border-bottom: 1px solid #ffffff; }
    .side-text { display: none; }
}