/* ============================================
   gabs.review - Retro-Futuristic Command Design
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --deep-void: #0B0E1A;
    --cockpit-slate: #1A1F35;
    --phosphor-cyan: #00E5CC;
    --amber-alert: #FF9E1B;
    --signal-white: #E8ECF4;
    --plasma-magenta: #FF2D78;
    --grid-line: #2E3A5C;
    --dim-readout: #00E5CC4D;

    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: var(--deep-void);
    color: var(--signal-white);
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.65;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* --- Background HUD Layer --- */
.hud-bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.orbital-arc {
    position: absolute;
    animation: orbitRotate 120s linear infinite;
}

.orbital-arc-1 {
    width: 800px;
    height: 800px;
    top: -10%;
    right: -15%;
}

.orbital-arc-2 {
    width: 600px;
    height: 600px;
    bottom: 5%;
    left: -10%;
    animation-direction: reverse;
    animation-duration: 150s;
}

@keyframes orbitRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- Section Base --- */
.section {
    position: relative;
    min-height: 100vh;
    padding: 8vh 6vw;
    display: flex;
    align-items: center;
    z-index: 1;
}

/* --- Diagonal Section Clip Paths --- */
.section-hero {
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    background: var(--deep-void);
    z-index: 5;
}

.section-signal {
    clip-path: polygon(0 8%, 100% 0, 100% 92%, 0 100%);
    background: var(--cockpit-slate);
    margin-top: -12vh;
    z-index: 4;
}

.section-transmission {
    clip-path: polygon(0 6%, 100% 0, 100% 88%, 0 100%);
    background: var(--deep-void);
    margin-top: -10vh;
    z-index: 3;
}

.section-telemetry {
    clip-path: polygon(0 10%, 100% 0, 100% 100%, 0 100%);
    background: var(--cockpit-slate);
    margin-top: -14vh;
    z-index: 2;
}

.section-lock {
    background: var(--deep-void);
    margin-top: -2vh;
    z-index: 1;
    justify-content: center;
}

/* --- HUD Corner Brackets --- */
.hud-corner-brackets {
    position: absolute;
    inset: 5vh 4vw;
    pointer-events: none;
    z-index: 10;
}

.bracket {
    position: absolute;
    width: 20px;
    height: 20px;
    opacity: 0;
    transition: opacity 0.4s ease-out;
}

.bracket::before,
.bracket::after {
    content: '';
    position: absolute;
    background: var(--phosphor-cyan);
}

.bracket::before {
    width: 20px;
    height: 2px;
}

.bracket::after {
    width: 2px;
    height: 20px;
}

.bracket-tl { top: 0; left: 0; }
.bracket-tl::before { top: 0; left: 0; }
.bracket-tl::after { top: 0; left: 0; }

.bracket-tr { top: 0; right: 0; }
.bracket-tr::before { top: 0; right: 0; }
.bracket-tr::after { top: 0; right: 0; }

.bracket-bl { bottom: 0; left: 0; }
.bracket-bl::before { bottom: 0; left: 0; }
.bracket-bl::after { bottom: 0; left: 0; }

.bracket-br { bottom: 0; right: 0; }
.bracket-br::before { bottom: 0; right: 0; }
.bracket-br::after { bottom: 0; right: 0; }

.section.in-view .bracket-tl { opacity: 1; transition-delay: 0ms; }
.section.in-view .bracket-tr { opacity: 1; transition-delay: 100ms; }
.section.in-view .bracket-br { opacity: 1; transition-delay: 200ms; }
.section.in-view .bracket-bl { opacity: 1; transition-delay: 300ms; }

@keyframes bracketPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.section.in-view .bracket {
    animation: bracketPulse 2s ease-in-out infinite;
}

.section.in-view .bracket-tl { animation-delay: 0ms; }
.section.in-view .bracket-tr { animation-delay: 100ms; }
.section.in-view .bracket-br { animation-delay: 200ms; }
.section.in-view .bracket-bl { animation-delay: 300ms; }

/* --- Background Elements --- */
.section-bg-elements {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.concentric-rings {
    position: absolute;
}

.rings-hero {
    width: 500px;
    height: 500px;
    right: 5%;
    top: 15%;
    animation: ringSpin 90s linear infinite;
}

.rings-signal {
    width: 400px;
    height: 400px;
    right: -5%;
    bottom: 10%;
    animation: ringSpin 110s linear infinite reverse;
}

.rings-telemetry {
    width: 600px;
    height: 600px;
    left: -10%;
    top: -5%;
    animation: ringSpin 100s linear infinite;
}

@keyframes ringSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- Waveform Ribbons --- */
.waveform-ribbon {
    position: absolute;
    width: 100%;
    height: 100px;
    bottom: 30%;
    left: 0;
}

/* --- Crosshair Clusters --- */
.crosshair-cluster {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.cluster-hero {
    top: 20%;
    right: 12%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.cluster-telemetry {
    bottom: 15%;
    right: 8%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.crosshair {
    width: 12px;
    height: 12px;
    position: relative;
    display: block;
}

.crosshair::before,
.crosshair::after {
    content: '';
    position: absolute;
    background: var(--grid-line);
}

.crosshair::before {
    width: 12px;
    height: 1px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.crosshair::after {
    width: 1px;
    height: 12px;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

.crosshair.active::before,
.crosshair.active::after {
    background: var(--amber-alert);
}

/* --- Status Dots --- */
.status-dot-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1.5px solid var(--phosphor-cyan);
    background: transparent;
    transition: background 0.3s ease-out, transform 0.3s ease-out;
    display: inline-block;
}

.section.in-view .status-dot {
    background: var(--phosphor-cyan);
    transform: scale(1);
}

.status-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    color: var(--phosphor-cyan);
    text-transform: uppercase;
}

/* --- Hero Section --- */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 65%;
    padding-top: 8vh;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(42px, 6.5vw, 120px);
    line-height: 1.02;
    letter-spacing: -0.04em;
    color: var(--signal-white);
    margin-bottom: 24px;
}

.hero-title .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
}

.hero-title .char.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--signal-white);
    opacity: 0.7;
    max-width: 500px;
}

/* --- Section Titles --- */
.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(28px, 3.2vw, 56px);
    line-height: 1.02;
    letter-spacing: -0.04em;
    color: var(--signal-white);
    margin-bottom: 32px;
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.6s ease-out;
}

.section-title.revealed {
    clip-path: inset(0 0% 0 0);
}

/* --- Body Text --- */
.body-text {
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.65;
    color: var(--signal-white);
    margin-bottom: 20px;
    max-width: 600px;
}

/* --- Signal Section (Section 2) --- */
.signal-content {
    display: flex;
    gap: 6vw;
    width: 100%;
    position: relative;
    z-index: 2;
    padding-top: 8vh;
}

.signal-column-left {
    flex: 0 0 60%;
}

.signal-column-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 50px;
}

/* --- HUD Modules --- */
.hud-module {
    background: var(--deep-void);
    border: 1px solid var(--grid-line);
    border-radius: 4px;
    padding: 16px 20px;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0, 229, 204, 0.05);
}

.module-header {
    margin-bottom: 8px;
}

.module-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--phosphor-cyan);
    text-transform: uppercase;
}

/* --- Readout Panels --- */
.readout-panel {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.counter {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 2.4rem;
    letter-spacing: 0.08em;
    color: var(--amber-alert);
    line-height: 1;
}

.counter-unit {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 0.875rem;
    letter-spacing: 0.08em;
    color: var(--signal-white);
    opacity: 0.5;
}

/* --- Transmission Section (Section 3) --- */
.transmission-content {
    width: 100%;
    position: relative;
    z-index: 2;
    padding-top: 10vh;
}

.transmission-strips {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px 40px;
    background: var(--cockpit-slate);
    border-left: 3px solid var(--phosphor-cyan);
    position: relative;
    transform-origin: left center;
}

.strip-1 {
    transform: rotate(-1deg);
    z-index: 3;
}

.strip-2 {
    transform: rotate(-2.5deg);
    margin-top: -4px;
    z-index: 2;
}

.strip-3 {
    transform: rotate(-4deg);
    margin-top: -4px;
    z-index: 1;
}

.strip-content {
    flex: 1;
    padding-right: 40px;
}

.strip-category {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--phosphor-cyan);
    display: block;
    margin-bottom: 8px;
}

.strip-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(20px, 2vw, 32px);
    letter-spacing: -0.02em;
    color: var(--signal-white);
    margin-bottom: 8px;
    line-height: 1.15;
}

.strip-excerpt {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.55;
    color: var(--signal-white);
    opacity: 0.7;
    max-width: 520px;
}

.strip-rating {
    flex-shrink: 0;
}

.rating-panel {
    background: var(--deep-void);
    border: 1px solid var(--grid-line);
    border-radius: 4px;
    padding: 12px 20px;
    box-shadow: inset 0 0 16px rgba(0, 229, 204, 0.05);
}

.rating-panel .counter {
    font-size: 2rem;
}

/* --- Telemetry Section (Section 4) --- */
.telemetry-content {
    width: 100%;
    position: relative;
    z-index: 2;
    padding-top: 12vh;
}

.telemetry-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.telemetry-card {
    background: var(--deep-void);
    border: 1px solid var(--grid-line);
    border-radius: 4px;
    padding: 24px;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0, 229, 204, 0.05);
}

.card-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--phosphor-cyan);
    text-transform: uppercase;
    display: block;
    margin-bottom: 12px;
}

.telemetry-card .readout-panel {
    margin-bottom: 16px;
}

.telemetry-card .counter {
    font-size: 2rem;
}

.card-bar {
    width: 100%;
    height: 3px;
    background: var(--grid-line);
    border-radius: 2px;
    overflow: hidden;
}

.card-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--phosphor-cyan);
    border-radius: 2px;
    transition: width 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section.in-view .card-bar-fill {
    width: var(--fill-width);
}

/* --- Lock Section (Section 5) --- */
.lock-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
}

.verdict-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 60px;
}

.verdict-label {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--phosphor-cyan);
    text-transform: uppercase;
}

.verdict-score {
    position: relative;
    padding: 30px 60px;
    border: 2px solid var(--plasma-magenta);
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(255, 45, 120, 0.2), inset 0 0 40px rgba(255, 45, 120, 0.05);
}

.verdict-number {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: clamp(60px, 10vw, 140px);
    color: var(--plasma-magenta);
    letter-spacing: 0.05em;
    line-height: 1;
    text-shadow: 0 0 30px rgba(255, 45, 120, 0.4);
}

.verdict-tagline {
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--signal-white);
    opacity: 0.6;
}

.lock-footer {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 40px;
    border-top: 1px solid var(--grid-line);
}

.footer-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.06em;
    color: var(--signal-white);
    opacity: 0.4;
}

.footer-text.mono {
    font-family: var(--font-mono);
    font-weight: 400;
}

.footer-divider {
    width: 40px;
    height: 1px;
    background: var(--grid-line);
}

/* --- Scan Line Diagonals --- */
.scan-line-diagonal {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}

.scan-line-diagonal::after {
    content: '';
    position: absolute;
    top: 0;
    left: -40px;
    width: 40px;
    height: 100%;
    background: var(--phosphor-cyan);
    opacity: 0;
    transform: translateX(-100%);
}

.section.in-view .scan-line-diagonal::after {
    opacity: 1;
    animation: scanTraverse 3s ease-in-out 0.2s infinite;
}

@keyframes scanTraverse {
    0% { transform: translateX(-40px); }
    50% { transform: translateX(calc(100vw + 40px)); }
    50.01% { opacity: 0; }
    100% { opacity: 0; transform: translateX(-40px); }
}

/* --- Horizontal Scanner --- */
.horizontal-scanner {
    position: absolute;
    bottom: 18%;
    left: 6vw;
    right: 6vw;
    height: 1px;
    background: var(--grid-line);
    z-index: 5;
    overflow: hidden;
}

.horizontal-scanner::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -60px;
    width: 60px;
    height: 3px;
    background: var(--phosphor-cyan);
    opacity: 0;
}

.section.in-view .horizontal-scanner::after {
    opacity: 1;
    animation: hScan 4s linear infinite;
}

@keyframes hScan {
    0% { left: -60px; }
    45% { left: calc(100% + 60px); }
    55% { left: calc(100% + 60px); }
    100% { left: -60px; }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .telemetry-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .signal-content {
        flex-direction: column;
    }

    .signal-column-left {
        flex: none;
    }

    .signal-column-right {
        flex-direction: row;
        flex-wrap: wrap;
        padding-top: 20px;
    }

    .hud-module {
        flex: 1 1 140px;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 6vh 5vw;
    }

    .hero-content {
        max-width: 100%;
    }

    .telemetry-grid {
        grid-template-columns: 1fr;
    }

    .strip {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .strip-content {
        padding-right: 0;
    }

    .strip-1,
    .strip-2,
    .strip-3 {
        transform: rotate(0deg);
    }

    .signal-column-right {
        flex-direction: column;
    }

    .hud-corner-brackets {
        inset: 3vh 3vw;
    }

    .cluster-hero,
    .cluster-telemetry {
        display: none;
    }

    .verdict-score {
        padding: 20px 40px;
    }

    .lock-footer {
        flex-direction: column;
        gap: 10px;
    }

    .footer-divider {
        width: 1px;
        height: 20px;
    }
}
