/* soning.stream - Broadcast Control Room Aesthetic */

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: #0A0A0F;
    color: #E8E4DF;
    font-family: 'Barlow', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== SCAN LINES OVERLAY ===== */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.03) 2px,
        rgba(255, 255, 255, 0.03) 3px
    );
}

/* ===== NOISE GRAIN OVERLAY ===== */
.noise-grain {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: 9997;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    animation: grainShift 0.5s steps(4) infinite;
}

@keyframes grainShift {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-2%, -1%); }
    50% { transform: translate(1%, 2%); }
    75% { transform: translate(-1%, -2%); }
    100% { transform: translate(2%, 1%); }
}

/* ===== STATIC OVERLAY (TUNING IN) ===== */
.static-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: #0A0A0F;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease-out;
}

.static-overlay canvas {
    width: 100%;
    height: 100%;
}

.static-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.static-overlay.hidden {
    display: none;
}

/* ===== BROADCAST HEADER ===== */
.broadcast-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 48px;
    background: #141419;
    border-bottom: 1px solid rgba(229, 25, 59, 0.4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 9000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.signal-icon rect {
    animation: signalPulse 2s ease-in-out infinite;
}

.signal-icon rect:nth-child(1) { animation-delay: 0s; }
.signal-icon rect:nth-child(2) { animation-delay: 0.15s; }
.signal-icon rect:nth-child(3) { animation-delay: 0.3s; }
.signal-icon rect:nth-child(4) { animation-delay: 0.45s; }

@keyframes signalPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.header-domain {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: #E8E4DF;
}

.header-right {
    display: flex;
    align-items: center;
}

.tune-in-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid #E5193B;
    color: #E5193B;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 16px;
    cursor: pointer;
    border-radius: 0;
    transition: background 0.2s, color 0.2s;
    animation: btnPulse 3s ease-in-out infinite;
}

.tune-in-btn:hover {
    background: #E5193B;
    color: #ffffff;
}

@keyframes btnPulse {
    0%, 100% { border-color: #E5193B; }
    50% { border-color: rgba(229, 25, 59, 0.5); }
}

.tune-dot {
    width: 6px;
    height: 6px;
    background: #E5193B;
    border-radius: 50%;
    animation: dotPulse 1.5s ease-in-out infinite;
}

/* ===== HERO SECTION ===== */
.hero-section {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px 0;
    position: relative;
}

.program-monitor {
    width: 100%;
    max-width: 960px;
}

.monitor-bezel {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #1C1C26;
    border: 2px solid rgba(229, 25, 59, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.monitor-content {
    text-align: center;
    padding: 40px;
    opacity: 0;
    animation: contentAppear 0.3s ease-out 0.9s forwards;
}

@keyframes contentAppear {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== CORNER BRACKETS ===== */
.corner-bracket {
    position: absolute;
    width: 24px;
    height: 24px;
}

.corner-bracket.top-left {
    top: 8px;
    left: 8px;
    border-top: 2px solid #E5193B;
    border-left: 2px solid #E5193B;
}

.corner-bracket.top-right {
    top: 8px;
    right: 8px;
    border-top: 2px solid #E5193B;
    border-right: 2px solid #E5193B;
}

.corner-bracket.bottom-left {
    bottom: 8px;
    left: 8px;
    border-bottom: 2px solid #E5193B;
    border-left: 2px solid #E5193B;
}

.corner-bracket.bottom-right {
    bottom: 8px;
    right: 8px;
    border-bottom: 2px solid #E5193B;
    border-right: 2px solid #E5193B;
}

/* Small corner brackets */
.corner-bracket-sm {
    position: absolute;
    width: 12px;
    height: 12px;
}

.corner-bracket-sm.top-left {
    top: 4px;
    left: 4px;
    border-top: 1px solid rgba(229, 25, 59, 0.4);
    border-left: 1px solid rgba(229, 25, 59, 0.4);
}

.corner-bracket-sm.top-right {
    top: 4px;
    right: 4px;
    border-top: 1px solid rgba(229, 25, 59, 0.4);
    border-right: 1px solid rgba(229, 25, 59, 0.4);
}

.corner-bracket-sm.bottom-left {
    bottom: 4px;
    left: 4px;
    border-bottom: 1px solid rgba(229, 25, 59, 0.4);
    border-left: 1px solid rgba(229, 25, 59, 0.4);
}

.corner-bracket-sm.bottom-right {
    bottom: 4px;
    right: 4px;
    border-bottom: 1px solid rgba(229, 25, 59, 0.4);
    border-right: 1px solid rgba(229, 25, 59, 0.4);
}

/* ===== LIVE BADGE ===== */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #E5193B;
    padding: 4px 12px;
    margin-bottom: 24px;
    border-radius: 0;
}

.live-badge.small {
    padding: 2px 8px;
    margin-bottom: 0;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.live-text {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    color: #ffffff;
    letter-spacing: 0.1em;
}

/* ===== HERO TYPOGRAPHY ===== */
.hero-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 7rem);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: #E8E4DF;
    line-height: 1;
    margin-bottom: 16px;
}

.hero-tagline {
    font-family: 'Barlow', sans-serif;
    font-weight: 400;
    font-size: 1.1rem;
    color: rgba(232, 228, 223, 0.7);
    margin-bottom: 32px;
}

/* ===== SIGNAL METER ===== */
.signal-meter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.meter-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: #22C55E;
}

.meter-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 16px;
}

.meter-bar {
    width: 4px;
    background: #22C55E;
    border-radius: 0;
    animation: meterBounce 1.2s ease-in-out infinite;
}

.meter-bar:nth-child(1) { height: 6px; animation-delay: 0s; }
.meter-bar:nth-child(2) { height: 10px; animation-delay: 0.1s; }
.meter-bar:nth-child(3) { height: 14px; animation-delay: 0.2s; }
.meter-bar:nth-child(4) { height: 16px; animation-delay: 0.3s; }
.meter-bar:nth-child(5) { height: 12px; animation-delay: 0.4s; }
.meter-bar:nth-child(6) { height: 8px; animation-delay: 0.5s; }
.meter-bar:nth-child(7) { height: 14px; animation-delay: 0.6s; }
.meter-bar:nth-child(8) { height: 10px; animation-delay: 0.7s; }

@keyframes meterBounce {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.5); }
}

/* ===== WAVEFORM DIVIDERS ===== */
.waveform-divider {
    width: 100%;
    height: 32px;
    overflow: hidden;
}

.waveform-svg {
    width: 100%;
    height: 100%;
}

.waveform-path {
    animation: waveShift 4s linear infinite;
}

.wave-2 { animation-delay: -1s; animation-duration: 5s; }
.wave-3 { animation-delay: -2s; animation-duration: 3.5s; }
.wave-4 { animation-delay: -0.5s; animation-duration: 6s; }

@keyframes waveShift {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50px); }
}

/* ===== FEED GRID SECTION ===== */
.feeds-section {
    padding: 64px 24px;
}

.feed-grid {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
}

.feed-column {
    flex: 1;
    padding: 0 16px;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.feed-column.visible {
    opacity: 1;
    transform: translateX(0);
}

.feed-divider {
    width: 1px;
    background: rgba(229, 25, 59, 0.3);
    align-self: stretch;
    flex-shrink: 0;
}

.feed-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* ===== TALLY LIGHTS ===== */
.tally-light {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1C1C26;
    flex-shrink: 0;
    transition: background 0.3s, box-shadow 0.3s;
}

.tally-light.active {
    background: #E5193B;
    box-shadow: 0 0 8px rgba(229, 25, 59, 0.6);
    animation: tallyPulse 1.5s ease-in-out infinite;
}

@keyframes tallyPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(229, 25, 59, 0.6); }
    50% { box-shadow: 0 0 16px rgba(229, 25, 59, 0.9); }
}

.feed-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: #E8E4DF;
}

.feed-meta {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: rgba(232, 228, 223, 0.4);
}

.feed-monitor {
    position: relative;
    background: rgba(28, 28, 38, 0.6);
    border: 1px solid rgba(229, 25, 59, 0.2);
    padding: 16px;
    border-radius: 0;
}

.feed-description {
    font-family: 'Barlow', sans-serif;
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(232, 228, 223, 0.7);
    margin-top: 12px;
}

.feed-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid rgba(229, 25, 59, 0.15);
}

.status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-indicator.active {
    background: #22C55E;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.status-indicator.encoding {
    background: #FACC15;
    box-shadow: 0 0 6px rgba(250, 204, 21, 0.5);
}

.status-indicator.monitoring {
    background: #2B6CB0;
    box-shadow: 0 0 6px rgba(43, 108, 176, 0.5);
}

.status-indicator.standby {
    background: #1C1C26;
    border: 1px solid rgba(232, 228, 223, 0.3);
}

.status-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: rgba(232, 228, 223, 0.6);
}

.timestamp {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: rgba(232, 228, 223, 0.3);
    margin-left: auto;
}

/* ===== FEED VISUALS ===== */
.feed-visual {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

/* VU Meter */
.vu-meter {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 60px;
    width: 100%;
    justify-content: center;
}

.vu-bar {
    width: 12px;
    height: var(--vu-height, 50%);
    background: linear-gradient(to top, #22C55E 0%, #22C55E 60%, #FACC15 60%, #FACC15 80%, #E5193B 80%, #E5193B 100%);
    border-radius: 0;
    animation: vuBounce 0.8s ease-in-out infinite alternate;
}

.vu-bar:nth-child(1) { animation-delay: 0s; }
.vu-bar:nth-child(2) { animation-delay: 0.1s; }
.vu-bar:nth-child(3) { animation-delay: 0.2s; }
.vu-bar:nth-child(4) { animation-delay: 0.05s; }
.vu-bar:nth-child(5) { animation-delay: 0.25s; }
.vu-bar:nth-child(6) { animation-delay: 0.15s; }

@keyframes vuBounce {
    0% { transform: scaleY(1); }
    100% { transform: scaleY(0.4); }
}

/* Encoding grid */
.encoding-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    width: 100%;
    height: 60px;
}

.encode-block {
    background: #1C1C26;
    border: 1px solid rgba(229, 25, 59, 0.15);
    animation: encodeFlash 2s ease-in-out infinite;
}

.encode-block:nth-child(odd) { animation-delay: 0.3s; }
.encode-block:nth-child(3n) { animation-delay: 0.6s; }
.encode-block:nth-child(4n) { animation-delay: 0.1s; }

@keyframes encodeFlash {
    0%, 100% { background: #1C1C26; }
    50% { background: rgba(229, 25, 59, 0.15); }
}

/* Scope display */
.scope-display {
    width: 100%;
    height: 60px;
}

.scope-svg {
    width: 100%;
    height: 100%;
}

.scope-line {
    animation: scopeSweep 3s ease-in-out infinite;
}

@keyframes scopeSweep {
    0%, 100% { opacity: 1; stroke-dashoffset: 0; }
    50% { opacity: 0.7; }
}

/* Output stats */
.output-stats {
    width: 100%;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    border-bottom: 1px solid rgba(28, 28, 38, 0.8);
}

.stat-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: rgba(232, 228, 223, 0.4);
}

.stat-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: #22C55E;
}

/* ===== PROGRAM SECTION ===== */
.program-section {
    padding: 64px 24px;
    max-width: 960px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.section-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: #E8E4DF;
}

.program-monitor-frame {
    position: relative;
    background: rgba(28, 28, 38, 0.4);
    border: 1px solid rgba(229, 25, 59, 0.3);
    padding: 40px;
}

.program-inner {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 40px;
    align-items: start;
}

.program-lead {
    font-family: 'Barlow', sans-serif;
    font-weight: 500;
    font-size: 1.15rem;
    line-height: 1.6;
    color: #E8E4DF;
    margin-bottom: 16px;
}

.program-body {
    font-family: 'Barlow', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(232, 228, 223, 0.7);
    margin-bottom: 12px;
}

.program-tech-overlay {
    background: rgba(10, 10, 15, 0.6);
    border: 1px solid rgba(229, 25, 59, 0.2);
    padding: 16px;
}

.tech-line {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(28, 28, 38, 0.5);
}

.tech-line:last-child {
    border-bottom: none;
}

.tech-key {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: rgba(232, 228, 223, 0.4);
}

.tech-val {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: #22C55E;
}

/* ===== PREVIEW SECTION ===== */
.preview-section {
    padding: 64px 24px;
    max-width: 960px;
    margin: 0 auto;
    padding-bottom: 120px;
}

.preview-badge {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: #2B6CB0;
    border: 1px solid #2B6CB0;
    padding: 2px 8px;
}

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

.preview-card {
    position: relative;
    background: rgba(28, 28, 38, 0.4);
    border: 1px solid rgba(229, 25, 59, 0.2);
    padding: 24px;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.preview-card.visible {
    opacity: 1;
    transform: translateX(0);
}

.preview-label {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.preview-num {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    color: rgba(229, 25, 59, 0.3);
    line-height: 1;
}

.preview-name {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #E8E4DF;
}

.preview-desc {
    font-family: 'Barlow', sans-serif;
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(232, 228, 223, 0.6);
    margin-bottom: 16px;
}

.preview-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
}

.preview-status {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: rgba(232, 228, 223, 0.4);
}

/* ===== CHYRON TICKER ===== */
.chyron-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 48px;
    background: #141419;
    border-top: 2px solid #E5193B;
    display: flex;
    align-items: center;
    z-index: 9000;
    overflow: hidden;
}

.chyron-live-dot {
    width: 8px;
    height: 8px;
    background: #E5193B;
    border-radius: 50%;
    margin-left: 16px;
    flex-shrink: 0;
    animation: dotPulse 1.5s ease-in-out infinite;
}

.chyron-track {
    flex: 1;
    overflow: hidden;
    margin-left: 12px;
}

.chyron-content {
    display: flex;
    white-space: nowrap;
    animation: chyronScroll 40s linear infinite;
}

.chyron-content span {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: rgba(232, 228, 223, 0.6);
    padding-right: 48px;
    flex-shrink: 0;
}

@keyframes chyronScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== SLIDE REVEAL ANIMATION ===== */
@keyframes slideReveal {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .feed-grid {
        flex-direction: column;
        gap: 32px;
    }

    .feed-divider {
        width: 100%;
        height: 1px;
    }

    .feed-column {
        padding: 0;
    }

    .program-inner {
        grid-template-columns: 1fr;
    }

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

    .section-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-tagline {
        font-size: 0.9rem;
    }

    .broadcast-header {
        padding: 0 12px;
    }

    .program-monitor-frame {
        padding: 20px;
    }

    .section-title {
        font-size: 1.4rem;
    }
}
