/* ============================================
   PPEBBL.com - Skeuomorphic Hardware Rack
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --burnt-sienna: #D97727;
    --deep-ember: #B85A1A;
    --gunmetal: #2B2D30;
    --brushed-steel: #6B6E73;
    --aluminum: #C8CCD0;
    --amber-glow: #F0A830;
    --carbon: #1A1B1E;
    --bone-white: #E8E4DF;
    --warm-gray: #9B9590;
    --teal-signal: #2A9D8F;

    --font-display: 'Archivo Black', sans-serif;
    --font-body: 'IBM Plex Sans', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    --rail-width: 40px;
    --gap: 2px;
    --module-border-width: 3px;
}

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

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

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    color: var(--bone-white);
    background: var(--carbon);
    overflow-x: hidden;
}

/* --- Rack Rail Navigation (Desktop) --- */
#rack-rail {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--rail-width);
    height: 100vh;
    background: var(--gunmetal);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    border-right: var(--gap) solid #111214;
    box-shadow: inset -1px 0 0 rgba(200,204,208,0.08);
}

.rail-track {
    position: absolute;
    left: 50%;
    top: 15%;
    bottom: 15%;
    width: 2px;
    background: #3a3c40;
    transform: translateX(-50%);
    border-radius: 1px;
}

.rail-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: var(--burnt-sienna);
    border-radius: 1px;
    transition: height 0.3s ease;
}

.rail-dot {
    position: relative;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #3a3c40;
    cursor: pointer;
    z-index: 2;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.rail-dot.active {
    background: var(--burnt-sienna);
    box-shadow: 0 0 8px rgba(217,119,39,0.6), 0 0 16px rgba(217,119,39,0.3);
}

.rail-dot:hover {
    background: var(--amber-glow);
    box-shadow: 0 0 12px rgba(240,168,48,0.5), 0 0 24px rgba(240,168,48,0.2);
}

.dot-label {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 500;
    color: var(--warm-gray);
    letter-spacing: 0.08em;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.rail-dot:hover .dot-label {
    opacity: 1;
}

/* --- Mobile Top Bar --- */
#mobile-bar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: var(--gunmetal);
    z-index: 200;
    align-items: center;
    padding: 0 16px;
    border-bottom: var(--gap) solid #111214;
}

#mobile-power-btn {
    background: none;
    border: 1px solid var(--brushed-steel);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#mobile-power-btn:hover {
    border-color: var(--burnt-sienna);
    box-shadow: 0 0 8px rgba(217,119,39,0.3);
}

.mobile-brand {
    font-family: var(--font-display);
    font-size: 14px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--aluminum);
    margin-left: 12px;
}

/* --- Mobile Overlay --- */
#mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26,27,30,0.95);
    z-index: 300;
    align-items: center;
    justify-content: center;
}

#mobile-overlay.open {
    display: flex;
}

.overlay-inner {
    width: 280px;
    background: var(--gunmetal);
    border: 1px solid var(--brushed-steel);
    border-radius: 4px;
    padding: 24px;
}

.overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.overlay-title {
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--aluminum);
}

#overlay-close {
    background: none;
    border: none;
    color: var(--warm-gray);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

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

.overlay-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--bone-white);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.05em;
    padding: 8px;
    border: 1px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.overlay-link:hover {
    border-color: var(--burnt-sienna);
    color: var(--amber-glow);
}

.link-led {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brushed-steel);
    flex-shrink: 0;
}

.overlay-link:hover .link-led {
    background: var(--burnt-sienna);
    box-shadow: 0 0 6px rgba(217,119,39,0.5);
}

/* --- Main Container --- */
#rack-container {
    margin-left: var(--rail-width);
    width: calc(100vw - var(--rail-width));
}

/* --- Module Row --- */
.module-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap);
    min-height: 50vh;
}

/* --- Module Base --- */
.module {
    position: relative;
    overflow: hidden;
    min-height: 50vh;
}

.module-1x1 {
    grid-column: span 1;
    grid-row: span 1;
}

.module-2x1 {
    grid-column: span 2;
    grid-row: span 1;
}

.module-1x2 {
    grid-column: span 1;
    grid-row: span 2;
}

.module-2x2 {
    grid-column: span 2;
    grid-row: span 2;
}

/* Module reveal animation */
.module {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 600ms cubic-bezier(0.22, 0.9, 0.36, 1.0),
                transform 600ms cubic-bezier(0.22, 0.9, 0.36, 1.0);
}

.module.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Shadow pulse on settle */
.module::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    box-shadow: 0 0 0 rgba(217,119,39,0);
    transition: box-shadow 0.15s ease;
    z-index: 5;
    pointer-events: none;
}

.module.settle-pulse::after {
    box-shadow: 0 2px 12px rgba(217,119,39,0.3);
}

/* --- Display Panel (dark screen) --- */
.display-panel {
    background: var(--gunmetal);
    border: var(--module-border-width) solid;
    border-color: #3a3c40 #222426 #222426 #3a3c40;
    box-shadow: inset 0 1px 0 rgba(200,204,208,0.06), inset 0 -1px 0 rgba(0,0,0,0.3);
}

/* --- Control Panel (lighter aluminum) --- */
.control-panel {
    background: var(--brushed-steel);
    border: var(--module-border-width) solid;
    border-color: #8a8d91 #555759 #555759 #8a8d91;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), inset 0 -1px 0 rgba(0,0,0,0.2);
    /* Brushed metal texture */
    background-image: repeating-linear-gradient(
        175deg,
        transparent,
        transparent 0.5px,
        rgba(255,255,255,0.03) 0.5px,
        rgba(255,255,255,0.03) 1px,
        transparent 1px,
        transparent 1.5px,
        rgba(0,0,0,0.02) 1.5px,
        rgba(0,0,0,0.02) 2px
    );
    background-color: var(--brushed-steel);
    transition: background-image 0.3s ease;
}

.control-panel:hover {
    background-image: repeating-linear-gradient(
        178deg,
        transparent,
        transparent 0.5px,
        rgba(255,255,255,0.04) 0.5px,
        rgba(255,255,255,0.04) 1px,
        transparent 1px,
        transparent 1.5px,
        rgba(0,0,0,0.02) 1.5px,
        rgba(0,0,0,0.02) 2px
    );
}

/* --- Viewport Panel (gradient mesh behind glass) --- */
.viewport-panel {
    background: var(--gunmetal);
    border: var(--module-border-width) solid;
    border-color: #3a3c40 #222426 #222426 #3a3c40;
}

/* --- Gradient Meshes --- */
.gradient-mesh {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.mesh-1 {
    background:
        radial-gradient(ellipse at 20% 30%, rgba(217,119,39,0.6) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(184,90,26,0.5) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(240,168,48,0.3) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 20%, rgba(42,157,143,0.4) 0%, transparent 50%);
    background-color: var(--gunmetal);
    animation: meshBreathe1 30s ease-in-out infinite;
}

.mesh-2 {
    background:
        radial-gradient(ellipse at 70% 40%, rgba(42,157,143,0.6) 0%, transparent 50%),
        radial-gradient(ellipse at 30% 70%, rgba(217,119,39,0.5) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 20%, rgba(240,168,48,0.3) 0%, transparent 60%);
    background-color: var(--gunmetal);
    animation: meshBreathe2 30s ease-in-out infinite;
}

.mesh-3 {
    background:
        radial-gradient(ellipse at 30% 60%, rgba(184,90,26,0.6) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 30%, rgba(240,168,48,0.5) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(42,157,143,0.35) 0%, transparent 55%),
        radial-gradient(ellipse at 20% 20%, rgba(217,119,39,0.4) 0%, transparent 50%);
    background-color: var(--gunmetal);
    animation: meshBreathe3 30s ease-in-out infinite;
}

.mesh-4 {
    background:
        radial-gradient(ellipse at 60% 30%, rgba(42,157,143,0.5) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(217,119,39,0.6) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 60%, rgba(184,90,26,0.3) 0%, transparent 55%);
    background-color: var(--gunmetal);
    animation: meshBreathe1 30s ease-in-out infinite reverse;
}

.mesh-5 {
    background:
        radial-gradient(ellipse at 50% 30%, rgba(217,119,39,0.5) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 70%, rgba(42,157,143,0.5) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(240,168,48,0.4) 0%, transparent 55%),
        radial-gradient(ellipse at 40% 90%, rgba(184,90,26,0.4) 0%, transparent 50%);
    background-color: var(--gunmetal);
    animation: meshBreathe2 30s ease-in-out infinite reverse;
}

@keyframes meshBreathe1 {
    0%, 100% { background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%; }
    33% { background-position: 5% 3%, -3% 5%, 2% -4%, -5% 2%; }
    66% { background-position: -3% -5%, 4% -2%, -5% 3%, 3% -4%; }
}

@keyframes meshBreathe2 {
    0%, 100% { background-position: 0% 0%, 0% 0%, 0% 0%; }
    33% { background-position: -4% 5%, 3% -3%, -2% 4%; }
    66% { background-position: 5% -3%, -5% 4%, 3% -5%; }
}

@keyframes meshBreathe3 {
    0%, 100% { background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%; }
    50% { background-position: 4% -4%, -3% 5%, 5% 2%, -4% -3%; }
}

/* Frosted glass overlay */
.frosted-glass {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: rgba(43,45,48,0.35);
    backdrop-filter: blur(1px);
}

/* --- Screws --- */
.screw {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    z-index: 10;
    background: radial-gradient(circle at 35% 35%, #999, #555 40%, #444 70%, #333);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.5), 0 0.5px 0 rgba(255,255,255,0.1);
}

.screw::before,
.screw::after {
    content: '';
    position: absolute;
    background: rgba(0,0,0,0.4);
}

.screw::before {
    top: 50%;
    left: 15%;
    right: 15%;
    height: 0.8px;
    transform: translateY(-50%) rotate(45deg);
}

.screw::after {
    top: 50%;
    left: 15%;
    right: 15%;
    height: 0.8px;
    transform: translateY(-50%) rotate(-45deg);
}

.screw-tl { top: 6px; left: 6px; }
.screw-tr { top: 6px; right: 6px; }
.screw-bl { bottom: 6px; left: 6px; }
.screw-br { bottom: 6px; right: 6px; }

/* --- Module Content --- */
.module-content {
    position: relative;
    z-index: 3;
    padding: 28px 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* --- LEDs --- */
.led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gunmetal);
    transition: background 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
    flex-shrink: 0;
}

.led.active.led-orange {
    background: radial-gradient(circle at 40% 40%, #ffc060, var(--burnt-sienna) 60%, transparent);
    box-shadow: 0 0 6px rgba(217,119,39,0.6), 0 0 12px rgba(217,119,39,0.3);
}

.led.active.led-teal {
    background: radial-gradient(circle at 40% 40%, #5fd4c4, var(--teal-signal) 60%, transparent);
    box-shadow: 0 0 6px rgba(42,157,143,0.6), 0 0 12px rgba(42,157,143,0.3);
}

.led.active.led-orange.overshoot {
    transform: scale(1.3);
}

.led.pulse.active {
    animation: ledPulse 2s ease-in-out infinite;
}

.led.pulse.active.led-teal {
    animation: ledPulseTeal 2s ease-in-out infinite;
}

@keyframes ledPulse {
    0%, 100% {
        opacity: 0.6;
        box-shadow: 0 0 6px rgba(217,119,39,0.4), 0 0 12px rgba(217,119,39,0.2);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 8px rgba(217,119,39,0.7), 0 0 16px rgba(217,119,39,0.4);
    }
}

@keyframes ledPulseTeal {
    0%, 100% {
        opacity: 0.6;
        box-shadow: 0 0 6px rgba(42,157,143,0.4), 0 0 12px rgba(42,157,143,0.2);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 8px rgba(42,157,143,0.7), 0 0 16px rgba(42,157,143,0.4);
    }
}

/* --- Typography --- */
.embossed-text {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.08), -1px -1px 0 rgba(0,0,0,0.4);
}

.display-panel .embossed-text {
    text-shadow: 1px 1px 0 rgba(0,0,0,0.6), -1px -1px 0 rgba(255,255,255,0.05),
                 0 0 12px rgba(217,119,39,0.2);
    color: var(--burnt-sienna);
}

.control-panel .embossed-text {
    color: var(--gunmetal);
    text-shadow: 1px 1px 0 rgba(255,255,255,0.3), -1px -1px 0 rgba(0,0,0,0.2);
}

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

.module-heading {
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.module-label {
    font-family: var(--font-display);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gunmetal);
    text-shadow: 0.5px 0.5px 0 rgba(255,255,255,0.3);
    margin-bottom: 16px;
}

.body-text {
    color: var(--bone-white);
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.6;
}

/* --- Hero Section --- */
.hero-display {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-leds {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
    justify-content: center;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    color: var(--aluminum);
    text-shadow: 2px 2px 0 rgba(0,0,0,0.5), -1px -1px 0 rgba(255,255,255,0.06),
                 0 0 40px rgba(217,119,39,0.15);
    margin-bottom: 16px;
    /* Brushed surface on text */
    -webkit-text-stroke: 0.5px rgba(200,204,208,0.3);
}

.hero-subtitle {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--amber-glow);
    text-shadow: 0 0 8px rgba(240,168,48,0.4);
    margin-bottom: 24px;
    opacity: 0;
}

.hero-subtitle.typed {
    opacity: 1;
}

.hero-tagline {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tagline-line {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    color: var(--warm-gray);
    letter-spacing: 0.15em;
    opacity: 0;
}

.tagline-line.visible {
    opacity: 1;
    transition: opacity 0.4s ease;
}

/* Brushed surface overlay for hero */
.brushed-surface {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image: repeating-linear-gradient(
        175deg,
        transparent,
        transparent 0.5px,
        rgba(255,255,255,0.015) 0.5px,
        rgba(255,255,255,0.015) 1px,
        transparent 1px,
        transparent 1.5px,
        rgba(0,0,0,0.01) 1.5px,
        rgba(0,0,0,0.01) 2px
    );
    pointer-events: none;
}

/* --- Status Block --- */
.status-block {
    align-items: center;
    gap: 12px;
}

.status-label {
    font-family: var(--font-display);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gunmetal);
    text-shadow: 0.5px 0.5px 0 rgba(255,255,255,0.3);
}

.indicator-bar {
    width: 60%;
    height: 4px;
    background: rgba(0,0,0,0.2);
    border-radius: 2px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}

.bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width 1s ease-out;
}

.bar-fill-1 { background: var(--burnt-sienna); }
.bar-fill-2 { background: var(--amber-glow); }
.bar-fill-3 { background: var(--teal-signal); }

.bar-fill.animate {
    width: var(--bar-width, 75%);
}

/* --- Vent Grille --- */
.vent-grille {
    width: 70%;
    height: 20px;
    margin-top: auto;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.15) 2px,
        rgba(0,0,0,0.15) 3px
    );
    border-radius: 2px;
    opacity: 0.5;
}

/* --- Signal Wave --- */
.signal-wave {
    margin-top: 8px;
}

.wave-path {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 1.5s ease;
}

.wave-path.animate {
    stroke-dashoffset: 0;
}

/* --- Toggle Switches --- */
.toggle-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 8px;
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toggle-label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--gunmetal);
    letter-spacing: 0.08em;
    text-shadow: 0.5px 0.5px 0 rgba(255,255,255,0.2);
}

.toggle-switch {
    width: 36px;
    height: 18px;
    border-radius: 9px;
    background: #494b4f;
    cursor: pointer;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.4), 0 0.5px 0 rgba(255,255,255,0.1);
    transition: background 0.2s ease;
}

.toggle-switch[data-state="on"] {
    background: var(--deep-ember);
}

.toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, #ddd, #aaa);
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
    transition: transform 0.2s ease-out;
}

.toggle-switch[data-state="on"] .toggle-knob {
    transform: translateX(18px);
}

/* --- Viewport Content --- */
.viewport-content {
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
}

.viewport-label {
    font-size: 10px;
    color: rgba(232,228,223,0.6);
    letter-spacing: 0.1em;
}

/* --- Display Text / Terminal --- */
.display-text {
    flex: 1;
}

/* --- Feature Items (Core Systems) --- */
.core-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.feature-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.05);
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feature-name {
    font-family: var(--font-display);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--aluminum);
}

.feature-desc {
    font-size: 13px;
    color: var(--warm-gray);
    line-height: 1.5;
}

/* --- Spec Grid --- */
.spec-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    flex: 1;
    align-content: center;
}

.spec-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}

.spec-value {
    font-size: 2.5rem;
    font-weight: 500;
    color: var(--amber-glow);
    text-shadow: 0 0 8px rgba(240,168,48,0.4);
    line-height: 1;
}

.spec-unit {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    color: var(--warm-gray);
    letter-spacing: 0.1em;
}

/* --- Circuit Trace --- */
.circuit-trace {
    margin-top: 8px;
}

.trace-path {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 2s ease;
}

.trace-path.animate {
    stroke-dashoffset: 0;
}

/* --- LED Cluster --- */
.led-cluster {
    display: grid;
    grid-template-columns: repeat(2, 8px);
    gap: 8px;
    justify-content: center;
    margin: 12px 0;
}

/* --- Readout --- */
.readout {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.readout-line {
    font-size: 11px;
    color: var(--amber-glow);
    text-shadow: 0 0 8px rgba(240,168,48,0.4);
    opacity: 0;
}

.readout-line.typed {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* --- Data Ports --- */
.data-ports {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 12px;
}

.port {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.port-socket {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    background: #3a3c40;
    border: 1px solid #555;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.port-socket.active {
    background: radial-gradient(circle, rgba(217,119,39,0.3) 0%, #3a3c40 70%);
    border-color: var(--burnt-sienna);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5), 0 0 4px rgba(217,119,39,0.3);
}

.port-label {
    font-size: 9px;
    color: var(--gunmetal);
    letter-spacing: 0.05em;
    text-shadow: 0.5px 0.5px 0 rgba(255,255,255,0.2);
}

/* --- Data Terminal --- */
.data-terminal {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 2px;
}

.terminal-line {
    font-size: 12px;
    color: var(--amber-glow);
    text-shadow: 0 0 8px rgba(240,168,48,0.4);
    opacity: 0;
    transform: translateX(-10px);
}

.terminal-line.typed {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* --- System Bars --- */
.system-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
    justify-content: center;
}

.sys-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sys-bar-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--warm-gray);
    letter-spacing: 0.08em;
    width: 40px;
    flex-shrink: 0;
}

.sys-bar {
    flex: 1;
    height: 6px;
    background: rgba(0,0,0,0.3);
    border-radius: 3px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.4);
}

.sys-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--deep-ember), var(--burnt-sienna), var(--amber-glow));
    transition: width 1.2s cubic-bezier(0.22, 0.9, 0.36, 1.0);
}

.sys-bar-fill.animate {
    width: var(--target-width);
}

.sys-bar-val {
    font-size: 11px;
    font-weight: 500;
    color: var(--amber-glow);
    text-shadow: 0 0 6px rgba(240,168,48,0.3);
    width: 32px;
    text-align: right;
    flex-shrink: 0;
}

.system-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.system-footer .mono-text {
    font-size: 11px;
    color: var(--teal-signal);
    text-shadow: 0 0 6px rgba(42,157,143,0.3);
    letter-spacing: 0.08em;
}

/* --- Footer Module --- */
.footer-module {
    align-items: center;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: auto 0;
}

.footer-line {
    font-size: 10px;
    color: var(--gunmetal);
    letter-spacing: 0.08em;
    text-shadow: 0.5px 0.5px 0 rgba(255,255,255,0.2);
}

/* --- Hero section layout fix --- */
#section-hero {
    min-height: 100vh;
    grid-template-rows: 1fr;
}

#section-hero .module-2x2 {
    min-height: 100vh;
}

#section-hero .module-1x1 {
    min-height: 50vh;
}

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

    .module {
        min-height: 33vh;
    }

    .module-2x2 {
        grid-column: span 2;
    }

    .module-1x2 {
        grid-column: span 1;
        grid-row: span 1;
    }

    #section-hero .module-2x2 {
        min-height: 66vh;
    }
}

/* --- Responsive: Mobile --- */
@media (max-width: 768px) {
    #rack-rail {
        display: none;
    }

    #mobile-bar {
        display: flex;
    }

    #rack-container {
        margin-left: 0;
        width: 100%;
        padding-top: 48px;
    }

    .module-row {
        grid-template-columns: 1fr;
    }

    .module,
    .module-1x1,
    .module-2x1,
    .module-1x2,
    .module-2x2 {
        grid-column: span 1;
        grid-row: span 1;
        min-height: auto;
    }

    .module-content {
        padding: 24px 20px;
        min-height: 200px;
    }

    #section-hero .module-2x2 {
        min-height: 70vh;
    }

    #section-hero .module-1x1 {
        min-height: 160px;
    }

    .hero-title {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .spec-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .spec-value {
        font-size: 2rem;
    }

    .feature-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .data-ports {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
}
