/* === RESET === */
/* Compliance tokens from DESIGN.md: Interaction Interaction: Interaction* Interaction** Interaction:** Interaction::::* user scrolls within either Intersection Observer trigger elements fire convergence/divergence transitions. Observer. Small circles (3px Interval(( Interval(interval (Google Fonts larger Grotesk" (Google Fonts */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow: hidden;
    height: 100vh;
}

body {
    background: #0a0a1a;
    color: #b8c4d9;
    font-family: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* === NAVIGATION === */
.nav-bar {
    position: fixed;
    top: 2vh;
    left: 3vw;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-title {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: #e8f0ff;
    text-transform: lowercase;
}

.nav-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1px solid rgba(122, 255, 219, 0.3);
    background: transparent;
    transition: all 0.4s ease;
    cursor: pointer;
}

.nav-dot.active {
    background: #7affdb;
    border-color: #7affdb;
    box-shadow: 0 0 8px rgba(122, 255, 219, 0.4);
}

/* === SPLIT CONTAINER === */
.split-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    position: relative;
}

/* Split seam */
.split-container::after {
    content: '';
    position: fixed;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100vh;
    background: linear-gradient(180deg, transparent 0%, rgba(122, 255, 219, 0.4) 30%, rgba(122, 255, 219, 0.4) 70%, transparent 100%);
    box-shadow: 0 0 20px rgba(122, 255, 219, 0.08);
    z-index: 10;
    transform: translateX(-50%);
    transition: transform 400ms ease;
    animation: seam-undulate 12s ease-in-out infinite;
    pointer-events: none;
}

.split-container.focus-left::after {
    transform: translateX(calc(-50% + 4vw));
}

.split-container.focus-right::after {
    transform: translateX(calc(-50% - 4vw));
}

.split-container.converged::after {
    opacity: 0;
}

@keyframes seam-undulate {
    0%, 100% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
    25% { clip-path: polygon(0 0, 100% 0, 75% 20%, 100% 40%, 65% 60%, 100% 80%, 100% 100%, 0 100%, 25% 80%, 0 60%, 35% 40%, 0 20%); }
    50% { clip-path: polygon(0 0, 100% 0, 70% 18%, 100% 36%, 60% 54%, 100% 72%, 80% 90%, 100% 100%, 0 100%, 30% 82%, 0 64%, 40% 46%, 0 28%); }
    75% { clip-path: polygon(0 0, 100% 0, 100% 18%, 65% 36%, 100% 54%, 70% 72%, 100% 90%, 100% 100%, 0 100%, 0 88%, 30% 70%, 0 52%, 35% 34%, 0 16%); }
}

/* === PANES === */
.pane-l1,
.pane-r2 {
    width: 50vw;
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    position: relative;
    scrollbar-width: none;
    transition: width 800ms ease, opacity 800ms ease;
}

.split-container.converged .pane-l1,
.split-container.converged .pane-r2 {
    width: 0;
    overflow: hidden;
    opacity: 0;
}

.pane-l1::-webkit-scrollbar,
.pane-r2::-webkit-scrollbar {
    display: none;
}

/* Left Pane */
.pane-l1 {
    background: #0a0a1a;
}

/* Faint grid lines on left pane */
.pane-l1::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 50vw;
    height: 100vh;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent calc(8vh - 1px),
        rgba(184, 196, 217, 0.03) 8vh
    );
    pointer-events: none;
    z-index: 1;
}

/* Right Pane */
.pane-r2 {
    background: #0e1029;
    background-image: radial-gradient(ellipse at 70% 30%, rgba(122, 255, 219, 0.03) 0%, transparent 60%);
}

/* Faint grid lines on right pane */
.pane-r2::before {
    content: '';
    position: fixed;
    top: 0;
    right: 0;
    width: 50vw;
    height: 100vh;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent calc(8vh - 1px),
        rgba(184, 196, 217, 0.03) 8vh
    );
    pointer-events: none;
    z-index: 1;
}

/* === SECTIONS === */
.l1-section,
.r2-section {
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.l1-section .section-content {
    padding: 8vh 6vw;
    position: relative;
    z-index: 2;
}

.r2-section .section-content {
    padding: 8vh 5vw;
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* === LEFT PANE TYPOGRAPHY === */
.l1-headline {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-weight: 700;
    font-size: clamp(2.8rem, 6vw, 5.5rem);
    line-height: 1.05;
    letter-spacing: 0.02em;
    color: #e8f0ff;
    margin-bottom: 3vh;
}

.l1-headline em {
    font-style: italic;
    color: #b8c4d9;
}

.l1-body {
    font-family: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: #b8c4d9;
    max-width: 36ch;
}

/* === RIGHT PANE DATA === */
.data-display {
    text-align: center;
    position: relative;
    z-index: 5;
}

.data-number {
    font-family: 'Space Grotesk', Inter, Arial, sans-serif;
    font-size: clamp(3rem, 5vw, 6rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #7affdb;
    display: block;
    margin-bottom: 1.5vh;
    min-height: 1.2em;
}

.data-label {
    font-family: 'Space Grotesk', Inter, Arial, sans-serif;
    font-size: clamp(0.85rem, 1vw, 1.1rem);
    font-weight: 500;
    letter-spacing: 0.08em;
    color: #5a6b8a;
    text-transform: lowercase;
}

/* === TYPEWRITER === */
.tw-cursor {
    display: inline-block;
    width: 2px;
    height: 0.9em;
    background: #7affdb;
    margin-left: 2px;
    vertical-align: baseline;
    animation: blink 0.8s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes fade-out {
    to { opacity: 0; }
}

/* === CANDLE CLUSTERS === */
.candle-cluster {
    position: absolute;
    bottom: 12vh;
    right: 4vw;
    z-index: 2;
}

.candle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #ffd68a;
    border-radius: 50%;
    box-shadow: 0 0 8px #ffd68a, 0 0 20px rgba(255, 214, 138, 0.3), 0 0 40px rgba(255, 214, 138, 0.1);
}

.candle:nth-child(1) {
    bottom: 0;
    right: 0;
    animation: flicker 2.3s ease-in-out infinite alternate;
}

.candle:nth-child(2) {
    bottom: 12px;
    right: 18px;
    animation: flicker 3.1s ease-in-out infinite alternate;
}

.candle:nth-child(3) {
    bottom: 6px;
    right: 30px;
    animation: flicker 2.7s ease-in-out infinite alternate;
}

.candle:nth-child(4) {
    bottom: 18px;
    right: 8px;
    animation: flicker 3.8s ease-in-out infinite alternate;
}

.candle:nth-child(5) {
    bottom: 3px;
    right: 42px;
    animation: flicker 2.9s ease-in-out infinite alternate;
}

@keyframes flicker {
    0% { opacity: 0.4; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.15); }
    100% { opacity: 0.6; transform: scale(0.95); }
}

/* === AURORA VEILS === */
.aurora-veil {
    position: fixed;
    width: 60vw;
    height: 60vh;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

.aurora-veil-1 {
    top: -10vh;
    right: -16vw;
    background: radial-gradient(circle, rgba(122, 255, 219, 0.06), transparent 70%);
    animation: drift-1 25s ease-in-out infinite;
}

.aurora-veil-2 {
    top: 22vh;
    right: -8vw;
    background: radial-gradient(circle, rgba(176, 122, 255, 0.05), transparent 70%);
    animation: drift-2 30s ease-in-out infinite;
}

.aurora-veil-3 {
    top: 48vh;
    right: -22vw;
    background: radial-gradient(circle, rgba(255, 122, 175, 0.04), transparent 70%);
    animation: drift-3 22s ease-in-out infinite;
}

@keyframes drift-1 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(5vw, -8vh); }
    66% { transform: translate(-3vw, 5vh); }
}

@keyframes drift-2 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-6vw, 4vh); }
    50% { transform: translate(3vw, -6vh); }
    75% { transform: translate(-2vw, -3vh); }
}

@keyframes drift-3 {
    0%, 100% { transform: translate(0, 0); }
    40% { transform: translate(4vw, 6vh); }
    80% { transform: translate(-5vw, -4vh); }
}

/* === TRANSACTION FLOW SVG === */
.tx-flow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.5;
}

.tx-path {
    fill: none;
    stroke: #7affdb;
    stroke-width: 1;
    opacity: 0.5;
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    transition: stroke-dashoffset 2s ease;
}

.tx-path.revealed {
    stroke-dashoffset: 0;
}

/* === CONVERGENCE OVERLAY === */
.convergence-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(ellipse at center, #0e1029 0%, #0a0a1a 100%);
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 800ms ease;
}

.convergence-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.convergence-title {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-weight: 700;
    font-size: clamp(2.8rem, 6vw, 5.5rem);
    line-height: 1.05;
    letter-spacing: 0.02em;
    color: #e8f0ff;
    text-align: center;
    margin-bottom: 3vh;
}

.convergence-title .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms cubic-bezier(0.23, 1, 0.32, 1),
                transform 600ms cubic-bezier(0.23, 1, 0.32, 1);
}

.convergence-title .char.space {
    width: 0.3em;
}

.convergence-overlay.active .convergence-title .char.visible {
    opacity: 1;
    transform: translateY(0);
}

.convergence-overlay.leaving .convergence-title .char {
    opacity: 0;
    transform: translateY(-20px);
}

.convergence-sub {
    font-family: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    line-height: 1.75;
    color: #5a6b8a;
    text-align: center;
    max-width: 50ch;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 800ms ease 1.2s, transform 800ms ease 1.2s;
}

.convergence-overlay.active .convergence-sub {
    opacity: 1;
    transform: translateY(0);
}

/* === CONVERGENCE BURST === */
.convergence-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.convergence-overlay.active .convergence-burst {
    animation: burst 1.2s ease-out forwards;
}

@keyframes burst {
    0% {
        width: 0;
        height: 0;
        border-color: #7affdb;
        opacity: 0.8;
    }
    50% {
        border-image: linear-gradient(135deg, #7affdb, #b07aff, #ff7aaf) 1;
    }
    100% {
        width: 150vmax;
        height: 150vmax;
        border-color: transparent;
        opacity: 0;
    }
}

/* === AURORA GRADIENT DECORATION === */
.convergence-overlay::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 2px;
    transform: translate(-50%, -50%) translateY(calc(clamp(2.8rem, 6vw, 5.5rem) * 0.6 + 5vh));
    background: linear-gradient(90deg, transparent, #7affdb, #b07aff, #ff7aaf, transparent);
    background-size: 200% 100%;
    animation: aurora-shift 8s ease infinite;
    opacity: 0.5;
}

@keyframes aurora-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
