:root {
    /* Color Palette - Bioluminescent Organic Alien */
    --bg-abyss: #060808;
    --bg-tissue: #0c100f;
    --bg-membrane: #101614;
    --bg-substrate: #0a0f0d;

    --text-primary: #c8d4cf;
    --text-muted: #6b7d75;

    --vein-teal: #00d4a8;
    --vein-teal-dim: rgba(0, 212, 168, 0.15);
    --bloom-amber: #d4a048;
    --bloom-amber-dim: rgba(212, 160, 72, 0.15);
    --ichor-magenta: #c45098;
    --depth-purple: #6b3fa0;

    /* Typography */
    --font-header: 'Cinzel', serif;
    --font-sub: 'Outfit', sans-serif;
    --font-body: 'Cormorant Garamond', serif;
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-abyss);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
}

body {
    position: relative;
    overflow-x: hidden;
}

/* Organic Tissue Overlay */
.tissue-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.45' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    mix-blend-mode: soft-light;
}

h1, h2, h3 {
    text-transform: uppercase;
    letter-spacing: 2px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--vein-teal), var(--bloom-amber));
    margin: 1rem 0 3rem 0;
    border-radius: 2px;
    box-shadow: 0 0 12px var(--vein-teal-dim);
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(6,8,8,0.95), rgba(6,8,8,0));
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 212, 168, 0.06);
}

.logo {
    font-family: var(--font-header);
    font-size: 1.8rem;
    letter-spacing: 6px;
    color: var(--text-primary);
    text-shadow: 0 0 15px rgba(0, 212, 168, 0.15);
    animation: logo-breathe 5s ease-in-out infinite alternate;
}

@keyframes logo-breathe {
    0% { text-shadow: 0 0 10px rgba(0, 212, 168, 0.08); }
    100% { text-shadow: 0 0 20px rgba(0, 212, 168, 0.2), 0 0 40px rgba(0, 212, 168, 0.05); }
}

nav a {
    margin-left: 2rem;
    font-family: var(--font-sub);
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    letter-spacing: 0.5px;
}

nav a:hover {
    color: var(--vein-teal);
    text-shadow: 0 0 8px rgba(0, 212, 168, 0.3);
}

.back-link {
    color: var(--bloom-amber) !important;
    border: 1px solid rgba(212, 160, 72, 0.3);
    padding: 0.4rem 1rem;
    border-radius: 2px;
    transition: all 0.3s ease !important;
}

.back-link:hover {
    border-color: var(--bloom-amber) !important;
    background: rgba(212, 160, 72, 0.08) !important;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('../assets/xylem_hero.png');
    background-size: cover;
    background-position: center 40%;
    z-index: 1;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(6,8,8,0.4) 0%,
        rgba(6,8,8,0.2) 30%,
        rgba(6,8,8,0.3) 60%,
        rgba(6,8,8,0.95) 100%
    );
}

/* Pulsing vein network behind the hero */
.vein-pulse {
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0,212,168,0.04) 0%, rgba(0,0,0,0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: vein-breathe 6s ease-in-out infinite;
    z-index: 2;
    pointer-events: none;
}

@keyframes vein-breathe {
    0%, 100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.8; }
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 750px;
    padding: 0 2rem;
}

.hero-title {
    font-family: var(--font-header);
    font-size: 5rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: 8px;
    position: relative;
    animation: title-emerge 6s ease-in-out infinite alternate;
}

@keyframes title-emerge {
    0% {
        text-shadow: 2px 2px 8px rgba(0,0,0,0.9), 0 0 20px rgba(0, 212, 168, 0.05);
        color: var(--text-primary);
    }
    100% {
        text-shadow: 2px 2px 8px rgba(0,0,0,0.9), 0 0 30px rgba(0, 212, 168, 0.15), 0 0 60px rgba(0, 212, 168, 0.05);
        color: #dae8e2;
    }
}

.hero-tagline {
    font-family: var(--font-sub);
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--vein-teal);
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 550px;
    margin: 0 auto 3rem auto;
    font-style: italic;
}

/* Buttons */
.cta-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.9rem 2.2rem;
    font-family: var(--font-sub);
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    border: 1px solid;
    border-radius: 2px;
    cursor: pointer;
}

.btn-primary {
    background: transparent;
    border-color: var(--vein-teal);
    color: var(--vein-teal);
    animation: btn-vein-idle 4s infinite alternate;
}

.btn-primary:hover {
    animation: none;
    background: rgba(0, 212, 168, 0.1);
    border-color: var(--vein-teal);
    color: #e0fff6;
    box-shadow: 0 0 20px rgba(0, 212, 168, 0.2), inset 0 0 10px rgba(0, 212, 168, 0.1);
    text-shadow: 0 0 8px rgba(0, 212, 168, 0.4);
}

@keyframes btn-vein-idle {
    0% { border-color: rgba(0,212,168,0.2); box-shadow: 0 0 5px rgba(0,212,168,0.05) inset; }
    100% { border-color: rgba(0,212,168,0.5); box-shadow: 0 0 12px rgba(0,212,168,0.1) inset; }
}

.btn-secondary {
    background: rgba(16, 22, 20, 0.6);
    border-color: var(--bloom-amber);
    color: var(--bloom-amber);
}

.btn-secondary:hover {
    background: rgba(212, 160, 72, 0.1);
    box-shadow: 0 0 15px rgba(212, 160, 72, 0.15);
}

/* World Section */
.world-section {
    background: var(--bg-tissue);
    border-top: 1px solid rgba(0, 212, 168, 0.08);
    border-bottom: 1px solid rgba(0, 212, 168, 0.08);
    position: relative;
    overflow: hidden;
}

.world-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 20% 80%, rgba(0, 212, 168, 0.03) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(212, 160, 72, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.world-section h2 {
    font-family: var(--font-header);
    font-size: 2.5rem;
    color: var(--vein-teal);
}

.world-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.world-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.world-text h3 {
    font-family: var(--font-sub);
    color: var(--bloom-amber);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    margin-top: 2rem;
    letter-spacing: 1px;
}

/* Feature Cards */
.feature-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-membrane);
    border: 1px solid rgba(0, 212, 168, 0.08);
    border-radius: 4px;
    padding: 1.8rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--vein-teal), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 212, 168, 0.2);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 212, 168, 0.05);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(0, 212, 168, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--vein-teal);
    background: rgba(0, 212, 168, 0.04);
}

.feature-card h4 {
    font-family: var(--font-sub);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Pillars Section */
.pillars-section {
    background: linear-gradient(to bottom, var(--bg-abyss), var(--bg-substrate));
}

.pillars-section h2 {
    font-family: var(--font-header);
    font-size: 2.5rem;
    text-align: center;
    color: var(--bloom-amber);
}

.pillars-section .divider {
    margin: 1rem auto 3rem auto;
}

.pillar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.pillar-card {
    background: var(--bg-tissue);
    border: 1px solid rgba(212, 160, 72, 0.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4), inset 0 0 30px rgba(0,0,0,0.3);
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    border-radius: 4px;
}

.pillar-card:hover {
    transform: translateY(-6px);
    border-color: rgba(212, 160, 72, 0.2);
    box-shadow: 0 12px 35px rgba(0,0,0,0.6), 0 0 15px rgba(212, 160, 72, 0.05);
}

.pillar-icon {
    width: 56px;
    height: 56px;
    background: rgba(212, 160, 72, 0.06);
    border: 1px solid rgba(212, 160, 72, 0.15);
    border-radius: 50%;
    margin: 0 auto 1.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bloom-amber);
}

.pillar-card h3 {
    font-family: var(--font-sub);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.pillar-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Status Banner */
.status-section {
    text-align: center;
    background: radial-gradient(circle, var(--bg-membrane) 0%, var(--bg-abyss) 100%);
    padding: 6rem 2rem;
    border-top: 1px solid rgba(0, 212, 168, 0.06);
    position: relative;
    overflow: hidden;
}

.status-section::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 212, 168, 0.03) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: vein-breathe 8s ease-in-out infinite;
    pointer-events: none;
}

.status-section h2 {
    font-family: var(--font-header);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--vein-teal);
    position: relative;
}

.status-section p {
    font-size: 1.15rem;
    margin-bottom: 2rem;
    position: relative;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

.status-badge {
    display: inline-block;
    padding: 0.6rem 1.8rem;
    font-family: var(--font-sub);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    border: 1px solid rgba(0, 212, 168, 0.25);
    color: var(--vein-teal);
    border-radius: 2px;
    position: relative;
    animation: badge-pulse 3s ease-in-out infinite;
    margin-bottom: 2rem;
}

@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 212, 168, 0.08); border-color: rgba(0, 212, 168, 0.15); }
    50% { box-shadow: 0 0 20px rgba(0, 212, 168, 0.15); border-color: rgba(0, 212, 168, 0.35); }
}

/* Newsletter form */
.newsletter-form {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 0;
    max-width: 550px;
    margin: 0 auto;
    height: 56px;
    position: relative;
}

.newsletter-form input[type="email"] {
    flex-grow: 1;
    height: 100%;
    padding: 0 1.5rem;
    background-color: var(--bg-abyss);
    border: 1px solid rgba(0, 212, 168, 0.12);
    border-right: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.05rem;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
    margin: 0;
    transition: border-color 0.3s ease;
}

.newsletter-form input[type="email"]::placeholder {
    color: var(--text-muted);
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--vein-teal);
}

.newsletter-form input[type="email"]:-webkit-autofill,
.newsletter-form input[type="email"]:-webkit-autofill:hover,
.newsletter-form input[type="email"]:-webkit-autofill:focus,
.newsletter-form input[type="email"]:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #060808 inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.newsletter-form button {
    height: 100%;
    border-radius: 0;
    margin: 0;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem;
    border-top: 1px solid rgba(0, 212, 168, 0.06);
    font-size: 0.85rem;
    color: #3d4d47;
    background: var(--bg-abyss);
}

footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--vein-teal);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 1.5rem;
    }

    .logo {
        font-size: 1.4rem;
        letter-spacing: 4px;
    }

    nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    nav a {
        margin: 0;
        font-size: 0.85rem;
    }

    .hero-title {
        font-size: 2.8rem;
        letter-spacing: 4px;
    }

    .hero-tagline {
        font-size: 0.8rem;
        letter-spacing: 3px;
    }

    .hero-desc {
        font-size: 1.1rem;
    }

    .world-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .cta-group {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .newsletter-form {
        flex-direction: column;
        height: auto;
        gap: 0.5rem;
    }

    .newsletter-form input[type="email"] {
        height: 50px;
        border-right: 1px solid rgba(0, 212, 168, 0.12);
    }

    .newsletter-form button {
        height: 50px;
    }

    .container {
        padding: 3rem 1.5rem;
    }
}
