/* ============================================
   dilemma.dev - Design System
   Dark-Neon Corporate Decision Architecture
   Immersive Scroll Experience
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    /* Palette - Dark-Neon: absolute darkness punctuated by electric accents */
    --void-black: #0A0A12;
    --deep-slate: #12121F;
    --neon-cyan: #00F5D4;
    --neon-magenta: #F72585;
    --neon-violet: #7209B7;
    --steel-gray: #7B8794;
    --pale-silver: #C9D1D9;
    --warning-amber: #FFB627;

    /* Gradient Definitions */
    --decision-gradient: linear-gradient(135deg, #00F5D4 0%, #7209B7 50%, #F72585 100%);
    --void-gradient: radial-gradient(ellipse at center, #12121F 0%, #0A0A12 70%);
    --focus-gradient: linear-gradient(to bottom, transparent 0%, #0A0A12 100%);

    /* Typography - Playfair Display (display), Source Sans 3 (body), IBM Plex Mono (code) */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans 3', 'Source Sans Pro', sans-serif;
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

    /* Fluid Sizing */
    --heading-size: clamp(2.8rem, 7vw + 0.5rem, 6rem);
    --body-size: clamp(1rem, 1.2vw + 0.4rem, 1.25rem);
    --mono-size: clamp(0.85rem, 1vw + 0.2rem, 1.05rem);

    /* Layout */
    --central-gap: clamp(40px, 5vw, 80px);
    --divide-width: 2px;

    /* State */
    --scroll-progress: 0;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    background: var(--void-black);
}

body {
    font-family: var(--font-body);
    font-size: var(--body-size);
    font-weight: 400;
    line-height: 1.72;
    color: var(--steel-gray);
    background: var(--void-black);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   CENTRAL DIVIDE LINE - Fixed Structural Spine
   2px vertical line, Decision Gradient background
   Pulses with heartbeat rhythm, expands at transitions
   ============================================ */
.central-divide {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: var(--divide-width);
    height: 100vh;
    z-index: 100;
    pointer-events: none;
}

.divide-line {
    width: 100%;
    height: 100%;
    background: var(--decision-gradient);
    opacity: 0.8;
    transition: width 0.3s ease, opacity 0.3s ease;
    will-change: width, opacity;
}

.divide-flare {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 100%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at center, rgba(114, 9, 183, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.central-divide.pulse .divide-line {
    width: 4px;
    transform: translateX(-1px);
}

.central-divide.expanding .divide-line {
    width: 100vw;
    transform: translateX(-50vw);
    opacity: 0.12;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
}

/* ============================================
   PARTICLE FIELD - Orbiting Geometric Debris
   Small triangles orbiting the central axis
   ============================================ */
.particle-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0.6;
}

.particle-triangle {
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 14px solid var(--neon-cyan);
}

.particle-triangle.magenta {
    border-bottom-color: var(--neon-magenta);
}

.particle-triangle.violet {
    border-bottom-color: var(--neon-violet);
}

.particle-triangle.amber {
    border-bottom-color: var(--warning-amber);
}

/* ============================================
   CHAMBER BASE
   Each chamber: 100vh, containment context
   ============================================ */
.chamber {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    contain: layout style paint;
}

.chamber-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Void Gradient Background */
.void-gradient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--void-gradient);
}

/* Grid Overlay - 60px spacing, slightly rotated, 10% opacity */
.grid-overlay {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-image:
        linear-gradient(var(--steel-gray) 1px, transparent 1px),
        linear-gradient(90deg, var(--steel-gray) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.04;
    transform: rotate(2.5deg);
    pointer-events: none;
}

/* ============================================
   FORK GRID SYSTEM
   12-column base, center gap is luminous void
   ============================================ */
.fork-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 var(--central-gap);
    width: 100%;
    height: 100%;
    z-index: 10;
}

.fork-left {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 2rem 2rem 2rem 4rem;
}

.fork-right {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem 4rem 2rem 2rem;
}

/* Chamber Number Labels */
.chamber-number {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    z-index: 20;
}

.mono-label {
    font-family: var(--font-mono);
    font-size: var(--mono-size);
    font-weight: 400;
    color: var(--steel-gray);
    letter-spacing: 0.05em;
}

/* ============================================
   LENS FLARE SYSTEM
   CSS-only atmospheric light effects
   Each neon element generates flare via pseudo-elements
   ============================================ */
.lens-flare {
    position: absolute;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.lens-flare.active {
    opacity: 0.4;
}

/* Neon element glow - procedural CSS flare */
.neon-element::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background:
        radial-gradient(circle at center, var(--neon-cyan) 0%, transparent 30%),
        radial-gradient(circle at 60% 40%, rgba(114, 9, 183, 0.2) 0%, transparent 15%);
    opacity: 0.15;
    mix-blend-mode: screen;
    pointer-events: none;
    animation: flare-pulse 4s ease-in-out infinite;
}

/* ============================================
   CHAMBER 1: HERO
   Domain name split across central divide
   Diamond wireframe rotating on scroll
   ============================================ */
.chamber-1 {
    background: var(--void-black);
}

.chamber-1 .fork-grid {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 15;
}

/* Hero Title - Playfair Display Black */
.hero-title {
    font-family: var(--font-display);
    font-size: var(--heading-size);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1;
    display: block;
    will-change: transform, opacity;
}

.hero-title-left {
    color: var(--neon-cyan);
    text-align: right;
    text-shadow: 0 0 60px rgba(0, 245, 212, 0.4), 0 0 120px rgba(0, 245, 212, 0.15);
}

.hero-title-right {
    color: var(--neon-magenta);
    text-align: left;
    text-shadow: 0 0 60px rgba(247, 37, 133, 0.4), 0 0 120px rgba(247, 37, 133, 0.15);
}

/* Hero Diamond - Wireframe Rhombus with Decision Gradient edges */
.hero-diamond {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    width: 220px;
    height: 220px;
}

.diamond-shape {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150px;
    height: 150px;
    transform: translate(-50%, -50%) rotate(45deg);
    border: 2px solid transparent;
    border-image: var(--decision-gradient);
    border-image-slice: 1;
    will-change: transform;
}

.diamond-inner {
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    border: 1px solid rgba(0, 245, 212, 0.25);
    transform: rotate(0deg);
    will-change: transform;
}

/* Diamond Lens Flare */
.diamond-flare {
    width: 350px;
    height: 350px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background:
        radial-gradient(circle at center, rgba(0, 245, 212, 0.25) 0%, transparent 35%),
        radial-gradient(circle at 55% 45%, rgba(114, 9, 183, 0.12) 0%, transparent 25%),
        radial-gradient(circle at 40% 55%, rgba(247, 37, 133, 0.08) 0%, transparent 20%);
    animation: flare-pulse 4s ease-in-out infinite;
}

/* Hero Tagline - Philosophical provocation */
.hero-tagline {
    position: absolute;
    bottom: 22%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 20;
    width: 80%;
    max-width: 620px;
}

.tagline-text {
    font-family: var(--font-body);
    font-size: clamp(1.1rem, 1.5vw + 0.3rem, 1.4rem);
    font-weight: 400;
    color: var(--pale-silver);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 0.5s, transform 0.8s ease 0.5s;
}

.tagline-text.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 20;
    opacity: 0.6;
    animation: indicator-bob 2s ease-in-out infinite;
    transition: opacity 0.6s ease;
}

.scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--steel-gray);
    border-bottom: 2px solid var(--steel-gray);
    transform: rotate(45deg);
}

/* ============================================
   CHAMBER 2: TWIN PANELS
   Opposing perspectives in cyan/magenta
   Slide outward from central line
   ============================================ */
.chamber-2 {
    background: var(--void-black);
}

/* Fork Divider Symbol Between Chambers */
.fork-symbol {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 25;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.fork-symbol.visible {
    opacity: 0.7;
}

.fork-svg {
    width: 50px;
    height: 70px;
}

.twin-panels .fork-left,
.twin-panels .fork-right {
    align-items: center;
    justify-content: center;
}

.panel-content {
    max-width: 420px;
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.panel-left .panel-content {
    transform: translateX(40px);
}

.panel-right .panel-content {
    transform: translateX(-40px);
}

.panel-left.visible .panel-content,
.panel-right.visible .panel-content {
    opacity: 1;
    transform: translateX(0);
}

.label-cyan {
    color: var(--neon-cyan);
}

.label-magenta {
    color: var(--neon-magenta);
}

/* Panel Title - Playfair Display Bold */
.panel-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw + 0.5rem, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0.75rem 0 1rem;
}

.cyan-text {
    color: var(--neon-cyan);
    text-shadow: 0 0 40px rgba(0, 245, 212, 0.25);
}

.magenta-text {
    color: var(--neon-magenta);
    text-shadow: 0 0 40px rgba(247, 37, 133, 0.25);
}

.panel-body {
    color: var(--pale-silver);
    line-height: 1.72;
    margin-bottom: 1.5rem;
}

/* Panel Decorations */
.panel-decoration {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.deco-line {
    height: 2px;
    width: 60px;
}

.cyan-line {
    background: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 245, 212, 0.4);
}

.magenta-line {
    background: var(--neon-magenta);
    box-shadow: 0 0 10px rgba(247, 37, 133, 0.4);
}

.deco-diamond {
    width: 12px;
    height: 12px;
    transform: rotate(45deg);
    border: 1.5px solid;
}

.cyan-diamond {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 8px rgba(0, 245, 212, 0.3);
}

.magenta-diamond {
    border-color: var(--neon-magenta);
    box-shadow: 0 0 8px rgba(247, 37, 133, 0.3);
}

/* Panel Flares - Light source effects */
.panel-flare-left {
    width: 220px;
    height: 220px;
    top: 25%;
    right: -30px;
    background:
        radial-gradient(circle at center, rgba(0, 245, 212, 0.2) 0%, transparent 45%),
        radial-gradient(circle at 70% 30%, rgba(0, 245, 212, 0.08) 0%, transparent 20%);
    animation: flare-pulse 4s ease-in-out infinite;
}

.panel-flare-right {
    width: 220px;
    height: 220px;
    top: 25%;
    left: -30px;
    background:
        radial-gradient(circle at center, rgba(247, 37, 133, 0.2) 0%, transparent 45%),
        radial-gradient(circle at 30% 60%, rgba(247, 37, 133, 0.08) 0%, transparent 20%);
    animation: flare-pulse 4s ease-in-out infinite 2s;
}

/* ============================================
   CHAMBER 3: ZOOM FOCUS TRANSITION
   Concentric circles, orbiting triangles
   Scale-up creates falling-into-geometry effect
   ============================================ */
.chamber-3 {
    background: var(--void-black);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chamber-3 .orbit-grid {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.zoom-focus-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    will-change: transform;
    transform-origin: center center;
}

.concentric-circles {
    position: relative;
    width: 400px;
    height: 400px;
}

/* Concentric Circles - Radar/Sonar Pulse */
.circle {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 1.5px solid;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.circle-1 {
    width: 60px;
    height: 60px;
    border-color: var(--neon-cyan);
}

.circle-2 {
    width: 130px;
    height: 130px;
    border-color: var(--neon-violet);
}

.circle-3 {
    width: 210px;
    height: 210px;
    border-color: var(--neon-magenta);
}

.circle-4 {
    width: 300px;
    height: 300px;
    border-color: var(--neon-violet);
    opacity: 0.5;
}

.circle-5 {
    width: 400px;
    height: 400px;
    border-color: var(--neon-cyan);
    opacity: 0.3;
}

.chamber-3.active .circle {
    opacity: 1;
    animation: radar-ping 3s ease-out infinite;
}

.chamber-3.active .circle-2 { animation-delay: 0.3s; }
.chamber-3.active .circle-3 { animation-delay: 0.6s; }
.chamber-3.active .circle-4 { animation-delay: 0.9s; }
.chamber-3.active .circle-5 { animation-delay: 1.2s; }

/* Zoom Flare */
.zoom-flare {
    width: 500px;
    height: 500px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background:
        radial-gradient(circle at center, rgba(114, 9, 183, 0.2) 0%, transparent 35%),
        radial-gradient(circle at 45% 55%, rgba(0, 245, 212, 0.1) 0%, transparent 25%),
        radial-gradient(circle at 55% 45%, rgba(247, 37, 133, 0.06) 0%, transparent 20%);
    animation: flare-pulse 4s ease-in-out infinite 1s;
}

/* Orbiting Triangles - 16-24px, solid fill at 60% opacity */
.orbit-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

.orbit-triangle {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 18px solid var(--neon-cyan);
    opacity: 0.6;
    will-change: transform;
    transition: transform 0.1s linear;
}

.t1 { top: 20%; left: 30%; border-bottom-color: var(--neon-cyan); }
.t2 { top: 50%; left: 65%; border-bottom-color: var(--neon-violet); }
.t3 { top: 72%; left: 40%; border-bottom-color: var(--warning-amber); }
.t4 { top: 22%; left: 55%; border-bottom-color: var(--neon-magenta); }
.t5 { top: 52%; left: 28%; border-bottom-color: var(--neon-cyan); }
.t6 { top: 78%; left: 68%; border-bottom-color: var(--neon-violet); }

/* Chamber Center Text */
.chamber-center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 20;
    width: 80%;
    max-width: 700px;
    pointer-events: none;
}

.zoom-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw + 0.3rem, 3rem);
    font-weight: 700;
    color: var(--pale-silver);
    letter-spacing: -0.02em;
    line-height: 1.3;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
    text-shadow: 0 0 60px rgba(201, 209, 217, 0.15);
}

.chamber-3.active .zoom-title {
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   CHAMBER 4: CODE COMPARISON
   Side-by-side diff view, git-style aesthetics
   IBM Plex Mono throughout, palette-only syntax highlighting
   ============================================ */
.chamber-4 {
    background: var(--void-black);
}

.code-chamber .fork-left,
.code-chamber .fork-right {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    padding: 3rem;
}

.code-panel-left,
.code-panel-right {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.code-panel-left {
    transform: translateX(25px);
}

.code-panel-right {
    transform: translateX(-25px);
}

.code-panel-left.visible,
.code-panel-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Code Header Bar */
.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--deep-slate);
    border-bottom: 1px solid rgba(123, 135, 148, 0.2);
    border-radius: 6px 6px 0 0;
}

.code-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 3px;
    letter-spacing: 0.08em;
}

.cyan-badge {
    color: var(--neon-cyan);
    border: 1px solid rgba(0, 245, 212, 0.3);
    background: rgba(0, 245, 212, 0.08);
}

.magenta-badge {
    color: var(--neon-magenta);
    border: 1px solid rgba(247, 37, 133, 0.3);
    background: rgba(247, 37, 133, 0.08);
}

/* Code Block - Background: #12121F */
.code-block {
    background: var(--deep-slate);
    padding: 1rem;
    border-radius: 0 0 6px 6px;
    overflow-x: auto;
}

/* Code Lines - IBM Plex Mono */
.code-line {
    font-family: var(--font-mono);
    font-size: var(--mono-size);
    line-height: 1.8;
    color: var(--pale-silver);
    padding: 0 0.5rem;
    border-left: 3px solid transparent;
    white-space: nowrap;
}

.code-line.highlight-cyan {
    background: rgba(0, 245, 212, 0.06);
    border-left-color: var(--neon-cyan);
}

.code-line.highlight-magenta {
    background: rgba(247, 37, 133, 0.06);
    border-left-color: var(--neon-magenta);
}

/* Line Numbers - #7B8794 steel gray */
.line-num {
    color: var(--steel-gray);
    opacity: 0.6;
    margin-right: 1.5rem;
    user-select: none;
    display: inline-block;
    width: 2ch;
    text-align: right;
}

/* Syntax Highlighting - palette colors only */
.code-keyword { color: var(--neon-cyan); }          /* keywords in #00F5D4 */
.code-func { color: var(--neon-magenta); }           /* functions in #F72585 */
.code-string { color: var(--warning-amber); }        /* strings in #FFB627 */
.code-comment { color: var(--steel-gray); font-style: italic; }  /* comments in #7B8794 */
.code-op { color: var(--pale-silver); }
.code-paren { color: var(--steel-gray); }
.code-param { color: var(--pale-silver); font-style: italic; }

/* Code Caption */
.code-chamber-caption {
    position: absolute;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.chamber-4.active .code-chamber-caption {
    opacity: 1;
}

/* ============================================
   CHAMBER 5: CONVERGENCE
   Two halves collapse inward, mix-blend-mode: screen
   Final unified statement emerges
   ============================================ */
.chamber-5 {
    background: var(--void-black);
}

.convergence-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.converge-grid {
    position: relative;
    z-index: 10;
}

.converge-left,
.converge-right {
    justify-content: center;
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
    will-change: transform, opacity;
}

.converge-content {
    max-width: 380px;
}

.converge-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.5vw + 0.3rem, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.converge-body {
    color: var(--pale-silver);
    line-height: 1.72;
}

/* Convergence Overlay - Reveals final statement */
.convergence-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    opacity: 0;
    transition: opacity 1s ease;
    background: rgba(10, 10, 18, 0.88);
    mix-blend-mode: normal;
    pointer-events: none;
}

.convergence-overlay.visible {
    opacity: 1;
}

.final-statement {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4vw + 0.3rem, 3.2rem);
    font-weight: 700;
    color: var(--pale-silver);
    text-align: center;
    letter-spacing: -0.02em;
    line-height: 1.3;
    max-width: 700px;
    padding: 0 2rem;
    will-change: transform;
}

.highlight-gradient {
    background: var(--decision-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Fork Symbol - Final */
.fork-symbol-final {
    position: absolute;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    opacity: 0.6;
}

.fork-svg-final {
    width: 60px;
    height: 72px;
}

/* Site End Branding */
.site-end {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.end-diamond {
    width: 8px;
    height: 8px;
    background: var(--warning-amber);
    transform: rotate(45deg);
    box-shadow: 0 0 8px rgba(255, 182, 39, 0.5);
}

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

@keyframes flare-pulse {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes radar-ping {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0;
    }
}

@keyframes indicator-bob {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

@keyframes diamond-rotate {
    from {
        transform: translate(-50%, -50%) rotate(45deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(405deg);
    }
}

@keyframes triangle-float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-15px) rotate(120deg);
    }
    66% {
        transform: translateY(10px) rotate(240deg);
    }
}

@keyframes divide-heartbeat {
    0%, 100% {
        width: 2px;
    }
    50% {
        width: 4px;
    }
}

@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 10px currentColor;
    }
    50% {
        box-shadow: 0 0 25px currentColor;
    }
}

/* ============================================
   SCROLL-DRIVEN ANIMATIONS (CSS Scroll Timeline API)
   Progressive Enhancement - Primary animation driver
   ============================================ */

@supports (animation-timeline: scroll()) {
    .chamber-1 .diamond-shape {
        animation: diamond-rotate linear;
        animation-timeline: scroll();
        animation-range: 0vh 100vh;
    }

    .divide-line {
        animation: divide-heartbeat 2s ease-in-out infinite;
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    :root {
        --central-gap: 20px;
    }

    .fork-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .fork-left, .fork-right {
        padding: 1.5rem;
        justify-content: center;
    }

    .fork-left {
        align-items: flex-end;
    }

    .fork-right {
        align-items: flex-start;
    }

    .hero-title {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }

    .hero-title-left,
    .hero-title-right {
        text-align: center;
    }

    .central-divide {
        opacity: 0.4;
    }

    .code-chamber .fork-left,
    .code-chamber .fork-right {
        padding: 1.5rem;
    }

    .panel-content {
        max-width: 100%;
    }

    .converge-content {
        max-width: 100%;
    }

    .concentric-circles {
        width: 250px;
        height: 250px;
    }

    .circle-4 { width: 200px; height: 200px; }
    .circle-5 { width: 250px; height: 250px; }

    .hero-diamond {
        width: 160px;
        height: 160px;
    }

    .diamond-shape {
        width: 110px;
        height: 110px;
    }

    .fork-symbol {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-tagline {
        bottom: 28%;
    }

    .zoom-title {
        font-size: clamp(1.4rem, 5vw, 2rem);
    }

    .code-line {
        font-size: 0.75rem;
    }

    .line-num {
        margin-right: 0.75rem;
    }

    .final-statement {
        font-size: clamp(1.3rem, 4vw, 2rem);
    }
}
