/* ============================================
   multipledger.com - Submerged Financial Manifesto
   ============================================ */
:root {
    --abyss-black: #071A0F;
    --deep-forest: #0A1F12;
    --dark-canopy: #0F3D22;
    --forest-core: #1A4D2E;
    --moss: #2D5A3D;
    --living-green: #4CAF50;
    --sage-text: #A5D6A7;
    --pale-mint: #C8E6C9;
    --mint-white: #E8F5E9;
    --crt-phosphor: #39FF14;
    --bubble-highlight: #69F0AE;
    --bioluminescent: #00E676;
    --spring-enter: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --spring-exit: cubic-bezier(0.6, -0.28, 0.735, 0.045);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; }
body {
    background: var(--abyss-black);
    color: var(--sage-text);
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.75;
    overflow-x: hidden;
}

/* --- CRT Scanlines --- */
.scanlines {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15) 0px,
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 3px
    );
}

/* --- Bubble Layer --- */
.bubble-layer {
    position: fixed;
    inset: 0;
    z-index: 9997;
    pointer-events: none;
    overflow: hidden;
}
.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.15), transparent 70%);
    border: 1px solid rgba(105, 240, 174, 0.25);
    box-shadow: 0 0 12px rgba(0, 230, 118, 0.1);
    animation: bubbleRise linear forwards;
    pointer-events: none;
}
@keyframes bubbleRise {
    0% { transform: translateX(0) translateY(0); opacity: var(--b-opacity, 0.08); }
    25% { transform: translateX(var(--b-wobble, 20px)) translateY(-25vh); }
    50% { transform: translateX(calc(var(--b-wobble, 20px) * -1)) translateY(-50vh); }
    75% { transform: translateX(var(--b-wobble, 20px)) translateY(-75vh); }
    100% { transform: translateX(0) translateY(-110vh); opacity: 0; }
}

/* --- Depth Indicator --- */
.depth-indicator {
    position: fixed;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}
.depth-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: var(--crt-phosphor);
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.4);
    writing-mode: vertical-rl;
    text-orientation: mixed;
}
.depth-value {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--crt-phosphor);
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.4);
}

/* --- Section Base --- */
.section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}
.transit-zone {
    height: 30vh;
    background: var(--abyss-black);
    position: relative;
}

/* --- Glass Panels --- */
.glass-panel {
    background: rgba(15, 61, 34, 0.4);
    backdrop-filter: blur(12px) saturate(0.8) brightness(0.7);
    -webkit-backdrop-filter: blur(12px) saturate(0.8) brightness(0.7);
    border: 1px solid rgba(105, 240, 174, 0.12);
    border-radius: 4px;
    padding: clamp(1.5rem, 3vw, 3rem);
    opacity: 0;
    transform: scale(0.92) translateY(20px);
    transition: opacity 1s ease, transform 1s var(--spring-enter);
}
.glass-panel.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* --- Typography --- */
.hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
    font-size: clamp(3.5rem, 10vw, 9rem);
    letter-spacing: 0.08em;
    line-height: 1;
    color: var(--pale-mint);
    text-align: center;
}
.section-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4.5rem);
    letter-spacing: 0.04em;
    line-height: 1.15;
    color: var(--pale-mint);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}
.body-text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.75;
    color: var(--sage-text);
    margin-bottom: 1.2rem;
}
.emphasis {
    color: var(--mint-white);
    font-weight: 600;
}
.panel-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.75rem, 1.2vw, 0.95rem);
    letter-spacing: 0.15em;
    color: var(--crt-phosphor);
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.4);
    display: block;
    margin-bottom: 0.5rem;
}

/* --- Bioluminescent Glow --- */
.bioluminescent {
    animation: bioGlow 6s ease-in-out infinite;
}
@keyframes bioGlow {
    0%, 100% { box-shadow: 0 0 60px 20px rgba(0, 230, 118, 0.03); }
    50% { box-shadow: 0 0 60px 20px rgba(0, 230, 118, 0.08); }
}

/* ============================
   SECTION 1: SURFACE
   ============================ */
.section-surface {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--moss) 0%, var(--deep-forest) 45%, var(--abyss-black) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}
.water-surface {
    position: absolute;
    top: 45%;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(232, 245, 233, 0.15) 20%,
        rgba(232, 245, 233, 0.3) 50%,
        rgba(232, 245, 233, 0.15) 80%,
        transparent 100%
    );
    z-index: 5;
    animation: waterShimmer 4s ease-in-out infinite;
}
@keyframes waterShimmer {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}
.hero-above {
    position: relative;
    z-index: 4;
    margin-bottom: 0;
    clip-path: inset(0 0 55% 0);
}
.hero-below {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    clip-path: inset(48% 0 0 0);
}
.hero-title--refracted {
    opacity: 0.5;
    filter: blur(1px);
    transform: scaleX(1.05) scaleY(0.97);
    animation: refract 4s ease-in-out infinite;
}
@keyframes refract {
    0%, 100% { transform: scaleX(1.05) scaleY(0.97) translateX(0); }
    50% { transform: scaleX(1.05) scaleY(0.97) translateX(2px); }
}
.hero-sub {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: clamp(1rem, 2vw, 1.5rem);
    letter-spacing: 0.25em;
    color: var(--crt-phosphor);
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.4);
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
}

/* ============================
   SECTION 2: DESCENT
   ============================ */
.section-descent {
    background: var(--deep-forest);
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: clamp(2rem, 4vw, 4rem);
}
.descent-split {
    display: flex;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}
.descent-terminal {
    flex: 0 0 30%;
}
.terminal-block {
    background: var(--abyss-black);
    border: 1px solid rgba(57, 255, 20, 0.2);
    border-radius: 2px;
    padding: 1.5rem;
}
.terminal-line {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.75rem, 1vw, 0.85rem);
    letter-spacing: 0.05em;
    color: var(--crt-phosphor);
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.4);
    display: block;
    line-height: 2;
}
.descent-manifesto {
    flex: 1;
}

/* ============================
   SECTION 3: PRESSURE CHAMBER
   ============================ */
.section-chamber {
    background: var(--abyss-black);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 4vw, 4rem);
}
.chamber-porthole {
    position: relative;
    width: 80%;
    max-width: 900px;
    min-height: 500px;
    border: 1px solid rgba(105, 240, 174, 0.08);
    border-radius: 8px;
    overflow: hidden;
    padding: clamp(2rem, 4vw, 4rem);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    justify-content: center;
}
.circuit-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    animation: circuitDrift 60s linear infinite;
}
@keyframes circuitDrift {
    from { transform: translateX(0); }
    to { transform: translateX(-100px); }
}
.circuit-svg {
    width: calc(100% + 100px);
    height: 100%;
}
.glass-panel--deep {
    position: relative;
    z-index: 2;
}
.glass-panel--mid {
    position: relative;
    z-index: 1;
    opacity: 0.8;
}

/* ============================
   SECTION 4: ABYSS
   ============================ */
.section-abyss {
    background: var(--abyss-black);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(3rem, 6vw, 6rem);
}
.abyss-column {
    max-width: 540px;
    text-align: center;
}
.section-heading--abyss {
    font-size: clamp(1.5rem, 3vw, 3rem);
}

/* ============================
   SECTION 5: CORE (NETWORK)
   ============================ */
.section-core {
    background: var(--abyss-black);
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
}
.network-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}
.core-sidebar {
    position: relative;
    z-index: 2;
    max-width: 380px;
    margin-left: 5%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s var(--spring-enter);
}
.core-sidebar.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================
   SECTION 6: RESURFACE
   ============================ */
.section-resurface {
    min-height: 80vh;
    background: linear-gradient(180deg, var(--abyss-black) 0%, var(--deep-forest) 50%, var(--moss) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(2rem, 4vw, 4rem);
}
.resurface-content {
    max-width: 700px;
}
.hero-title--resurface {
    font-size: clamp(2rem, 6vw, 5rem);
    margin-bottom: 2rem;
    opacity: 0.7;
    filter: blur(0.5px);
}
.resurface-signal {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 300;
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    color: var(--mint-white);
    margin-bottom: 2rem;
    line-height: 1.6;
}
.terminal-glow {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--crt-phosphor);
    text-shadow: 0 0 12px rgba(57, 255, 20, 0.5);
    display: block;
    margin-top: 2rem;
    animation: terminalPulse 3s ease-in-out infinite;
}
@keyframes terminalPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* --- Reveal System --- */
[data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s var(--spring-enter);
}
[data-reveal].visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 768px) {
    .descent-split {
        flex-direction: column;
        gap: 1.5rem;
    }
    .descent-terminal { flex: none; }
    .chamber-porthole { width: 95%; }
    .core-sidebar {
        margin: 0 auto;
        padding: 0 5vw;
        max-width: 90%;
    }
    .glass-panel {
        backdrop-filter: blur(6px) saturate(0.8) brightness(0.7);
        -webkit-backdrop-filter: blur(6px) saturate(0.8) brightness(0.7);
    }
    .depth-indicator { display: none; }
}
