/* rational.monster - Y2K Corporate Gothic */

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

:root {
    --obsidian: #1A0A14;
    --burgundy-wine: #6B1D3A;
    --deep-burgundy: #4A0E28;
    --bone-white: #F2ECE4;
    --silver-gleam: #C0C0C8;
    --white-chrome: #E8E8F0;
    --marrow-black: #120810;
    --parchment-ash: #D8D0C4;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.65;
    background-color: var(--obsidian);
    color: var(--bone-white);
}

/* === Scroll Container === */
#scroll-container {
    display: flex;
    height: 100vh;
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    position: relative;
}

#scroll-container::-webkit-scrollbar {
    display: none;
}

/* === Chrome Wipe === */
#chrome-wipe {
    position: fixed;
    top: 0;
    left: 50%;
    width: 60px;
    height: 100%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #C0C0C8, #E8E8F0, #FFFFFF, #E8E8F0, #C0C0C8);
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

#chrome-wipe.visible {
    opacity: 0.6;
}

/* === Panels === */
.panel {
    min-width: 100vw;
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.panel-content {
    position: relative;
    z-index: 5;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
}

/* === Skeleton Overlay === */
.skeleton-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    background-color: var(--obsidian);
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.skeleton-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(232, 232, 240, 0.08), transparent);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-overlay.resolved {
    opacity: 0;
}

.skeleton-extended::after {
    animation-duration: 2s;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* === Statement Panels === */
.panel-statement {
    background-color: var(--obsidian);
}

.title-block {
    text-align: center;
}

.panel-title {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5rem);
    letter-spacing: 0.02em;
    line-height: 1.1;
}

.title-rational {
    color: var(--bone-white);
}

.title-monster {
    color: var(--burgundy-wine);
}

.statement-text {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3.5vw, 3rem);
    letter-spacing: 0.02em;
    color: var(--bone-white);
    max-width: 800px;
    text-align: center;
    line-height: 1.3;
}

.panel-number {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: var(--parchment-ash);
    opacity: 0.5;
}

/* === Y2K Shapes === */
.y2k-shape {
    position: absolute;
    z-index: 2;
}

.shape-tl {
    top: 8%;
    right: 12%;
}

.shape-br {
    bottom: 12%;
    left: 8%;
}

.shape-oval {
    width: 120px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--silver-gleam), var(--white-chrome), var(--silver-gleam));
    opacity: 0.3;
    animation: slowRotate 30s linear infinite;
}

.shape-oval-burg {
    width: 120px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--deep-burgundy), var(--burgundy-wine), var(--deep-burgundy));
    opacity: 0.4;
    animation: slowRotate 30s linear infinite;
}

.shape-star {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--silver-gleam), var(--white-chrome));
    clip-path: polygon(50% 0%, 60% 35%, 100% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 0% 35%, 40% 35%);
    opacity: 0.25;
    animation: scalePulse 4s ease-in-out infinite;
}

@keyframes slowRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes scalePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* === Specimen Panels === */
.panel-specimen {
    background-color: var(--obsidian);
}

.specimen-layout {
    display: flex;
    gap: 4rem;
    align-items: center;
    flex-direction: row;
}

.specimen-illustration {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.monster-geo {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.monster-geo.visible {
    opacity: 1;
}

.draw-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1.2s ease;
}

.draw-path.drawn {
    stroke-dashoffset: 0;
}

.cultural-marker {
    opacity: 0.2;
}

.specimen-text {
    flex: 1;
}

.specimen-title {
    font-family: 'Zilla Slab', serif;
    font-weight: 600;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.02em;
    color: var(--bone-white);
    margin-bottom: 1.5rem;
}

.specimen-body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--parchment-ash);
    margin-bottom: 1rem;
}

.line-reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.line-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === Data Panel === */
.panel-data {
    background-color: var(--obsidian);
}

.data-layout {
    flex-direction: column;
    max-width: 700px;
}

.data-title {
    font-family: 'Zilla Slab', serif;
    font-weight: 600;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--bone-white);
    margin-bottom: 3rem;
    text-align: center;
    letter-spacing: 0.02em;
}

.data-chart {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.data-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.data-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: var(--parchment-ash);
    min-width: 100px;
    text-align: right;
}

.data-bar-track {
    flex: 1;
    height: 24px;
    background-color: rgba(74, 14, 40, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.data-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--deep-burgundy), var(--burgundy-wine));
    border-radius: 2px;
    transition: width 1s ease;
}

.data-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: var(--bone-white);
    min-width: 30px;
}

/* === Conclusion Panel === */
.panel-conclusion {
    background-color: var(--bone-white);
}

.conclusion-block {
    text-align: center;
}

.conclusion-title {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--burgundy-wine);
    letter-spacing: 0.02em;
}

.conclusion-dot {
    color: var(--silver-gleam);
}

.panel-conclusion .panel-number {
    color: var(--marrow-black);
}

/* === Progress Bar === */
#progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: rgba(192, 192, 200, 0.15);
    z-index: 999;
}

#progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--deep-burgundy), var(--silver-gleam));
    transition: width 0.3s ease;
}

#panel-indicators {
    position: absolute;
    top: -12px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-evenly;
    padding: 0 5%;
}

.indicator-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1px solid var(--silver-gleam);
    background: transparent;
    transition: background 0.3s ease;
}

.indicator-dot.active {
    background: var(--burgundy-wine);
    border-color: var(--burgundy-wine);
}

/* === Responsive === */
@media (max-width: 768px) {
    .panel-content {
        padding: 2rem;
    }

    .specimen-layout {
        flex-direction: column;
        gap: 2rem;
    }

    .specimen-illustration {
        flex: 0 0 auto;
    }

    .monster-geo {
        width: 200px;
        height: 200px;
    }

    .data-label {
        min-width: 70px;
        font-size: 0.65rem;
    }
}
