/* Botanical Tech & Digital Tree-Root Aesthetic CSS */
:root {
    /* Light Mode (Organic Bright) */
    --bg: #f0fdf4;
    --surface: rgba(255, 255, 255, 0.7);
    --text: #064e3b;
    --text-muted: #166534;
    --primary: #22c55e;        /* Radiant chlorophyll emerald green */
    --primary-hover: #16a34a;
    --primary-glow: #84cc16;   /* Neon sprout lime */
    --border: rgba(34, 197, 94, 0.3);
    --shadow: 0 8px 32px rgba(34, 197, 94, 0.1);
    --radius: 16px;
}

[data-theme="dark"] {
    /* Deep Forest Obsidian Canvas */
    --bg: #07110d;
    --surface: rgba(11, 28, 20, 0.65);
    --text: #ecfdf5;
    --text-muted: #a7f3d0;
    --primary: #22c55e;
    --primary-hover: #4ade80;
    --primary-glow: #84cc16;
    --border: rgba(34, 197, 94, 0.25);
    --shadow: 0 8px 32px rgba(34, 197, 94, 0.15);
}

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

html {
    scroll-behavior: smooth; /* Smooth transitions for anchor links */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    transition: background-color 0.4s ease, color 0.4s ease;
    line-height: 1.6;
}

body {
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 10;
}

section {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 3.5rem;
    color: var(--primary-glow);
    text-shadow: 0 0 15px rgba(132, 204, 22, 0.2);
}

/* Translucent Botanical-Glass Navbar */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    box-shadow: var(--shadow);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-glow);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 0 0 10px rgba(132, 204, 22, 0.4);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s, text-shadow 0.3s;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--primary-glow);
    text-shadow: 0 0 8px rgba(132, 204, 22, 0.5);
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary-glow);
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.2);
}

.theme-toggle:hover {
    background: rgba(34, 197, 94, 0.1);
    box-shadow: 0 0 15px rgba(132, 204, 22, 0.5);
}

[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid transparent;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-glow));
    color: #000 !important; /* High contrast dark text on bright lime */
    border: none;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(132, 204, 22, 0.6);
    filter: brightness(1.1);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-glow) !important;
    border: 1px solid var(--primary-glow);
}
.btn-secondary:hover {
    background: rgba(132, 204, 22, 0.1);
    box-shadow: 0 0 15px rgba(132, 204, 22, 0.3);
}

/* Glass Card with Leaf-Vein Glow Effect */
.glass-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    padding: 2px;
    background: linear-gradient(135deg, var(--primary-glow), transparent, var(--primary));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

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

.glass-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.2);
    border-color: var(--primary-glow);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 10rem 0 6rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text), var(--primary-glow));
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: 0 0 30px rgba(34, 197, 94, 0.2);
}

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

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
}

/* Topology Widget */
.topology-wrapper {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
}

.anim-dash {
    animation: dashFlow 30s linear infinite;
}
@keyframes dashFlow {
    to { stroke-dashoffset: -1000; }
}

.leaf-node {
    cursor: pointer;
    transition: all 0.3s ease;
    transform-origin: center;
}
.leaf-node:hover {
    fill: var(--primary-glow);
    filter: drop-shadow(0 0 12px var(--primary-glow));
    transform: scale(1.2);
}
@keyframes nodePulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 0px var(--primary)); }
    50% { transform: scale(1.5); filter: drop-shadow(0 0 20px var(--primary-glow)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 0px var(--primary)); }
}

.topo-tooltip {
    position: absolute;
    top: -50px;
    right: 20px;
    background: rgba(7, 17, 13, 0.9);
    border: 1px solid var(--primary-glow);
    padding: 12px 20px;
    border-radius: 8px;
    color: var(--primary-glow);
    font-size: 14px;
    box-shadow: 0 0 20px rgba(132, 204, 22, 0.4);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.topo-tooltip.show { opacity: 1; }

/* Grid Layouts */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

/* Value Cards specifically */
.value-icon {
    width: 50px; height: 50px;
    margin-bottom: 1.5rem;
    color: var(--primary-glow);
}
.glass-card h3 { font-size: 1.4rem; margin-bottom: 1rem; color: var(--text); }
.glass-card p { color: var(--text-muted); }

/* Matrix Table */
.matrix-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    backdrop-filter: blur(12px);
}
.matrix-row {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}
.matrix-row:last-child { border-bottom: none; }
.matrix-row:hover { background: rgba(34, 197, 94, 0.05); }
.matrix-label { font-weight: 600; display: flex; align-items: center; gap: 10px; }
.matrix-value { color: var(--primary-glow); font-family: monospace; font-size: 1.5rem; font-weight: bold; }
.matrix-status { color: var(--primary); font-size: 0.9rem; border: 1px solid var(--primary); padding: 2px 8px; border-radius: 20px; }

/* Pricing */
.pricing-card { text-align: center; }
.pricing-card.popular { border: 2px solid var(--primary-glow); transform: scale(1.05); }
.pricing-card.popular:hover { transform: scale(1.05) translateY(-5px); }
.popular-badge {
    position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
    background: var(--primary-glow); color: #000;
    padding: 4px 16px; border-radius: 20px; font-weight: 800; font-size: 0.85rem;
}
.price { font-size: 3.5rem; font-weight: 900; color: var(--primary-glow); margin: 1.5rem 0; text-shadow: 0 0 15px rgba(132, 204, 22, 0.2); }
.price span { font-size: 1.2rem; color: var(--text-muted); font-weight: normal; }
.pricing-features { list-style: none; text-align: left; margin: 2rem 0; }
.pricing-features li { margin-bottom: 1rem; display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.pricing-features li::before { content: "❖"; color: var(--primary-glow); }

/* Footer */
footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
    margin-top: 5rem;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 3rem; }
.footer-col h4 { margin-bottom: 1.5rem; color: var(--primary-glow); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.75rem; }
.footer-col a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.footer-col a:hover { color: var(--primary-glow); }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid var(--border); color: var(--text-muted); }

/* Responsive */
@media (max-width: 900px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2.5rem; }
    .hero-buttons { flex-direction: column; }
    .btn { width: 100%; }
    .pricing-card.popular { transform: scale(1); }
    .pricing-card.popular:hover { transform: translateY(-5px); }
    .matrix-row { flex-direction: column; gap: 10px; text-align: center; align-items: center; }
}
