:root {
    --bio-dark: #0c1a14;
    --chlorophyll-deep: #14291e;
    --synth-jade: #39e89a;
    --petal-pink: #f472b6;
    --dawn-sky: #7dd3fc;
    --cream-bone: #f0ebe0;
    --moss-fade: #6a8a74;
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(240, 235, 228, 0.03);
}

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

body {
    background: var(--bio-dark);
    color: var(--cream-bone);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
}

/* Circuit-leaf pattern on body */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            30deg,
            transparent,
            transparent 40px,
            rgba(57, 232, 154, 0.02) 40px,
            rgba(57, 232, 154, 0.02) 41px
        ),
        repeating-linear-gradient(
            -30deg,
            transparent,
            transparent 60px,
            rgba(57, 232, 154, 0.015) 60px,
            rgba(57, 232, 154, 0.015) 61px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 80px,
            rgba(57, 232, 154, 0.01) 80px,
            rgba(57, 232, 154, 0.01) 81px
        );
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   Ripple Layer
   ============================================ */
.ripple-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 500;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(57, 232, 154, 0.20) 0%,
        rgba(57, 232, 154, 0.10) 33%,
        rgba(57, 232, 154, 0.04) 66%,
        transparent 100%
    );
    transform: scale(0);
    animation: ripple-expand 0.6s ease-out forwards;
}

@keyframes ripple-expand {
    to {
        transform: scale(1);
        opacity: 0;
    }
}

/* ============================================
   Hero: The Gate
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    overflow: hidden;
}

.hero-left {
    width: 55%;
    background: var(--bio-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 60px 80px 80px;
    position: relative;
    z-index: 2;
}

.hero-right {
    width: 45%;
    background: var(--chlorophyll-deep);
    position: relative;
    overflow: hidden;
}

.vine-divider {
    position: absolute;
    top: 0;
    left: 54%;
    width: 80px;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

.hero-title {
    font-family: 'Lora', serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 7rem);
    color: var(--cream-bone);
    line-height: 1.05;
    margin-bottom: 24px;
}

.hero-tagline {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.3vw, 1.1rem);
    color: var(--cream-bone);
    opacity: 0.8;
    max-width: 40ch;
    margin-bottom: 24px;
}

.hero-label {
    font-family: 'Overpass Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: var(--synth-jade);
}

/* Hero vine SVGs */
.vine-hero {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    opacity: 0.6;
}

.vine-path {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    animation: vine-draw 3s ease forwards;
}

.vine-delay-1 {
    animation-delay: 0.5s;
}

.vine-delay-2 {
    animation-delay: 1s;
}

@keyframes vine-draw {
    to { stroke-dashoffset: 0; }
}

/* Hero glass panel */
.hero-glass-panel {
    position: absolute;
    bottom: 30%;
    left: 20%;
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    border: 1px solid var(--glass-border);
    padding: 20px 28px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 4;
}

.glass-label {
    font-family: 'Overpass Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    color: var(--moss-fade);
    text-transform: uppercase;
}

.glass-value {
    font-family: 'Overpass Mono', monospace;
    font-size: 0.9rem;
    color: var(--synth-jade);
    font-weight: 500;
}

/* ============================================
   Glass Cards
   ============================================ */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        ellipse at 30% 40%,
        rgba(57, 232, 154, 0.04) 0%,
        transparent 50%
    ),
    radial-gradient(
        ellipse at 70% 60%,
        rgba(244, 114, 182, 0.03) 0%,
        transparent 50%
    );
    animation: glass-glow 20s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes glass-glow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-30%, -20%); }
}

.glass-card-large {
    padding: 48px;
}

.glass-card-center {
    max-width: 60ch;
    text-align: center;
    padding: 48px;
}

/* ============================================
   Typography
   ============================================ */
.section-heading {
    font-family: 'Lora', serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--cream-bone);
    margin-bottom: 24px;
    line-height: 1.15;
}

.card-heading {
    font-family: 'Lora', serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--cream-bone);
    margin-bottom: 16px;
    line-height: 1.2;
}

.body-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.3vw, 1.1rem);
    line-height: 1.7;
    color: var(--cream-bone);
    opacity: 0.85;
    margin-bottom: 14px;
}

/* ============================================
   Data elements
   ============================================ */
.card-data {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.data-label {
    font-family: 'Overpass Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: var(--moss-fade);
    text-transform: uppercase;
}

.data-value {
    font-family: 'Overpass Mono', monospace;
    font-size: 0.85rem;
    color: var(--cream-bone);
    font-weight: 500;
}

.data-value.jade { color: var(--synth-jade); }
.data-value.pink { color: var(--petal-pink); }

/* ============================================
   Canopy: Broken Grid
   ============================================ */
.canopy {
    position: relative;
    z-index: 1;
    padding: 80px 40px 120px;
}

.broken-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.grid-card {
    position: relative;
}

.card-a {
    grid-column: 1 / 4;
    margin-right: -20px;
}

.card-b {
    grid-column: 4 / 7;
    margin-top: 60px;
    margin-left: -20px;
}

.card-c {
    grid-column: 2 / 5;
    margin-top: -30px;
}

/* Tendrils */
.tendril {
    position: absolute;
    width: 100px;
    height: 60px;
    overflow: visible;
}

.tendril-right {
    top: 50%;
    right: -80px;
    transform: translateY(-50%);
}

.tendril-left {
    top: 30%;
    left: -60px;
    transform: translateY(-50%);
}

/* ============================================
   Diagonal Section Breaks
   ============================================ */
.diagonal-break {
    height: 80px;
    background: var(--bio-dark);
    clip-path: polygon(0 0, 100% 40%, 100% 100%, 0 60%);
    position: relative;
    z-index: 2;
}

.diagonal-steep {
    clip-path: polygon(0 0, 100% 50%, 100% 100%, 0 50%);
}

/* ============================================
   Atrium
   ============================================ */
.atrium {
    position: relative;
    z-index: 1;
    padding: 80px 40px 120px;
    background: linear-gradient(180deg, var(--bio-dark) 0%, #162e20 50%, var(--bio-dark) 100%);
}

.atrium-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.atrium-card-left {
    margin-top: 40px;
}

.atrium-card-right {
    margin-top: -20px;
}

/* ============================================
   Lab
   ============================================ */
.lab {
    position: relative;
    z-index: 1;
    padding: 80px 40px 120px;
    background: var(--chlorophyll-deep);
}

.lab-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.lab-card-wide {
    grid-column: 1 / -1;
}

/* Specimens */
.specimen-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.specimen {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.specimen-id {
    font-family: 'Overpass Mono', monospace;
    font-size: 0.75rem;
    color: var(--moss-fade);
    letter-spacing: 0.05em;
}

.specimen-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    color: var(--cream-bone);
}

.specimen-status {
    font-family: 'Overpass Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.specimen-status.jade { color: var(--synth-jade); }
.specimen-status.pink { color: var(--petal-pink); }

/* ============================================
   Horizon
   ============================================ */
.horizon {
    position: relative;
    z-index: 1;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px 200px;
    background: var(--bio-dark);
}

.horizon-content {
    position: relative;
    z-index: 2;
}

.horizon-text {
    font-family: 'Lora', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.1rem, 1.6vw, 1.3rem);
    line-height: 1.8;
    color: var(--cream-bone);
    opacity: 0.9;
    margin-bottom: 32px;
}

.horizon-domain {
    font-family: 'Lora', serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--synth-jade);
    letter-spacing: 0.02em;
}

/* Skyline */
.skyline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    z-index: 1;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.skyline.visible {
    opacity: 1;
}

.skyline svg {
    width: 100%;
    height: 100%;
}

/* ============================================
   Reveal Animation
   ============================================ */
[data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-reveal].in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
    }

    .hero-left {
        width: 100%;
        padding: 60px 24px;
        min-height: 60vh;
    }

    .hero-right {
        width: 100%;
        min-height: 40vh;
    }

    .vine-divider {
        display: none;
    }

    .broken-grid {
        grid-template-columns: 1fr;
    }

    .card-a,
    .card-b,
    .card-c {
        grid-column: 1;
        margin: 0;
    }

    .tendril {
        display: none;
    }

    .atrium-grid {
        grid-template-columns: 1fr;
    }

    .atrium-card-left,
    .atrium-card-right {
        margin: 0;
    }

    .lab-grid {
        grid-template-columns: 1fr;
    }

    .lab-card-wide {
        grid-column: 1;
    }

    .diagonal-break {
        clip-path: polygon(0 0, 100% 20%, 100% 100%, 0 80%);
    }

    .glass-card {
        padding: 24px;
    }

    .glass-card-large {
        padding: 32px;
    }
}
