/* =============================================
   parallel.quest — Bauhaus Chrome Multiverse
   ============================================= */

/* --- CSS Variables --- */
:root {
    --void-chrome: #1C1C24;
    --brushed-plate: #2A2A36;
    --polished-silver: #C8C8D4;
    --mirror-edge: #E0E0EC;
    --bauhaus-red: #D4423C;
    --bauhaus-gold: #D4A017;
    --iridescent-blue: #8CA0CC;
    --iridescent-lilac: #B8A0D4;
    --diagonal-angle: -7deg;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Serif 4', 'Georgia', serif;
    --font-ui: 'IBM Plex Sans', 'Helvetica Neue', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: var(--void-chrome);
    color: var(--polished-silver);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    line-height: 1.72;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Scroll Progress Diagonal Line --- */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--bauhaus-red);
    z-index: 100;
    transform-origin: top left;
    transform: rotate(7deg);
    pointer-events: none;
}

/* --- Navigation Chrome Strip --- */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: linear-gradient(180deg, #E8E8E8, #B0B0B0, #D0D0D0);
    z-index: 50;
    display: flex;
    align-items: center;
}

.nav-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    color: var(--void-chrome);
    text-decoration: none;
    letter-spacing: 0.04em;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-item {
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--void-chrome);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    padding: 0.25rem 0;
    transition: color 0.3s ease;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--bauhaus-gold);
    transition: width 0.3s ease;
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 100%;
}

.nav-item.active {
    position: relative;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    inset: -4px -8px;
    background: radial-gradient(ellipse at center, rgba(212, 160, 23, 0.2), transparent 70%);
    border-radius: 4px;
    z-index: -1;
}

/* --- Floating Bubble Overlay --- */
#bubble-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    overflow: hidden;
}

.floating-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
        rgba(255, 255, 255, 0.4),
        rgba(192, 192, 210, 0.15) 40%,
        rgba(140, 160, 200, 0.1) 60%,
        rgba(200, 180, 220, 0.08) 80%,
        transparent
    );
    box-shadow:
        inset 0 0 20px rgba(255, 255, 255, 0.3),
        inset -5px -5px 15px rgba(100, 130, 180, 0.1),
        0 0 8px rgba(200, 200, 220, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.25);
    will-change: transform;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.floating-bubble.visible {
    opacity: 1;
}

@keyframes floatBubble1 {
    0% { transform: translate(0, 0); }
    25% { transform: translate(30px, -30vh); }
    50% { transform: translate(-20px, -60vh); }
    75% { transform: translate(25px, -90vh); }
    100% { transform: translate(0, -120vh); }
}

@keyframes floatBubble2 {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-25px, -28vh); }
    50% { transform: translate(35px, -58vh); }
    75% { transform: translate(-15px, -88vh); }
    100% { transform: translate(0, -120vh); }
}

@keyframes floatBubble3 {
    0% { transform: translate(0, 0); }
    25% { transform: translate(20px, -32vh); }
    50% { transform: translate(-30px, -62vh); }
    75% { transform: translate(20px, -92vh); }
    100% { transform: translate(0, -120vh); }
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--void-chrome);
    overflow: hidden;
}

.hero-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
        rgba(255, 255, 255, 0.35),
        rgba(192, 192, 210, 0.12) 40%,
        rgba(140, 160, 200, 0.08) 60%,
        transparent
    );
    box-shadow:
        inset 0 0 15px rgba(255, 255, 255, 0.25),
        inset -3px -3px 10px rgba(100, 130, 180, 0.08),
        0 0 6px rgba(200, 200, 220, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: scale(0);
    will-change: transform;
}

.hero-bubble.animate {
    animation: heroExpand 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heroExpand {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

.hero-content {
    position: relative;
    z-index: 5;
    text-align: center;
    opacity: 0;
}

.hero-content.visible {
    animation: fadeIn 800ms ease forwards;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(3.5rem, 10vw, 8rem);
    color: var(--mirror-edge);
    letter-spacing: 0.04em;
    line-height: 1.1;
}

.accent-dot {
    color: var(--bauhaus-red);
}

.hero-subtitle {
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--polished-silver);
    margin-top: 1rem;
    opacity: 0;
}

.hero-subtitle.visible {
    animation: fadeIn 800ms ease forwards;
}

.hero-illustration {
    position: absolute;
    bottom: 5%;
    right: 5%;
    width: clamp(200px, 30vw, 400px);
    height: auto;
    opacity: 0.25;
    pointer-events: none;
}

/* SVG animation classes */
.svg-line {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    transition: stroke-dashoffset 1s ease;
}

.svg-line.drawn {
    stroke-dashoffset: 0;
}

.svg-circle {
    transform-origin: center;
    transform: scale(0);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.svg-circle.expanded {
    transform: scale(1);
}

.svg-accent {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.svg-accent.visible {
    opacity: 1;
}

/* --- Transition Strips --- */
.transition-strip {
    position: relative;
    height: 60px;
    overflow: hidden;
    background: var(--void-chrome);
}

.transition-strip::before {
    content: '';
    position: absolute;
    top: 0;
    left: -20px;
    right: -20px;
    bottom: 0;
    background-image: radial-gradient(circle 6px at center, #C0C0C0 0%, #808080 50%, #C0C0C0 100%);
    background-size: 32px 32px;
    background-position: center center;
    opacity: 0.4;
}

.transition-strip::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: repeating-linear-gradient(-7deg,
        transparent,
        transparent 20px,
        #D4423C 20px,
        #D4423C 22px
    );
    opacity: 0.5;
}

/* --- Diagonal Sections --- */
.diagonal-section {
    position: relative;
    min-height: 80vh;
    padding: 6rem 0;
    background: linear-gradient(135deg, #2A2A36 0%, #3A3A48 30%, #2A2A36 60%, #3A3A48 100%);
    clip-path: polygon(0 4%, 100% 0, 100% 96%, 0 100%);
    margin: -30px 0;
    overflow: hidden;
}

.diagonal-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(135deg,
        rgba(255, 255, 255, 0.02) 0px,
        rgba(255, 255, 255, 0.02) 1px,
        transparent 1px,
        transparent 4px
    );
    pointer-events: none;
}

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    position: relative;
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-inner.in-view {
    opacity: 1;
    transform: translateX(0);
}

/* --- Section Number Bubble --- */
.section-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3A3A48, #4A4A58, #3A3A48);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    border: 1px solid #3A3A48;
    box-shadow: 0 0 0 1px #1C1C24;
}

.section-number span {
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--polished-silver);
    letter-spacing: 0.05em;
}

/* --- Section Headings --- */
.section-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: var(--mirror-edge);
    letter-spacing: 0.04em;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(-7deg,
        transparent,
        transparent 20px,
        #D4423C 20px,
        #D4423C 22px
    );
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.section-heading:hover::after {
    opacity: 0.15;
}

.accent-word {
    color: var(--bauhaus-red);
}

/* --- Section Content Layout --- */
.section-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: start;
}

.section-illustration {
    width: 100%;
    height: auto;
    max-width: 400px;
}

/* --- Text Lines (stagger animation) --- */
.text-line {
    margin-bottom: 1.2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.text-line.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* --- Chrome Blockquote (Bubble shape) --- */
.chrome-blockquote {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem;
    margin: 2rem auto;
    background: radial-gradient(circle at 30% 30%,
        rgba(140, 160, 204, 0.12),
        rgba(42, 42, 54, 0.9) 70%
    );
    border: 1px solid rgba(200, 200, 220, 0.15);
    box-shadow:
        inset 0 0 30px rgba(140, 160, 204, 0.08),
        0 4px 24px rgba(140, 160, 204, 0.1);
}

.chrome-blockquote p {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(0.85rem, 1vw, 1rem);
    color: var(--iridescent-blue);
    line-height: 1.6;
    font-style: italic;
}

/* --- Chrome List (custom bullet points) --- */
.chrome-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.chrome-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.chrome-list li.in-view {
    opacity: 1;
    transform: translateY(0);
}

.chrome-list li::before {
    content: '';
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 0.55rem;
    background: radial-gradient(circle at 30% 30%, #E0E0EC, #808080, #C0C0C0);
    box-shadow: 0 0 3px rgba(200, 200, 220, 0.3);
}

.list-text {
    color: var(--polished-silver);
}

/* --- Branching Section --- */
.branching-section {
    min-height: auto;
    padding: 0;
}

.branching-section .section-inner {
    max-width: 100%;
    padding: 3rem 2rem 0;
}

.branching-container {
    position: relative;
}

.branching-sticky {
    position: sticky;
    top: 60px;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.branching-visualization {
    width: 100%;
    max-width: 900px;
    height: 50vh;
    position: relative;
}

.branch-bubble {
    position: absolute;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at 30% 30%,
        rgba(255, 255, 255, 0.3),
        rgba(192, 192, 210, 0.1) 40%,
        rgba(140, 160, 200, 0.07) 60%,
        transparent
    );
    box-shadow:
        inset 0 0 15px rgba(255, 255, 255, 0.2),
        0 0 8px rgba(200, 200, 220, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--polished-silver);
    transform: scale(0);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    will-change: transform;
}

.branch-bubble.visible {
    transform: scale(1);
}

.branch-connector {
    position: absolute;
    height: 1px;
    background: var(--polished-silver);
    transform-origin: left center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.branch-connector.visible {
    opacity: 0.4;
}

.branching-scroll-space {
    position: relative;
    height: 300vh;
    z-index: 3;
    pointer-events: none;
}

.branch-text {
    position: absolute;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    pointer-events: auto;
}

.branch-text-1 { top: 5%; }
.branch-text-2 { top: 30%; }
.branch-text-3 { top: 55%; }
.branch-text-4 { top: 80%; }

.branch-text .text-line {
    background: rgba(28, 28, 36, 0.85);
    padding: 1rem 2rem;
    border-radius: 4px;
    border: 1px solid rgba(200, 200, 220, 0.1);
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: var(--mirror-edge);
    text-align: center;
}

/* --- Link Hover Effect --- */
a:not(.nav-item):not(.nav-logo) {
    color: var(--iridescent-blue);
    text-decoration: none;
    position: relative;
}

a:not(.nav-item):not(.nav-logo)::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--polished-silver), var(--mirror-edge));
    transition: width 0.3s ease;
}

a:not(.nav-item):not(.nav-logo):hover::after {
    width: 100%;
}

/* --- Footer --- */
.site-footer {
    background: var(--void-chrome);
    padding: 4rem 2rem;
    text-align: center;
    border-top: 1px solid #3A3A48;
    box-shadow: inset 0 1px 0 #1C1C24;
}

.footer-inner {
    max-width: 600px;
    margin: 0 auto;
}

.footer-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--mirror-edge);
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.footer-tagline {
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--polished-silver);
    margin-bottom: 1.5rem;
}

.footer-shapes {
    opacity: 0.5;
}

/* --- Bubble Pop Hover Effect --- */
.bubble-pop {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent 70%);
    pointer-events: none;
    animation: bubblePop 0.4s ease-out forwards;
}

@keyframes bubblePop {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .section-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .section-illustration {
        max-width: 280px;
        margin: 0 auto;
    }

    .chrome-blockquote {
        width: 220px;
        height: 220px;
        padding: 2rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .diagonal-section {
        clip-path: polygon(0 2%, 100% 0, 100% 98%, 0 100%);
        padding: 4rem 0;
    }

    .hero-illustration {
        width: clamp(150px, 40vw, 250px);
        opacity: 0.15;
    }

    .branching-sticky {
        height: 50vh;
    }
}

@media (max-width: 480px) {
    .nav-inner {
        padding: 0 1rem;
    }

    .section-inner {
        padding: 2rem 1rem;
    }

    .hero-title {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .section-heading {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .chrome-blockquote {
        width: 180px;
        height: 180px;
        padding: 1.5rem;
    }
}
