/* logical.day — Holographic Logic Garden */
:root {
    --holo-pink: #ff6fd8;
    --holo-cyan: #00fff0;
    --void-purple: #1a0e2e;
    --twilight: #3813c2;
    --prism-mist: #f0e8ff;
    --leaf-green: #4ade80;
    --sunset: #ffb347;
    --plum: #2d1b4e;
    --deep-dark: #0d0618;
    --darkest: #0a0510;
    --light-green: #c8e6c9;
    --light-cyan: #e0f7fa;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    color: var(--plum);
    overflow-x: hidden;
    background: var(--void-purple);
}

/* ===== SCENE 1 — CANOPY ===== */
#canopy {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 30% 20%, rgba(74, 222, 128, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(255, 111, 216, 0.1) 0%, transparent 50%),
                linear-gradient(180deg, #1a0e2e 0%, #0d0618 100%);
    overflow: hidden;
}

.particle-field {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--holo-cyan);
    box-shadow: 0 0 6px var(--holo-cyan), 0 0 12px var(--holo-pink);
    animation: float var(--dur, 12s) ease-in-out infinite;
    opacity: 0.6;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.leaves-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.leaf {
    position: absolute;
    background: linear-gradient(var(--leaf-angle, 135deg), rgba(255,111,216,0.2), rgba(0,255,240,0.12), rgba(74,222,128,0.18));
    filter: drop-shadow(0 0 6px rgba(0,255,240,0.25));
    clip-path: polygon(50% 0%, 80% 20%, 100% 50%, 80% 80%, 50% 100%, 20% 80%, 0% 50%, 20% 20%);
    animation: leafSway var(--sway-dur, 6s) ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes leafSway {
    0% { transform: rotate(-3deg); }
    100% { transform: rotate(3deg); }
}

.canopy-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-title {
    font-family: 'Righteous', cursive;
    font-size: clamp(4rem, 10vw, 9rem);
    line-height: 0.95;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ff6fd8 0%, #3813c2 25%, #00fff0 50%, #ff6fd8 75%, #3813c2 100%);
    background-size: 400% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: holoShift 12s linear infinite;
}

@keyframes holoShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 400% 50%; }
}

.tagline {
    font-family: 'Nunito', sans-serif;
    font-size: 1.3rem;
    color: rgba(240, 232, 255, 0.8);
    margin-top: 1rem;
    opacity: 0;
    animation: fadeIn 1s ease 1.5s forwards;
}

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

.scroll-chevron {
    position: absolute;
    bottom: 2rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

/* ===== SCENE 2 — UNDERSTORY ===== */
#understory {
    position: relative;
    padding: 8rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    background: linear-gradient(180deg, #0d0618 0%, var(--prism-mist) 15%, var(--prism-mist) 85%, #1a0e2e 100%);
}

.vine-connector {
    width: 80px;
    height: 150px;
    display: block;
    margin: 0 auto;
}

.vine-path {
    animation: vineGrow 2s ease-out forwards;
    animation-play-state: paused;
    stroke-dashoffset: 300;
}

.vine-path.animate {
    animation-play-state: running;
}

@keyframes vineGrow {
    to { stroke-dashoffset: 0; }
}

.vine-node {
    fill: url(#holoGrad);
    fill: var(--holo-cyan);
    opacity: 0.7;
}

.pod {
    position: relative;
    max-width: 520px;
    width: 90%;
    padding: 2.5rem;
    background: linear-gradient(145deg, rgba(240, 232, 255, 0.95) 0%, rgba(224, 247, 250, 0.9) 100%);
    backdrop-filter: blur(8px);
    border-radius: 30px 60px 30px 60px;
    box-shadow: 0 8px 32px rgba(26, 14, 46, 0.08), 0 0 0 1px rgba(0, 255, 240, 0.1);
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, box-shadow 0.3s ease;
}

.pod.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.pod:hover {
    box-shadow: 0 8px 32px rgba(26, 14, 46, 0.12), 0 0 0 2px var(--holo-cyan), 0 0 20px rgba(0,255,240,0.15);
}

.pod-a { align-self: flex-start; margin-left: 10%; }
.pod-b { align-self: flex-end; margin-right: 10%; }
.pod-c { align-self: center; }

.pod-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--plum);
    margin-bottom: 1rem;
}

.pod-text {
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    color: var(--plum);
    line-height: 1.6;
    margin-top: 1rem;
}

/* Truth Table */
.truth-table table {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    border-collapse: collapse;
    width: 100%;
}

.truth-table th, .truth-table td {
    padding: 0.5rem 1rem;
    text-align: center;
    border: 1px solid rgba(0, 255, 240, 0.3);
}

.truth-table th {
    background: linear-gradient(135deg, rgba(255,111,216,0.1), rgba(0,255,240,0.1));
    color: var(--twilight);
}

/* Gate Botanicals */
.gate-botanicals {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin: 1rem 0;
}

.gate-svg {
    width: 80px;
    height: 80px;
}

.gate-draw {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 1.5s ease;
}

.pod.visible .gate-draw {
    stroke-dashoffset: 0;
}

/* Inference Flow */
.inference-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.inference-node {
    font-family: 'Fira Code', monospace;
    font-size: 1.1rem;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(240,232,255,1), rgba(224,247,250,1));
    border: 2px solid rgba(0, 255, 240, 0.3);
    box-shadow: 0 4px 12px rgba(56, 19, 194, 0.1);
}

.inference-node.conclusion {
    border-color: var(--leaf-green);
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.3);
}

.inference-arrow {
    font-size: 1.2rem;
    color: var(--twilight);
}

/* ===== SCENE 3 — ROOT NETWORK ===== */
#roots {
    position: relative;
    height: 100vh;
    background: var(--void-purple);
    overflow: hidden;
}

.tech-underlay {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(45deg, transparent, transparent 40px, rgba(56, 19, 194, 0.05) 40px, rgba(56, 19, 194, 0.05) 41px);
    pointer-events: none;
}

.network {
    position: absolute;
    inset: 0;
}

.net-node {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--holo-pink), var(--twilight));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fira Code', monospace;
    font-size: 1.2rem;
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 111, 216, 0.4);
    transform: scale(0);
    transition: transform 0.5s ease-out, box-shadow 0.3s ease;
    cursor: default;
}

.net-node::after {
    content: attr(data-symbol);
}

.net-node.active {
    transform: scale(1);
}

.net-node.active:hover {
    box-shadow: 0 0 25px var(--holo-cyan), 0 0 40px rgba(0,255,240,0.3);
}

.network-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.network-lines line {
    stroke: var(--leaf-green);
    stroke-width: 1.5;
    stroke-dasharray: 8 4;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 1.5s ease;
}

.network-lines line.animate {
    stroke-dashoffset: 0;
}

/* ===== SCENE 4 — SOIL ===== */
#soil {
    position: relative;
    height: 50vh;
    background: linear-gradient(180deg, #1a0e2e, #0a0510);
    display: flex;
    align-items: center;
    justify-content: center;
}

.seeds {
    position: absolute;
    inset: 0;
}

.seed {
    position: absolute;
    left: var(--sx);
    top: var(--sy);
    font-family: 'Nunito', sans-serif;
    font-size: 0.75rem;
    color: rgba(240, 232, 255, 0.6);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(240,232,255,0.05), transparent);
    border: 1px solid rgba(240,232,255,0.1);
    transition: all 0.3s ease;
    cursor: default;
}

.seed:hover {
    color: var(--sunset);
    border-color: var(--sunset);
    box-shadow: 0 0 20px rgba(255, 179, 71, 0.4);
    text-shadow: 0 0 8px var(--sunset);
}

.soil-footer {
    position: absolute;
    bottom: 2rem;
    text-align: center;
}

.footer-title {
    font-family: 'Righteous', cursive;
    font-size: 1.2rem;
    color: var(--prism-mist);
    display: block;
    margin-bottom: 0.5rem;
}

.footer-underline {
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, var(--holo-pink), var(--holo-cyan));
    margin: 0 auto;
    animation: drawLine 2s ease forwards;
    animation-play-state: paused;
}

.footer-underline.animate {
    animation-play-state: running;
}

@keyframes drawLine {
    to { width: 120px; }
}

/* Ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,111,216,0.3), rgba(0,255,240,0.2), transparent);
    transform: scale(0);
    animation: rippleExpand 500ms ease-out forwards;
    pointer-events: none;
}

@keyframes rippleExpand {
    to {
        transform: scale(3);
        opacity: 0;
    }
}
