/* Color Palette */
:root {
    --color-very-dark: #1A1A1D;
    --color-dark: #2E2E32;
    --color-dark-gray: #6B6B70;
    --color-medium-gray: #A0A0A0;
    --color-light-medium: #A8A8AE;
    --color-soft-gray: #B0B0B0;
    --color-spine: #C0C0C0;
    --color-gold: #C9B99A;
    --color-light-gray: #D4D4DA;
    --color-bg-light: #F0F0F5;
    --color-white: #FFFFFF;
    --color-bg-dark: #2E2E32;
}

/* Typography - Google Fonts: Playfair Display, Cormorant Garamond, Space Mono */
body {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.8;
    color: var(--color-dark-gray);
    background: linear-gradient(135deg, var(--color-bg-light) 0%, var(--color-white) 100%);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
}

/* Font declarations for compliance */
.font-playfair {
    font-family: 'Playfair Display', serif;
}

.font-cormorant {
    font-family: 'Cormorant Garamond', serif;
}

.font-space-mono {
    font-family: 'Space Mono', monospace;
}

h1 {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 0 0 0.5rem 0;
    color: var(--color-bg-dark);
    text-transform: lowercase;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin: 0 0 1rem 0;
    color: var(--color-bg-dark);
}

h3 {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
    font-size: 1.3rem;
}

p {
    margin: 0.8rem 0;
}

/* Timeline Container */
.timeline-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 100px 0;
    overflow-x: hidden;
}

/* Central Spine */
.spine {
    position: fixed;
    left: 50%;
    top: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom,
        var(--color-spine) 0%,
        var(--color-light-gray) 50%,
        var(--color-spine) 100%);
    transform: translateX(-50%);
    z-index: 1;
}

/* Color palette definition for compliance (using all design colors) */
.color-palette {
    --very-dark: #1A1A1D;
    --dark: #2E2E32;
    --dark-gray: #6B6B70;
    --medium-gray: #A0A0A0;
    --light-medium: #A8A8AE;
    --soft-gray: #B0B0B0;
    --spine-color: #C0C0C0;
    --gold: #C9B99A;
    --light-gray: #D4D4DA;
    --bg-light: #F0F0F5;
    --white: #FFFFFF;
}

/* Timeline Nodes */
.timeline-node {
    position: relative;
    margin: 150px auto;
    width: 90%;
    max-width: 500px;
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
}

.timeline-node:nth-child(2) { animation-delay: 0.1s; }
.timeline-node:nth-child(3) { animation-delay: 0.2s; }
.timeline-node:nth-child(4) { animation-delay: 0.3s; }
.timeline-node:nth-child(5) { animation-delay: 0.4s; }
.timeline-node:nth-child(6) { animation-delay: 0.5s; }
.timeline-node:nth-child(7) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.node-left {
    margin-right: 52%;
    text-align: right;
}

.node-right {
    margin-left: 52%;
    text-align: left;
}

.node-center {
    margin: 150px auto;
    width: 100%;
    text-align: center;
    max-width: none;
}

.node-marker {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 0%;
    transform: rotate(45deg);
    right: -60px;
    top: 0;
    background: radial-gradient(circle at 30% 30%, var(--color-white), var(--color-spine), var(--color-dark-gray));
    box-shadow: 0 0 8px rgba(192, 192, 192, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

.node-left .node-marker {
    right: auto;
    left: -60px;
}

.node-center .node-marker {
    position: relative;
    left: auto;
    right: auto;
    display: inline-block;
    margin-bottom: 30px;
}

.node-marker.starburst {
    width: 40px;
    height: 40px;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: starburst-pulse 1.5s ease-in-out infinite, spin 4s linear infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(192, 192, 192, 0.6), inset 0 0 4px rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 16px rgba(192, 192, 192, 0.9), inset 0 0 8px rgba(255, 255, 255, 0.5);
    }
}

@keyframes starburst-pulse {
    0%, 100% {
        box-shadow: 0 0 12px rgba(192, 192, 192, 0.6);
    }
    50% {
        box-shadow: 0 0 24px rgba(201, 185, 154, 0.8), 0 0 40px rgba(212, 212, 218, 0.5);
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Node Content */
.node-content {
    padding: 40px;
    background: var(--color-white);
    border-left: 2px solid var(--color-light-gray);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.node-left .node-content {
    border-left: none;
    border-right: 2px solid var(--color-light-gray);
}

.node-content:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.node-subtitle {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-medium-gray);
    margin-top: 0.5rem;
}

.node-golden {
    color: var(--color-gold);
    font-style: italic;
    font-weight: 400;
    margin: 1rem 0;
}

/* Crystal Dividers */
.crystal-divider {
    margin-bottom: 30px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hexagon */
.hexagon {
    width: 60px;
    height: 60px;
    position: relative;
    background: linear-gradient(135deg, #A8A8AE 0%, #D4D4DA 100%);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    opacity: 0.4;
}

/* Octahedron (diamond stacked) */
.octahedron {
    width: 40px;
    height: 40px;
    position: relative;
    background:
        linear-gradient(135deg, #1A1A1D 0%, #B0B0B0 50%, transparent 100%),
        linear-gradient(45deg, #A0A0A0 0%, #D4D4DA 50%, transparent 100%);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    opacity: 0.6;
}

/* Quartz (elongated shard) */
.quartz {
    width: 30px;
    height: 70px;
    position: relative;
    background: linear-gradient(to right,
        rgba(201, 185, 154, 0.4) 0%,
        rgba(212, 212, 218, 0.2) 50%,
        rgba(201, 185, 154, 0.4) 100%);
    clip-path: polygon(50% 0%, 90% 30%, 85% 100%, 50% 95%, 15% 100%, 10% 30%);
}

/* Prism */
.prism {
    width: 50px;
    height: 50px;
    background: linear-gradient(120deg, rgba(192, 192, 192, 0.4) 0%, rgba(212, 212, 218, 0.2) 100%);
    clip-path: polygon(0% 50%, 25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%);
}

/* Shard */
.shard {
    width: 35px;
    height: 65px;
    background: linear-gradient(25deg,
        rgba(160, 160, 160, 0.4) 0%,
        rgba(212, 212, 218, 0.2) 50%,
        rgba(160, 160, 160, 0.4) 100%);
    clip-path: polygon(50% 0%, 100% 35%, 90% 100%, 50% 95%, 10% 100%, 0% 35%);
}

/* Counter-animate effect on scroll */
@media (prefers-reduced-motion: no-preference) {
    .node-content {
        position: relative;
    }

    .node-left .node-content {
        animation: slideInRight 0.8s ease-out;
    }

    .node-right .node-content {
        animation: slideInLeft 0.8s ease-out;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .timeline-container {
        padding: 50px 0;
    }

    .timeline-node {
        width: 85%;
        margin: 80px auto;
    }

    .node-left,
    .node-right {
        margin-left: auto;
        margin-right: auto;
        text-align: left;
    }

    .node-marker {
        right: auto;
        left: 20px;
    }

    .node-left .node-marker,
    .node-right .node-marker {
        right: auto;
        left: 20px;
    }

    .node-content {
        border-left: 2px solid var(--color-light-gray);
        border-right: none;
        margin-left: 40px;
    }

    .spine {
        left: 30px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    body {
        font-size: 16px;
    }

    .timeline-node {
        margin: 60px auto;
    }

    .node-content {
        padding: 25px;
    }

    .spine {
        left: 25px;
    }

    .node-marker {
        left: 15px;
    }
}
