/* ===== BASE RESET & GLOBALS ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-deep: #0d0a12;
    --bg-card: #1a1425;
    --paper-primary: #e8dcc8;
    --paper-secondary: #c4b8a4;
    --neon-magenta: #ff0066;
    --neon-cyan: #00e5ff;
    --neon-green: #39ff14;
    --ghost-hex: #ff006620;
    --sepia: #8b7355;
    --spring-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-deep);
    color: var(--paper-secondary);
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* ===== HEX GRID BACKGROUND ===== */
.hex-grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.grid-pulse {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 50%, #ff006610 0%, transparent 70%);
    opacity: 0;
    animation: gridPulse 8s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--paper-primary);
    letter-spacing: 0.02em;
}

mark {
    background: transparent;
    color: var(--neon-magenta);
    text-shadow: 0 0 8px #ff006680;
}

.hex-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--neon-cyan);
}

.hex-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--neon-cyan);
}

/* ===== SECTION TITLES ===== */
.section-title {
    text-align: center;
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

/* ===== GREENHOUSE ENTRANCE ===== */
.greenhouse {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding: 2rem;
}

.greenhouse-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    max-width: 900px;
    width: 100%;
}

.botanical {
    width: 150px;
    height: 300px;
    flex-shrink: 0;
    animation: breathe 6s ease-in-out infinite;
}

.botanical-right {
    animation-delay: -3s;
}

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

.hex-frame-wrapper {
    position: relative;
    width: 320px;
    height: 370px;
    flex-shrink: 0;
}

.hex-frame {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.hex-frame-path {
    stroke-dasharray: 1600;
    stroke-dashoffset: 1600;
    animation: drawHex 1.5s ease-out forwards;
    filter: drop-shadow(0 0 10px #ff006640) drop-shadow(0 0 20px #00e5ff30);
}

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

.wordmark-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    opacity: 0;
    animation: fadeIn 1s ease-out 1.2s forwards;
}

.wordmark {
    font-size: clamp(3rem, 8vw, 5.5rem);
    color: var(--paper-primary);
    text-shadow: 0 0 30px #ff006640, 0 0 60px #ff006620;
    line-height: 1.1;
}

.tagline {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: var(--paper-secondary);
    margin-top: 0.5rem;
}

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

/* Botanical neon illumination */
.bot-neon-cyan, .bot-neon-magenta, .bot-neon-green {
    transition: opacity 0.6s ease;
}

.greenhouse.illuminated .bot-neon-cyan {
    opacity: 1;
    filter: drop-shadow(0 0 4px #00e5ff80);
    animation: fadeIn 0.5s ease-out forwards;
}

.greenhouse.illuminated .bot-neon-magenta {
    opacity: 1;
    filter: drop-shadow(0 0 4px #ff006680);
    animation: fadeIn 0.5s ease-out 0.3s forwards;
}

.greenhouse.illuminated .bot-neon-green {
    opacity: 1;
    filter: drop-shadow(0 0 4px #39ff1480);
    animation: fadeIn 0.5s ease-out 0.6s forwards;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bobDown 2s ease-in-out infinite;
    z-index: 1;
}

.seed-sprout {
    width: 40px;
    height: 60px;
}

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

/* ===== HONEYCOMB GALLERY ===== */
.honeycomb-section {
    position: relative;
    z-index: 1;
    padding: 6rem 2rem;
}

.honeycomb-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1100px;
    margin: 0 auto;
    gap: 8px;
}

/* Hexagonal Cell */
.hex-cell {
    width: 240px;
    height: 264px;
    position: relative;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: transform 0.4s var(--spring-ease);
    opacity: 0;
    transform: scale(0.85);
}

.hex-cell.visible {
    opacity: 1;
    transform: scale(1);
    animation: hexBounce 0.6s var(--spring-ease) forwards;
}

@keyframes hexBounce {
    0% { transform: scale(0.85); opacity: 0; }
    60% { transform: scale(1.02); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.hex-cell:hover {
    transform: scale(1.05);
}

/* Hex border pseudo-element */
.hex-border {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: #ff006640;
    z-index: -1;
    transition: all 0.4s var(--spring-ease);
}

.hex-cell:hover .hex-border {
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: var(--neon-magenta);
    box-shadow: 0 0 20px #ff006680, 0 0 40px #ff006640;
}

.hex-content {
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.hex-content h3 {
    font-size: 1.3rem;
    line-height: 1.3;
}

.hex-content p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--paper-secondary);
}

/* Empty hex cells */
.hex-cell.hex-empty {
    background: transparent;
    border: none;
}

.hex-cell.hex-empty .hex-border {
    background: #ff006615;
}

.hex-botanical-bg {
    width: 80px;
    height: 80px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Hex cell type accents */
.hex-cell.hex-game:hover .hex-border { background: var(--neon-magenta); }
.hex-cell.hex-member:hover .hex-border { background: var(--neon-cyan); }
.hex-cell.hex-philosophy:hover .hex-border { background: var(--neon-green); }

/* ===== SEED DIVIDER ===== */
.seed-divider {
    text-align: center;
    padding: 2rem 0;
    position: relative;
    z-index: 1;
}

.seed-divider svg {
    width: 300px;
    max-width: 80%;
    height: auto;
}

/* ===== GROWTH TIMELINE ===== */
.timeline-section {
    position: relative;
    z-index: 1;
    padding: 6rem 2rem;
    background: linear-gradient(to bottom, transparent, #08060e 30%, #08060e 70%, transparent);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline-stem {
    position: absolute;
    left: 50%;
    top: 0;
    width: 20px;
    height: 100%;
    transform: translateX(-50%);
    animation: stemSway 8s ease-in-out infinite;
}

@keyframes stemSway {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    25% { transform: translateX(-50%) rotate(0.5deg); }
    75% { transform: translateX(-50%) rotate(-0.5deg); }
}

.timeline-entry {
    position: relative;
    width: 45%;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s var(--spring-ease);
}

.timeline-entry.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-left {
    margin-right: auto;
    margin-left: 0;
    text-align: right;
    padding-right: 2rem;
}

.timeline-right {
    margin-left: auto;
    margin-right: 0;
    text-align: left;
    padding-left: 2rem;
}

.timeline-branch {
    position: absolute;
    top: 50%;
    width: 60px;
    transform: translateY(-50%);
}

.branch-left {
    right: -60px;
}

.branch-right {
    left: -60px;
}

.timeline-branch svg {
    width: 100%;
    height: auto;
}

.timeline-entry.visible .timeline-branch {
    animation: branchSway 2s var(--spring-ease) forwards;
}

@keyframes branchSway {
    0% { transform: translateY(-50%) rotate(0deg); }
    20% { transform: translateY(-50%) rotate(4deg); }
    40% { transform: translateY(-50%) rotate(-3deg); }
    60% { transform: translateY(-50%) rotate(2deg); }
    80% { transform: translateY(-50%) rotate(-1deg); }
    100% { transform: translateY(-50%) rotate(0deg); }
}

.timeline-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--neon-cyan);
    display: block;
    margin-bottom: 0.3rem;
}

.timeline-node h3 {
    font-size: 1.4rem;
    margin-bottom: 0.4rem;
}

.timeline-node p {
    font-size: 0.9rem;
    color: var(--paper-secondary);
}

/* ===== SEED VAULT FOOTER ===== */
.seed-vault {
    position: relative;
    z-index: 1;
    padding: 6rem 2rem 3rem;
    text-align: center;
}

.footer-hex-cluster {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-hex {
    position: relative;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.footer-hex-main {
    width: 340px;
    height: 374px;
    background: var(--bg-card);
}

.footer-hex-seed {
    width: 200px;
    height: 220px;
    background: var(--bg-card);
}

.footer-hex .hex-border {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: #ff006630;
    z-index: -1;
}

.footer-hex .hex-content {
    padding: 3rem 2rem;
}

.footer-hex h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 30px #ff006640;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
    justify-content: center;
}

.social-link {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: var(--neon-cyan);
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.social-link:hover {
    color: var(--neon-magenta);
    text-shadow: 0 0 8px #ff006680;
}

.email-line {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: var(--paper-secondary);
    margin-top: 0.5rem;
}

.daily-seed {
    width: 80px;
    height: 80px;
    margin-top: 0.5rem;
}

.copyright {
    margin-top: 3rem;
    font-size: 0.8rem;
    color: var(--paper-secondary);
    opacity: 0.6;
}

/* ===== PAPER TEXTURE (CSS-generated) ===== */
.hex-cell:not(.hex-empty)::after,
.footer-hex::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background-image:
        radial-gradient(ellipse at 20% 30%, #8b735510 0%, transparent 50%),
        radial-gradient(ellipse at 70% 60%, #8b735508 0%, transparent 40%),
        radial-gradient(ellipse at 50% 80%, #8b735506 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .greenhouse-content {
        flex-direction: column;
        gap: 1rem;
    }

    .botanical {
        width: 100px;
        height: 200px;
    }

    .botanical-left, .botanical-right {
        display: none;
    }

    .hex-cell {
        width: 180px;
        height: 198px;
    }

    .hex-content {
        padding: 2rem 1rem;
    }

    .hex-content h3 {
        font-size: 1.1rem;
    }

    .hex-content p {
        font-size: 0.75rem;
    }

    .timeline-left, .timeline-right {
        width: 80%;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
        padding-left: 0;
        padding-right: 0;
    }

    .timeline-branch {
        display: none;
    }

    .timeline-stem {
        display: none;
    }

    .footer-hex-main {
        width: 280px;
        height: 308px;
    }
}

@media (max-width: 600px) {
    .hex-cell {
        width: 160px;
        height: 176px;
    }

    .hex-content p {
        font-size: 0.7rem;
        line-height: 1.4;
    }

    .hex-frame-wrapper {
        width: 240px;
        height: 280px;
    }
}
