/* continua.club - Perpetual Kinetic Art */

:root {
    --void-charcoal: #1C1C1E;
    --dark-umber: #2C1A0E;
    --frosted-slate: rgba(42, 42, 46, 0.65);
    --bone-white: #E8E4DC;
    --patina-copper: #B87333;
    --phosphor-green: #39FF14;
    --verdigris: #6B8F71;
    --amber-glow: #D4A437;
    --muted-wire: #4A4A4C;
    --speed-multiplier: 1;
}

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

body {
    background: var(--void-charcoal);
    color: var(--bone-white);
    font-family: 'Spectral', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.85;
    overflow-x: hidden;
}

/* Nav Dot */
.nav-dot {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100;
    cursor: pointer;
}

.nav-dot-circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--patina-copper);
    transition: transform 200ms ease;
}

.nav-dot:hover .nav-dot-circle {
    transform: scale(1.3);
}

.nav-menu {
    position: absolute;
    top: 20px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease;
}

.nav-dot:hover .nav-menu {
    opacity: 1;
    pointer-events: all;
}

.nav-item {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.12em;
    color: var(--patina-copper);
    text-decoration: none;
    white-space: nowrap;
    text-align: right;
    transition: color 200ms ease;
}

.nav-item:hover {
    color: var(--bone-white);
}

/* Hero Section */
.section-hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

#lissajousCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-title {
    position: absolute;
    bottom: 40px;
    left: 40px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--bone-white);
    opacity: 0;
    transition: opacity 800ms ease;
}

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

/* Drift Zone */
.section-drift {
    position: relative;
    min-height: 200vh;
    padding: 100px 40px;
}

/* Concentric background */
.concentric-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    opacity: 0.15;
}

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

.conc-ring {
    fill: none;
    stroke: var(--muted-wire);
    stroke-width: 0.5;
}

.ring-1 { animation: rotateRing 120s linear infinite; }
.ring-2 { animation: rotateRing 90s linear infinite reverse; }
.ring-3 { animation: rotateRing 60s linear infinite; }
.ring-4 { animation: rotateRing 40s linear infinite reverse; }
.ring-5 { animation: rotateRing 25s linear infinite; }

@keyframes rotateRing {
    to { transform: rotate(360deg); transform-origin: center; }
}

/* Lissajous mini */
.lissajous-mini {
    position: fixed;
    top: 20px;
    right: 60px;
    width: 120px;
    height: 120px;
    opacity: 0;
    transition: opacity 500ms ease;
    pointer-events: none;
    z-index: 5;
}

.lissajous-mini.visible {
    opacity: 0.15;
}

/* Drift Cards */
.drift-cards {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 80px;
    max-width: 560px;
}

.drift-card {
    background: var(--frosted-slate);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--muted-wire);
    border-radius: 8px;
    padding: 32px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 600ms cubic-bezier(0.34, 1.56, 0.64, 1), transform 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.drift-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.card-1 { margin-left: 0; }
.card-2 { margin-left: auto; }
.card-3 { margin-left: 15%; }

.prose {
    color: var(--bone-white);
    opacity: 0.85;
}

/* Continuum Ribbon */
.section-ribbon {
    position: relative;
    height: 200vh;
    display: flex;
    align-items: center;
}

.ribbon-track {
    width: 100%;
    overflow: hidden;
    position: sticky;
    top: 50%;
    transform: translateY(-50%);
    border-top: 1px solid var(--muted-wire);
    border-bottom: 1px solid var(--muted-wire);
    padding: 20px 0;
}

.ribbon-strip {
    display: flex;
    gap: 24px;
    padding: 0 40px;
    width: max-content;
    will-change: transform;
}

.vignette {
    flex-shrink: 0;
    width: 200px;
    text-align: center;
}

.vignette-inner {
    width: 200px;
    height: 200px;
    border: 1px solid var(--patina-copper);
    border-radius: 12px;
    overflow: hidden;
    background: var(--void-charcoal);
}

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

.vignette-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.12em;
    color: var(--patina-copper);
    display: block;
    margin-top: 8px;
}

/* Vignette animations */
.spinning-top {
    transform-origin: 100px 113px;
    animation: spinTop 3s linear infinite;
}

@keyframes spinTop {
    to { transform: rotate(360deg); }
}

.mobius-marker {
    animation: mobiusMove 4s ease-in-out infinite;
}

@keyframes mobiusMove {
    0% { cx: 40; cy: 100; }
    25% { cx: 100; cy: 40; }
    50% { cx: 160; cy: 100; }
    75% { cx: 100; cy: 160; }
    100% { cx: 40; cy: 100; }
}

.wave-path {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: wavePropagate 3s linear infinite;
}

@keyframes wavePropagate {
    to { stroke-dashoffset: 0; }
}

.pendulum-bob {
    transform-origin: 100px 30px;
    animation: pendulumSwing 2s ease-in-out infinite alternate;
}

.pendulum-line {
    transform-origin: 100px 30px;
    animation: pendulumSwing 2s ease-in-out infinite alternate;
}

@keyframes pendulumSwing {
    0% { transform: rotate(-25deg); }
    100% { transform: rotate(25deg); }
}

/* The Still Point */
.section-still {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background-color 1s ease;
}

.still-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    border: 0.5px solid var(--muted-wire);
    border-radius: 50%;
    opacity: 0.02;
    animation: stillRotate 200s linear infinite;
}

@keyframes stillRotate {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.still-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.still-quote {
    font-family: 'Spectral', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    color: var(--bone-white);
    opacity: 0;
    transition: opacity 2000ms ease;
}

.still-quote.visible {
    opacity: 1;
}

.still-attribution {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--patina-copper);
    opacity: 0;
    margin-top: 16px;
    transition: opacity 1000ms ease 1000ms;
}

.still-attribution.show {
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 768px) {
    .section-drift {
        padding: 60px 20px;
    }

    .drift-cards {
        max-width: 100%;
    }

    .card-2 { margin-left: 0; }
    .card-3 { margin-left: 0; }

    .ribbon-strip {
        padding: 0 20px;
    }

    .concentric-bg {
        width: 300px;
        height: 300px;
    }
}
