/* parallel.quest - Candlelit Computational Shrine */

/* ============================================
   ROOT CUSTOM PROPERTIES
   ============================================ */
:root {
    --void-black: #0a0a0f;
    --neon-cerise: #ff2d7b;
    --electric-cyan: #00f0ff;
    --plasma-violet: #9d4edd;
    --muted-slate: #94a3b8;
    --deep-charcoal: #1a1a2e;
    --amber-candle: #f59e0b;
    --dark-glow: #1a1028;
    --column-width: 640px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background-color: var(--void-black);
    scroll-behavior: smooth;
}

body {
    background-color: var(--void-black);
    color: var(--muted-slate);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   FILAMENTS - Fixed position neon lines
   ============================================ */
.filaments {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.filament {
    position: fixed;
    top: 0;
    width: 1px;
    background: linear-gradient(
        to bottom,
        transparent,
        var(--filament-color, var(--neon-cerise)) 30%,
        var(--filament-color, var(--neon-cerise)) 70%,
        transparent
    );
    opacity: var(--filament-opacity, 0.15);
    height: var(--filament-height, 60vh);
    top: var(--filament-top, 20vh);
    left: var(--filament-x, 50%);
    animation: filament-pulse var(--pulse-speed, 4s) ease-in-out infinite alternate;
}

@keyframes filament-pulse {
    0% { opacity: 0.08; }
    100% { opacity: 0.20; }
}

/* ============================================
   CANDLE GLOWS
   ============================================ */
.candle-glows {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.candle-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(
        circle at center,
        rgba(157, 78, 221, var(--glow-opacity, 0.05)) 0%,
        transparent 50%
    );
    top: var(--glow-y, 50%);
    left: var(--glow-x, 50%);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* ============================================
   WATERMARK
   ============================================ */
.watermark {
    font-family: 'Jost', sans-serif;
    font-size: 10px;
    letter-spacing: 0.5em;
    color: var(--deep-charcoal);
    text-align: center;
    position: relative;
    z-index: 2;
    user-select: none;
}

.watermark-top {
    padding-top: 40px;
}

.watermark-bottom {
    padding-bottom: 40px;
    padding-top: 100px;
}

/* ============================================
   CONTENT COLUMN
   ============================================ */
.content-column {
    max-width: var(--column-width);
    margin: 0 auto;
    position: relative;
    z-index: 2;
    padding: 0 24px;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    position: relative;
}

.section-inner {
    margin-top: clamp(15vh, 20vh, 25vh);
    width: 100%;
}

/* ============================================
   SECTION LABEL (Accent text)
   ============================================ */
.section-label {
    display: block;
    font-family: 'Jost', sans-serif;
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--electric-cyan);
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 600ms ease, transform 600ms ease;
}

/* ============================================
   SECTION HEADING
   ============================================ */
.section-heading {
    font-family: 'Jost', sans-serif;
    font-weight: 600;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--neon-cerise);
    line-height: 1.2;
    margin-bottom: 32px;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 600ms ease, transform 600ms ease;
}

/* ============================================
   SECTION BODY
   ============================================ */
.section-body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    line-height: 1.75;
    color: var(--muted-slate);
    max-width: 52ch;
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 600ms ease, transform 600ms ease;
}

/* ============================================
   REVEAL ANIMATION
   ============================================ */
.section.is-visible [data-reveal-order='0'] {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0ms;
}

.section.is-visible [data-reveal-order='1'] {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 120ms;
}

.section.is-visible [data-reveal-order='2'] {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 240ms;
}

.section.is-visible [data-reveal-order='3'] {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 360ms;
}

.section.is-visible [data-reveal-order='4'] {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 480ms;
}

/* ============================================
   ISOMETRIC ICONS - Shared Styles
   ============================================ */
.isometric-icon {
    position: relative;
    width: 120px;
    height: 120px;
    margin-left: auto;
    margin-top: 48px;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 600ms ease, transform 600ms ease;
}

.isometric-icon:hover {
    cursor: default;
}

.isometric-icon:hover > * {
    transform: rotateX(55deg) rotateZ(-40deg);
    transition: transform 800ms ease-in-out;
}

/* ============================================
   ICON 1: PARALLEL BARS
   ============================================ */
.icon-parallel-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    perspective: 400px;
}

.iso-bar {
    width: 24px;
    border: 1px solid var(--electric-cyan);
    background: transparent;
    box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.05);
    transform: rotateX(55deg) rotateZ(-45deg);
    transition: transform 800ms ease-in-out;
}

.bar-1 { height: 80px; }
.bar-2 { height: 55px; }
.bar-3 { height: 100px; }

/* ============================================
   ICON 2: FORK NODE
   ============================================ */
.icon-fork-node {
    perspective: 400px;
}

.iso-cube {
    border: 1px solid var(--electric-cyan);
    background: transparent;
    box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.05);
    transform: rotateX(55deg) rotateZ(-45deg);
    transition: transform 800ms ease-in-out;
}

.iso-cube-top {
    width: 24px;
    height: 24px;
    position: absolute;
    top: 0;
    left: 50%;
    margin-left: -12px;
}

.iso-connector {
    position: absolute;
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--electric-cyan), transparent);
    opacity: 0.5;
}

.connector-1 {
    top: 24px;
    left: 25%;
}

.connector-2 {
    top: 24px;
    left: 50%;
}

.connector-3 {
    top: 24px;
    left: 75%;
}

.iso-cube-bottom-1,
.iso-cube-bottom-2,
.iso-cube-bottom-3 {
    width: 16px;
    height: 16px;
    position: absolute;
    top: 64px;
}

.iso-cube-bottom-1 { left: calc(25% - 8px); }
.iso-cube-bottom-2 { left: calc(50% - 8px); }
.iso-cube-bottom-3 { left: calc(75% - 8px); }

/* ============================================
   ICON 3: GRID MATRIX
   ============================================ */
.icon-grid-matrix {
    perspective: 400px;
}

.iso-grid {
    display: grid;
    grid-template-columns: repeat(3, 30px);
    grid-template-rows: repeat(3, 30px);
    gap: 6px;
    transform: rotateX(55deg) rotateZ(-45deg);
    transition: transform 800ms ease-in-out;
    position: absolute;
    right: 0;
    bottom: 0;
}

.grid-cube {
    width: 30px;
    height: 30px;
    border: 1px solid var(--electric-cyan);
    background: transparent;
    box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.05);
}

.grid-cube.filled {
    background: rgba(0, 240, 255, 0.08);
}

/* ============================================
   ICON 4: MERGE POINT
   ============================================ */
.icon-merge-point {
    perspective: 400px;
}

.iso-merge-small {
    width: 16px;
    height: 16px;
    position: absolute;
}

.merge-1 { top: 0; left: 10px; }
.merge-2 { top: 0; left: 52px; }
.merge-3 { top: 0; left: 94px; }

.iso-merge-connector {
    position: absolute;
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--electric-cyan), transparent);
    opacity: 0.5;
}

.mc-1 { top: 16px; left: 18px; }
.mc-2 { top: 16px; left: 60px; }
.mc-3 { top: 16px; left: 102px; }

.iso-hex {
    width: 40px;
    height: 40px;
    position: absolute;
    top: 60px;
    left: 40px;
    border: 1px solid var(--electric-cyan);
    background: transparent;
    box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.05);
    transform: rotateX(55deg) rotateZ(-45deg);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* ============================================
   ICON 5: INFINITE LOOP
   ============================================ */
.icon-infinite-loop {
    perspective: 400px;
}

.iso-loop {
    transform: rotateX(55deg) rotateZ(-45deg);
    transition: transform 800ms ease-in-out;
    width: 120px;
    height: 60px;
}

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

.loop-svg path {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: loop-draw 3s ease-in-out infinite;
}

@keyframes loop-draw {
    0% { stroke-dashoffset: 200; }
    50% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -200; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 720px) {
    .content-column {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .section-heading {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }
    
    .isometric-icon {
        width: 80px;
        height: 80px;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .filament {
        animation: none;
        opacity: 0.12;
    }
    
    .section-label,
    .section-heading,
    .section-body,
    .isometric-icon {
        opacity: 1;
        transform: translateY(0);
        transition: none;
    }
    
    .loop-svg path {
        animation: none;
        stroke-dashoffset: 0;
    }
}
