@property --year-count {
    syntax: '<integer>';
    initial-value: 0;
    inherits: false;
}

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

html, body {
    height: 100vh;
    overflow-x: scroll;
    overflow-y: hidden;
    background: #08061a;
    color: #e8e4f0;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    line-height: 1.65;
    letter-spacing: 0.01em;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

.track {
    display: flex;
    width: fit-content;
    height: 100vh;
}

.panel {
    min-width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    scroll-snap-align: start;
    padding: 2rem 4rem;
}

/* Panel widths */
.panel-threshold { min-width: 100vw; }
.panel-field { min-width: 150vw; flex-direction: row; flex-wrap: wrap; align-content: center; gap: 3rem; padding: 4rem 8rem; }
.panel-menu { min-width: 100vw; }
.panel-theory { min-width: 120vw; }
.panel-singularity { min-width: 80vw; }

/* Typography */
.kinetic-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2.8rem, 7vw, 6rem);
    line-height: 0.95;
    letter-spacing: 0.03em;
    color: #e8e4f0;
    margin-bottom: 1rem;
}

.kinetic-title .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px) rotate(15deg);
    animation: charReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.kinetic-title .char.idle {
    animation: charReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, wobble 3s ease-in-out infinite;
}

@keyframes charReveal {
    to {
        opacity: 1;
        transform: translateY(0) rotate(0);
    }
}

@keyframes wobble {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-3px) rotate(-1.5deg); }
}

.subtitle {
    color: #8b85a6;
    font-size: clamp(1rem, 2vw, 1.3rem);
    max-width: 500px;
    text-align: center;
    margin-top: 1rem;
}

/* Panel 2: Field Cards */
.field-card {
    background: #141033;
    border: 1px solid rgba(0, 201, 219, 0.2);
    border-radius: 12px;
    padding: 2rem 2.5rem;
    max-width: 400px;
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
    backdrop-filter: blur(8px);
}

.field-card.visible { opacity: 1; transform: translateY(0) !important; }
.card-left { transform: translateY(-40px); }
.card-right { transform: translateY(40px); }

.field-card h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); margin-bottom: 0.8rem; }
.field-card p { color: #8b85a6; }

/* Panel 3: Menu */
.menu-grid {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.cocktail-bubble {
    position: relative;
    width: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 50% / 40%;
    background: rgba(20, 16, 51, 0.8);
    border: 1px solid transparent;
    background-clip: padding-box;
}

.cocktail-bubble::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50% / 40%;
    background: conic-gradient(from var(--angle, 0deg), #00c9db44, #db007744, #dbb70044, #00c9db44);
    z-index: -1;
    animation: rotateBorder 6s linear infinite;
}

@keyframes rotateBorder {
    to { --angle: 360deg; }
}

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.cocktail-content h3 {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    margin-bottom: 0.5rem;
}

.cocktail-desc { color: #8b85a6; font-size: 0.9rem; }

.cocktail-illustration {
    width: 80px;
    height: 96px;
    margin-top: 1rem;
}

/* Panel 4: Theory */
.timeline {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-top: 2rem;
    flex-wrap: nowrap;
}

.timeline-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.timeline-year {
    font-family: 'Azeret Mono', monospace;
    font-weight: 500;
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: #00c9db;
}

.timeline-bubble {
    background: #141033;
    border: 1px solid rgba(219, 0, 119, 0.3);
    border-radius: 20px;
    padding: 1.2rem 1.5rem;
    max-width: 220px;
    text-align: center;
    backdrop-filter: blur(8px);
}

.timeline-bubble p { font-size: 0.9rem; color: #e8e4f0; }
.timeline-label { color: #8b85a6; font-size: 0.8rem; font-style: italic; }

.year-counter {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.counter-label {
    color: #8b85a6;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.counter-value {
    font-family: 'Azeret Mono', monospace;
    font-weight: 500;
    font-size: clamp(3rem, 8vw, 6rem);
    color: #db0077;
    text-shadow: 0 0 20px #db0077, 0 0 40px #db007755;
    --year-count: 0;
    transition: --year-count 3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.counter-value.counting {
    --year-count: 95;
}

/* Panel 5: Singularity */
.panel-singularity {
    position: relative;
}

.convergence-point {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid;
    animation: pulse 3s ease-in-out infinite;
}

.ring-1 { width: 200px; height: 200px; border-color: #00c9db33; animation-delay: 0s; }
.ring-2 { width: 150px; height: 150px; border-color: #db007733; animation-delay: 0.5s; }
.ring-3 { width: 100px; height: 100px; border-color: #dbb70033; animation-delay: 1s; }
.ring-4 { width: 60px; height: 60px; border-color: #00c9db55; animation-delay: 1.5s; }

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 1; }
}

.monopole-core {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(#dbb700, #db0077, #00c9db);
    box-shadow: 0 0 20px #dbb700, 0 0 40px #db0077, 0 0 60px #00c9db, 0 0 80px #00c9db55;
}

.final-title { margin-top: 2rem; }
.closing-line { color: #8b85a6; margin-top: 1rem; font-style: italic; }

/* Bubbles */
.bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: conic-gradient(from var(--angle, 0deg), #00c9db11, #db007711, #dbb70011, #00c9db11);
    border: 1px solid rgba(0, 201, 219, 0.15);
    animation: floatBubble var(--duration, 15s) ease-in-out infinite, rotateBorder 8s linear infinite;
}

@keyframes floatBubble {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(10px, -20px); }
    50% { transform: translate(-5px, -10px); }
    75% { transform: translate(15px, 10px); }
}

/* Field Lines SVG */
.field-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.field-line {
    fill: none;
    stroke-width: 1;
    stroke-dasharray: 8 12;
    animation: flowLine 4s linear infinite;
}

@keyframes flowLine {
    to { stroke-dashoffset: -40; }
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    z-index: 100;
}

.progress-svg {
    width: 100%;
    height: 100%;
}

/* Z-index for panels over bg */
.panel { position: relative; z-index: 1; }

/* Micro bubbles */
.micro-bubble {
    position: absolute;
    border-radius: 50%;
    background: #00c9db;
    box-shadow: 0 0 4px #00c9db;
}
