/* CSS Variables & Reset */
:root {
    --bg-primary: #0a0a0c;
    --bg-secondary: #131316;
    --text-primary: #f2f2f2;
    --text-data: #64ffda;
    /* Tech Cyan accent */
    --accent-almond: #d4a373;
    --accent-gold: #e6c200;
    --glass-panel: rgba(20, 20, 23, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    /* Fainter, sharper */
    --font-heading: 'Space Grotesk', monospace;
    /* Monospace heading for tech feel */
    --font-body: 'Outfit', sans-serif;
    --font-mono: 'Space Mono', monospace;
    /* Dedicated data font */
    --transition-speed: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    /* Smooth snap */
    --border-radius: 4px;
    /* Sharper corners */
    --grid-line: rgba(255, 255, 255, 0.03);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: default;
    /* Custom cursor feel later */
}

/* Background Grid */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
    pointer-events: none;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.glass-panel {
    background: var(--glass-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.tech-border {
    position: relative;
    border: 1px solid var(--glass-border);
}

.tech-border::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 10px;
    height: 10px;
    border-top: 2px solid var(--accent-almond);
    border-left: 2px solid var(--accent-almond);
}

.tech-border::before {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-bottom: 2px solid var(--accent-almond);
    border-right: 2px solid var(--accent-almond);
}

.highlight {
    color: var(--accent-almond);
}

.btn-outline {
    border: 1px solid var(--text-primary);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    display: inline-block;
    transition: all var(--transition-speed);
}

.btn-outline:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: background 0.3s;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.footer-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    margin-bottom: 1rem;
}

.badge {
    font-size: 0.7rem;
    background: var(--accent-gold);
    color: var(--bg-primary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    vertical-align: middle;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.8;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--accent-almond);
}

.cta-btn.small {
    border: 1px solid var(--accent-almond);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    color: var(--accent-almond);
}

.cta-btn.small:hover {
    background: var(--accent-almond);
    color: var(--bg-primary);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 0 1rem;
    overflow: hidden;
    /* Removed background image to let board.js render the nodes */
}

.hero-video-bg {
    display: none;
    /* Hide video bg as we use image now */
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    /* Let clicks pass through */
}

.video-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.8)), url('https://images.unsplash.com/photo-1509440159596-0249088772ff?q=80&w=2072&auto=format&fit=crop');
    /* Placeholder Almonds */
    background-size: cover;
    background-position: center;
}

.hero-headline {
    font-size: 5rem;
    /* Bigger */
    line-height: 0.95;
    margin-bottom: 2rem;
    letter-spacing: -2px;
    text-transform: uppercase;
    font-weight: 700;
    mix-blend-mode: overlay;
    /* Blend with canvas */
    color: white;
}

.scramble-text {
    font-family: var(--font-mono);
    color: var(--accent-almond);
    font-size: 1rem;
    margin-bottom: 1rem;
    display: block;
    letter-spacing: 2px;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

.scroll-indicator .line {
    width: 1px;
    height: 40px;
    background: var(--text-primary);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Philosophy Section */
.philosophy-section {
    padding: 6rem 0;
    background: var(--bg-primary);
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.image-card {
    width: 100%;
    height: 500px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    background-size: cover;
    background-position: center;
}

#philosophy-img {
    background-image: url('ourphil.jpg');
    /* Certified by Suns Lab */
}

.eyebrow {
    color: var(--accent-almond);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 1rem;
}

.philosophy-text h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.philosophy-text p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Research Section */
.research-section {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
}

.view-all {
    color: var(--accent-almond);
    border-bottom: 1px solid var(--accent-almond);
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.research-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s;
    border: 1px solid #333;
}

.research-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-almond);
}

.card-status {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem;
    border-radius: 8px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.stage-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    background: var(--accent-almond);
}

.card-visual {
    height: 250px;
    background-size: cover;
    background-position: center;
}

#honey-butter-img {
    background-image: url('https://images.unsplash.com/photo-1587049359521-b44c6606a241?q=80&w=2070&auto=format&fit=crop');
    /* Honey Texture */
}

#bbq-img {
    background-image: url('https://images.unsplash.com/photo-1596040033229-a9821ebd058d?q=80&w=2070&auto=format&fit=crop');
    /* Spices */
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    font-size: 1.5rem;
}

.card-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    align-items: center;
}

.action-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
}

.action-btn.primary {
    background: var(--accent-almond);
    color: var(--bg-primary);
}

.action-btn.secondary {
    background: transparent;
    border: 1px solid var(--text-primary);
    color: var(--text-primary);
}

.action-btn.secondary:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.action-link {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Content Feed */
.content-feed-section {
    padding: 6rem 0;
}

.content-carousel-wrapper {
    overflow-x: auto;
    padding-bottom: 2rem;
    scrollbar-width: none;
    /* Firefox */
}

.content-carousel-wrapper::-webkit-scrollbar {
    display: none;
}

.content-carousel {
    display: flex;
    gap: 1.5rem;
    width: max-content;
}

.content-card {
    width: 300px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px -10px rgba(212, 163, 115, 0.2);
    border-color: var(--accent-almond);
}

.content-card .thumbnail {
    height: 180px;
    background: #333;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-icon {
    font-size: 2rem;
    color: var(--text-primary);
    opacity: 0.8;
}

.type-tag {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    border-radius: 4px;
}

.card-info {
    padding: 1rem;
}

.card-info h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.card-info .meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Join Experiment */
.join-experiment-section {
    padding: 6rem 0;
    background: var(--bg-secondary);
    text-align: center;
}

.centered-heading {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.participation-pathways {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.pathway-card {
    padding: 3rem 2rem;
    text-align: center;
    transition: background 0.3s;
}

.pathway-card:hover {
    background: rgba(255, 255, 255, 0.1);
}

.icon-box {
    font-size: 2.5rem;
    color: var(--accent-almond);
    margin-bottom: 1.5rem;
}

.pathway-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Roadmap */
.roadmap-section {
    padding: 6rem 0;
}

/* Hiding hero content as image has text, but keeping scroll indicator if needed or hide all */
/* Reverting: .hero-content { display: none; } - Removed */

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    border-left: 2px solid var(--glass-border);
    padding-left: 5rem;
    /* Increased to prevent overlap */
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item .marker {
    position: absolute;
    left: -5.5rem;
    /* Pushed further left */
    top: 0;
    background: var(--bg-primary);
    border: 2px solid var(--accent-almond);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-almond);
}

.timeline-item.active .marker {
    background: var(--accent-almond);
    color: var(--bg-primary);
}

.timeline-item.future .marker {
    border-color: var(--text-secondary);
    color: var(--text-secondary);
}

.timeline-item .content h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.timeline-item .content p {
    color: var(--text-secondary);
}

/* Footer */
footer {
    background: #000;
    padding: 4rem 2rem;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
}

.footer-brand h3 {
    color: var(--accent-almond);
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.link-group h4 {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.link-group a {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    opacity: 0.7;
}

.link-group a:hover {
    opacity: 1;
    color: var(--accent-almond);
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.hidden {
    display: none;
}

.modal-content {
    background: var(--bg-secondary);
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    position: relative;
    border: 1px solid var(--accent-almond);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
}

.poll-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.poll-btn {
    padding: 1rem;
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.poll-btn:hover {
    background: var(--glass-panel);
    border-color: var(--accent-almond);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-headline {
        font-size: 2.5rem;
    }

    .logo {
        position: relative;
        z-index: 1002;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
        position: relative;
        z-index: 1002;
    }

    .split-layout {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-links {
        flex-direction: column;
        gap: 2rem;
    }

    .mobile-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(10, 10, 12, 0.85);
        /* Semi-transparent base */
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        z-index: 2000;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .mobile-menu.active {
        opacity: 1;
        pointer-events: all;
    }

    .menu-close {
        position: absolute;
        top: 2rem;
        right: 2rem;
        font-size: 2rem;
        cursor: pointer;
        color: var(--text-primary);
    }

    .mobile-links {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .mobile-links a {
        font-family: var(--font-heading);
        font-size: 2rem;
        font-weight: 600;
        color: var(--text-primary);
        opacity: 0.7;
        transition: opacity 0.3s;
    }

    .mobile-links a:hover {
        opacity: 1;
        color: var(--accent-almond);
    }
}