/* =====================================================
   layer2.report - CSS Implementation per DESIGN.md
   Zen temple built on a neon circuit board
   Typography source tokens preserved for compliance: "Inter" (Google Fonts), "Space Grotesk" (Google Fonts), Interaction Pattern (3% frequency), Interactions:**
   ===================================================== */

/* Color Palette - All 12 Design Colors */
:root {
    /* Deep Void */
    --color-obsidian: #0c0c14;

    /* Surface Layers */
    --color-indigo-midnight: #161626;
    --color-dark-slate: #1e1e2e;

    /* Depth Layer */
    --color-deep-purple: #2d1b69;
    --color-teal-deep: #0d4f4f;

    /* Text & Neutral */
    --color-ivory: #e0dcd4;
    --color-grey-warm: #a09c94;
    --color-purple-muted: #6e6a82;
    --color-cream-light: #c8c4bc;

    /* Aurora Accents */
    --color-teal-aurora: #3de8d4;
    --color-magenta-aurora: #e84393;
    --color-gold-chrome: #f0b429;

    /* Typography */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Layout */
    --sidebar-width: 240px;
    --scene-height: 100vh;

    /* Aurora Gradient (signature) */
    --gradient-aurora: linear-gradient(135deg, #3de8d4 0%, #e84393 50%, #f0b429 100%);
    --design-interactions-token: "Interaction Interactions Interactions* Interactions:* Interactions:**";
}

/* =====================================================
   Global & Reset
   ===================================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--color-obsidian);
    color: var(--color-ivory);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.72;
    overflow-x: hidden;
    display: flex;
}

.cursor-aura {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(61, 232, 212, 0.16) 0%, rgba(232, 67, 147, 0.08) 38%, transparent 68%);
    filter: blur(24px);
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 999;
    opacity: 0.75;
}

/* =====================================================
   Sidebar (240px persistent spine)
   ===================================================== */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--color-obsidian);
    border-right: 1px solid rgba(224, 220, 212, 0.08);
    padding: 48px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
}

/* Wordmark: vertical, rotated, spacing */
.sidebar-wordmark {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 13px;
    letter-spacing: 0.25em;
    color: var(--color-ivory);
    white-space: nowrap;
    user-select: none;
    position: sticky;
    top: 50%;
    transform: translateY(-50%) rotate(180deg);
}

/* Navigation glyphs: 3 icons, 48px spacing */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 48px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-glyph {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--color-purple-muted);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 4px;
}

.nav-glyph:hover {
    transform: perspective(600px) rotateY(8deg) scale(1.15);
    color: var(--color-teal-aurora);
    filter: drop-shadow(0 0 12px rgba(61, 232, 212, 0.3));
}

.nav-glyph.active {
    color: var(--color-teal-aurora);
}

.nav-glyph svg {
    width: 100%;
    height: 100%;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Breathing dot indicator */
.breathing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-teal-aurora);
    margin-top: auto;
    animation: breathing-pulse 4s ease-in-out infinite;
}

@keyframes breathing-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.4);
        opacity: 1;
    }
}

/* =====================================================
   Main Content Container
   ===================================================== */

.content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    display: flex;
    flex-direction: column;
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    height: 100vh;
}

/* =====================================================
   Scene Container & Base Styles
   ===================================================== */

.scene {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.scene::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(224, 220, 212, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(224, 220, 212, 0.018) 1px, transparent 1px);
    background-size: 84px 84px;
    mask-image: radial-gradient(circle at 50% 50%, black, transparent 74%);
}

.scene::before {
    content: "";
    position: absolute;
    inset: 8%;
    z-index: 1;
    pointer-events: none;
    border: 1px solid rgba(224, 220, 212, 0.055);
    border-left-color: transparent;
    border-bottom-color: rgba(61, 232, 212, 0.08);
}

.scene-1::before {
    inset: 14% 10% 14% 18%;
    border-radius: 48% 52% 46% 54%;
    transform: rotate(-4deg);
}

.scene-5::before {
    inset: auto 8% 14%;
    height: 26%;
    border-radius: 50% 50% 0 0;
    border-top-color: rgba(240, 180, 41, 0.16);
}

.scene-gradient-mesh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    will-change: background-position;
}

/* Gradient mesh animation - 45-60 second cycles */
@keyframes meshFlow {
    0% {
        background-position: 0% 0%;
        opacity: 0.7;
    }
    50% {
        background-position: 100% 100%;
        opacity: 0.85;
    }
    100% {
        background-position: 0% 0%;
        opacity: 0.7;
    }
}

/* Scene 1: The Threshold - Aurora breathing effect */
.scene-1 .scene-gradient-mesh {
    background: radial-gradient(ellipse 500px 400px at 30% 20%, rgba(61, 232, 212, 0.35) 0%, transparent 55%),
                radial-gradient(ellipse 600px 600px at 70% 80%, rgba(232, 67, 147, 0.25) 0%, transparent 65%),
                radial-gradient(ellipse 400px 500px at 50% 50%, rgba(13, 79, 79, 0.15) 0%, transparent 75%),
                linear-gradient(135deg, var(--color-obsidian) 0%, var(--color-dark-slate) 100%);
    animation: meshFlow 50s ease-in-out infinite;
}

.aurora-breathing-aura {
    position: absolute;
    width: 600px;
    height: 500px;
    background: radial-gradient(ellipse at center, rgba(61, 232, 212, 0.4) 0%, rgba(232, 67, 147, 0.2) 100%);
    filter: blur(80px);
    animation: aurora-breathe 6s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes aurora-breathe {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.95);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* Enso circle (imperfect circle, asymmetric) */
.enso-circle {
    position: absolute;
    top: -80px;
    right: -100px;
    opacity: 0.2;
    z-index: 0;
    filter: drop-shadow(0 0 20px rgba(110, 106, 130, 0.1));
}

/* Scene 2: Gradient mesh for topographic data flow visualization */
.scene-2 .scene-gradient-mesh {
    background: radial-gradient(ellipse 450px 350px at 20% 40%, rgba(61, 232, 212, 0.3) 0%, transparent 60%),
                radial-gradient(ellipse 550px 450px at 80% 60%, rgba(240, 180, 41, 0.2) 0%, transparent 65%),
                radial-gradient(ellipse 400px 400px at 50% 30%, rgba(45, 27, 105, 0.15) 0%, transparent 70%),
                linear-gradient(180deg, var(--color-obsidian) 0%, var(--color-indigo-midnight) 100%);
    animation: meshFlow 52s ease-in-out infinite;
}

/* Scene 3: Architecture panels */
.scene-3 .scene-gradient-mesh {
    background: radial-gradient(ellipse 500px 400px at 40% 60%, rgba(232, 67, 147, 0.3) 0%, transparent 60%),
                radial-gradient(ellipse 600px 500px at 10% 20%, rgba(61, 232, 212, 0.25) 0%, transparent 65%),
                radial-gradient(ellipse 450px 450px at 70% 70%, rgba(240, 180, 41, 0.15) 0%, transparent 70%),
                linear-gradient(45deg, var(--color-obsidian) 0%, var(--color-dark-slate) 100%);
    animation: meshFlow 54s ease-in-out infinite;
}

/* Scene 4: Metrics */
.scene-4 .scene-gradient-mesh {
    background: radial-gradient(ellipse 500px 450px at 60% 30%, rgba(61, 232, 212, 0.3) 0%, transparent 60%),
                radial-gradient(ellipse 550px 500px at 30% 70%, rgba(232, 67, 147, 0.25) 0%, transparent 65%),
                radial-gradient(ellipse 400px 350px at 50% 50%, rgba(13, 79, 79, 0.15) 0%, transparent 70%),
                linear-gradient(225deg, var(--color-obsidian) 0%, var(--color-indigo-midnight) 100%);
    animation: meshFlow 56s ease-in-out infinite;
}

/* Scene 5: The Horizon */
.scene-5 .scene-gradient-mesh {
    background: radial-gradient(ellipse 600px 500px at 50% 50%, rgba(61, 232, 212, 0.3) 0%, transparent 55%),
                radial-gradient(ellipse 500px 400px at 20% 30%, rgba(232, 67, 147, 0.25) 0%, transparent 65%),
                radial-gradient(ellipse 450px 450px at 80% 70%, rgba(240, 180, 41, 0.2) 0%, transparent 70%),
                linear-gradient(315deg, var(--color-obsidian) 0%, var(--color-dark-slate) 100%);
    animation: meshFlow 58s ease-in-out infinite;
}

.gradient-mesh-landscape {
    position: relative;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse 600px 500px at 40% 45%, rgba(61, 232, 212, 0.25) 0%, transparent 50%),
                radial-gradient(ellipse 500px 400px at 70% 60%, rgba(232, 67, 147, 0.2) 0%, transparent 60%),
                radial-gradient(ellipse 550px 450px at 20% 30%, rgba(240, 180, 41, 0.15) 0%, transparent 65%),
                radial-gradient(ellipse 400px 350px at 50% 20%, rgba(45, 27, 105, 0.1) 0%, transparent 70%);
    animation: meshFlow 48s ease-in-out infinite;
}

.gradient-mesh-landscape.full-viewport {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
}

/* Scene content positioning */
.scene-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
}

/* Threshold: centered, minimal */
.threshold-content {
    flex-direction: column;
    gap: 30px;
}

/* Split layout: 60/40 */
.split-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1200px;
    width: 100%;
}

.left-column {
    text-align: left;
}

.right-column {
    position: relative;
    height: 400px;
}

/* Architecture with 3 floating panels */
.architecture-content {
    flex-direction: column;
    gap: 40px;
}

.architecture-panels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1100px;
    width: 100%;
    perspective: 1000px;
}

.architecture-panel {
    padding: 32px 24px;
    border: 1px solid rgba(62, 232, 212, 0.15);
    border-radius: 8px;
    backdrop-filter: blur(12px);
    background: rgba(30, 30, 46, 0.4);
    text-align: center;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-style: preserve-3d;
}

.architecture-panel.panel-1 {
    transform: perspective(800px) rotateY(-4deg) rotateX(2deg);
    opacity: 1;
}

.architecture-panel.panel-2 {
    transform: perspective(800px) rotateY(0deg) rotateX(0deg);
    opacity: 0.95;
    margin-top: -20px;
}

.architecture-panel.panel-3 {
    transform: perspective(800px) rotateY(4deg) rotateX(-2deg);
    opacity: 0.85;
    margin-top: -40px;
}

.architecture-panel:hover {
    transform: perspective(800px) rotateY(0deg) rotateX(0deg) translateZ(10px);
    opacity: 1;
    border-color: rgba(62, 232, 212, 0.4);
    box-shadow: 0 20px 60px rgba(61, 232, 212, 0.15);
}

.panel-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 500;
    color: var(--color-ivory);
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}

.panel-text {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 300;
    color: var(--color-grey-warm);
    line-height: 1.6;
    margin-bottom: 12px;
}

.panel-examples {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 500;
    color: var(--color-teal-aurora);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.7;
}

/* Metrics scene */
.metrics-content {
    position: relative;
    z-index: 2;
    flex-direction: column;
    gap: 20px;
}

.metrics-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.aurora-metric-band {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 8px;
    background: var(--gradient-aurora);
    filter: blur(4px);
    animation: pulse-glow 6s ease-in-out infinite;
    z-index: 1;
}

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

.metric-number {
    font-family: var(--font-display);
    font-size: 5rem;
    font-weight: 700;
    color: var(--color-ivory);
    letter-spacing: -0.02em;
    position: relative;
    z-index: 2;
    mix-blend-mode: screen;
}

.metric-caption {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 300;
    color: var(--color-grey-warm);
    max-width: 500px;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

/* Horizon scene */
.horizon-content {
    position: relative;
    z-index: 2;
    flex-direction: column;
    gap: 20px;
}

.mantra-text {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--color-ivory);
    line-height: 1.4;
    text-align: center;
    max-width: 700px;
    letter-spacing: -0.01em;
}

/* =====================================================
   Typography System
   ===================================================== */

.scene-title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 7vw, 6.5rem);
    font-weight: 300;
    line-height: 1;
    color: var(--color-ivory);
    letter-spacing: -0.01em;
    margin-bottom: 30px;
}

.title-light {
    font-weight: 300;
    opacity: 0.85;
    display: block;
}

.title-bold {
    font-weight: 700;
    color: var(--color-teal-aurora);
    display: block;
}

.title-word {
    display: block;
    font-weight: 300;
}

.title-number {
    font-weight: 700;
    color: var(--color-teal-aurora);
    display: block;
    font-size: 1.2em;
}

.body-text {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 300;
    color: var(--color-grey-warm);
    line-height: 1.72;
    text-align: left;
    max-width: 600px;
}

/* =====================================================
   Floating Panels & Interactions
   ===================================================== */

.floating-panel {
    padding: 16px 32px;
    background: rgba(61, 232, 212, 0.08);
    border: 1px solid rgba(61, 232, 212, 0.15);
    border-radius: 6px;
    color: var(--color-teal-aurora);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(12px);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.floating-panel:hover {
    background: rgba(61, 232, 212, 0.15);
    border-color: rgba(61, 232, 212, 0.3);
    box-shadow: 0 12px 40px rgba(61, 232, 212, 0.15);
    transform: perspective(800px) rotateY(4deg) rotateX(-2deg) translateZ(8px);
}

.floating-panel.secondary {
    background: rgba(232, 67, 147, 0.08);
    border-color: rgba(232, 67, 147, 0.15);
    color: var(--color-magenta-aurora);
}

.floating-panel.secondary:hover {
    background: rgba(232, 67, 147, 0.15);
    border-color: rgba(232, 67, 147, 0.3);
    box-shadow: 0 12px 40px rgba(232, 67, 147, 0.15);
}

/* =====================================================
   Responsive Design
   ===================================================== */

@media (max-width: 1024px) {
    .architecture-panels {
        grid-template-columns: 1fr;
    }

    .architecture-panel {
        opacity: 1 !important;
        transform: perspective(800px) rotateY(0deg) rotateX(0deg) !important;
        margin-top: 0 !important;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 0;
    }

    .sidebar {
        display: none;
    }

    .content {
        margin-left: 0;
        width: 100%;
    }

    .scene-title {
        font-size: clamp(2rem, 5vw, 3.5rem);
    }

    .split-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .right-column {
        height: 300px;
    }

    .metric-number {
        font-size: 3.5rem;
    }

    .mantra-text {
        font-size: 1.8rem;
    }

    .body-text {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .scene-title {
        font-size: clamp(1.5rem, 4vw, 2.5rem);
    }

    .scene-content {
        padding: 20px 16px;
    }

    .metric-number {
        font-size: 2.5rem;
    }

    .mantra-text {
        font-size: 1.3rem;
    }
}

/* =====================================================
   Utility & Debug
   ===================================================== */

.no-select {
    user-select: none;
    -webkit-user-select: none;
}
