/* ===========================================
   MMIDDL.com - Graffiti Dashboard Styles
   =========================================== */

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

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

body {
    background-color: #0A0E27;
    color: #C0C7D0;
    font-family: 'IBM Plex Mono', monospace;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

/* --- Particle Canvas --- */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 999;
}

/* --- Dashboard Container (Scroll Snap) --- */
.dashboard-container {
    width: 100vw;
    height: 100vh;
    overflow-y: scroll;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
}

.dashboard-container::-webkit-scrollbar {
    display: none;
}

/* --- Floor Sections --- */
.floor {
    width: 100vw;
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* --- Floor Grid: 6-column dashboard matrix --- */
.floor-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 6px;
    padding: 6px;
    background-color: #0A0E27;
}

/* Floor 2: Sparse grid (fewer, larger panels) */
.floor-grid-sparse {
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(3, 1fr);
}

/* Floor 3: Open grid (floaty, more spacing) */
.floor-grid-open {
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 20px;
    padding: 40px 20px 6px;
}

/* --- Panel Base --- */
.panel {
    position: relative;
    overflow: hidden;
    background-color: #1A1F3D;
    border: 1px solid #7B8794;
    border-image: linear-gradient(135deg, #7B8794, #C0C7D0, #7B8794) 1;
    border-radius: 3px;
    box-shadow: inset 0 0 30px rgba(0, 14, 39, 0.5);
}

.panel-svg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.panel-svg-layer svg {
    width: 100%;
    height: 100%;
}

.panel-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* --- Tag Signatures --- */
.tag-signature {
    position: absolute;
    bottom: 6px;
    right: 10px;
    font-family: 'Caveat', cursive;
    font-size: 13px;
    color: #2D3561;
    z-index: 3;
    opacity: 0.6;
    transform: rotate(-3deg);
}

/* --- Indicator Dots (pulse-attention) --- */
.indicator-dot {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    z-index: 3;
    animation: pulse-dot 2.5s ease-in-out infinite;
}

.dot-cyan {
    background-color: #00E5FF;
    box-shadow: 0 0 6px #00E5FF;
}

.dot-magenta {
    background-color: #FF2D78;
    box-shadow: 0 0 6px #FF2D78;
    animation-delay: 0.3s;
}

.dot-gold {
    background-color: #C9A84C;
    box-shadow: 0 0 6px #C9A84C;
    animation-delay: 0.6s;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* --- Stencil Overlay --- */
.stencil-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.stencil-overlay svg {
    width: 100%;
    height: 100%;
}

/* =============================================
   FLOOR 1: The Control Room (cyan-dominant)
   ============================================= */

/* Hero Panel: 3 cols x 2 rows */
.panel-hero {
    grid-column: 1 / 4;
    grid-row: 1 / 3;
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(60px, 10vw, 120px);
    letter-spacing: -0.03em;
    line-height: 1;
    background: linear-gradient(
        90deg,
        #7B8794 0%,
        #C0C7D0 20%,
        #E8ECF0 40%,
        #C0C7D0 60%,
        #7B8794 80%,
        #C0C7D0 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: metallic-shimmer 8s linear infinite;
    margin-bottom: 10px;
}

@keyframes metallic-shimmer {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

.hero-drips {
    width: 80%;
    max-width: 400px;
    height: 40px;
}

.hero-drips .drip-svg {
    width: 100%;
    height: 100%;
}

.drip-line {
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: drip-down 3s ease-out forwards;
}

.drip-line:nth-child(2) { animation-delay: 0.5s; }
.drip-line:nth-child(3) { animation-delay: 1s; }
.drip-line:nth-child(4) { animation-delay: 0.3s; }
.drip-line:nth-child(5) { animation-delay: 0.8s; }

@keyframes drip-down {
    to { stroke-dashoffset: 0; }
}

.hero-subtitle {
    font-family: 'Caveat', cursive;
    font-size: 20px;
    color: #7B8794;
    margin-top: 8px;
    opacity: 0.7;
}

.skyline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 25%;
    z-index: 1;
}

/* Status Panels: top-right column */
.panel-status-1 {
    grid-column: 4 / 6;
    grid-row: 1 / 2;
}

.panel-status-2 {
    grid-column: 6 / 7;
    grid-row: 1 / 2;
}

.panel-status-3 {
    grid-column: 4 / 7;
    grid-row: 2 / 3;
}

/* Feature Panels: bottom half */
.panel-feature-1 {
    grid-column: 1 / 3;
    grid-row: 3 / 5;
}

.panel-feature-2 {
    grid-column: 3 / 5;
    grid-row: 3 / 5;
}

.panel-feature-3 {
    grid-column: 5 / 7;
    grid-row: 3 / 5;
}

/* --- Panel Headings --- */
.panel-heading {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(18px, 2.5vw, 30px);
    color: #C0C7D0;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.heading-magenta {
    color: #FF2D78;
}

.heading-gold {
    color: #C9A84C;
}

/* --- Data Text --- */
.data-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    color: #7B8794;
    line-height: 1.6;
}

.data-highlight {
    color: #E8ECF0;
    font-weight: 700;
}

/* --- Signal Bars --- */
.signal-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 40px;
    margin-bottom: 10px;
}

.signal-bar {
    width: 10px;
    border-radius: 2px;
    animation: pulse-bar 2.5s ease-in-out infinite;
}

.bar-1 { height: 20%; background: linear-gradient(to top, #7B8794, #C0C7D0); animation-delay: 0s; }
.bar-2 { height: 40%; background: linear-gradient(to top, #7B8794, #C0C7D0); animation-delay: 0.3s; }
.bar-3 { height: 60%; background: linear-gradient(to top, #00E5FF, #C0C7D0); animation-delay: 0.6s; }
.bar-4 { height: 80%; background: linear-gradient(to top, #00E5FF, #E8ECF0); animation-delay: 0.9s; }
.bar-5 { height: 100%; background: linear-gradient(to top, #00E5FF, #E8ECF0); animation-delay: 1.2s; }

@keyframes pulse-bar {
    0%, 100% { opacity: 0.6; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.05); }
}

/* --- Frequency Display --- */
.freq-display {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 8px;
}

.freq-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    color: #FF2D78;
}

.freq-unit {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    color: #7B8794;
}

/* --- Gauge --- */
.uplink-gauge {
    width: 100%;
    max-width: 180px;
    margin-bottom: 10px;
}

.gauge-svg {
    width: 100%;
    height: auto;
}

.gauge-fill {
    stroke-dasharray: 130;
    stroke-dashoffset: 130;
    animation: gauge-animate 2s ease-out forwards 0.5s;
}

@keyframes gauge-animate {
    to { stroke-dashoffset: 30; }
}

.gauge-needle {
    transform-origin: 50px 55px;
    animation: needle-sweep 2s ease-out forwards 0.5s;
}

@keyframes needle-sweep {
    from { transform: rotate(-60deg); }
    to { transform: rotate(0deg); }
}

/* --- Sparkline paths --- */
.sparkline-path {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    animation: draw-sparkline 2.5s ease-out forwards;
}

@keyframes draw-sparkline {
    to { stroke-dashoffset: 0; }
}

/* --- Mini Stats --- */
.mini-stats {
    display: flex;
    gap: 24px;
    margin-top: auto;
    padding-top: 10px;
}

.mini-stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 24px;
    font-weight: 700;
    color: #E8ECF0;
}

.stat-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #7B8794;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* --- Grid Dots --- */
.grid-dots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
    max-width: 140px;
}

.grid-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #2D3561;
    border: 1px solid #7B8794;
}

.grid-dot.active {
    background-color: #00E5FF;
    border-color: #00E5FF;
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
    animation: pulse-dot 2.5s ease-in-out infinite;
}

.grid-dot:nth-child(2) { animation-delay: 0.3s; }
.grid-dot:nth-child(3) { animation-delay: 0.6s; }
.grid-dot:nth-child(5) { animation-delay: 0.9s; }
.grid-dot:nth-child(7) { animation-delay: 1.2s; }
.grid-dot:nth-child(8) { animation-delay: 1.5s; }
.grid-dot:nth-child(10) { animation-delay: 1.8s; }
.grid-dot:nth-child(11) { animation-delay: 2.1s; }
.grid-dot:nth-child(12) { animation-delay: 0.15s; }
.grid-dot:nth-child(14) { animation-delay: 0.45s; }
.grid-dot:nth-child(15) { animation-delay: 0.75s; }

/* --- Ticker Bar --- */
.ticker-bar {
    width: 100%;
    height: 36px;
    background-color: #1A1F3D;
    border-top: 1px solid #2D3561;
    overflow: hidden;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.ticker-track {
    display: flex;
    white-space: nowrap;
    animation: ticker-scroll 30s linear infinite;
}

.ticker-track-reverse {
    animation: ticker-scroll-reverse 35s linear infinite;
}

.ticker-text {
    font-family: 'Caveat', cursive;
    font-size: 18px;
    color: #7B8794;
    padding-left: 100%;
}

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

@keyframes ticker-scroll-reverse {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* =============================================
   FLOOR 2: The Back Wall (magenta-dominant)
   ============================================= */

/* Mural Panel: 4 cols x 2 rows */
.panel-mural {
    grid-column: 1 / 5;
    grid-row: 1 / 3;
}

.mural-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
}

.mural-title {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(32px, 5vw, 56px);
    color: #FF2D78;
    margin-bottom: 20px;
    letter-spacing: 0.05em;
}

.mural-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 15px;
    color: #C0C7D0;
    line-height: 1.8;
    max-width: 600px;
}

.wet-paint-tag {
    margin-top: 20px;
    display: inline-block;
    align-self: flex-start;
    padding: 4px 16px;
    border: 1px dashed #FF2D78;
    border-radius: 2px;
    animation: pulse-dot 2.5s ease-in-out infinite;
}

.caveat-text {
    font-family: 'Caveat', cursive;
    font-size: 18px;
    color: #FF2D78;
}

/* Side Panels */
.panel-side-1 {
    grid-column: 5 / 7;
    grid-row: 1 / 2;
}

.panel-side-2 {
    grid-column: 5 / 7;
    grid-row: 2 / 3;
}

/* Dispatch Entries */
.dispatch-entries {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.dispatch-entry {
    display: flex;
    gap: 10px;
    align-items: baseline;
}

.dispatch-time {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: #C9A84C;
    font-weight: 700;
    flex-shrink: 0;
}

.dispatch-msg {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    color: #7B8794;
}

/* Crew List */
.crew-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.crew-tag {
    font-family: 'Permanent Marker', cursive;
    font-size: 16px;
    color: #FF2D78;
    background-color: rgba(255, 45, 120, 0.1);
    padding: 4px 10px;
    border-radius: 2px;
    border: 1px solid rgba(255, 45, 120, 0.2);
}

/* =============================================
   FLOOR 3: The Rooftop (gold-dominant)
   ============================================= */

/* Statement Panel */
.panel-statement {
    grid-column: 2 / 6;
    grid-row: 1 / 3;
}

.statement-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
}

.statement-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: clamp(20px, 3vw, 32px);
    color: #E8ECF0;
    line-height: 1.6;
    max-width: 600px;
    margin-bottom: 24px;
}

.statement-attribution {
    font-size: 20px;
    color: #C9A84C;
}

/* Floating Panels */
.panel-float {
    background-color: rgba(26, 31, 61, 0.8);
}

.panel-float-1 {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
}

.panel-float-2 {
    grid-column: 6 / 7;
    grid-row: 2 / 3;
}

/* Altitude Display */
.altitude-display {
    margin: 8px 0;
}

.altitude-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    color: #C9A84C;
}

/* Wind Compass */
.wind-display {
    width: 60px;
    height: 60px;
    margin: 8px 0;
}

.wind-compass {
    width: 100%;
    height: 100%;
}

.wind-arrow {
    transform-origin: 30px 30px;
    animation: wind-rotate 6s ease-in-out infinite alternate;
}

@keyframes wind-rotate {
    0% { transform: rotate(-15deg); }
    100% { transform: rotate(15deg); }
}

/* Rooftop Skyline */
.rooftop-skyline {
    grid-column: 1 / 7;
    grid-row: 3 / 4;
    align-self: end;
    pointer-events: none;
}

.rooftop-skyline svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Ticker bar variants */
.ticker-bar-2 {
    background-color: rgba(26, 31, 61, 0.9);
    border-top-color: #FF2D78;
}

.ticker-bar-2 .ticker-text {
    color: #FF2D78;
    opacity: 0.6;
}

.ticker-bar-3 {
    background-color: rgba(26, 31, 61, 0.7);
    border-top-color: #C9A84C;
}

.ticker-bar-3 .ticker-text {
    color: #C9A84C;
    opacity: 0.5;
}

/* =============================================
   Spectrum Bars Animation
   ============================================= */
.spectrum-bar {
    animation: spectrum-pulse 2s ease-in-out infinite alternate;
}

.spectrum-bar:nth-child(odd) { animation-delay: 0.2s; }
.spectrum-bar:nth-child(even) { animation-delay: 0.5s; }
.spectrum-bar:nth-child(3n) { animation-delay: 0.8s; }

@keyframes spectrum-pulse {
    0% { opacity: 0.2; }
    100% { opacity: 0.6; }
}

/* =============================================
   Floor Transitions (scroll-driven)
   ============================================= */
.floor {
    transition: opacity 0.4s ease;
}

/* Panel entrance animation */
.panel {
    opacity: 0;
    transform: translateY(20px);
    animation: panel-enter 0.6s ease-out forwards;
}

.panel:nth-child(1) { animation-delay: 0ms; }
.panel:nth-child(2) { animation-delay: 50ms; }
.panel:nth-child(3) { animation-delay: 100ms; }
.panel:nth-child(4) { animation-delay: 150ms; }
.panel:nth-child(5) { animation-delay: 200ms; }
.panel:nth-child(6) { animation-delay: 250ms; }
.panel:nth-child(7) { animation-delay: 300ms; }

@keyframes panel-enter {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================
   Spray paint cloud ambient decoration
   ============================================= */
.panel::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.06), transparent 70%);
    top: -30px;
    right: -30px;
    z-index: 0;
    pointer-events: none;
}

.floor-2 .panel::before {
    background: radial-gradient(circle, rgba(255, 45, 120, 0.06), transparent 70%);
}

.floor-3 .panel::before {
    background: radial-gradient(circle, rgba(201, 168, 76, 0.06), transparent 70%);
}

/* =============================================
   Responsive adjustments
   ============================================= */
@media (max-width: 900px) {
    .floor-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto;
    }

    .panel-hero {
        grid-column: 1 / 4;
        grid-row: 1 / 2;
    }

    .panel-status-1 { grid-column: 1 / 2; grid-row: 2; }
    .panel-status-2 { grid-column: 2 / 3; grid-row: 2; }
    .panel-status-3 { grid-column: 3 / 4; grid-row: 2; }

    .panel-feature-1 { grid-column: 1 / 2; grid-row: 3; }
    .panel-feature-2 { grid-column: 2 / 3; grid-row: 3; }
    .panel-feature-3 { grid-column: 3 / 4; grid-row: 3; }

    .panel-mural { grid-column: 1 / 4; grid-row: 1 / 2; }
    .panel-side-1 { grid-column: 1 / 2; grid-row: 2; }
    .panel-side-2 { grid-column: 2 / 4; grid-row: 2; }

    .panel-statement { grid-column: 1 / 4; grid-row: 1 / 2; }
    .panel-float-1 { grid-column: 1 / 2; grid-row: 2; }
    .panel-float-2 { grid-column: 3 / 4; grid-row: 2; }
    .rooftop-skyline { grid-column: 1 / 4; grid-row: 3; }

    .hero-title {
        font-size: clamp(40px, 8vw, 80px);
    }
}

@media (max-width: 600px) {
    .floor-grid,
    .floor-grid-sparse,
    .floor-grid-open {
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        padding: 4px;
    }

    .floor-grid-open {
        gap: 10px;
        padding: 20px 10px 4px;
    }

    .panel-hero { grid-column: 1 / 3; }
    .panel-status-1 { grid-column: 1 / 2; }
    .panel-status-2 { grid-column: 2 / 3; }
    .panel-status-3 { grid-column: 1 / 3; }
    .panel-feature-1 { grid-column: 1 / 3; }
    .panel-feature-2 { grid-column: 1 / 3; }
    .panel-feature-3 { grid-column: 1 / 3; }

    .panel-mural { grid-column: 1 / 3; }
    .panel-side-1 { grid-column: 1 / 3; }
    .panel-side-2 { grid-column: 1 / 3; }

    .panel-statement { grid-column: 1 / 3; }
    .panel-float-1 { grid-column: 1 / 2; }
    .panel-float-2 { grid-column: 2 / 3; }
    .rooftop-skyline { grid-column: 1 / 3; }

    .panel-heading {
        font-size: 18px;
    }

    .mural-content {
        padding: 20px;
    }

    .statement-content {
        padding: 20px;
    }
}
