/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --midnight-marble: #1a1a2e;
    --electric-magenta: #ff006e;
    --imperial-gold: #ffd700;
    --neon-mint: #00f5d4;
    --polished-chrome: #e0e0e0;
    --brushed-steel: #8a8a8a;
    --veined-parchment: #f0ece2;
    --twilight-indigo: #16213e;
    --bubblegum-chrome: #ff69b4;
    --deep-black: #0a0a1a;

    --split-left: 1fr;
    --split-right: 1fr;
}

html {
    scroll-behavior: auto;
}

body {
    background: var(--deep-black);
    overflow-x: hidden;
    font-size: 16px;
}

/* === SCROLL PROGRESS PILL === */
#scroll-pill {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    background: rgba(26, 26, 46, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 245, 212, 0.2);
    border-radius: 20px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.75rem;
    color: var(--neon-mint);
}

#pill-roman {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--imperial-gold);
}

#pill-divider {
    opacity: 0.4;
}

/* === SVG FISSURE === */
#fissure-svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    pointer-events: none;
}

/* === PANEL GRID === */
.panel {
    display: grid;
    grid-template-columns: var(--split-left) var(--split-right);
    min-height: 100vh;
    position: relative;
    transition: grid-template-columns 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    contain: layout style;
}

.classical, .future {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === CLASSICAL SIDE === */
.classical {
    background: radial-gradient(ellipse at 30% 40%, var(--midnight-marble), var(--deep-black));
}

.marble-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(240, 236, 226, 0.03) 25%, transparent 25%),
        linear-gradient(225deg, rgba(240, 236, 226, 0.03) 25%, transparent 25%),
        radial-gradient(ellipse at 20% 50%, rgba(240, 236, 226, 0.08), transparent 70%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 215, 0, 0.03), transparent 50%);
    pointer-events: none;
}

.marble-v2 {
    background:
        linear-gradient(45deg, rgba(240, 236, 226, 0.04) 20%, transparent 20%),
        radial-gradient(ellipse at 70% 60%, rgba(240, 236, 226, 0.06), transparent 60%),
        radial-gradient(ellipse at 10% 80%, rgba(255, 215, 0, 0.04), transparent 40%);
}

.marble-v3 {
    background:
        conic-gradient(from 45deg at 50% 50%, rgba(240, 236, 226, 0.02), transparent 30%, rgba(240, 236, 226, 0.03), transparent 60%),
        radial-gradient(ellipse at 60% 30%, rgba(240, 236, 226, 0.07), transparent 65%);
}

.marble-v4 {
    background:
        linear-gradient(160deg, rgba(240, 236, 226, 0.05) 15%, transparent 40%),
        radial-gradient(ellipse at 40% 70%, rgba(240, 236, 226, 0.06), transparent 55%),
        radial-gradient(ellipse at 90% 10%, rgba(255, 215, 0, 0.02), transparent 45%);
}

.marble-v5 {
    background:
        linear-gradient(200deg, rgba(240, 236, 226, 0.04) 10%, transparent 35%),
        radial-gradient(ellipse at 25% 75%, rgba(240, 236, 226, 0.09), transparent 60%);
}

.classical-content {
    position: relative;
    z-index: 2;
    padding: 3rem;
    text-align: center;
    max-width: 600px;
}

.classical-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: clamp(3rem, 7vw, 8rem);
    color: var(--imperial-gold);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1;
}

.classical-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: var(--veined-parchment);
    font-variant: small-caps;
    margin-top: 1rem;
    opacity: 0.7;
}

.classical-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 5rem);
    color: var(--imperial-gold);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.classical-body {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: var(--veined-parchment);
    line-height: 1.8;
    opacity: 0.85;
}

/* === GREEK KEY BORDER === */
.greek-key-border {
    width: 100%;
    height: 4px;
    margin-top: 2rem;
    background:
        linear-gradient(90deg, var(--imperial-gold) 25%, transparent 25%, transparent 50%, var(--imperial-gold) 50%, var(--imperial-gold) 75%, transparent 75%);
    background-size: 20px 4px;
    opacity: 0.3;
}

/* === COLUMN FRAGMENTS === */
.column-fragment {
    position: absolute;
    width: 60px;
    height: 200px;
    opacity: 0.15;
    z-index: 1;
}

.column-left {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    border: 2px solid var(--imperial-gold);
    border-right: none;
    border-radius: 30px 0 0 0;
}

.column-bottom {
    right: 20px;
    bottom: 40px;
    width: 50px;
    height: 160px;
    border: 2px solid var(--imperial-gold);
    border-left: none;
    border-radius: 0 25px 0 0;
}

/* === LAUREL WREATH === */
.laurel-wreath {
    width: 120px;
    height: 60px;
    margin-bottom: 1.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.laurel-wreath path {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    transition: stroke-dashoffset 1.2s ease-out;
}

.panel.in-view .laurel-wreath path {
    stroke-dashoffset: 0;
}

/* === FUTURE SIDE === */
.future {
    background: linear-gradient(135deg, var(--electric-magenta), var(--twilight-indigo));
}

.pixel-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(0, 245, 212, 0.08) 1px, transparent 1px);
    background-size: 4px 4px;
    pointer-events: none;
}

.future-content {
    position: relative;
    z-index: 2;
    padding: 3rem;
    text-align: center;
    max-width: 600px;
}

.future-title {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(3.5rem, 8vw, 10rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
    background: linear-gradient(180deg, #ffffff 0%, #e0e0e0 30%, #8a8a8a 60%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.future-subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    color: var(--polished-chrome);
    margin-top: 1rem;
    opacity: 0.7;
}

.future-heading {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(2.5rem, 6vw, 6rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(180deg, #ffffff 0%, #e0e0e0 30%, #8a8a8a 60%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.future-body {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    color: var(--polished-chrome);
    line-height: 1.7;
}

/* === TRANSLUCENT PANELS === */
.translucent-panel {
    background: rgba(255, 0, 110, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 2.5rem;
}

/* === CHROME ORBS === */
.chrome-orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff, #e0e0e0, #8a8a8a, #333333);
    will-change: transform;
    animation: orb-float 3s ease-in-out infinite;
    animation-delay: calc(var(--orb-index) * 0.8s);
    opacity: 0;
    transition: opacity 0.6s ease;
    transition-delay: calc(var(--orb-index) * 0.15s);
}

.panel.in-view .chrome-orb {
    opacity: 1;
}

.orb-1 { width: 60px; height: 60px; top: 15%; right: 15%; }
.orb-2 { width: 40px; height: 40px; bottom: 20%; left: 10%; }
.orb-3 { width: 80px; height: 80px; top: 10%; right: 10%; }
.orb-4 { width: 45px; height: 45px; bottom: 15%; right: 25%; }
.orb-5 { width: 100px; height: 100px; top: 8%; left: 8%; }
.orb-6 { width: 50px; height: 50px; bottom: 25%; right: 12%; }
.orb-7 { width: 35px; height: 35px; top: 40%; right: 5%; }
.orb-8 { width: 70px; height: 70px; bottom: 10%; left: 15%; }
.orb-9 { width: 55px; height: 55px; top: 12%; right: 20%; }
.orb-10 { width: 90px; height: 90px; bottom: 8%; left: 5%; }

@keyframes orb-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* === STARBURSTS === */
.starburst {
    position: absolute;
    width: 30px;
    height: 30px;
    background: var(--neon-mint);
    opacity: 0;
    clip-path: polygon(
        50% 0%, 63% 28%, 98% 35%, 72% 57%,
        79% 91%, 50% 72%, 21% 91%, 28% 57%,
        2% 35%, 37% 28%
    );
    animation: starburst-pulse 3s ease-in-out infinite;
    will-change: transform, opacity;
    transition: opacity 0.5s ease;
}

.panel.in-view .starburst {
    opacity: 0.6;
}

.sb-1 { top: 20%; left: 20%; width: 25px; height: 25px; }
.sb-2 { bottom: 30%; right: 15%; width: 20px; height: 20px; animation-delay: 1s; }
.sb-3 { top: 25%; left: 15%; width: 22px; height: 22px; animation-delay: 0.5s; }
.sb-4 { bottom: 20%; left: 20%; width: 28px; height: 28px; animation-delay: 1.5s; }
.sb-5 { top: 15%; right: 20%; width: 18px; height: 18px; }
.sb-6 { bottom: 30%; left: 10%; width: 24px; height: 24px; animation-delay: 0.7s; }
.sb-merge { top: 10%; right: 15%; width: 35px; height: 35px; animation-delay: 0.3s; }

@keyframes starburst-pulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(15deg); }
}

/* === MERGE SECTION === */
.merge-panel {
    display: block;
    min-height: 100vh;
}

.merge-zone {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 30% 40%, var(--midnight-marble), transparent 60%),
        linear-gradient(135deg, var(--electric-magenta), var(--twilight-indigo));
}

.marble-merge {
    opacity: 0.4;
}

.merge-grid {
    opacity: 0.3;
}

.merge-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 3rem;
    max-width: 800px;
}

.merge-laurel {
    margin-bottom: 1rem;
}

.laurel-merge {
    width: 150px;
    height: 75px;
}

.merge-title-classical {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 6rem);
    color: var(--imperial-gold);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.6;
    line-height: 1;
}

.merge-title-future {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(3rem, 7vw, 8rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(180deg, #ffffff 0%, #e0e0e0 30%, #8a8a8a 60%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-top: -0.5rem;
    opacity: 0.6;
}

.merge-body {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    color: var(--polished-chrome);
    line-height: 1.7;
    margin-top: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.merge-orb-1 { width: 80px; height: 80px; top: 15%; left: 10%; }
.merge-orb-2 { width: 50px; height: 50px; bottom: 20%; right: 10%; }

/* === SECTION ANIMATIONS === */
.panel .classical-content,
.panel .future-content,
.panel .merge-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.panel.in-view .classical-content,
.panel.in-view .future-content,
.panel.in-view .merge-content {
    opacity: 1;
    transform: translateY(0);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .panel {
        grid-template-columns: 1fr !important;
        grid-template-rows: 1fr 1fr;
    }

    .classical, .future {
        min-height: 50vh;
    }

    .classical-content, .future-content {
        padding: 2rem;
    }

    #scroll-pill {
        top: 10px;
        right: 10px;
    }
}
