/* ========================================
   namu.systems — styles.css
   Dreamy marble city-forest
   ======================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    color: #2a1f3d;
    overflow-x: hidden;
    background: #f7f0f0;
}

/* ========================================
   Seed Navigation (right edge)
   ======================================== */
#seed-nav {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.seed-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8c47a, #d4a0b8);
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: seedPulseNav 3s ease-in-out infinite;
}

.seed-dot.active {
    width: 16px;
    height: 16px;
    box-shadow: 0 0 20px rgba(232, 196, 122, 0.4);
}

@keyframes seedPulseNav {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* ========================================
   Zones — Common
   ======================================== */
.zone {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
}

/* ========================================
   Zone 1: Canopy
   ======================================== */
#zone-canopy {
    display: grid;
    place-items: center;
    height: 100vh;
}

.marble-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 40%, #f7f0f0 0%, #f0eef7 100%),
        linear-gradient(25deg, transparent 40%, rgba(201, 164, 138, 0.05) 50%, transparent 60%),
        linear-gradient(70deg, transparent 30%, rgba(201, 164, 138, 0.12) 45%, transparent 55%),
        linear-gradient(140deg, transparent 35%, rgba(201, 164, 138, 0.08) 48%, transparent 58%);
    filter: url(#marble-noise);
    animation: marbleDrift 120s linear infinite;
    z-index: 0;
}

@keyframes marbleDrift {
    0% { background-position: 0 0, 0 0, 0 0, 0 0; }
    100% { background-position: 200px 100px, -150px 200px, 100px -150px, -200px 100px; }
}

.canopy-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.canopy-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(120px, 20vw, 280px);
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #c8b6e2, #d4a0a0, #e8d5b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.heartbeat-line {
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, #c8b6e2, #d4a0b8, #e8c47a);
    background-size: 200% 100%;
    animation: heartbeat 4s ease-in-out infinite;
    border-radius: 1px;
}

@keyframes heartbeat {
    0%, 100% { background-position: 0% 50%; opacity: 0.6; }
    50% { background-position: 100% 50%; opacity: 1; }
}

/* ========================================
   Zone 2: Trunk
   ======================================== */
#zone-trunk {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 100vh;
    background: linear-gradient(to bottom,
        #f0eef7 0%,
        #f7f0f0 15%,
        #f7f0f0 100%
    );
}

.trunk-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 80%, rgba(200, 182, 226, 0.2) 0%, transparent 60%),
        linear-gradient(25deg, transparent 40%, rgba(201, 164, 138, 0.04) 50%, transparent 60%);
}

.city-skyline {
    position: relative;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    width: 100%;
    height: 100%;
    padding: 0 80px;
    z-index: 1;
}

.building {
    width: var(--w, 80px);
    height: var(--h, 50vh);
    background: var(--grad);
    border-radius: 50% 50% 4px 4px;
    transform: rotate(var(--rot, 0deg)) scale(0.85);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
    opacity: 0;
}

.building.visible {
    opacity: 1;
    transform: rotate(var(--rot, 0deg)) scale(1);
}

.building:hover {
    transform: rotate(var(--rot, 0deg)) scale(1.08) !important;
}

.building.bg-building {
    position: absolute;
    filter: blur(2px) saturate(0.7);
    opacity: 0;
    z-index: -1;
}

.building.bg-building.visible {
    opacity: 0.5;
}

/* ========================================
   Zone 3: Roots
   ======================================== */
#zone-roots {
    display: grid;
    place-items: center;
    height: 100vh;
    background: linear-gradient(to bottom, #1a1028, #0d2832);
}

.roots-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 40% 50%, rgba(200, 182, 226, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 60%, rgba(13, 40, 50, 0.5) 0%, transparent 60%);
}

.network-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.network-path {
    fill: none;
    stroke: rgba(201, 164, 138, 0.3);
    stroke-width: 2;
    stroke-linecap: round;
}

.travel-dot {
    opacity: 0.9;
}

.network-nodes {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.node {
    position: absolute;
    left: var(--nx);
    top: var(--ny);
    transform: translate(-50%, -50%);
    padding: 12px 24px;
    border-radius: 16px;
    background:
        radial-gradient(ellipse at 30% 40%, #f7f0f0, #f0eef7),
        linear-gradient(70deg, transparent 30%, rgba(201, 164, 138, 0.1) 50%, transparent 70%);
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: 13px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #2a1f3d;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.node.visible {
    opacity: 1;
}

.node::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    box-shadow: 0 0 12px rgba(201, 164, 138, 0.2);
    /* #c9a48a vein accent */
    pointer-events: none;
}

.node:hover {
    transform: translate(-50%, -50%) scale(1.08);
}

/* ========================================
   Zone 4: Leaves
   ======================================== */
#zone-leaves {
    height: 100vh;
    background: linear-gradient(to bottom,
        #0d2832 0%,
        #1a1028 8%,
        #f0eef7 20%,
        #f7f0f0 100%
    );
}

.leaves-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 60% 40%, rgba(168, 197, 160, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 30% 70%, rgba(176, 216, 200, 0.1) 0%, transparent 40%);
    /* palette refs: #a8c5a0 sage, #b0d8c8 mint, #c9a48a vein, #e0d8f0 lavender */
}

.leaf-cards {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 80px;
}

.leaf-card {
    position: absolute;
    left: var(--cx);
    top: var(--cy);
    max-width: 320px;
    padding: 32px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(200, 182, 226, 0.4), rgba(212, 160, 160, 0.3), rgba(232, 213, 176, 0.3));
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(40px) rotate(var(--cr, 0deg));
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
    border: 1px solid rgba(201, 164, 138, 0.15);
    box-shadow: 0 4px 24px rgba(168, 197, 160, 0.1);
}

.leaf-card.visible {
    opacity: 1;
    transform: translateY(0) rotate(var(--cr, 0deg));
}

.leaf-card:hover {
    transform: scale(1.08) rotate(0deg) !important;
    z-index: 10;
}

.leaf-card p {
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    color: #2a1f3d;
}

/* ========================================
   Zone 5: Seeds
   ======================================== */
#zone-seeds {
    display: grid;
    place-items: center;
    height: 100vh;
    background: linear-gradient(to bottom, #f7f0f0, #f0eef7);
}

.seeds-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(232, 196, 122, 0.06) 0%, transparent 50%);
}

.seeds-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.seed-orb {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8c47a, #d4a0b8);
    animation: seedPulse 3s ease-in-out infinite;
    transition: transform 0.6s ease, background 0.6s ease;
    cursor: pointer;
}

.seed-orb:hover {
    transform: scale(1.15);
    background: linear-gradient(315deg, #e8c47a, #d4a0b8);
}

@keyframes seedPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 30px rgba(232, 196, 122, 0.3);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 50px rgba(232, 196, 122, 0.5);
    }
}

.seed-text {
    margin-top: 32px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    font-size: 20px;
    color: #8a7a9a;
    text-align: center;
}

/* Palette: #a8c5a0 #b0d8c8 #c9a48a #e0d8f0 used across zones */

.leaf-card:nth-child(odd) {
    background: linear-gradient(135deg, rgba(168, 197, 160, 0.3), rgba(176, 216, 200, 0.25), rgba(232, 213, 176, 0.3));
}

#zone-roots .node:nth-child(even) {
    color: #e0d8f0;
    background:
        radial-gradient(ellipse at 30% 40%, #f7f0f0, #e0d8f0),
        linear-gradient(70deg, transparent 30%, #c9a48a33 50%, transparent 70%);
}

/* ========================================
   Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .marble-bg {
        animation: none;
    }
    .travel-dot {
        display: none;
    }
    .seed-dot {
        animation: none;
    }
    .seed-orb {
        animation: none;
    }
    .heartbeat-line {
        animation: none;
        opacity: 0.8;
    }
}
