/* ==========================================================================
   prototype.report - Dopamine-neon Botanical Greenhouse
   ========================================================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: #0D1F0D;
    color: #F0F5F0;
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 400;
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 1.8;
    overflow-x: hidden;
}

/* ---------- Fullscreen Sections ---------- */
.fullscreen-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
}

/* ==========================================================================
   GREENHOUSE ENTRY
   ========================================================================== */
#greenhouse-entry {
    background: #0D1F0D;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Parallax background layer */
.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Parallax foreground layer */
.parallax-fg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

/* ---------- Vine Borders ---------- */
.vine-border {
    position: absolute;
    z-index: 2;
}

.vine-left {
    left: 0;
    top: 0;
    width: 120px;
    height: 100%;
}

.vine-right {
    right: 0;
    top: 0;
    width: 120px;
    height: 100%;
}

.vine-top {
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
}

.vine-bottom {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
}

/* Vine stroke-dashoffset animation */
.vine-path {
    stroke-dasharray: 2500;
    stroke-dashoffset: 2500;
    animation: drawVine 2s ease-out 0.2s forwards;
}

.vine-path-delay {
    animation-delay: 0.6s;
}

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

/* Leaf clusters fade in */
.leaf-cluster {
    opacity: 0;
    animation: fadeInLeaf 0.8s ease-out forwards;
}

.leaf-1 { animation-delay: 1.0s; }
.leaf-2 { animation-delay: 1.3s; }
.leaf-3 { animation-delay: 1.6s; }

@keyframes fadeInLeaf {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* ---------- Foreground Leaves ---------- */
.fg-leaf {
    position: absolute;
    opacity: 0;
    animation: fadeInLeaf 0.8s ease-out forwards;
}

.fg-leaf-1 {
    top: 8%;
    left: 5%;
    transform: rotate(-15deg);
    animation-delay: 1.1s;
}

.fg-leaf-2 {
    top: 75%;
    right: 8%;
    transform: rotate(25deg);
    animation-delay: 1.4s;
}

.fg-leaf-3 {
    bottom: 15%;
    left: 10%;
    transform: rotate(-40deg);
    animation-delay: 1.7s;
}

.fg-leaf-4 {
    top: 20%;
    right: 3%;
    transform: rotate(10deg);
    animation-delay: 1.9s;
}

/* ---------- Wordmark ---------- */
.wordmark {
    position: relative;
    z-index: 4;
    text-align: center;
    opacity: 0;
    animation: fadeInWordmark 1s ease-out 1.5s forwards;
}

@keyframes fadeInWordmark {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.wordmark-title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: clamp(36px, 6vw, 72px);
    letter-spacing: -0.01em;
    color: #FF2D78;
    text-shadow:
        0 0 40px rgba(255, 45, 120, 0.4),
        0 0 80px rgba(255, 45, 120, 0.2);
    line-height: 1.1;
}

.wordmark-dot {
    color: #ADFF02;
    text-shadow:
        0 0 30px rgba(173, 255, 2, 0.5),
        0 0 60px rgba(173, 255, 2, 0.3);
}

.wordmark-subtitle {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 0.03em;
    color: #00E5CC;
    margin-top: 16px;
    opacity: 0.8;
}

/* ---------- Dopamine Pink Glow ---------- */
.pink-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,45,120,0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ---------- Bubbles Container ---------- */
.bubbles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

/* Individual bubble */
.bubble {
    position: absolute;
    border-radius: 50%;
    animation: floatBubble var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
    opacity: 0;
}

@keyframes floatBubble {
    0% {
        transform: translateY(100px) scale(0.8);
        opacity: 0;
    }
    20% {
        opacity: 0.8;
    }
    80% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100px) scale(1.1);
        opacity: 0;
    }
}

/* ==========================================================================
   INTERLUDE SECTIONS (Water Garden)
   ========================================================================== */
.interlude-section {
    position: relative;
    height: 40vh;
    min-height: 250px;
    background: #0D1F0D;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.interlude-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Morph shapes */
.morph-shape {
    position: absolute;
    opacity: 0.4;
    animation: floatMorph 6s ease-in-out infinite;
}

.morph-1 {
    top: 20%;
    left: 15%;
    animation-duration: 7s;
}

.morph-2 {
    bottom: 15%;
    right: 20%;
    animation-duration: 5s;
    animation-delay: 1.5s;
}

.morph-3 {
    top: 30%;
    right: 25%;
    animation-duration: 6s;
    animation-delay: 0.8s;
}

.morph-4 {
    top: 25%;
    left: 30%;
    animation-duration: 8s;
    animation-delay: 2s;
}

@keyframes floatMorph {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
    33% { transform: translateY(-15px) rotate(5deg) scale(1.05); }
    66% { transform: translateY(10px) rotate(-3deg) scale(0.95); }
}

/* ==========================================================================
   REPORT SECTIONS
   ========================================================================== */
.report-section {
    background: #1A4D1A;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.report-section:nth-child(odd) {
    background: #0D1F0D;
}

.report-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Margin vines for report sections */
.margin-vine {
    position: absolute;
    top: 0;
    height: 100%;
}

.margin-vine-left {
    left: 0;
    width: 60px;
}

.margin-vine-right {
    right: 0;
    width: 60px;
}

.vine-tendril {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 1.5s ease-out;
}

.vine-tendril.animate-in {
    stroke-dashoffset: 0;
}

/* ---------- Report Content ---------- */
.report-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
    width: 90%;
    padding: 60px 0;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.report-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.report-label {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 0.03em;
    color: #E8C840;
    display: block;
    margin-bottom: 12px;
}

.report-title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 4.5vw, 56px);
    letter-spacing: -0.01em;
    color: #FF2D78;
    margin-bottom: 24px;
    line-height: 1.15;
}

/* Accent color per section */
#report-1 .report-title { color: #FF2D78; }
#report-2 .report-title { color: #00E5CC; }
#report-3 .report-title { color: #E8C840; }
#report-4 .report-title { color: #ADFF02; }

.report-body {
    color: #F0F5F0;
    margin-bottom: 32px;
}

/* ---------- Report Meta ---------- */
.report-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.meta-item {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 0.03em;
    color: #F0F5F0;
    opacity: 0.7;
}

.meta-key {
    color: #ADFF02;
    margin-right: 6px;
}

#report-2 .meta-key { color: #00E5CC; }
#report-3 .meta-key { color: #E8C840; }

/* ==========================================================================
   ROOT SYSTEM FOOTER
   ========================================================================== */
#root-footer {
    background: #0D1F0D;
    padding: 60px 20px 40px;
    position: relative;
    overflow: hidden;
}

.root-system {
    max-width: 800px;
    margin: 0 auto;
}

#root-svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Root trunk and branches */
.root-trunk {
    stroke: #1A4D1A;
    stroke-width: 3;
}

.root-branch {
    stroke: #ADFF02;
    stroke-width: 1.5;
    transition: stroke 0.3s ease, stroke-width 0.3s ease;
    cursor: pointer;
}

.root-sub {
    stroke: #1A4D1A;
    stroke-width: 1;
    opacity: 0.6;
}

/* Root nodes */
.root-node {
    cursor: pointer;
}

.node-circle {
    transition: fill 0.3s ease, stroke 0.3s ease, r 0.3s ease;
}

.node-glow-circle {
    transition: opacity 0.3s ease;
}

.node-label {
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    letter-spacing: 0.03em;
    fill: #F0F5F0;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

/* Hover state */
.root-node:hover .node-circle {
    fill: #FF2D78;
    stroke: #FF2D78;
}

.root-node:hover .node-glow-circle {
    opacity: 1;
}

.root-node:hover .node-label {
    opacity: 1;
    fill: #FF2D78;
}

/* Active branch highlight */
.root-branch.highlight {
    stroke: #FF2D78;
    stroke-width: 2.5;
}

/* Footer text */
.footer-text {
    text-align: center;
    margin-top: 40px;
}

.footer-domain {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #FF2D78;
    display: block;
    margin-bottom: 8px;
}

.footer-tagline {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.03em;
    color: #F0F5F0;
    opacity: 0.5;
}

/* ==========================================================================
   SCROLL REVEAL ANIMATION
   ========================================================================== */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .vine-left,
    .vine-right {
        width: 60px;
    }

    .vine-top,
    .vine-bottom {
        height: 60px;
    }

    .margin-vine-left {
        width: 30px;
    }

    .margin-vine-right {
        width: 30px;
    }

    .fg-leaf {
        display: none;
    }

    .report-content {
        width: 85%;
        padding: 40px 0;
    }

    .report-meta {
        flex-direction: column;
        gap: 8px;
    }

    .wordmark-title {
        font-size: clamp(28px, 8vw, 48px);
    }

    .pink-glow {
        width: 300px;
        height: 300px;
    }

    .morph-shape {
        display: none;
    }

    #root-svg {
        min-height: 200px;
    }
}

@media (max-width: 480px) {
    .vine-left,
    .vine-right {
        width: 40px;
    }

    .vine-top,
    .vine-bottom {
        height: 40px;
    }

    .interlude-section {
        height: 25vh;
        min-height: 150px;
    }
}
