/* ============================================
   GLOLOS.COM - Global to Local
   Cyberpunk Zen Aesthetic
   ============================================ */

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

:root {
    --honeyed-cream: #F0E4C8;
    --cyber-violet: #7B4FD9;
    --local-gold: #D4A43A;
    --global-blue: #3A6A9D;
    --node-green: #4CAF7A;
    --deep-charcoal: #1E1E28;
    --marble-cream: #E8E0D8;

    --font-display: 'Crimson Text', Georgia, serif;
    --font-body: 'Noto Sans', 'Segoe UI', sans-serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;
}

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

body {
    background-color: var(--honeyed-cream);
    color: var(--deep-charcoal);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.75;
    overflow-x: hidden;
}

/* --- Typography --- */
.section-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(26px, 4.5vw, 56px);
    color: var(--deep-charcoal);
    line-height: 1.2;
}

.body-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.75;
    color: var(--deep-charcoal);
}

.fira-code {
    font-family: var(--font-mono);
    font-size: 0.85em;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    background-color: var(--honeyed-cream);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-marble-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(232, 224, 216, 0.6) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 30%, rgba(232, 224, 216, 0.4) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 80%, rgba(240, 228, 200, 0.3) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

.network-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

/* Initial hidden states for animation */
.global-hub {
    opacity: 0;
    transform-origin: 600px 400px;
}

.connection-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.local-node {
    opacity: 0;
}

.bokeh-circle {
    opacity: 0;
}

.traveling-dot {
    opacity: 0;
}

/* Hero title */
.hero-title {
    position: absolute;
    left: 40%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    opacity: 0;
    text-align: left;
}

.hero-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(48px, 8vw, 120px);
    color: var(--deep-charcoal);
    letter-spacing: 0.08em;
    line-height: 1;
    margin-bottom: 0.2em;
}

.hero-tagline {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(14px, 1.8vw, 22px);
    color: var(--deep-charcoal);
    opacity: 0.7;
    letter-spacing: 0.04em;
}

/* ============================================
   ADAPTATION FLOW SECTION
   ============================================ */
.adaptation-flow {
    position: relative;
    padding: 120px 5% 120px;
    background-color: var(--honeyed-cream);
    overflow: hidden;
}

.flow-container {
    display: flex;
    gap: 4%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.flow-connections {
    position: absolute;
    top: 0;
    left: 48%;
    width: 8%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.flow-line {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    transition: stroke-dashoffset 1s ease;
}

.flow-line.drawn {
    stroke-dashoffset: 0;
}

/* Global side */
.global-side {
    width: 56%;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.marble-panel {
    background:
        radial-gradient(ellipse at 30% 20%, rgba(232, 224, 216, 0.8) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(232, 224, 216, 0.5) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 50%, rgba(240, 228, 200, 0.2) 0%, transparent 70%),
        linear-gradient(135deg, var(--marble-cream) 0%, #ddd5cc 50%, var(--marble-cream) 100%);
    border: 1px solid rgba(212, 164, 58, 0.15);
    border-radius: 4px;
    padding: 48px 44px;
    position: relative;
    overflow: hidden;
}

.marble-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 25% 25%, rgba(200, 190, 175, 0.3) 0%, transparent 25%),
        radial-gradient(circle at 75% 75%, rgba(200, 190, 175, 0.2) 0%, transparent 30%),
        radial-gradient(circle at 60% 20%, rgba(190, 180, 165, 0.15) 0%, transparent 20%);
    pointer-events: none;
}

.panel-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--global-blue);
    border: 1px solid rgba(58, 106, 157, 0.3);
    padding: 3px 12px;
    border-radius: 2px;
    margin-bottom: 16px;
}

.global-panel .section-heading {
    margin-bottom: 16px;
    font-size: clamp(22px, 3vw, 38px);
}

.global-panel .body-text {
    margin-bottom: 20px;
}

.data-tag {
    display: inline-block;
    background: rgba(30, 30, 40, 0.06);
    border: 1px solid rgba(30, 30, 40, 0.1);
    padding: 4px 14px;
    border-radius: 2px;
    margin-right: 8px;
    margin-bottom: 8px;
    color: var(--deep-charcoal);
    opacity: 0.8;
}

.connection-indicator {
    margin-top: 16px;
    overflow: hidden;
}

.draw-path {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 1.5s ease;
}

.draw-path.drawn {
    stroke-dashoffset: 0;
}

/* Global panels scroll reveal */
.global-panel {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.global-panel.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Local side */
.local-side {
    width: 40%;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-top: 30px;
}

.local-card {
    position: relative;
    background: rgba(240, 228, 200, 0.5);
    border: 1px solid rgba(212, 164, 58, 0.2);
    border-radius: 4px;
    padding: 32px 28px;
    overflow: hidden;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.local-card.visible {
    opacity: 1;
    transform: translateX(0);
}

.bokeh-glow {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.5s ease;
}

.bokeh-gold {
    background: radial-gradient(circle, rgba(212, 164, 58, 0.10) 0%, transparent 70%);
}

.bokeh-green {
    background: radial-gradient(circle, rgba(76, 175, 122, 0.08) 0%, transparent 70%);
}

.bokeh-violet {
    background: radial-gradient(circle, rgba(123, 79, 217, 0.06) 0%, transparent 70%);
}

.locale-badge {
    display: inline-block;
    background: var(--local-gold);
    color: var(--deep-charcoal);
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 2px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.card-heading {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(18px, 2.2vw, 26px);
    margin-bottom: 10px;
    color: var(--deep-charcoal);
    position: relative;
    z-index: 1;
}

.card-text {
    font-family: var(--font-body);
    font-size: clamp(13px, 1.3vw, 16px);
    line-height: 1.7;
    color: var(--deep-charcoal);
    opacity: 0.85;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.local-card .data-tag {
    position: relative;
    z-index: 1;
}

/* ============================================
   PHILOSOPHY SECTION
   ============================================ */
.philosophy {
    position: relative;
    padding: 140px 5%;
    background-color: var(--deep-charcoal);
    overflow: hidden;
}

.philosophy-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 60px;
    position: relative;
    z-index: 2;
}

.marble-texture-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 15% 50%, rgba(232, 224, 216, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 30%, rgba(123, 79, 217, 0.03) 0%, transparent 40%);
    pointer-events: none;
    z-index: 1;
}

.philosophy-content {
    flex: 1.2;
}

.philosophy .section-heading {
    color: var(--honeyed-cream);
    margin-bottom: 32px;
}

.philosophy-text {
    color: var(--marble-cream);
    opacity: 0.85;
    margin-bottom: 24px;
}

.philosophy-network {
    flex: 0.8;
    display: flex;
    justify-content: center;
}

.mini-network {
    width: 100%;
    max-width: 350px;
    opacity: 0.6;
}

/* ============================================
   PROCESS SECTION
   ============================================ */
.process {
    padding: 120px 5%;
    background-color: var(--honeyed-cream);
    position: relative;
}

.process-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.process-heading {
    text-align: center;
    margin-bottom: 80px;
}

.process-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}

.process-step {
    text-align: center;
    flex: 0 0 200px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.process-step.visible {
    opacity: 1;
    transform: translateY(0);
}

.process-connector {
    display: flex;
    align-items: center;
    padding-top: 20px;
    flex: 0 0 100px;
}

.step-node {
    margin-bottom: 20px;
}

.step-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(20px, 2.5vw, 30px);
    color: var(--deep-charcoal);
    margin-bottom: 12px;
}

.step-desc {
    font-size: 13px;
    line-height: 1.6;
    color: var(--deep-charcoal);
    opacity: 0.75;
    max-width: 200px;
    margin: 0 auto;
}

/* ============================================
   CLOSING SECTION
   ============================================ */
.closing {
    position: relative;
    padding: 160px 5%;
    background-color: var(--deep-charcoal);
    overflow: hidden;
    text-align: center;
}

.closing-inner {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.closing-bokeh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.bokeh-orb {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: bokeh-float 8s ease-in-out infinite;
}

.bokeh-orb-1 {
    width: 250px;
    height: 250px;
    top: 10%;
    left: 5%;
    background: radial-gradient(circle, rgba(212, 164, 58, 0.08) 0%, transparent 70%);
    animation-delay: 0s;
}

.bokeh-orb-2 {
    width: 300px;
    height: 300px;
    top: 50%;
    right: 5%;
    background: radial-gradient(circle, rgba(123, 79, 217, 0.06) 0%, transparent 70%);
    animation-delay: 2s;
}

.bokeh-orb-3 {
    width: 200px;
    height: 200px;
    bottom: 15%;
    left: 20%;
    background: radial-gradient(circle, rgba(76, 175, 122, 0.07) 0%, transparent 70%);
    animation-delay: 4s;
}

.bokeh-orb-4 {
    width: 180px;
    height: 180px;
    top: 20%;
    right: 25%;
    background: radial-gradient(circle, rgba(212, 164, 58, 0.06) 0%, transparent 70%);
    animation-delay: 1s;
}

.bokeh-orb-5 {
    width: 220px;
    height: 220px;
    bottom: 10%;
    right: 15%;
    background: radial-gradient(circle, rgba(58, 106, 157, 0.05) 0%, transparent 70%);
    animation-delay: 3s;
}

@keyframes bokeh-float {
    0%, 100% {
        opacity: 0.4;
        transform: translate(0, 0) scale(1);
    }
    25% {
        opacity: 0.7;
        transform: translate(10px, -15px) scale(1.05);
    }
    50% {
        opacity: 0.5;
        transform: translate(-5px, 10px) scale(0.98);
    }
    75% {
        opacity: 0.8;
        transform: translate(8px, 5px) scale(1.02);
    }
}

.closing-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(32px, 5vw, 64px);
    color: var(--honeyed-cream);
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
}

.closing-text {
    color: var(--marble-cream);
    opacity: 0.8;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 2;
}

.closing-network-label {
    font-size: 13px;
    color: var(--cyber-violet);
    opacity: 0.6;
    letter-spacing: 0.1em;
    position: relative;
    z-index: 2;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .flow-container {
        flex-direction: column;
    }

    .global-side,
    .local-side {
        width: 100%;
    }

    .local-side {
        padding-top: 40px;
    }

    .flow-connections {
        display: none;
    }

    .philosophy-inner {
        flex-direction: column;
    }

    .process-steps {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .process-connector {
        transform: rotate(90deg);
        flex: 0 0 40px;
    }

    .hero-title {
        left: 50%;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .marble-panel {
        padding: 32px 24px;
    }

    .local-card {
        padding: 24px 20px;
    }

    .hero-heading {
        font-size: clamp(36px, 12vw, 72px);
    }
}

/* ============================================
   SCROLL ANIMATION UTILITIES
   ============================================ */
[data-scroll-reveal] {
    opacity: 0;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-scroll-reveal="left"] {
    transform: translateX(-20px);
}

[data-scroll-reveal="right"] {
    transform: translateX(20px);
}

[data-scroll-reveal].visible {
    opacity: 1;
    transform: translateX(0);
}

/* Underline draw animation */
.underline-draw .draw-path {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
}

.underline-draw.active .draw-path {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1.5s ease;
}
