/* miris.dev - Flat Design Dashboard */
/* Flat-design enforcement */
* {
    box-shadow: none;
    border-radius: 0;
}

/* Custom Properties */
:root {
    --void: #0d0a1a;
    --cosmic: #1a0a2e;
    --amethyst: #2a0e4f;
    --aurora: #39ff8e;
    --violet: #7b2fff;
    --magenta: #ff3a6e;
    --teal-wash: #1e5a8a;
    --rule: #3d1a6e;
    --text-primary: #e0f7e0;
    --text-muted: #c4b8d8;
    --spine-width: 48px;
}

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

html {
    scroll-behavior: smooth;
}

body.miris-dashboard {
    background-color: var(--void);
    color: var(--text-primary);
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.65;
    letter-spacing: 0.005em;
    overflow-x: hidden;
}

/* ===== SPINE NAVIGATION ===== */
.spine {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--spine-width);
    height: 100vh;
    background-color: var(--void);
    border-right: 2px solid var(--rule);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
}

.spine-glyphs {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding-top: 16px;
}

.glyph-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    position: relative;
    text-decoration: none;
}

.glyph {
    stroke: var(--aurora);
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 100;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.4s ease, stroke 0.3s ease;
}

.glyph-link:hover .glyph {
    stroke: var(--magenta);
    stroke-dashoffset: 100;
    animation: glyph-draw 0.4s ease forwards;
}

@keyframes glyph-draw {
    from { stroke-dashoffset: 100; }
    to { stroke-dashoffset: 0; }
}

.glyph-link::after {
    content: attr(data-label);
    position: absolute;
    left: 44px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--aurora);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.glyph-link:hover::after {
    opacity: 1;
}

.spine-marker {
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-dot {
    width: 8px;
    height: 8px;
    background-color: var(--aurora);
    display: block;
    animation: marker-pulse 2s ease-in-out infinite;
}

@keyframes marker-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ===== GRID VIEWPORT ===== */
.grid-viewport {
    margin-left: var(--spine-width);
    width: calc(100vw - var(--spine-width));
}

/* ===== PANELS (universal) ===== */
.panel {
    border: 2px solid var(--rule);
    background-color: var(--cosmic);
    position: relative;
    overflow: hidden;
}

.panel[data-visible="false"] {
    opacity: 0;
    transform: translateY(12px);
}

.panel[data-visible="true"] {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.panel-group[data-visible="false"] > .panel {
    opacity: 0;
    transform: translateY(12px);
}

.panel-group[data-visible="true"] > .panel[data-visible="true"] {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Panel label (mono) */
.panel-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--aurora);
    display: block;
    margin-bottom: 16px;
}

/* Panel title (Commissioner) */
.panel-title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 800;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    letter-spacing: -0.04em;
    line-height: 0.95;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* Panel body */
.panel-body {
    color: var(--text-muted);
    max-width: 540px;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 2fr 1fr;
    background-color: var(--cosmic);
}

.hero-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-column: 1 / -1;
    min-height: 100vh;
}

.hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 60px;
}

.hero-label {
    margin-bottom: 24px;
}

.label-mono {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--aurora);
}

.hero-title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 800;
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    letter-spacing: -0.04em;
    line-height: 0.95;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.title-dot {
    color: var(--aurora);
}

.hero-tagline {
    color: var(--text-muted);
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    line-height: 1.65;
    max-width: 520px;
    margin-bottom: 32px;
}

.hero-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background-color: var(--aurora);
    display: inline-block;
    animation: marker-pulse 2s ease-in-out infinite;
}

.status-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--aurora);
}

/* Hero Waveform */
.hero-waveform {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-left: 2px solid var(--rule);
    padding: 40px 24px;
    background-color: var(--void);
}

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

.hero-wave {
    height: 160px;
}

/* Wave path styles */
.wave-path {
    stroke: var(--aurora);
    stroke-width: 1.5;
    fill: none;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: signal-flow 8s linear infinite;
}

.wave-2 {
    stroke: var(--violet);
    stroke-width: 1;
    opacity: 0.6;
    animation-delay: -2s;
    animation-duration: 10s;
}

.wave-3 {
    stroke: var(--teal-wash);
    stroke-width: 1;
    opacity: 0.4;
    animation-delay: -4s;
    animation-duration: 12s;
}

@keyframes signal-flow {
    from { stroke-dashoffset: 1000; }
    to { stroke-dashoffset: 0; }
}

/* Readout data */
.readout-data {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-top: 16px;
    width: 100%;
}

.readout-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.readout-value {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 1.2rem;
    color: var(--aurora);
    letter-spacing: 0.02em;
}

/* ===== WATERCOLOR BLEEDS ===== */
.watercolor-bleed {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.wc-hero {
    width: 300px;
    height: 300px;
    top: -50px;
    right: -50px;
    background: radial-gradient(ellipse at center, rgba(30, 90, 138, 0.15) 0%, transparent 70%),
                radial-gradient(ellipse at 30% 70%, rgba(123, 47, 255, 0.1) 0%, transparent 60%);
    filter: blur(40px);
    mix-blend-mode: screen;
}

.wc-about-1 {
    width: 200px;
    height: 200px;
    bottom: -40px;
    left: -40px;
    background: radial-gradient(ellipse at center, rgba(30, 90, 138, 0.15) 0%, transparent 70%);
    filter: blur(40px);
    mix-blend-mode: screen;
}

.wc-about-2 {
    width: 180px;
    height: 180px;
    top: -30px;
    right: -30px;
    background: radial-gradient(ellipse at center, rgba(123, 47, 255, 0.1) 0%, transparent 70%);
    filter: blur(40px);
    mix-blend-mode: screen;
}

.wc-about-4 {
    width: 160px;
    height: 160px;
    top: 20px;
    left: -20px;
    background: radial-gradient(ellipse at center, rgba(57, 255, 142, 0.05) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 30%, rgba(30, 90, 138, 0.12) 0%, transparent 70%);
    filter: blur(35px);
    mix-blend-mode: screen;
}

.wc-feat-2 {
    width: 250px;
    height: 250px;
    bottom: -60px;
    right: -60px;
    background: radial-gradient(ellipse at center, rgba(123, 47, 255, 0.1) 0%, transparent 65%),
                radial-gradient(ellipse at 20% 80%, rgba(30, 90, 138, 0.12) 0%, transparent 60%);
    filter: blur(45px);
    mix-blend-mode: screen;
}

.wc-feat-5 {
    width: 200px;
    height: 200px;
    top: -40px;
    left: -20px;
    background: radial-gradient(ellipse at center, rgba(30, 90, 138, 0.15) 0%, transparent 70%);
    filter: blur(40px);
    mix-blend-mode: screen;
}

.wc-signal {
    width: 400px;
    height: 300px;
    bottom: -80px;
    right: -80px;
    background: radial-gradient(ellipse at center, rgba(123, 47, 255, 0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 40% 60%, rgba(30, 90, 138, 0.1) 0%, transparent 65%);
    filter: blur(50px);
    mix-blend-mode: screen;
}

/* ===== GEOMETRIC ACCENTS ===== */
.geometric-accent {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.geo-hero-1 {
    width: 120px;
    height: 120px;
    bottom: 40px;
    left: 60px;
    background-color: var(--violet);
    opacity: 0.08;
    transform: rotate(15deg);
}

.geo-hero-2 {
    width: 60px;
    height: 60px;
    top: 80px;
    right: 40px;
    background-color: var(--magenta);
    opacity: 0.1;
    transform: rotate(-8deg);
}

.geo-triangle {
    width: 0;
    height: 0;
    bottom: 16px;
    right: 16px;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 70px solid var(--violet);
    opacity: 0.08;
}

.geo-circle {
    width: 80px;
    height: 80px;
    bottom: 20px;
    right: 20px;
    background-color: var(--teal-wash);
    opacity: 0.1;
    clip-path: circle(50%);
}

.geo-rect-1 {
    width: 100px;
    height: 40px;
    bottom: 20px;
    right: 20px;
    background-color: var(--amethyst);
    opacity: 0.15;
    transform: rotate(5deg);
}

.geo-rect-2 {
    width: 50px;
    height: 80px;
    top: 30px;
    right: 40px;
    background-color: var(--violet);
    opacity: 0.08;
    transform: rotate(-12deg);
}

.geo-diamond {
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 24px;
    background-color: var(--aurora);
    opacity: 0.06;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

/* ===== WAVE DIVIDERS ===== */
.wave-divider {
    height: 60px;
    width: 100%;
    background-color: var(--void);
    display: flex;
    align-items: center;
}

.divider-wave {
    height: 60px;
}

.wave-divider-path {
    stroke: var(--aurora);
    stroke-width: 1;
    fill: none;
    opacity: 0.5;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: signal-flow 12s linear infinite;
}

/* ===== ABOUT PANEL GROUP ===== */
.panel-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    background-color: var(--rule);
}

.about-panel {
    padding: 40px 32px;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.about-panel .panel-body {
    margin-top: auto;
}

.panel-wave {
    width: 100%;
    height: 40px;
    margin-top: 16px;
}

.wave-mini {
    stroke: var(--aurora);
    stroke-width: 1.5;
    fill: none;
    opacity: 0.6;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: signal-flow 6s linear infinite;
}

/* ===== FEATURES PANEL GROUP ===== */
.features-group {
    grid-template-columns: repeat(4, 1fr);
}

.feature-panel {
    padding: 40px 32px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.feature-1 {
    grid-column: span 2;
}

.feature-2 {
    grid-column: span 2;
}

.feature-3 {
    grid-column: span 1;
}

.feature-4 {
    grid-column: span 2;
}

.feature-5 {
    grid-column: span 1;
}

.feature-panel .panel-body {
    margin-top: auto;
}

.feature-wave {
    height: 60px;
    margin-top: 16px;
}

.wave-feature {
    stroke: var(--aurora);
    stroke-width: 1.5;
    fill: none;
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    animation: signal-flow 7s linear infinite;
}

/* ===== SIGNAL SECTION ===== */
.signal-section {
    background-color: var(--amethyst);
    padding: 60px 48px;
}

.signal-content {
    position: relative;
    z-index: 1;
}

.signal-header {
    margin-bottom: 40px;
}

.signal-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
}

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

.signal-card {
    background-color: var(--cosmic);
    border: 2px solid var(--rule);
    padding: 28px 24px;
}

.signal-metric-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
}

.signal-metric-value {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 600;
    font-size: 1.8rem;
    color: var(--aurora);
    display: block;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.signal-bar {
    width: 100%;
    height: 4px;
    background-color: var(--amethyst);
}

.signal-bar-fill {
    height: 100%;
    background-color: var(--aurora);
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== TERMINAL SECTION ===== */
.terminal {
    background-color: var(--void);
    padding: 60px 48px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.terminal-content {
    width: 100%;
    max-width: 800px;
    border: 2px solid var(--rule);
    background-color: var(--cosmic);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 2px solid var(--rule);
    background-color: var(--amethyst);
}

.terminal-dot {
    width: 10px;
    height: 10px;
    display: inline-block;
}

.dot-1 { background-color: var(--magenta); }
.dot-2 { background-color: var(--aurora); }
.dot-3 { background-color: var(--violet); }

.terminal-title-bar {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-left: 12px;
}

.terminal-body {
    padding: 24px;
}

.terminal-line {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-primary);
    display: flex;
    gap: 12px;
}

.terminal-prompt {
    color: var(--aurora);
    font-weight: 600;
}

.terminal-command {
    color: var(--text-primary);
}

.terminal-output .terminal-text {
    color: var(--text-muted);
}

.terminal-final {
    margin-top: 8px;
}

.terminal-typed {
    color: var(--aurora);
}

.terminal-cursor {
    color: var(--aurora);
    animation: cursor-blink 1s step-end infinite;
}

@keyframes cursor-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ===== FOOTER SECTION ===== */
.footer-section {
    background-color: var(--void);
    border-top: 2px solid var(--rule);
    padding: 60px 48px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.footer-title {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    margin-bottom: 12px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    padding: 12px 16px;
    border: 2px solid var(--rule);
    background-color: var(--cosmic);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.footer-link:hover {
    border-color: var(--magenta);
    background-color: var(--amethyst);
}

.link-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-primary);
}

.link-arrow {
    color: var(--aurora);
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.footer-link:hover .link-arrow {
    transform: translateX(4px);
    color: var(--magenta);
}

.footer-signal {
    display: flex;
    align-items: center;
    gap: 10px;
    align-self: end;
}

.footer-status {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--aurora);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: var(--aurora);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .spine {
        display: none;
    }

    .grid-viewport {
        margin-left: 0;
        width: 100vw;
    }

    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-waveform {
        border-left: none;
        border-top: 2px solid var(--rule);
        min-height: 200px;
    }

    .panel-group {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-group .feature-1,
    .features-group .feature-2,
    .features-group .feature-4 {
        grid-column: span 2;
    }

    .features-group .feature-3,
    .features-group .feature-5 {
        grid-column: span 1;
    }

    .signal-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .hero-text {
        padding: 60px 32px;
    }

    .signal-section {
        padding: 40px 24px;
    }

    .terminal {
        padding: 40px 24px;
    }

    .footer-section {
        padding: 40px 24px;
    }
}

@media (max-width: 600px) {
    .panel-group {
        grid-template-columns: 1fr;
    }

    .features-group .feature-1,
    .features-group .feature-2,
    .features-group .feature-3,
    .features-group .feature-4,
    .features-group .feature-5 {
        grid-column: span 1;
    }

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

    .hero-text {
        padding: 40px 20px;
    }

    .about-panel,
    .feature-panel {
        padding: 32px 20px;
    }
}
