/* =============================================================
   misty.day — Y2K Futurism through actual mist
   Palette: burnt-orange family on warm near-black
   ============================================================= */

:root {
    /* Core palette (DESIGN.md hex) */
    --core-orange: #E8710A;
    --deep-ember: #C75B12;
    --pale-amber: #F0A848;
    --warm-parchment: #F0DCC0;
    --espresso-black: #1A0E05;
    --dark-umber: #2D1608;
    --fog-gray: #B8A08A;
    --haze-white: #E8DDD0;
    --gap-black: #0D0704;

    /* Derived warm tones */
    --faded-copper: #8B5E3C;
    --darker-umber: #2D1608;

    /* Fog overlay positions (driven by JS) */
    --fog-x1: 30%;
    --fog-y1: 40%;
    --fog-x2: 70%;
    --fog-y2: 60%;
    --fog-density: 0.06;

    /* Spring ease for entrances */
    --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);

    /* Typography stacks (Quicksand / Nunito / IBM Plex Mono) */
    --font-display: "Quicksand", "Inter", system-ui, sans-serif;
    --font-body: "Nunito", "Inter", system-ui, sans-serif;
    --font-mono: "IBM Plex Mono", "space", ui-monospace, monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    background: var(--gap-black);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--warm-parchment);
    background:
        radial-gradient(ellipse 1200px 800px at 30% 20%, rgba(232, 113, 10, 0.05), transparent 60%),
        radial-gradient(ellipse 900px 700px at 70% 80%, rgba(199, 91, 18, 0.05), transparent 60%),
        linear-gradient(180deg, var(--gap-black) 0%, var(--espresso-black) 50%, var(--gap-black) 100%);
    overflow-x: hidden;
    line-height: 1.65;
    letter-spacing: 0.01em;
    min-height: 100vh;
}

/* =============================================================
   Boot progress bar
   ============================================================= */
.boot-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, transparent, var(--core-orange), var(--pale-amber));
    z-index: 1000;
    box-shadow: 0 0 12px rgba(232, 113, 10, 0.6);
    transition: width 0.4s linear;
}

/* =============================================================
   Fog overlay (full viewport, pointer-events: none)
   ============================================================= */
.fog-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
    mix-blend-mode: screen;
}

.fog-layer {
    position: absolute;
    inset: -10%;
    opacity: var(--fog-density);
    transition: opacity 1.2s ease;
}

.fog-layer-1 {
    background: radial-gradient(ellipse 700px 350px at var(--fog-x1) var(--fog-y1), rgba(232, 221, 208, 0.85), transparent 70%);
}

.fog-layer-2 {
    background: radial-gradient(ellipse 800px 320px at var(--fog-x2) var(--fog-y2), rgba(240, 220, 192, 0.7), transparent 70%);
}

/* =============================================================
   Particle field (fog motes + embers)
   ============================================================= */
.particle-field {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform, opacity;
}

.particle.fog-mote {
    background: radial-gradient(circle, rgba(240, 168, 72, 0.15) 0%, rgba(240, 168, 72, 0.05) 40%, transparent 70%);
    animation: drift var(--drift-dur, 90s) linear infinite;
}

.particle.ember {
    background: var(--core-orange);
    box-shadow: 0 0 8px rgba(232, 113, 10, 0.7), 0 0 16px rgba(240, 168, 72, 0.3);
    animation: rise var(--rise-dur, 12s) ease-out infinite;
    opacity: 0;
}

@keyframes drift {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(var(--dx1, 80px), var(--dy1, -60px)); }
    50%  { transform: translate(var(--dx2, -40px), var(--dy2, -120px)); }
    75%  { transform: translate(var(--dx3, 60px), var(--dy3, 40px)); }
    100% { transform: translate(0, 0); }
}

@keyframes rise {
    0%   { transform: translate(0, 0); opacity: 0; }
    10%  { opacity: 0.6; }
    100% { transform: translate(var(--rdx, 30px), -120vh); opacity: 0; }
}

/* =============================================================
   Ripple rings
   ============================================================= */
.ripple-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 998;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border: 1px solid rgba(232, 113, 10, 0.3);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%) scale(0);
    animation: ripple-expand 1.5s ease-out forwards;
    pointer-events: none;
}

@keyframes ripple-expand {
    from {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.4;
    }
    to {
        transform: translate(-50%, -50%) scale(20);
        opacity: 0;
    }
}

/* =============================================================
   Dashboard root grid
   ============================================================= */
.dashboard {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Scenes */
.scene {
    position: relative;
    width: 100%;
    padding: 32px;
}

/* =============================================================
   SCENE 1: Boot / Hero
   ============================================================= */
.scene-boot {
    display: grid;
    grid-template-columns: 280px 1fr 360px;
    grid-template-rows: 1fr;
    gap: 8px;
    min-height: 100vh;
    background:
        radial-gradient(ellipse 800px 600px at 50% 30%, rgba(232, 113, 10, 0.08), transparent 60%),
        linear-gradient(180deg, var(--gap-black) 0%, var(--espresso-black) 50%, var(--dark-umber) 100%);
    align-items: stretch;
}

.scanline-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 1px,
        rgba(199, 91, 18, 0.04) 1px,
        rgba(199, 91, 18, 0.04) 2px
    );
    z-index: 1;
}

/* =============================================================
   STATUS PANEL (left column widgets)
   ============================================================= */
.status-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
    position: relative;
}

.widget {
    background: linear-gradient(180deg, var(--dark-umber) 0%, #221208 100%);
    border: 2px solid var(--deep-ember);
    border-radius: 16px;
    padding: 14px 14px 16px;
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 0 0 20px rgba(199, 91, 18, 0.08),
        inset 0 1px 0 rgba(240, 168, 72, 0.15),
        0 4px 14px rgba(0, 0, 0, 0.4);
    opacity: 0;
}

.widget.flickered {
    animation: flicker-on 400ms steps(20, end) forwards;
}

@keyframes flicker-on {
    0%   { opacity: 0; }
    10%  { opacity: 0.8; }
    20%  { opacity: 0; }
    35%  { opacity: 1; }
    45%  { opacity: 0.3; }
    60%  { opacity: 1; }
    100% { opacity: 1; }
}

.widget-bezel {
    background: linear-gradient(0deg, var(--faded-copper) 0%, var(--warm-parchment) 50%, var(--faded-copper) 100%);
    margin: -14px -14px 12px;
    padding: 4px 10px;
    border-bottom: 1px solid rgba(199, 91, 18, 0.5);
}

.widget-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    color: var(--espresso-black);
    text-transform: uppercase;
}

.widget-readout {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--deep-ember);
    letter-spacing: 0.08em;
    margin-top: 8px;
    text-align: center;
}

/* Clock widget */
.widget-clock .clock-ring {
    width: 100%;
    aspect-ratio: 1;
    max-width: 180px;
    margin: 6px auto 0;
    border-radius: 50%;
    background:
        conic-gradient(
            var(--deep-ember) 0deg, var(--pale-amber) 45deg,
            var(--deep-ember) 90deg, var(--pale-amber) 135deg,
            var(--deep-ember) 180deg, var(--pale-amber) 225deg,
            var(--deep-ember) 270deg, var(--pale-amber) 315deg,
            var(--deep-ember) 360deg
        );
    padding: 6px;
    position: relative;
    box-shadow: 0 0 12px rgba(232, 113, 10, 0.25);
}

.clock-face {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--espresso-black) 0%, var(--gap-black) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(199, 91, 18, 0.4);
}

.clock-time {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 500;
    color: var(--core-orange);
    letter-spacing: 0.05em;
    text-shadow: 0 0 8px rgba(232, 113, 10, 0.5);
}

.clock-date {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--faded-copper);
    letter-spacing: 0.15em;
    margin-top: 4px;
    text-transform: uppercase;
}

/* Signal strength widget */
.signal-rings {
    position: relative;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.signal-rings .ring {
    position: absolute;
    border: 1px solid var(--core-orange);
    border-radius: 50%;
    opacity: 0;
    animation: signal-pulse 2.4s ease-out infinite;
}

.signal-rings .r1 { width: 16px; height: 16px; animation-delay: 0s; }
.signal-rings .r2 { width: 32px; height: 32px; animation-delay: 0.4s; }
.signal-rings .r3 { width: 52px; height: 52px; animation-delay: 0.8s; }
.signal-rings .r4 { width: 72px; height: 72px; animation-delay: 1.2s; }

.ring-core {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pale-amber);
    box-shadow: 0 0 10px var(--core-orange);
}

@keyframes signal-pulse {
    0%   { opacity: 0.7; transform: scale(0.6); }
    100% { opacity: 0; transform: scale(1.3); }
}

/* Fog meter */
.fog-meter {
    position: relative;
    height: 18px;
    border-radius: 8px;
    background: var(--gap-black);
    border: 1px solid var(--faded-copper);
    overflow: hidden;
    margin: 4px 0;
}

.fog-meter-fill {
    position: absolute;
    inset: 2px 2px 2px 2px;
    width: calc(8% - 4px);
    background: linear-gradient(90deg, var(--deep-ember), var(--core-orange), var(--pale-amber));
    border-radius: 6px;
    box-shadow: 0 0 8px rgba(232, 113, 10, 0.6);
    transition: width 0.4s ease;
}

.fog-meter-ticks {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    pointer-events: none;
}

.fog-meter-ticks span {
    width: 1px;
    height: 8px;
    background: rgba(184, 160, 138, 0.4);
}

/* Y2K buttons */
.y2k-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.y2k-btn {
    flex: 1;
    min-width: 0;
    padding: 8px 4px;
    border: 1px solid var(--faded-copper);
    border-radius: 10px;
    background: linear-gradient(180deg, var(--pale-amber) 0%, var(--core-orange) 50%, var(--deep-ember) 100%);
    color: var(--espresso-black);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.4);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.y2k-btn:hover {
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3),
        0 4px 8px rgba(232, 113, 10, 0.4);
}

.y2k-btn:active {
    transform: translateY(1px);
    box-shadow:
        inset 0 1px 4px rgba(0, 0, 0, 0.4),
        0 0 0 transparent;
}

/* Status list */
.status-list {
    list-style: none;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--warm-parchment);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.9;
}

.status-list li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: dot-pulse 2.4s ease-in-out infinite;
}

.dot-green  { background: #8a9a3d; box-shadow: 0 0 6px #8a9a3d; }
.dot-orange { background: var(--core-orange); box-shadow: 0 0 6px var(--core-orange); }
.dot-amber  { background: var(--pale-amber); box-shadow: 0 0 6px var(--pale-amber); }

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

/* =============================================================
   HERO PANEL
   ============================================================= */
.hero-panel {
    position: relative;
    background:
        radial-gradient(ellipse 700px 400px at 50% 20%, rgba(232, 113, 10, 0.12), transparent 60%),
        radial-gradient(ellipse 600px 300px at 50% 80%, rgba(199, 91, 18, 0.1), transparent 60%),
        linear-gradient(180deg, var(--espresso-black) 0%, var(--dark-umber) 100%);
    border: 2px solid var(--deep-ember);
    border-radius: 20px;
    padding: 56px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    overflow: hidden;
    box-shadow:
        inset 0 0 60px rgba(199, 91, 18, 0.06),
        inset 0 1px 0 rgba(240, 168, 72, 0.1);
    z-index: 2;
    min-height: calc(100vh - 64px);
}

.hero-noise {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='1'/></svg>");
    pointer-events: none;
    mix-blend-mode: overlay;
}

.hero-glow {
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(80px);
}

.hero-glow-1 {
    top: -20%;
    left: 30%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(232, 113, 10, 0.18), transparent 60%);
    animation: glow-drift-1 18s ease-in-out infinite alternate;
}

.hero-glow-2 {
    bottom: -10%;
    right: 10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(240, 168, 72, 0.12), transparent 60%);
    animation: glow-drift-2 24s ease-in-out infinite alternate;
}

@keyframes glow-drift-1 {
    from { transform: translate(0, 0); }
    to   { transform: translate(80px, -40px); }
}

@keyframes glow-drift-2 {
    from { transform: translate(0, 0); }
    to   { transform: translate(-100px, 60px); }
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
    z-index: 2;
}

.meta-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--pale-amber);
    text-transform: uppercase;
    padding: 5px 10px;
    border: 1px solid var(--deep-ember);
    border-radius: 999px;
    background: rgba(13, 7, 4, 0.7);
}

.rotated-2  { transform: rotate(2deg); }
.rotated-1  { transform: rotate(1.5deg); }
.rotated-3  { transform: rotate(3deg); }
.rotated-neg-2 { transform: rotate(-2deg); }
.rotated-neg-3 { transform: rotate(-3deg); }

.hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(56px, 9vw, 112px);
    line-height: 1.05;
    letter-spacing: 0.02em;
    color: var(--core-orange);
    text-shadow:
        0 0 40px rgba(232, 113, 10, 0.4),
        0 0 80px rgba(240, 168, 72, 0.2);
    z-index: 2;
    display: inline-block;
    margin-bottom: 24px;
}

.hero-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(8px);
    animation: letter-in 600ms var(--ease-spring) forwards;
    animation-delay: calc(800ms + var(--i) * 50ms);
}

.hero-letter.hero-dot { color: var(--pale-amber); }

@keyframes letter-in {
    from {
        opacity: 0;
        transform: translateY(8px);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.hero-tagline {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(16px, 1.6vw, 20px);
    color: var(--warm-parchment);
    max-width: 580px;
    line-height: 1.65;
    margin-bottom: 36px;
    z-index: 2;
    opacity: 0;
    animation: fade-up 800ms ease-out 1800ms forwards;
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 2;
    opacity: 0;
    animation: fade-up 800ms ease-out 2200ms forwards;
}

.cursor-pulse {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cursor-pulse span {
    width: 10px;
    height: 10px;
    background: var(--core-orange);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--core-orange);
    animation: cursor-blink 1.2s steps(2, end) infinite;
}

@keyframes cursor-blink {
    0%, 50% { opacity: 1; transform: scale(1); }
    51%, 100% { opacity: 0.2; transform: scale(0.7); }
}

.hero-prompt {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.2em;
    color: var(--pale-amber);
    text-transform: uppercase;
}

/* Hero sidecar */
.hero-sidecar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
}

.sidecar-panel {
    background: linear-gradient(180deg, var(--dark-umber) 0%, #221208 100%);
    border: 2px solid var(--deep-ember);
    border-radius: 16px;
    padding: 20px;
    box-shadow:
        inset 0 0 20px rgba(199, 91, 18, 0.08),
        0 4px 14px rgba(0, 0, 0, 0.4);
    flex: 1;
}

.sidecar-panel-tall {
    flex: 1.2;
}

.chrome-strip {
    height: 6px;
    background: linear-gradient(0deg, var(--faded-copper) 0%, var(--warm-parchment) 50%, var(--faded-copper) 100%);
    margin: -20px -20px 14px;
    border-radius: 14px 14px 0 0;
}

.sidecar-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    color: var(--deep-ember);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.sidecar-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 22px;
    color: var(--core-orange);
    line-height: 1.1;
    letter-spacing: 0.02em;
    margin-bottom: 12px;
}

.sidecar-body {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--warm-parchment);
    line-height: 1.6;
    margin-bottom: 16px;
}

.sidecar-footer {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: auto;
}

.kbd {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--pale-amber);
    background: var(--gap-black);
    border: 1px solid var(--faded-copper);
    padding: 3px 7px;
    border-radius: 6px;
}

.meta-mono {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.16em;
    color: var(--faded-copper);
    text-transform: uppercase;
}

/* Node grid */
.node-grid {
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    gap: 3px;
    margin: 12px 0;
}

.node-grid .node {
    aspect-ratio: 1;
    background: var(--deep-ember);
    border-radius: 2px;
    opacity: 0.8;
    animation: node-pulse 3s ease-in-out infinite;
}

.node-grid .node.hot {
    background: var(--pale-amber);
    box-shadow: 0 0 4px var(--core-orange);
}

@keyframes node-pulse {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 1; }
}

/* =============================================================
   TICKER STRIPS
   ============================================================= */
.ticker-strip {
    position: relative;
    background: var(--gap-black);
    border-top: 1px solid var(--faded-copper);
    border-bottom: 1px solid var(--faded-copper);
    overflow: hidden;
    height: 40px;
    z-index: 1;
}

.ticker-strip::before,
.ticker-strip::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 2;
    pointer-events: none;
}

.ticker-strip::before {
    left: 0;
    background: linear-gradient(90deg, var(--gap-black), transparent);
}

.ticker-strip::after {
    right: 0;
    background: linear-gradient(-90deg, var(--gap-black), transparent);
}

.ticker-track {
    display: inline-flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    animation: ticker-scroll 60s linear infinite;
    gap: 18px;
    padding: 0 24px;
}

.ticker-reverse .ticker-track {
    animation-direction: reverse;
}

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

.ticker-item {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--core-orange);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-shadow: 0 0 6px rgba(232, 113, 10, 0.4);
}

.ticker-sep {
    font-family: var(--font-mono);
    color: var(--faded-copper);
    font-size: 12px;
}

/* =============================================================
   SCENE 2: Dashboard reveal
   ============================================================= */
.scene-dashboard {
    padding: 80px 32px;
    position: relative;
}

.scene-header {
    max-width: 720px;
    margin: 0 auto 48px;
    text-align: center;
    z-index: 2;
    position: relative;
}

.scene-index {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    color: var(--deep-ember);
    text-transform: uppercase;
}

.scene-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(40px, 6vw, 72px);
    color: var(--core-orange);
    line-height: 1.05;
    letter-spacing: 0.02em;
    margin: 12px 0 16px;
    text-shadow: 0 0 30px rgba(232, 113, 10, 0.3);
}

.scene-deck {
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--warm-parchment);
    max-width: 560px;
    margin: 0 auto;
}

/* Card grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 8px;
    max-width: 1280px;
    margin: 0 auto;
    z-index: 2;
    position: relative;
}

.card {
    background: linear-gradient(180deg, var(--dark-umber) 0%, #221208 100%);
    border: 2px solid var(--deep-ember);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 0 0 20px rgba(199, 91, 18, 0.08),
        inset 0 1px 0 rgba(240, 168, 72, 0.1),
        0 6px 20px rgba(0, 0, 0, 0.4);
}

.card.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition:
        transform 600ms var(--ease-spring),
        opacity 600ms ease-out;
    will-change: transform, opacity;
}

.card.reveal.in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Card sizing */
.card-feature   { grid-column: span 7; min-height: 280px; }
.card-narrow    { grid-column: span 5; }
.card-tutorial  { grid-column: span 6; }
.card-diagram   { grid-column: span 6; }
.card-readout   { grid-column: span 5; }
.card-mini      { grid-column: span 4; }
.card-glossary  { grid-column: span 12; }

.card-narrow.rotated-1 { transform: rotate(1.2deg); }
.card-readout.rotated-neg-2 { transform: rotate(-1.5deg); }
.card-mini.rotated-3 { transform: rotate(2deg); }

.card-noise {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    pointer-events: none;
    mix-blend-mode: overlay;
}

.card-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--deep-ember);
    text-transform: uppercase;
    margin-bottom: 14px;
    display: inline-block;
    padding: 3px 8px;
    border: 1px solid var(--faded-copper);
    border-radius: 999px;
    background: rgba(13, 7, 4, 0.6);
}

.card-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 28px;
    color: var(--core-orange);
    line-height: 1.1;
    letter-spacing: 0.02em;
    margin-bottom: 14px;
}

.card-subtitle {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 22px;
    color: var(--core-orange);
    line-height: 1.1;
    margin-bottom: 14px;
}

.card-body {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--warm-parchment);
    line-height: 1.65;
    margin-bottom: 12px;
}

.card-body-muted {
    color: var(--fog-gray);
    font-style: italic;
}

.card-blockquote {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 19px;
    color: var(--pale-amber);
    line-height: 1.4;
    letter-spacing: 0.01em;
    border-left: 2px solid var(--core-orange);
    padding-left: 14px;
    margin: 6px 0 12px;
}

.card-attribution {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    color: var(--faded-copper);
    text-transform: uppercase;
}

.card-stat {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--faded-copper);
}

.stat-value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 44px;
    color: var(--pale-amber);
    line-height: 1;
}

.stat-unit {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--core-orange);
    letter-spacing: 0.08em;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--fog-gray);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-left: auto;
}

/* Tutorial steps */
.tutorial-steps {
    list-style: none;
    counter-reset: step;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tutorial-steps li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(199, 91, 18, 0.3);
}

.tutorial-steps li:last-child {
    border-bottom: none;
}

.step-num {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
    color: var(--pale-amber);
    background: var(--gap-black);
    border: 1px solid var(--core-orange);
    border-radius: 8px;
    padding: 6px 10px;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(232, 113, 10, 0.2);
}

.step-body {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--warm-parchment);
    line-height: 1.55;
}

/* Layer diagram */
.layer-diagram {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.layer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-radius: 12px;
    font-family: var(--font-mono);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 12px;
    border: 1px solid var(--deep-ember);
    transition: transform 0.3s ease;
}

.layer:hover {
    transform: translateX(4px);
}

.layer-cloud {
    background: linear-gradient(90deg, rgba(232, 221, 208, 0.1), rgba(184, 160, 138, 0.05));
    color: var(--haze-white);
}

.layer-fog {
    background: linear-gradient(90deg, rgba(240, 168, 72, 0.12), rgba(232, 113, 10, 0.06));
    color: var(--pale-amber);
}

.layer-edge {
    background: linear-gradient(90deg, rgba(232, 113, 10, 0.15), rgba(199, 91, 18, 0.08));
    color: var(--core-orange);
}

.layer-device {
    background: linear-gradient(90deg, rgba(199, 91, 18, 0.18), rgba(45, 22, 8, 0.4));
    color: var(--deep-ember);
    border-color: var(--core-orange);
}

.layer-name {
    font-weight: 500;
}

.layer-depth {
    color: var(--fog-gray);
    font-size: 11px;
}

/* Readout / terminal */
.readout-pre {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--core-orange);
    background: var(--gap-black);
    border: 1px solid var(--deep-ember);
    border-radius: 10px;
    padding: 16px;
    line-height: 1.55;
    letter-spacing: 0.04em;
    white-space: pre-wrap;
    box-shadow: inset 0 0 20px rgba(232, 113, 10, 0.1);
    text-shadow: 0 0 4px rgba(232, 113, 10, 0.4);
}

/* Mini metric cards */
.mini-metric {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    margin-top: 10px;
}

.metric-num {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 56px;
    color: var(--pale-amber);
    line-height: 1;
    letter-spacing: 0.02em;
    text-shadow: 0 0 24px rgba(240, 168, 72, 0.3);
}

.metric-num small {
    font-size: 24px;
    color: var(--core-orange);
}

.metric-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--fog-gray);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

/* Glossary */
.glossary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 32px;
    margin-top: 6px;
}

.glossary-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed rgba(199, 91, 18, 0.25);
}

.glossary dt {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    color: var(--pale-amber);
    letter-spacing: 0.02em;
}

.glossary dd {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--warm-parchment);
    line-height: 1.55;
}

/* =============================================================
   SCENE 3: Deep fog zone
   ============================================================= */
.scene-deep-fog {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 80px 32px;
    background:
        radial-gradient(ellipse 1000px 600px at 50% 50%, rgba(199, 91, 18, 0.1), transparent 70%),
        linear-gradient(180deg, var(--dark-umber) 0%, var(--gap-black) 100%);
    overflow: hidden;
}

.deep-fog-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(232, 113, 10, 0.18) 0%, transparent 60%);
    transform: translate(-50%, -50%);
    filter: blur(60px);
    animation: glow-breathe 8s ease-in-out infinite;
}

@keyframes glow-breathe {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50%      { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

.deep-fog-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.deep-fog-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 720px;
}

.deep-fog-content.reveal {
    opacity: 0;
    transform: scale(0.95);
    transition:
        transform 800ms var(--ease-spring),
        opacity 800ms ease-out;
}

.deep-fog-content.reveal.in-view {
    opacity: 1;
    transform: scale(1);
}

.deep-fog-tag {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.3em;
    color: var(--deep-ember);
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 32px;
    padding: 6px 16px;
    border: 1px solid var(--faded-copper);
    border-radius: 999px;
    background: rgba(13, 7, 4, 0.7);
}

.deep-fog-statement {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(28px, 4vw, 44px);
    color: var(--core-orange);
    line-height: 1.4;
    letter-spacing: 0.02em;
    text-shadow:
        0 0 40px rgba(232, 113, 10, 0.4),
        0 0 80px rgba(240, 168, 72, 0.2);
}

.deep-fog-signature {
    margin-top: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.sig-line {
    height: 1px;
    flex: 1;
    max-width: 80px;
    background: linear-gradient(90deg, transparent, var(--faded-copper), transparent);
}

.sig-text {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.2em;
    color: var(--fog-gray);
    text-transform: uppercase;
}

/* =============================================================
   FOOTER
   ============================================================= */
.dashboard-footer {
    background: var(--gap-black);
    border-top: 1px solid var(--faded-copper);
    padding: 20px 32px;
    z-index: 2;
}

.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 1280px;
    margin: 0 auto;
}

.footer-mono {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--core-orange);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.footer-dim {
    color: var(--faded-copper);
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1279px) {
    .scene-boot {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .status-panel {
        flex-direction: row;
        flex-wrap: wrap;
        order: -1;
    }

    .status-panel .widget {
        flex: 1;
        min-width: 200px;
    }

    .widget-clock .clock-ring {
        max-width: 140px;
    }

    .hero-sidecar {
        flex-direction: row;
    }

    .hero-sidecar .sidecar-panel {
        flex: 1;
    }
}

@media (max-width: 900px) {
    .card-feature   { grid-column: span 12; }
    .card-narrow    { grid-column: span 12; }
    .card-tutorial  { grid-column: span 12; }
    .card-diagram   { grid-column: span 12; }
    .card-readout   { grid-column: span 12; }
    .card-mini      { grid-column: span 4; }
    .card-glossary  { grid-column: span 12; }

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

@media (max-width: 768px) {
    .scene {
        padding: 24px 16px;
    }

    .scene-boot {
        gap: 16px;
        padding: 24px 16px;
    }

    .hero-panel {
        padding: 36px 24px;
        min-height: auto;
    }

    .hero-sidecar {
        flex-direction: column;
    }

    .status-panel {
        flex-direction: column;
    }

    .card-mini { grid-column: span 12; }

    .card-feature, .card-narrow, .card-tutorial,
    .card-diagram, .card-readout, .card-mini {
        transform: none !important;
    }

    .footer-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .scene-dashboard {
        padding: 48px 16px;
    }
}
