:root {
    --primary-color: #059669; 
    --primary-hover: #10b981;
    --bg-color: #f0fdf4;
    --bg-alt: #dcfce7;
    --text-main: #064e3b;
    --text-muted: #047857;
    --border-color: #a7f3d0;
    --card-bg: rgba(255, 255, 255, 0.7);
    --shadow: 0 8px 32px 0 rgba(16, 185, 129, 0.1);
    --glass-border: rgba(16, 185, 129, 0.2);
}

body.dark {
    --primary-color: #10b981; 
    --primary-hover: #34d399;
    --bg-color: #050d0a; 
    --bg-alt: #022c22;
    --text-main: #ecfdf5;
    --text-muted: #a7f3d0;
    --border-color: #064e3b;
    --card-bg: rgba(5, 13, 10, 0.6);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --glass-border: rgba(16, 185, 129, 0.3);
}

html {
    scroll-behavior: smooth;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

a { text-decoration: none; color: var(--primary-color); transition: color 0.3s; }
a:hover { color: var(--primary-hover); }

/* Background Canvas */
#bio-particles {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -2;
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.text-center { text-align: center; }
.section-padding { padding: 90px 0; }
.bg-alt { background-color: var(--bg-alt); transition: background-color 0.4s ease; }

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 50px;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

/* Header */
header {
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    transition: all 0.3s;
}

.header-container {
    display: flex; justify-content: space-between; align-items: center;
}

.logo {
    font-size: 1.6rem; font-weight: 800;
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
    letter-spacing: 1px;
}

.main-nav { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.main-nav a {
    color: var(--text-main); font-weight: 500;
    position: relative;
    padding: 5px 0;
}
.main-nav a::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
    background: var(--primary-color); transition: width 0.3s;
}
.main-nav a:hover::after { width: 100%; }

.theme-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 50%;
    background: transparent; border: 1px solid var(--primary-color);
    color: var(--primary-color); cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(16,185,129,0.2);
}
.theme-toggle:hover {
    box-shadow: 0 0 15px rgba(16,185,129,0.6);
    transform: rotate(15deg) scale(1.05);
}

/* Hero Section */
.hero {
    padding: 120px 0;
    position: relative;
}
.headline {
    font-size: 3.5rem; font-weight: 800; margin-bottom: 25px; line-height: 1.2;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}
.sub-headline {
    font-size: 1.2rem; color: var(--text-muted); margin-bottom: 40px;
    max-width: 800px; margin-left: auto; margin-right: auto;
}

/* Radar Widget */
.radar-widget {
    margin: 40px auto 0; max-width: 400px; height: 200px;
    position: relative; background: var(--card-bg); border-radius: 16px;
    border: 1px solid var(--glass-border); box-shadow: var(--shadow);
    backdrop-filter: blur(8px); padding: 20px;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
}
.radar-title { position: absolute; top: 15px; font-size: 0.9rem; color: var(--text-muted); font-weight: 600; }
.sim-btn {
    background: rgba(16,185,129,0.1); border: 1px solid var(--primary-color);
    color: var(--primary-color); padding: 8px 20px; border-radius: 20px;
    cursor: pointer; transition: all 0.3s; font-size: 0.85rem; font-weight: 600;
    z-index: 2; margin-bottom: 10px;
}
.sim-btn:hover { background: var(--primary-color); color: #fff !important; }

.node {
    position: absolute; width: 14px; height: 14px; border-radius: 50%;
    background: var(--primary-color); box-shadow: 0 0 12px var(--primary-color);
}
.node::after {
    content: attr(title); position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
    font-size: 0.75rem; color: var(--text-muted); white-space: nowrap;
}
.node.n1 { top: 60px; left: 60px; }
.node.n2 { top: 60px; right: 60px; }
.node.n3 { top: 120px; left: 50%; transform: translateX(-50%); }

.line {
    position: absolute; height: 2px; background: var(--glass-border);
    transform-origin: 0 50%; transition: all 0.5s;
}
.line.l1 { top: 67px; left: 74px; width: 240px; background: var(--primary-color); box-shadow: 0 0 8px var(--primary-color); }
.line.l2 { top: 67px; left: 74px; width: 140px; transform: rotate(23deg); opacity: 0; }
.line.l3 { top: 127px; left: 200px; width: 140px; transform: rotate(-23deg); opacity: 0; }

.radar-widget.rerouted .line.l1 { background: #ef4444; box-shadow: 0 0 8px #ef4444; width: 110px; } 
.radar-widget.rerouted .line.l2, .radar-widget.rerouted .line.l3 {
    opacity: 1; background: var(--primary-color); box-shadow: 0 0 8px var(--primary-color);
}
.radar-widget.rerouted .data-pulse { display: none; }

.data-pulse {
    position: absolute; width: 8px; height: 8px; background: #fff; border-radius: 50%;
    box-shadow: 0 0 10px #fff;
    animation: pulseMove 1.5s linear infinite; top: -3px;
}
@keyframes pulseMove {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(230px); opacity: 0; }
}

/* Buttons */
.cta-button {
    display: inline-block; padding: 12px 30px; border-radius: 8px;
    font-size: 1.1rem; font-weight: 600; cursor: pointer;
    transition: all 0.3s; text-align: center; text-decoration: none;
}
.primary-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #fff !important; box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    border: none;
}
.primary-btn:hover {
    transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}
.outline-btn {
    background: rgba(16,185,129,0.05); color: var(--primary-color);
    border: 1px solid var(--primary-color);
}
.outline-btn:hover {
    background: rgba(16,185,129,0.15); box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

/* Grid & Cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.card {
    background: var(--card-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border); border-radius: 16px;
    padding: 30px; box-shadow: var(--shadow); transition: transform 0.3s, background 0.3s;
    position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-5px); }

/* Organic breathing border effect for Feature Cards */
.feature-card { z-index: 1; }
.feature-card::after {
    content: ''; position: absolute; top: 50%; left: 50%; width: 250%; height: 250%;
    background: conic-gradient(from 0deg, transparent, var(--primary-color), transparent);
    animation: rotateBorder 4s linear infinite; z-index: -2; opacity: 0; transition: opacity 0.3s;
    transform: translate(-50%, -50%);
}
.feature-card:hover::after { opacity: 0.2; }
.feature-card::before {
    content: ''; position: absolute; inset: 1px; background: var(--card-bg);
    border-radius: 15px; z-index: -1;
}
@keyframes rotateBorder { 100% { transform: translate(-50%, -50%) rotate(360deg); } }

.card-icon {
    font-size: 2.5rem; margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5); display: inline-block;
}

/* Pricing */
.pricing-card { display: flex; flex-direction: column; text-align: center; }
.price { font-size: 3rem; font-weight: 800; color: var(--primary-color); margin: 20px 0; }
.price span { font-size: 1rem; color: var(--text-muted); }
.pricing-features { list-style: none; margin-bottom: 30px; flex-grow: 1; text-align: left; }
.pricing-features li { margin-bottom: 15px; padding-left: 25px; position: relative; }
.pricing-features li::before {
    content: "✓"; position: absolute; left: 0; color: var(--primary-color); font-weight: bold;
    text-shadow: 0 0 5px var(--primary-color);
}
.popular { border-color: var(--primary-color); transform: scale(1.05); }
.popular:hover { transform: scale(1.05) translateY(-5px); }
.badge {
    position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
    background: var(--primary-color); color: #fff; padding: 5px 15px; border-radius: 20px;
    font-size: 0.9rem; font-weight: 600; box-shadow: 0 0 10px var(--primary-color);
}

/* Footer */
footer {
    background: var(--bg-alt); border-top: 1px solid var(--glass-border);
    padding: 50px 0 30px; text-align: center; transition: background 0.4s;
}
.footer-links { display: flex; justify-content: center; gap: 30px; margin-bottom: 30px; flex-wrap: wrap; }

/* Page content for subpages */
.page-content { max-width: 800px; margin: 0 auto; position: relative; z-index: 1; }
.page-content h1 { font-size: 2.5rem; margin-bottom: 30px; color: var(--primary-color); text-shadow: 0 0 10px rgba(16,185,129,0.2); }
.page-content h2 { font-size: 1.5rem; margin: 30px 0 15px; }

@media (max-width: 768px) {
    .headline { font-size: 2.2rem; }
    .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
    .main-nav { display: none; }
    .header-container { flex-wrap: wrap; }
    .popular { transform: none; }
    .popular:hover { transform: translateY(-5px); }
    .cta-button { display: block; width: 100%; margin-bottom: 10px; }
}
