/* ========================================
   monopoleai.com — Styles
   Frutiger-Aero in Monochrome + Candle Warmth
   ======================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Jost', sans-serif;
    font-weight: 400;
    color: #3A3A40;
    background: #F8F8FA;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Section 0 — The Glow
   ======================================== */
.section-glow {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F8F8FA;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle 80px, rgba(255,200,120,0.15), transparent);
    opacity: 0;
    transition: opacity 1.2s ease;
    pointer-events: none;
    z-index: 0;
}

.glow-orb.visible {
    opacity: 1;
}

.glow-orb.intensified {
    background: radial-gradient(circle 80px, rgba(255,200,120,0.22), transparent);
}

.glow-text {
    position: relative;
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.domain-name {
    font-family: 'Jost', sans-serif;
    font-weight: 300;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: #2A2A30;
    letter-spacing: 0.1em;
    opacity: 0;
    filter: blur(6px);
    transition: opacity 1s ease, filter 1s ease;
}

.domain-name.revealed {
    opacity: 1;
    filter: blur(0);
}

.domain-ext {
    font-family: 'Jost', sans-serif;
    font-weight: 200;
    font-size: 0.9rem;
    color: #A0A0A8;
    letter-spacing: 0.1em;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.domain-ext.revealed {
    opacity: 1;
}

/* ========================================
   Section 1 — The Timeline
   ======================================== */
.section-timeline {
    position: relative;
    width: 100%;
    padding: 10vh 0 15vh;
    background: #F8F8FA;
}

.timeline-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 24px;
}

.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(50% - 280px);
    width: 1px;
    background: #D0D0D4;
    opacity: 0;
    transition: opacity 0.8s ease;
    transform-origin: top;
}

.timeline-line.visible {
    opacity: 1;
}

/* --- Timeline Nodes --- */
.timeline-node {
    position: relative;
    padding: 60px 0 60px 60px;
    margin-left: 0;
}

.node-marker {
    position: absolute;
    left: -30px;
    top: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.node-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid #D0D0D4;
    background: #F8F8FA;
}

.node-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.7rem;
    color: #B0B0B8;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* --- Frosted Glass Panels --- */
.timeline-panel {
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 16px;
    padding: 32px;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 400ms cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timeline-panel.entered {
    opacity: 1;
    transform: scale(1);
}

.panel-title {
    font-family: 'Jost', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.05rem);
    color: #3A3A40;
    letter-spacing: 0.06em;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.panel-body {
    font-family: 'Jost', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.05rem);
    line-height: 1.8;
    color: #3A3A40;
}

/* --- Panel: Direction Arrow --- */
.direction-arrow {
    display: block;
    margin: 0 auto 16px;
}

/* --- Panel: Illumination Glow --- */
.panel-illumination {
    position: relative;
    overflow: hidden;
}

.illumination-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(255,200,120,0.08), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.panel-illumination .panel-title,
.panel-illumination .panel-body {
    position: relative;
    z-index: 1;
}

/* --- Panel: Convergence Quote --- */
.panel-convergence {
    padding: 48px 32px;
}

.convergence-quote {
    border: none;
    margin: 0;
    padding: 0;
}

.convergence-quote p {
    font-family: 'Jost', sans-serif;
    font-weight: 200;
    font-style: italic;
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    line-height: 1.7;
    color: #6A6A70;
    text-align: center;
}

/* ========================================
   Section 2 — The Candle
   ======================================== */
.section-candle {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, #F8F8FA, #EDEDF0);
    overflow: hidden;
}

/* Grain Overlay */
.grain-filter {
    position: absolute;
    width: 0;
    height: 0;
}

.grain-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.015;
    pointer-events: none;
    z-index: 1;
    /* Grain color base: #808080 neutral gray */
    background-color: #808080;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

/* Mountain Silhouette */
.mountain-silhouette {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    opacity: 0.01;
    pointer-events: none;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200' preserveAspectRatio='none'%3E%3Cpolygon points='0,200 150,80 300,160 450,40 600,120 750,20 900,100 1050,60 1200,140 1200,200' fill='%23D0D0D4'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: bottom;
    background-repeat: no-repeat;
}

/* Candle */
.candle-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.candle-wax {
    width: 4px;
    height: 40px;
    background: #D0D0D4;
    border-radius: 2px;
}

.candle-flame {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: flamePulse 2s ease-in-out infinite;
}

.flame-outer {
    position: absolute;
    width: 20px;
    height: 28px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: rgba(255,200,120,0.2);
}

.flame-inner {
    position: absolute;
    width: 10px;
    height: 18px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: rgba(255,220,160,0.3);
}

@keyframes flamePulse {
    0%, 100% {
        transform: translateX(-50%) scale(0.95);
    }
    50% {
        transform: translateX(-50%) scale(1.05);
    }
}

.candle-domain {
    font-family: 'Jost', sans-serif;
    font-weight: 200;
    font-size: 0.9rem;
    color: #B0B0B8;
    letter-spacing: 0.12em;
    margin-top: 40px;
    z-index: 2;
}

/* ========================================
   Responsive — Below 768px
   ======================================== */
@media (max-width: 768px) {
    .timeline-container {
        max-width: 90vw;
        padding: 0 16px;
    }

    .timeline-line {
        left: 20px;
    }

    .timeline-node {
        padding-left: 50px;
    }

    .node-marker {
        left: 8px;
    }

    .timeline-panel {
        background: rgba(248,248,250,0.9);
    }
}

/* ========================================
   Responsive — Below 480px
   ======================================== */
@media (max-width: 480px) {
    .node-marker {
        display: none;
    }

    .timeline-line {
        display: none;
    }

    .timeline-node {
        padding: 20px 0;
        margin-left: 0;
    }

    .timeline-panel {
        padding: 24px;
    }

    .candle-container {
        transform: scale(0.6);
    }
}
