/* resar.one — Neon-lit reasoning salon */
/* Palette: Void Black #0a0a0f, Midnight Ink #0f0f1a, Porcelain White #f0eff4,
   Muted Lavender #8a8a9e, Electric Magenta #ff2d6f, Cyan Pulse #00e5ff,
   Solar Lime #b8ff3a, Deep Orchid #6b2fa0 */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #0a0a0f;
    color: #f0eff4;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    overflow: hidden;
}

/* ===================== REASONING THREAD ===================== */
#reasoning-thread {
    position: fixed;
    top: 0;
    left: calc(50% - 8%);
    width: 1px;
    height: 100vh;
    z-index: 10;
    pointer-events: none;
}

#thread-line {
    width: 1px;
    height: 0%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,229,255,0.3) 10%, rgba(0,229,255,0.3) 90%, transparent 100%);
    transition: height 0.8s ease-out;
}

#thread-line.revealed {
    height: 100%;
}

/* ===================== DOT NAVIGATION ===================== */
#dot-nav {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    opacity: 0;
    transition: opacity 0.6s ease;
}

#dot-nav.visible {
    opacity: 1;
}

.dot-nav-btn {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: none;
    background: #8a8a9e;
    cursor: pointer;
    position: relative;
    transition: width 0.2s ease, height 0.2s ease, background-color 0.2s ease;
    padding: 0;
}

.dot-nav-btn:hover {
    width: 10px;
    height: 10px;
}

.dot-nav-btn.active {
    width: 10px;
    height: 10px;
}

.dot-label {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8a8a9e;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.dot-nav-btn:hover .dot-label {
    opacity: 1;
}

/* ===================== SPREADS CONTAINER ===================== */
#spreads-container {
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

.spread {
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
}

.spread-content {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

/* ===================== LOGIC NODES ===================== */
.logic-node {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #00e5ff;
    position: absolute;
    left: calc(50% - 8% - 5px);
    z-index: 15;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.logic-node::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8a8a9e;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.logic-node:hover {
    transform: scale(1.5);
    box-shadow: 0 0 12px rgba(0,229,255,0.4);
}

.node-premise { top: 20%; }
.node-argument-top { top: 10%; }
.node-argument-bottom { bottom: 10%; }
.node-evidence-top { top: 15%; }
.node-evidence-bottom { bottom: 15%; }
.node-synthesis-top { top: 10%; }
.node-synthesis-bottom { bottom: 10%; }
.node-conclusion-top { top: 20%; }

/* ===================== SPREAD 1: PREMISE ===================== */
#spread-premise {
    background: #0a0a0f;
}

.hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #f0eff4;
    opacity: 0;
    transition: opacity 0.4s ease;
    text-align: center;
    line-height: 1;
    margin-left: -8%;
}

.hero-title.visible {
    opacity: 1;
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    line-height: 1.72;
    letter-spacing: 0.01em;
    color: #8a8a9e;
    max-width: 540px;
    text-align: center;
    margin-top: 24px;
    margin-left: -8%;
    opacity: 0;
    transition: opacity 0.4s ease 0.4s;
}

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

.section-divider {
    width: 4px;
    height: 20px;
    background: #ff2d6f;
    margin-top: 32px;
    margin-left: -8%;
    opacity: 0;
    transition: opacity 0.4s ease 0.6s;
}

.section-divider.visible {
    opacity: 1;
}

/* ===================== PREMISE BUBBLES ===================== */
.premise-bubble {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.bubble-1 {
    width: 180px;
    height: 180px;
    background: rgba(255,45,111,0.06);
    border: 1px solid rgba(255,45,111,0.2);
    top: 10%;
    right: 15%;
    animation: bubbleFloat1 30s ease-in-out infinite;
}

.bubble-2 {
    width: 120px;
    height: 120px;
    background: rgba(0,229,255,0.06);
    border: 1px solid rgba(0,229,255,0.2);
    bottom: 20%;
    left: 10%;
    animation: bubbleFloat2 25s ease-in-out infinite;
}

.bubble-3 {
    width: 80px;
    height: 80px;
    background: rgba(184,255,58,0.06);
    border: 1px solid rgba(184,255,58,0.15);
    top: 60%;
    right: 25%;
    animation: bubbleFloat3 35s ease-in-out infinite;
}

@keyframes bubbleFloat1 {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(-30px); opacity: 0.8; }
}

@keyframes bubbleFloat2 {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(25px); opacity: 0.7; }
}

@keyframes bubbleFloat3 {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.4; }
    33% { transform: translateY(-15px) translateX(10px); opacity: 0.6; }
    66% { transform: translateY(10px) translateX(-10px); opacity: 0.5; }
}

/* ===================== SPREAD 2: ARGUMENT ===================== */
#spread-argument {
    background: #0a0a0f;
}

.argument-panels {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 700px;
    margin-left: -8%;
}

.argument-panel {
    padding: 32px;
    position: relative;
    border: 1px solid transparent;
    transition: transform 0.2s ease-out, border-color 0.2s ease;
    cursor: default;
}

.argument-panel:hover {
    transform: translateY(-4px);
}

.panel-magenta {
    background: rgba(255,45,111,0.08);
    margin-left: 0;
}

.panel-magenta:hover {
    border-color: rgba(255,45,111,0.4);
}

.panel-lime {
    background: rgba(184,255,58,0.08);
    margin-left: 60px;
}

.panel-lime:hover {
    border-color: rgba(184,255,58,0.4);
}

.panel-cyan {
    background: rgba(0,229,255,0.08);
    margin-left: 120px;
}

.panel-cyan:hover {
    border-color: rgba(0,229,255,0.4);
}

.panel-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8a8a9e;
    display: block;
    margin-bottom: 8px;
}

.panel-title {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #f0eff4;
    margin-bottom: 12px;
}

.panel-text {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: clamp(0.85rem, 1vw, 1rem);
    line-height: 1.72;
    letter-spacing: 0.01em;
    color: #8a8a9e;
}

/* Stagger fade-in for argument panels */
.argument-panel {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.2s ease-out;
}

.argument-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.argument-panel.visible:hover {
    transform: translateY(-4px);
}

/* ===================== SPREAD 3: EVIDENCE ===================== */
#spread-evidence {
    background: #0a0a0f;
}

.evidence-panel {
    width: 90vw;
    max-width: 900px;
    height: auto;
    padding: 40px;
    position: relative;
    border: 1px solid rgba(0,229,255,0.15);
    margin-left: -8%;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.2s ease-out, border-color 0.2s ease;
}

.evidence-panel.visible {
    opacity: 1;
}

.evidence-panel:hover {
    transform: translateY(-4px);
    border-color: rgba(0,229,255,0.4);
}

.evidence-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #00e5ff;
    margin-bottom: 24px;
}

.node-graph {
    width: 100%;
    height: auto;
    max-height: 300px;
}

.evidence-footer {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(0,229,255,0.1);
}

.evidence-stat {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8a8a9e;
}

.evidence-divider {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #8a8a9e;
    opacity: 0.4;
}

/* ===================== SPREAD 4: SYNTHESIS ===================== */
#spread-synthesis {
    background: #0a0a0f;
}

.synthesis-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.synth-bubble-1 {
    width: 200px;
    height: 200px;
    background: rgba(107,47,160,0.05);
    border: 1px solid rgba(107,47,160,0.12);
    top: 5%;
    left: 5%;
    animation: bubbleFloat1 40s ease-in-out infinite;
}

.synth-bubble-2 {
    width: 140px;
    height: 140px;
    background: rgba(107,47,160,0.06);
    border: 1px solid rgba(107,47,160,0.1);
    bottom: 15%;
    right: 10%;
    animation: bubbleFloat2 32s ease-in-out infinite;
}

.synth-bubble-3 {
    width: 100px;
    height: 100px;
    background: rgba(107,47,160,0.04);
    border: 1px solid rgba(107,47,160,0.08);
    top: 40%;
    right: 30%;
    animation: bubbleFloat3 28s ease-in-out infinite;
}

.synthesis-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 900px;
    width: 100%;
    margin-left: -8%;
    align-items: start;
}

.pull-quote {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
    color: #f0eff4;
    border: none;
    padding: 0;
    margin: 0;
    transition: color 0.3s ease;
    cursor: default;
}

.pull-quote:hover {
    color: #ff2d6f;
}

.body-text {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    line-height: 1.72;
    letter-spacing: 0.01em;
    color: #f0eff4;
    margin-bottom: 20px;
}

.body-text.muted {
    color: #8a8a9e;
    font-style: italic;
}

.hr-fade {
    width: 200px;
    height: 1px;
    background: linear-gradient(to right, #00e5ff, transparent);
    margin: 24px 0;
}

.synthesis-layout {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.synthesis-layout.visible {
    opacity: 1;
}

/* ===================== SPREAD 5: CONCLUSION ===================== */
#spread-conclusion {
    background: #0f0f1a;
}

.conclusion-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.concl-bubble-1 {
    width: 160px;
    height: 160px;
    background: rgba(0,229,255,0.05);
    border: 1px solid rgba(0,229,255,0.12);
    top: 15%;
    right: 20%;
    animation: bubbleFloat2 36s ease-in-out infinite;
}

.concl-bubble-2 {
    width: 100px;
    height: 100px;
    background: rgba(184,255,58,0.04);
    border: 1px solid rgba(184,255,58,0.1);
    bottom: 25%;
    left: 15%;
    animation: bubbleFloat1 28s ease-in-out infinite;
}

.conclusion-statement {
    text-align: center;
    margin-left: -8%;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.conclusion-statement.visible {
    opacity: 1;
}

.conclusion-text {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #f0eff4;
    line-height: 1.3;
    margin-bottom: 48px;
}

.qed-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.qed-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #b8ff3a;
    box-shadow: 0 0 20px rgba(184,255,58,0.3);
}

.qed-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8a8a9e;
}

/* ===================== CONNECTOR BUBBLES ===================== */
#connector-bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.connector-bubble {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.cb-1 {
    width: 40px;
    height: 40px;
    background: rgba(0,229,255,0.06);
    border: 1px solid rgba(0,229,255,0.15);
    left: calc(50% - 8% + 40px);
    top: 90vh;
}

.cb-2 {
    width: 50px;
    height: 50px;
    background: rgba(255,45,111,0.06);
    border: 1px solid rgba(255,45,111,0.12);
    left: calc(50% - 8% - 70px);
    top: 88vh;
}

.cb-3 {
    width: 35px;
    height: 35px;
    background: rgba(184,255,58,0.06);
    border: 1px solid rgba(184,255,58,0.12);
    left: calc(50% - 8% + 60px);
    top: 85vh;
}

.cb-4 {
    width: 45px;
    height: 45px;
    background: rgba(107,47,160,0.06);
    border: 1px solid rgba(107,47,160,0.1);
    left: calc(50% - 8% - 50px);
    top: 92vh;
}

/* ===================== ENTRY ANIMATION ===================== */
body.loading {
    background: #0a0a0f;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    .synthesis-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .argument-panel {
        margin-left: 0 !important;
    }

    .panel-lime {
        margin-left: 0;
    }

    .panel-cyan {
        margin-left: 0;
    }

    #dot-nav {
        right: 16px;
    }

    .spread-content {
        padding: 24px;
    }

    .evidence-panel {
        width: 95vw;
        padding: 20px;
    }

    .logic-node {
        left: calc(50% - 5px);
    }

    .hero-title,
    .hero-subtitle,
    .section-divider,
    .argument-panels,
    .evidence-panel,
    .synthesis-layout,
    .conclusion-statement {
        margin-left: 0;
    }

    #reasoning-thread {
        left: 50%;
    }
}
