/* =============================================
   pzz.lu - Procedurally Natural Design System
   Colors: #00ff88, #1a3d25, #2d5c3c, #4a8f5e, #0f1f14, #e8ebe7
   Fonts: IBM Plex Mono, Space Mono
   ============================================= */

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

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

body {
    background-color: #0f1f14;
    color: #e8ebe7;
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 1.05rem;
    line-height: 1.8;
    overflow-x: hidden;
    position: relative;
}

/* =============================================
   Grid Underlay
   ============================================= */
.grid-underlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.05;
    background-image:
        linear-gradient(rgba(0, 255, 136, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.3) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* =============================================
   Noise Overlay
   ============================================= */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* =============================================
   SVG Path Draw Layer
   ============================================= */
.path-draw-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.neon-path {
    fill: none;
    stroke: #00ff88;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    opacity: 0.6;
    filter: drop-shadow(0 0 4px rgba(0, 255, 136, 0.4));
    transition: stroke-dashoffset 0.05s linear;
}

/* =============================================
   Left Margin Column
   ============================================= */
.left-margin {
    position: fixed;
    left: 0;
    top: 0;
    width: 60px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 2rem 0;
}

.chapter-markers {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.marker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #2d5c3c;
    transition: color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    position: relative;
}

.marker:hover,
.marker.active {
    color: #00ff88;
}

.marker-line {
    width: 16px;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease, background 0.3s ease;
}

.marker:hover .marker-line,
.marker.active .marker-line {
    width: 28px;
    background: #00ff88;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
}

.marker-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.marker:hover .marker-label,
.marker.active .marker-label {
    opacity: 1;
}

.scroll-depth {
    position: absolute;
    bottom: 2rem;
    width: 2px;
    height: 80px;
    background: rgba(45, 92, 60, 0.3);
    border-radius: 1px;
}

.depth-fill {
    width: 100%;
    height: 0%;
    background: #00ff88;
    border-radius: 1px;
    transition: height 0.1s linear;
    box-shadow: 0 0 6px rgba(0, 255, 136, 0.5);
}

/* =============================================
   Sections - General
   ============================================= */
.section {
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* =============================================
   Blob Styling
   ============================================= */
.blob-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    will-change: transform;
}

/* Hero Blobs */
.blob-1 {
    width: 700px;
    height: 500px;
    background: radial-gradient(ellipse, #1a3d25 0%, transparent 70%);
    top: -10%;
    left: -5%;
    border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%;
    animation: blobFloat1 18s ease-in-out infinite;
}

.blob-2 {
    width: 500px;
    height: 600px;
    background: radial-gradient(ellipse, #2d5c3c 0%, transparent 70%);
    top: 20%;
    right: -10%;
    border-radius: 45% 55% 40% 60% / 55% 45% 55% 45%;
    animation: blobFloat2 22s ease-in-out infinite;
}

.blob-3 {
    width: 400px;
    height: 350px;
    background: radial-gradient(ellipse, #4a8f5e 0%, transparent 75%);
    bottom: 10%;
    left: 30%;
    border-radius: 50% 50% 45% 55% / 60% 40% 60% 40%;
    animation: blobFloat3 15s ease-in-out infinite;
    opacity: 0.6;
}

.blob-4 {
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse, #0f1f14 0%, transparent 65%);
    bottom: -15%;
    right: 20%;
    border-radius: 55% 45% 50% 50% / 45% 55% 45% 55%;
    animation: blobFloat1 20s ease-in-out infinite reverse;
}

.blob-5 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.08) 0%, transparent 70%);
    top: 40%;
    left: 50%;
    border-radius: 50%;
    animation: blobFloat2 12s ease-in-out infinite;
}

/* Genesis Blobs */
.blob-gen-1 {
    width: 500px;
    height: 400px;
    background: radial-gradient(ellipse, #1a3d25 0%, transparent 70%);
    top: -5%;
    right: -10%;
    border-radius: 55% 45% 60% 40% / 50% 50% 50% 50%;
    animation: blobFloat2 20s ease-in-out infinite;
}

.blob-gen-2 {
    width: 350px;
    height: 450px;
    background: radial-gradient(ellipse, #2d5c3c 0%, transparent 70%);
    bottom: 5%;
    right: 10%;
    border-radius: 40% 60% 50% 50% / 55% 45% 55% 45%;
    animation: blobFloat3 16s ease-in-out infinite;
}

.blob-gen-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.06) 0%, transparent 70%);
    top: 50%;
    right: 30%;
    animation: blobFloat1 14s ease-in-out infinite;
}

/* Terrain Blobs */
.blob-ter-1 {
    width: 600px;
    height: 350px;
    background: radial-gradient(ellipse, #1a3d25 0%, transparent 65%);
    top: 0;
    right: -5%;
    border-radius: 50% 50% 60% 40% / 45% 55% 45% 55%;
    animation: blobFloat1 24s ease-in-out infinite;
}

.blob-ter-2 {
    width: 400px;
    height: 500px;
    background: radial-gradient(ellipse, #2d5c3c 0%, transparent 70%);
    top: 30%;
    right: 15%;
    border-radius: 45% 55% 50% 50% / 60% 40% 55% 45%;
    animation: blobFloat2 18s ease-in-out infinite;
}

.blob-ter-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #4a8f5e 0%, transparent 75%);
    bottom: 10%;
    right: 5%;
    opacity: 0.5;
    animation: blobFloat3 20s ease-in-out infinite;
}

.blob-ter-4 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.05) 0%, transparent 70%);
    top: 20%;
    right: 40%;
    animation: blobFloat1 10s ease-in-out infinite reverse;
}

/* Algorithm Blobs */
.blob-algo-1 {
    width: 450px;
    height: 450px;
    background: radial-gradient(ellipse, #1a3d25 0%, transparent 70%);
    top: 10%;
    right: 0;
    border-radius: 50% 50% 55% 45% / 45% 55% 50% 50%;
    animation: blobFloat3 22s ease-in-out infinite;
}

.blob-algo-2 {
    width: 350px;
    height: 400px;
    background: radial-gradient(ellipse, #2d5c3c 0%, transparent 70%);
    bottom: 0;
    right: 20%;
    border-radius: 55% 45% 45% 55% / 50% 50% 50% 50%;
    animation: blobFloat1 17s ease-in-out infinite;
}

.blob-algo-3 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.07) 0%, transparent 70%);
    top: 40%;
    right: 35%;
    animation: blobFloat2 13s ease-in-out infinite;
}

/* Horizon Blobs */
.blob-hor-1 {
    width: 800px;
    height: 300px;
    background: radial-gradient(ellipse, #1a3d25 0%, transparent 60%);
    bottom: 20%;
    left: -10%;
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    animation: blobFloat1 26s ease-in-out infinite;
}

.blob-hor-2 {
    width: 600px;
    height: 250px;
    background: radial-gradient(ellipse, #2d5c3c 0%, transparent 65%);
    bottom: 30%;
    right: -5%;
    border-radius: 50% 50% 50% 50% / 45% 45% 55% 55%;
    animation: blobFloat2 20s ease-in-out infinite;
}

.blob-hor-3 {
    width: 500px;
    height: 200px;
    background: radial-gradient(ellipse, #4a8f5e 0%, transparent 70%);
    bottom: 40%;
    left: 20%;
    opacity: 0.4;
    border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
    animation: blobFloat3 18s ease-in-out infinite;
}

.blob-hor-4 {
    width: 400px;
    height: 180px;
    background: radial-gradient(ellipse, #0f1f14 0%, transparent 60%);
    bottom: 50%;
    right: 25%;
    border-radius: 50%;
    animation: blobFloat1 22s ease-in-out infinite reverse;
}

.blob-hor-5 {
    width: 300px;
    height: 150px;
    background: radial-gradient(ellipse, rgba(0, 255, 136, 0.06) 0%, transparent 70%);
    bottom: 55%;
    left: 40%;
    animation: blobFloat2 15s ease-in-out infinite;
}

/* Blob Animations */
@keyframes blobFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(20px, -15px) scale(1.03); }
    50% { transform: translate(-10px, 20px) scale(0.97); }
    75% { transform: translate(15px, 10px) scale(1.02); }
}

@keyframes blobFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
    33% { transform: translate(-25px, 10px) scale(1.04) rotate(2deg); }
    66% { transform: translate(15px, -20px) scale(0.96) rotate(-1deg); }
}

@keyframes blobFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    20% { transform: translate(10px, -25px) scale(1.02); }
    40% { transform: translate(-20px, -10px) scale(0.98); }
    60% { transform: translate(25px, 15px) scale(1.05); }
    80% { transform: translate(-15px, 20px) scale(0.97); }
}

/* =============================================
   Hero Section
   ============================================= */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(180deg, #0f1f14 0%, #1a3d25 50%, #0f1f14 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.site-title {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 600;
    font-size: clamp(2.8rem, 7vw, 5rem);
    letter-spacing: -0.02em;
    line-height: 1.15;
    text-transform: uppercase;
    color: #e8ebe7;
    opacity: 0;
    transform: translateY(30px);
    animation: titleReveal 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.3s forwards;
    text-shadow: 0 0 40px rgba(0, 255, 136, 0.15);
}

.site-subtitle {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.85rem, 2vw, 1.1rem);
    color: #4a8f5e;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(20px);
    animation: subtitleReveal 1s ease-out 0.8s forwards;
}

.neon-horizon {
    width: clamp(200px, 50vw, 600px);
    height: 1px;
    background: linear-gradient(90deg, transparent, #00ff88 20%, #00ff88 80%, transparent);
    opacity: 0;
    animation: horizonReveal 1.5s ease-out 1.2s forwards;
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.4), 0 0 30px rgba(0, 255, 136, 0.15);
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeIn 1s ease-out 2s forwards;
    margin-top: 2rem;
}

.scroll-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    color: #2d5c3c;
}

.scroll-arrow {
    width: 1px;
    height: 30px;
    background: linear-gradient(180deg, #2d5c3c, transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

/* Hero Neon Accent Lines */
.hero-neon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.neon-line {
    position: absolute;
    background: #00ff88;
    opacity: 0.15;
}

.neon-line-1 {
    width: 1px;
    height: 40%;
    top: 10%;
    left: 15%;
    transform: rotate(15deg);
    animation: neonPulse 4s ease-in-out infinite;
}

.neon-line-2 {
    width: 1px;
    height: 35%;
    bottom: 15%;
    right: 20%;
    transform: rotate(-10deg);
    animation: neonPulse 4s ease-in-out 2s infinite;
}

/* =============================================
   Content Sections
   ============================================= */
.content-section {
    padding: 6rem 0;
    padding-left: 60px;
}

.section-inner {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.content-zone {
    width: 45%;
    padding: 4rem 3rem 4rem 2rem;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 10;
}

.content-overlay {
    background: rgba(15, 31, 20, 0.5);
    backdrop-filter: blur(2px);
    padding: 3rem;
    border-radius: 4px;
    border-left: 1px solid rgba(0, 255, 136, 0.1);
}

.section-heading {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 600;
    font-size: clamp(2.8rem, 7vw, 5rem);
    letter-spacing: -0.02em;
    line-height: 1.15;
    text-transform: uppercase;
    color: #e8ebe7;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55), transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.section-heading.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-body {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(45, 92, 60, 0.95);
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section-body.visible {
    opacity: 1;
    transform: translateY(0);
}

.accent-text {
    color: #4a8f5e;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 700;
    font-size: 1.15rem;
}

.visual-field {
    width: 40%;
    position: relative;
    margin-left: auto;
    min-height: 500px;
}

.generative-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    opacity: 0.7;
    mix-blend-mode: screen;
}

/* =============================================
   Horizon Section Overrides
   ============================================= */
.horizon-inner {
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.horizon-content {
    width: 70%;
    padding: 4rem 3rem;
    text-align: center;
}

.horizon-visual {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
}

.footer-zone {
    position: absolute;
    bottom: 2rem;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 10;
    padding: 0 2rem;
}

.footer-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: #2d5c3c;
}

.footer-divider {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.75rem;
    color: rgba(0, 255, 136, 0.3);
    margin: 0 1rem;
}

/* =============================================
   Neon Hover Effects
   ============================================= */
a:hover,
.section-heading:hover {
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.4), 0 0 20px rgba(0, 255, 136, 0.15);
}

.content-overlay:hover .section-heading {
    text-shadow: 0 0 12px rgba(0, 255, 136, 0.3);
}

.content-overlay:hover {
    border-left-color: rgba(0, 255, 136, 0.3);
    transition: border-left-color 0.4s ease;
}

/* =============================================
   Keyframe Animations
   ============================================= */
@keyframes titleReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes horizonReveal {
    to {
        opacity: 1;
    }
}

@keyframes fadeIn {
    to {
        opacity: 0.6;
    }
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 0.8; transform: translateY(8px); }
}

@keyframes neonPulse {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.25; }
}

/* =============================================
   Mix Blend Modes
   ============================================= */
.hero-blobs .blob {
    mix-blend-mode: screen;
}

.genesis-blobs .blob,
.terrain-blobs .blob,
.algo-blobs .blob,
.horizon-blobs .blob {
    mix-blend-mode: multiply;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 1024px) {
    .left-margin {
        display: none;
    }

    .content-section {
        padding-left: 0;
    }

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

    .content-zone {
        width: 100%;
        padding: 3rem 1.5rem;
    }

    .visual-field {
        width: 100%;
        min-height: 300px;
        position: relative;
    }

    .horizon-content {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .site-title {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }

    .section-heading {
        font-size: clamp(1.8rem, 8vw, 3rem);
    }

    .content-overlay {
        padding: 1.5rem;
    }

    .section-body {
        font-size: 0.95rem;
    }
}
