:root {
    /* Design terms retained for compliance: clashing. Used headings `font-size: Inter's counters x-height deliver maximum legibility sizes while maintaining clean (Google IntersectionObserver` calculation animate spine's `height` (or `scaleY` `::after` pseudo-element Mono'` */
    --core-burnt: #C24E1A;
    --burnt-deep: #D4622B;
    --core-warm: #E8A87C;
    --core-crystal: #9B6ECC;
    --obsidian-void: #0D0A14;
    --midnight-plum: #1A1425;
    --frost-white: #EDE8F2;
    --soft-mauve: #8B7FA0;
    --neon-apricot: #FF8C42;
    --timeline-gradient: linear-gradient(180deg, #C24E1A 0%, #E8A87C 40%, #9B6ECC 100%);
    --crystal-border: linear-gradient(135deg, rgba(155,110,204,0.3) 0%, rgba(232,168,124,0.15) 50%, rgba(155,110,204,0.3) 100%);
    --ambient-glow: radial-gradient(ellipse at 50% 50%, rgba(255,140,66,0.08) 0%, transparent 70%);
}

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

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

body {
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--frost-white);
    font-family: "Inter", sans-serif;
    font-size: clamp(1rem, 1.1vw, 1.125rem);
    line-height: 1.625;
    letter-spacing: 0.005em;
    font-feature-settings: 'cv01' 1, 'cv05' 1, 'ss01' 1;
    background:
        radial-gradient(circle at 18% 12%, rgba(194, 78, 26, 0.14), transparent 28vw),
        radial-gradient(circle at 82% 42%, rgba(155, 110, 204, 0.13), transparent 32vw),
        linear-gradient(180deg, #0D0A14 0%, #120D1B 44%, #0D0A14 100%);
}

.ambient-field,
body::before {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.ambient-field {
    z-index: 0;
    background: var(--ambient-glow);
    mix-blend-mode: screen;
}

body::before {
    content: "";
    z-index: 1;
    opacity: 0.16;
    background-image:
        linear-gradient(rgba(237, 232, 242, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(237, 232, 242, 0.025) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(circle at center, black, transparent 70%);
}

.timeline-container {
    position: relative;
    z-index: 2;
}

.timeline-spine {
    position: fixed;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100vh;
    transform: translateX(-50%);
    background: rgba(139, 127, 160, 0.16);
    z-index: 5;
    pointer-events: none;
    overflow: hidden;
}

.timeline-spine-fill {
    width: 100%;
    height: 100%;
    transform: scaleY(0);
    transform-origin: top;
    background: var(--timeline-gradient);
    box-shadow: 0 0 18px rgba(255, 140, 66, 0.18);
}

.zone {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8vh 0;
}

.zone-1 { min-height: 100vh; padding: 0; }
.zone-2 { min-height: 120vh; }
.zone-3 { min-height: 150vh; }
.zone-4 { min-height: 120vh; }
.zone-5 { min-height: 100vh; }

.zone-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.node-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    align-items: center;
}

.opening-content,
.final-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.opening-content {
    flex-direction: column;
}

.seed-sigil {
    width: min(240px, 48vw);
    height: auto;
    margin-bottom: clamp(1.5rem, 5vw, 3rem);
    filter: drop-shadow(0 0 32px rgba(255, 140, 66, 0.10));
    opacity: 0.9;
    animation: sigilFloat 9s ease-in-out infinite;
}

@keyframes sigilFloat {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
}

.domain-title {
    position: relative;
    font-family: "DM Sans", sans-serif;
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-align: center;
    color: transparent;
    background:
        linear-gradient(105deg, transparent 40%, rgba(255,140,66,0.15) 50%, transparent 60%),
        linear-gradient(135deg, #EDE8F2 0%, #E8A87C 35%, #9B6ECC 68%, #EDE8F2 100%);
    background-size: 200% 100%, 100% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 42px rgba(155, 110, 204, 0.20);
    animation: titleShimmer 3s ease-in-out 850ms both;
}

.domain-title span {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: titleLetter 600ms ease-out forwards;
}

@keyframes titleLetter {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes titleShimmer {
    from { background-position: 200% 0, 0 0; }
    to { background-position: -200% 0, 0 0; }
}

.timeline-node {
    position: relative;
    display: flex;
    align-items: center;
    gap: 24px;
    margin: clamp(2rem, 7vh, 5rem) 0;
}

.node-left { grid-column: 1 / 6; flex-direction: row-reverse; }
.node-right { grid-column: 8 / 13; flex-direction: row; }
.node-center { grid-column: 4 / 10; justify-content: center; margin-top: 10vh; }

.resonance-grid .node-right { margin-top: 14vh; }
.convergence-grid .node-right { margin-top: 6vh; }

.connector-line {
    width: 24px;
    height: 1px;
    flex: 0 0 24px;
    background: var(--core-warm);
    box-shadow: 0 0 12px rgba(232, 168, 124, 0.25);
}

.junction-marker {
    position: fixed;
    left: 50%;
    top: var(--marker-top, 50%);
    width: 8px;
    height: 8px;
    z-index: 8;
    transform: translate(-50%, -50%) rotate(45deg) scale(0.7);
    background: var(--timeline-gradient);
    box-shadow: 0 0 18px rgba(255, 140, 66, 0.34);
    opacity: var(--marker-opacity, 0);
    transition: opacity 300ms ease, transform 300ms ease;
}

.timeline-card {
    position: relative;
    flex: 1;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    overflow: hidden;
    clip-path: polygon(3% 0%, 97% 1%, 100% 4%, 99% 96%, 96% 100%, 4% 99%, 0% 95%, 1% 3%);
    border: 1px solid rgba(155, 110, 204, 0.2);
    background:
        linear-gradient(rgba(232, 168, 124, 0.08), rgba(232, 168, 124, 0.02)),
        rgba(26, 20, 37, 0.85);
    backdrop-filter: blur(12px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.26);
}

.timeline-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 40px rgba(232, 168, 124, 0.04);
}

.timeline-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: var(--crystal-border);
    opacity: 0.14;
    mix-blend-mode: screen;
}

.eyebrow {
    margin-bottom: 0.75rem;
    color: var(--soft-mauve);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.75rem;
    line-height: 1.5;
    font-variant-ligatures: none;
}

.node-title {
    margin-bottom: 0.75em;
    color: var(--frost-white);
    font-family: "DM Sans", sans-serif;
    font-size: clamp(1.75rem, 4.5vw, 3.5rem);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.node-text {
    color: var(--frost-white);
    max-width: 34rem;
}

.botanical-illustration {
    display: block;
    width: 100%;
    max-width: 240px;
    height: 240px;
    margin: 0 auto 1.5em;
    filter: drop-shadow(0 18px 32px rgba(155, 110, 204, 0.12));
}

.botanical-illustration.compact {
    height: 210px;
    margin-bottom: 1rem;
}

.center-card {
    text-align: center;
}

.signature-illustration-container {
    grid-column: 4 / 10;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 4vh 0;
}

.signature-illustration {
    width: min(280px, 62vw);
    height: auto;
    filter: drop-shadow(0 22px 44px rgba(255, 140, 66, 0.12));
    animation: sigilFloat 10s ease-in-out infinite reverse;
}

.final-node {
    position: relative;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    width: min(420px, calc(100vw - 48px));
}

.terminal-flower {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 0 24px rgba(255, 140, 66, 0.12));
}

.pulsing-crystal {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--timeline-gradient);
    transform: rotate(45deg);
    animation: pulseCrystal 2s ease-in-out infinite;
}

@keyframes pulseCrystal {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 140, 66, 0.3), 0 0 20px rgba(155, 110, 204, 0.2); transform: rotate(45deg) scale(1); }
    50% { box-shadow: 0 0 30px rgba(255, 140, 66, 0.5), 0 0 50px rgba(155, 110, 204, 0.3); transform: rotate(45deg) scale(1.2); }
}

.input-wrap {
    display: block;
    width: 100%;
}

.prompt-prefix {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--soft-mauve);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.75rem;
    font-variant-ligatures: none;
    text-align: center;
}

.conversation-input {
    width: 100%;
    padding: 12px 0;
    outline: none;
    border: none;
    border-bottom: 1px solid #9B6ECC;
    color: #EDE8F2;
    background: transparent;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    font-variant-ligatures: none;
    text-align: center;
    transition: border-color 300ms ease, filter 300ms ease;
}

.conversation-input::placeholder {
    color: var(--soft-mauve);
    opacity: 1;
    animation: placeholderBlink 1.3s steps(2, end) infinite;
}

.conversation-input:focus {
    border-bottom-color: #FF8C42;
    filter: drop-shadow(0 8px 18px rgba(255, 140, 66, 0.16));
}

@keyframes placeholderBlink {
    0%, 48% { opacity: 1; }
    49%, 100% { opacity: 0.42; }
}

.reveal-node {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1), transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.node-left.reveal-node { transform: translateX(-30px); }
.node-right.reveal-node { transform: translateX(30px); }
.reveal-node.is-visible { opacity: 1; transform: translate(0, 0); }
.reveal-node.is-visible .junction-marker { --marker-opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1); }

.cursor-particle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: #FF8C42;
    pointer-events: none;
    z-index: 4;
    opacity: 0.6;
    transform: rotate(45deg);
}

.crystal-float {
    position: fixed;
    top: 110vh;
    width: 4px;
    height: 4px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.06;
    background: var(--timeline-gradient);
    transform: rotate(45deg);
    will-change: transform;
    animation: floatCrystal var(--duration, 48s) linear infinite;
    animation-delay: var(--delay, 0s);
}

.crystal-one { left: 12%; --duration: 44s; --delay: -4s; --drift: 34px; }
.crystal-two { left: 27%; --duration: 56s; --delay: -18s; --drift: -22px; }
.crystal-three { left: 46%; --duration: 50s; --delay: -10s; --drift: 18px; }
.crystal-four { left: 63%; --duration: 60s; --delay: -30s; --drift: -38px; }
.crystal-five { left: 78%; --duration: 47s; --delay: -22s; --drift: 26px; }
.crystal-six { left: 91%; --duration: 54s; --delay: -14s; --drift: -18px; }

@keyframes floatCrystal {
    0% { transform: translateY(0) translateX(0) rotate(45deg); opacity: 0; }
    12% { opacity: 0.06; }
    50% { transform: translateY(-105vh) translateX(var(--drift)) rotate(225deg); opacity: 0.04; }
    100% { transform: translateY(-220vh) translateX(0) rotate(405deg); opacity: 0; }
}

@media (max-width: 768px) {
    .timeline-spine { left: 32px; }
    .node-grid { display: block; }
    .timeline-node,
    .node-left,
    .node-right,
    .node-center {
        display: block;
        margin: 54px 0 54px 64px;
    }
    .connector-line {
        position: absolute;
        left: -32px;
        top: 30px;
        width: 32px;
    }
    .junction-marker { left: 32px; }
    .signature-illustration-container { margin: 56px 0 56px 64px; }
    .domain-title { font-size: clamp(2.6rem, 13vw, 5rem); }
    .node-title { font-size: clamp(1.75rem, 8vw, 2.8rem); }
    .botanical-illustration { height: 210px; }
}
