/* ============================================
   opensource.bid — Chrome Metallic Zen
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --void-black: #0d0d0f;
    --obsidian: #141418;
    --gunmetal: #1e1e24;
    --chrome-smoke: #2a2a32;
    --tarnished-silver: #5a5a66;
    --brushed-chrome: #8a8a98;
    --polished-chrome: #c8c8d4;
    --white-chrome: #e8e8f0;
    --ember: #d4603a;
    --ghost-chrome-start: #1e1e24;
    --ghost-chrome-end: #2a2a32;

    --font-display: 'Roboto Slab', serif;
    --font-body: 'Zilla Slab', serif;
    --font-mono: 'IBM Plex Mono', monospace;

    --left-panel-opacity: 1;
    --right-panel-width: 50vw;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--void-black);
    color: var(--brushed-chrome);
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* --- SVG Noise Overlay --- */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    mix-blend-mode: overlay;
}

.noise-overlay rect {
    fill: var(--polished-chrome);
    opacity: 0.015;
}

/* --- Split Container --- */
.split-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* --- Left Panel (The Mirror) --- */
.left-panel {
    width: 50vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: linear-gradient(180deg, var(--void-black) 0%, var(--obsidian) 100%);
    overflow: hidden;
    z-index: 10;
    opacity: var(--left-panel-opacity);
    transition: opacity 0.1s linear;
}

/* Radial bokeh base glow */
.left-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 30% 40%, rgba(200, 200, 212, 0.04) 0%, transparent 60%),
        radial-gradient(circle at 70% 20%, rgba(200, 200, 212, 0.02) 0%, transparent 50%);
    z-index: 1;
}

/* --- Bokeh Field --- */
.bokeh-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.bokeh-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
}

.bokeh-1 {
    width: 350px;
    height: 350px;
    top: 10%;
    left: 15%;
    background: radial-gradient(circle, rgba(42, 42, 50, 0.08) 0%, transparent 70%);
    animation: bokehDrift1 25s ease-in-out infinite;
}

.bokeh-2 {
    width: 200px;
    height: 200px;
    top: 55%;
    left: 60%;
    background: radial-gradient(circle, rgba(90, 90, 102, 0.05) 0%, transparent 70%);
    animation: bokehDrift2 35s ease-in-out infinite;
}

.bokeh-3 {
    width: 400px;
    height: 400px;
    top: 30%;
    left: 40%;
    background: radial-gradient(circle, rgba(42, 42, 50, 0.06) 0%, transparent 70%);
    animation: bokehDrift3 40s ease-in-out infinite;
}

.bokeh-4 {
    width: 150px;
    height: 150px;
    top: 75%;
    left: 20%;
    background: radial-gradient(circle, rgba(90, 90, 102, 0.04) 0%, transparent 70%);
}

.bokeh-5 {
    width: 280px;
    height: 280px;
    top: 5%;
    left: 65%;
    background: radial-gradient(circle, rgba(42, 42, 50, 0.05) 0%, transparent 70%);
}

.bokeh-6 {
    width: 180px;
    height: 180px;
    top: 85%;
    left: 50%;
    background: radial-gradient(circle, rgba(90, 90, 102, 0.03) 0%, transparent 70%);
}

.bokeh-7 {
    width: 320px;
    height: 320px;
    top: 45%;
    left: 10%;
    background: radial-gradient(circle, rgba(42, 42, 50, 0.04) 0%, transparent 70%);
}

.bokeh-8 {
    width: 250px;
    height: 250px;
    top: 20%;
    left: 80%;
    background: radial-gradient(circle, rgba(90, 90, 102, 0.06) 0%, transparent 70%);
}

.bokeh-9 {
    width: 130px;
    height: 130px;
    top: 65%;
    left: 35%;
    background: radial-gradient(circle, rgba(42, 42, 50, 0.05) 0%, transparent 70%);
}

.bokeh-10 {
    width: 300px;
    height: 300px;
    top: 40%;
    left: 75%;
    background: radial-gradient(circle, rgba(90, 90, 102, 0.04) 0%, transparent 70%);
}

@keyframes bokehDrift1 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(3%, -2%); }
    50% { transform: translate(-2%, 4%); }
    75% { transform: translate(4%, 1%); }
}

@keyframes bokehDrift2 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(-4%, 3%); }
    66% { transform: translate(2%, -3%); }
}

@keyframes bokehDrift3 {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(2%, 3%); }
    40% { transform: translate(-3%, -1%); }
    60% { transform: translate(1%, -4%); }
    80% { transform: translate(-2%, 2%); }
}

/* --- Organic Blobs --- */
.blob-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
}

.organic-blob {
    position: absolute;
    opacity: 0;
}

.blob-1 {
    width: 400px;
    height: 400px;
    top: -5%;
    left: -10%;
    background: radial-gradient(circle, rgba(42, 42, 50, 0.12) 0%, transparent 70%);
    border-radius: 30% 70% 55% 45% / 55% 40% 60% 45%;
    animation: blobMorph1 45s ease-in-out infinite;
}

.blob-2 {
    width: 300px;
    height: 300px;
    top: 50%;
    right: -8%;
    background: radial-gradient(circle, rgba(90, 90, 102, 0.08) 0%, transparent 70%);
    border-radius: 60% 40% 30% 70% / 40% 65% 35% 60%;
    animation: blobMorph2 35s ease-in-out infinite;
}

.blob-3 {
    width: 250px;
    height: 250px;
    bottom: -5%;
    left: 30%;
    background: radial-gradient(circle, rgba(42, 42, 50, 0.1) 0%, transparent 70%);
    border-radius: 45% 55% 65% 35% / 50% 35% 65% 50%;
    animation: blobMorph3 55s ease-in-out infinite;
}

.blob-4 {
    width: 200px;
    height: 200px;
    top: 25%;
    left: 55%;
    background: radial-gradient(circle, rgba(90, 90, 102, 0.06) 0%, transparent 70%);
    border-radius: 55% 45% 40% 60% / 65% 50% 50% 35%;
    animation: blobMorph4 40s ease-in-out infinite;
}

@keyframes blobMorph1 {
    0%   { border-radius: 30% 70% 55% 45% / 55% 40% 60% 45%; }
    25%  { border-radius: 50% 50% 40% 60% / 45% 55% 45% 55%; }
    50%  { border-radius: 40% 60% 65% 35% / 60% 35% 65% 40%; }
    75%  { border-radius: 65% 35% 45% 55% / 35% 60% 40% 60%; }
    100% { border-radius: 30% 70% 55% 45% / 55% 40% 60% 45%; }
}

@keyframes blobMorph2 {
    0%   { border-radius: 60% 40% 30% 70% / 40% 65% 35% 60%; }
    25%  { border-radius: 35% 65% 55% 45% / 60% 40% 60% 40%; }
    50%  { border-radius: 50% 50% 45% 55% / 35% 65% 45% 55%; }
    75%  { border-radius: 45% 55% 60% 40% / 55% 45% 55% 45%; }
    100% { border-radius: 60% 40% 30% 70% / 40% 65% 35% 60%; }
}

@keyframes blobMorph3 {
    0%   { border-radius: 45% 55% 65% 35% / 50% 35% 65% 50%; }
    20%  { border-radius: 55% 45% 40% 60% / 40% 60% 40% 60%; }
    40%  { border-radius: 35% 65% 55% 45% / 60% 45% 55% 45%; }
    60%  { border-radius: 60% 40% 50% 50% / 45% 55% 50% 50%; }
    80%  { border-radius: 40% 60% 35% 65% / 55% 40% 60% 40%; }
    100% { border-radius: 45% 55% 65% 35% / 50% 35% 65% 50%; }
}

@keyframes blobMorph4 {
    0%   { border-radius: 55% 45% 40% 60% / 65% 50% 50% 35%; }
    33%  { border-radius: 40% 60% 55% 45% / 45% 55% 60% 40%; }
    66%  { border-radius: 60% 40% 45% 55% / 55% 40% 45% 55%; }
    100% { border-radius: 55% 45% 40% 60% / 65% 50% 50% 35%; }
}

/* --- Left Panel Content --- */
.left-content {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 48px;
}

.site-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.5rem, 5.5vw, 5rem);
    line-height: 1.15;
    letter-spacing: 0.03em;
    color: var(--white-chrome);
    margin-bottom: 0.3em;
    min-height: 1.2em;
}

.ember-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ember);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: emberPulse 4s ease-in-out infinite;
}

.meditative-tagline {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: var(--brushed-chrome);
    max-width: 38ch;
    opacity: 0;
    transform: translateY(10px);
}

.meditative-tagline.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 800ms ease, transform 800ms ease;
}

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

/* --- Chrome Divider --- */
.chrome-divider {
    position: fixed;
    top: 0;
    left: 50vw;
    width: 2px;
    height: 100vh;
    background: linear-gradient(180deg, #c0c0c8 0%, transparent 100%);
    z-index: 20;
    transform: scaleY(0);
    transform-origin: top;
    transition: box-shadow 0.3s ease;
}

.chrome-divider:hover {
    box-shadow: 0 0 12px rgba(192, 192, 200, 0.15);
}

.chrome-divider.drawn {
    transform: scaleY(1);
    transition: transform 1200ms cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

/* --- Right Panel (The Stream) --- */
.right-panel {
    margin-left: 50vw;
    width: var(--right-panel-width);
    min-height: 100vh;
    background: var(--obsidian);
    position: relative;
    z-index: 5;
    transition: margin-left 0.1s linear, width 0.1s linear;
}

/* Brushed metal texture overlay on right panel */
.right-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        135deg,
        transparent 0px,
        transparent 1px,
        rgba(255, 255, 255, 0.008) 1px,
        rgba(255, 255, 255, 0.008) 2px
    );
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.right-panel:hover::before {
    opacity: 1;
}

.right-content {
    position: relative;
    z-index: 2;
    padding: 32px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0 24px;
}

/* --- Content Sections --- */
.content-section {
    grid-column: 1 / -1;
    position: relative;
    padding: clamp(4rem, 8vh, 8rem) 0;
}

.content-section:first-child {
    padding-top: clamp(4rem, 12vh, 10rem);
}

/* --- Skeleton Loading --- */
.skeleton-wrapper {
    position: relative;
    overflow: hidden;
}

.skeleton-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-bar {
    height: 16px;
    background: var(--ghost-chrome-start);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.skeleton-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        110deg,
        transparent 0%,
        rgba(200, 200, 212, 0.03) 40%,
        rgba(200, 200, 212, 0.03) 60%,
        transparent 100%
    );
    animation: shimmer 1.5s ease-in-out 2;
    pointer-events: none;
}

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

.section-content {
    opacity: 0;
    transform: translateY(10px);
}

.content-section.revealed .skeleton-wrapper {
    opacity: 0;
    transition: opacity 600ms cubic-bezier(0.25, 0.1, 0.25, 1.0);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.content-section.revealed .section-content {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 600ms cubic-bezier(0.25, 0.1, 0.25, 1.0),
                transform 600ms cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

/* --- Section Marker --- */
.section-marker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.marker-ember {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ember);
    animation: emberPulse 4s ease-in-out infinite;
}

.marker-label {
    font-family: var(--font-mono);
    font-size: clamp(0.8rem, 1vw, 0.95rem);
    letter-spacing: 0.06em;
    color: var(--tarnished-silver);
}

/* --- Typography --- */
h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.4rem, 2.5vw, 2.2rem);
    line-height: 1.15;
    letter-spacing: 0.03em;
    color: var(--polished-chrome);
    margin-bottom: 1.5rem;
}

p {
    max-width: 52ch;
    margin-bottom: 1.25rem;
    color: var(--brushed-chrome);
}

p:last-child {
    margin-bottom: 0;
}

em {
    color: var(--polished-chrome);
    font-style: italic;
}

.mono-accent {
    font-family: var(--font-mono);
    font-size: clamp(0.8rem, 1vw, 0.95rem);
    letter-spacing: 0.06em;
    color: var(--tarnished-silver);
    background: var(--gunmetal);
    padding: 12px 16px;
    border-radius: 4px;
    border-left: 2px solid var(--chrome-smoke);
    max-width: 100%;
}

/* --- Void Space --- */
.void-space {
    grid-column: 1 / -1;
    height: 15vh;
}

/* --- Dissolution Zone --- */
.dissolution-zone {
    grid-column: 1 / -1;
    height: 200vh;
}

/* --- Final Section --- */
.final-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.final-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.final-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.5rem, 5.5vw, 5rem);
    line-height: 1.15;
    letter-spacing: 0.03em;
    color: var(--white-chrome);
    margin-bottom: 1rem;
}

.final-ember {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ember);
    margin-bottom: 2rem;
    animation: emberPulse 4s ease-in-out infinite;
}

.final-statement {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    line-height: 1.75;
    color: var(--brushed-chrome);
    max-width: 48ch;
    text-align: center;
}

/* --- Elevated Content Block Hover --- */
.content-section.revealed:hover {
    background: var(--gunmetal);
    border-radius: 4px;
    padding-left: 24px;
    padding-right: 24px;
    transition: background 0.3s ease;
}

.content-section.revealed:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        135deg,
        transparent 0px,
        transparent 1px,
        rgba(255, 255, 255, 0.008) 1px,
        rgba(255, 255, 255, 0.008) 2px
    );
    pointer-events: none;
    border-radius: 4px;
}

/* --- Responsive: Split to Stack --- */
@media (max-width: 768px) {
    .split-container {
        flex-direction: column;
    }

    .left-panel {
        position: relative;
        width: 100vw;
        height: 60vh;
    }

    .chrome-divider {
        position: relative;
        left: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient(90deg, #c0c0c8 0%, transparent 100%);
        transform: scaleX(0);
        transform-origin: left;
    }

    .chrome-divider.drawn {
        transform: scaleX(1);
        transition: transform 1200ms cubic-bezier(0.25, 0.1, 0.25, 1.0);
    }

    .right-panel {
        margin-left: 0;
        width: 100vw !important;
    }

    .right-content {
        padding: 24px;
        grid-template-columns: 1fr;
    }

    .left-content {
        padding: 32px;
    }

    .dissolution-zone {
        height: 50vh;
    }
}

/* --- Viewport > 1440px padding expansion --- */
@media (min-width: 1441px) {
    .right-content {
        padding: 48px;
    }

    .left-content {
        padding: 64px;
    }
}
