/* ============================================
   completengine.com — styles.css
   Evolved-minimal, candlelight aesthetic
   ============================================ */

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

html {
    scroll-behavior: smooth;
    background-color: #0a0a0f;
}

body {
    background-color: #0a0a0f;
    color: #e8e0d0;
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    line-height: 1.85;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Particle Canvas --- */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* --- Content Column --- */
.content-column {
    max-width: 680px;
    margin-left: 12vw;
    margin-right: auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .content-column {
        margin-left: auto;
        margin-right: auto;
    }
}

/* --- Sections Base --- */
.section {
    position: relative;
    z-index: 1;
}

/* --- Section Spacing --- */
.section + .section {
    margin-top: clamp(120px, 20vh, 240px);
}

/* --- Blur Reveal Animation --- */
.blur-reveal {
    filter: blur(8px);
    opacity: 0;
    transform: translateY(12px);
    transition: filter 600ms ease-out, opacity 600ms ease-out, transform 600ms ease-out;
}

.blur-reveal.revealed {
    filter: blur(0);
    opacity: 1;
    transform: translateY(0);
}

/* --- Section Dividers --- */
.section-divider {
    width: 680px;
    max-width: calc(100% - 4rem);
    height: 1px;
    background-color: #1a1a22;
    margin: clamp(120px, 20vh, 240px) auto;
    margin-left: 12vw;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 800ms ease-out;
}

.section-divider.revealed {
    transform: scaleX(1);
    filter: none;
    opacity: 1;
}

@media (max-width: 768px) {
    .section-divider {
        margin-left: auto;
        margin-right: auto;
    }
}

/* ============================================
   Section 1: The Flame
   ============================================ */
.section-flame {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.flame-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1200ms ease-out;
}

.flame-container.visible {
    opacity: 1;
}

.main-flame-svg {
    position: relative;
    z-index: 2;
}

.flame-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 230, 200, 0.06) 0%, rgba(232, 196, 124, 0.08) 30%, transparent 70%);
    box-shadow: 0 0 120px 40px rgba(232, 196, 124, 0.08), 0 0 60px 20px rgba(212, 160, 80, 0.04);
    z-index: 1;
    pointer-events: none;
}

/* Flame palette reference: core #f5e6c8, mid #e8c47c, edge #d4a050 */
.flame-layer {
    opacity: 0.9;
}

.wordmark {
    font-family: 'Outfit', sans-serif;
    font-weight: 200;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.2em;
    color: #e8e0d0;
    text-transform: lowercase;
    margin-top: clamp(2rem, 4vh, 4rem);
    filter: blur(12px);
    opacity: 0;
    transition: filter 800ms ease-out, opacity 800ms ease-out;
}

.wordmark.visible {
    filter: blur(0);
    opacity: 1;
}

/* ============================================
   Fixed Mini Flame
   ============================================ */
.fixed-flame {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 100;
    opacity: 0;
    transition: opacity 600ms ease-out;
    pointer-events: none;
}

.fixed-flame.visible {
    opacity: 0.4;
}

/* ============================================
   Section 2: The Thesis
   ============================================ */
.section-thesis {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.thesis-lines {
    display: flex;
    flex-direction: column;
    gap: clamp(0.5rem, 1.5vh, 1.5rem);
}

.thesis-line {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.4;
    letter-spacing: 0.02em;
    color: #e8e0d0;
}

/* ============================================
   Section 3: The Process (Timeline)
   ============================================ */
.section-process {
    padding: clamp(2rem, 4vh, 4rem) 0;
}

.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline-line-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 16px;
    height: 100%;
    z-index: 0;
}

.event-node {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: clamp(80px, 12vh, 160px);
}

.event-node:last-child {
    margin-bottom: 0;
}

.node-dot {
    position: absolute;
    left: -40px;
    top: 4px;
    width: 16px;
    height: 16px;
    z-index: 2;
    transition: filter 400ms ease-out;
}

.node-dot svg {
    display: block;
}

.node-circle {
    fill: transparent;
    stroke: #2a2a35;
    transition: fill 400ms ease-out, stroke 400ms ease-out;
}

.event-node.node-active .node-circle {
    fill: #e8c47c;
    stroke: #e8c47c;
}

.event-node.node-active .node-dot {
    filter: drop-shadow(0 0 8px rgba(232, 196, 124, 0.4));
}

.node-text {
    flex: 1;
}

.node-description {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    line-height: 1.85;
    color: #9a9490;
}

.node-description em {
    font-style: normal;
    color: #c8c0b8;
}

/* ============================================
   Section 4: The Architecture
   ============================================ */
.section-architecture {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 4vh, 4rem) 0;
}

.architecture-container {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: breathe 8s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(0.98); }
    50% { transform: scale(1.02); }
}

.architecture-svg {
    width: clamp(280px, 50vw, 400px);
    height: auto;
}

.architecture-caption {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    color: #5a5550;
    margin-top: clamp(2rem, 4vh, 4rem);
    text-align: center;
}

/* ============================================
   Section 5: The Closing
   ============================================ */
.section-closing {
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: #0f0f14;
    transition: background-color 1s ease;
}

.closing-content {
    text-align: center;
    z-index: 2;
    position: relative;
}

.closing-tagline {
    font-family: 'Outfit', sans-serif;
    font-weight: 200;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.12em;
    color: #e8e0d0;
}

.closing-flame {
    position: absolute;
    bottom: 32px;
    right: 32px;
    opacity: 0.5;
    z-index: 1;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .content-column {
        max-width: 100%;
        padding: 0 clamp(1.5rem, 5vw, 2rem);
    }

    .architecture-svg {
        width: 80vw;
    }

    .closing-flame {
        bottom: 20px;
        right: 20px;
    }

    .flame-glow {
        width: 200px;
        height: 200px;
    }
}
