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

:root {
    --bg: #0e1410;
    --bg-2: #141c16;
    --bg-card: #1a2620;
    --bg-glass: rgba(26, 38, 32, 0.72);
    --border: rgba(74, 138, 84, 0.18);
    --border-hi: rgba(74, 138, 84, 0.45);
    --green: #4a8a54;
    --green-li: #6ab87a;
    --green-xli: #9dd4a7;
    --amber: #d4933a;
    --red: #c0514a;
    --text: #dde8df;
    --text-muted: #8aab90;
    --text-dim: #526657;
    --white: #f2f7f3;
    --r: 12px;
    --r-lg: 20px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ===== NOISE TEXTURE OVERLAY ===== */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: .6;
}

/* ===== NAV ===== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 40px;
    background: rgba(14, 20, 16, 0.85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-family: 'DM Serif Display', serif;
    font-size: 1.1rem;
    color: var(--green-li);
    letter-spacing: 0.02em;
}

.nav-logo span {
    color: var(--text-muted);
    font-size: .8rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    display: block;
}

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    letter-spacing: .03em;
    transition: color var(--transition);
}

.nav-links a:hover {
    color: var(--green-li);
}

.nav-cta {
    background: var(--green);
    color: #fff;
    border: none;
    cursor: pointer;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    transition: background var(--transition);
    text-decoration: none;
}

.nav-cta:hover {
    background: var(--green-li);
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(74, 138, 84, 0.12);
    border: 1px solid var(--border-hi);
    color: var(--green-li);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 28px;
    font-family: 'JetBrains Mono', monospace;
}

.hero-badge::before {
    content: '●';
    font-size: .6rem;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1
    }
    50% {
        opacity: .2
    }
}

.hero h1 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2.6rem, 6vw, 4.8rem);
    line-height: 1.1;
    color: var(--white);
    max-width: 820px;
    margin: 0 auto 12px;
}

.hero h1 em {
    font-style: italic;
    color: var(--green-li);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-muted);
    max-width: 560px;
    margin: 16px auto 40px;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--green);
    color: #fff;
    padding: 13px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    font-family: 'DM Sans', sans-serif;
    box-shadow: 0 4px 20px rgba(74, 138, 84, 0.35);
}

.btn-primary:hover {
    background: var(--green-li);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(74, 138, 84, 0.45);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--text);
    padding: 13px 28px;
    border-radius: 10px;
    font-weight: 500;
    font-size: .95rem;
    text-decoration: none;
    border: 1px solid var(--border-hi);
    cursor: pointer;
    transition: all var(--transition);
    font-family: 'DM Sans', sans-serif;
}

.btn-secondary:hover {
    border-color: var(--green-li);
    color: var(--green-li);
}

/* ===== SCROLL INDICATOR ===== */
.scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    font-size: .75rem;
    letter-spacing: .06em;
    font-family: 'JetBrains Mono', monospace;
}

.scroll-hint svg {
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
    0%, 100% {
        transform: translateY(0)
    }
    50% {
        transform: translateY(6px)
    }
}

/* ===== SECTION COMMON ===== */
section {
    padding: 80px 24px;
    position: relative;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

.section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: .75rem;
    color: var(--green);
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-title {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    color: var(--white);
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-desc {
    color: var(--text-muted);
    max-width: 600px;
    font-weight: 300;
    font-size: 1rem;
}

.divider {
    width: 48px;
    height: 3px;
    background: var(--green);
    border-radius: 2px;
    margin: 20px 0;
}

/* ===== STATS BAR ===== */
.stats-bar {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 32px 24px;
}

.stats-bar .container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 24px;
}

.stat {
    text-align: center;
}

.stat-value {
    font-family: 'DM Serif Display', serif;
    font-size: 2.2rem;
    color: var(--green-li);
    line-height: 1;
}

.stat-label {
    font-size: .8rem;
    color: var(--text-muted);
    margin-top: 4px;
    letter-spacing: .04em;
}

/* ===== DEVICE OVERVIEW ===== */
.device-section {
    background: var(--bg-2);
}

.device-grid {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 48px;
    align-items: center;
    margin-top: 48px;
}

/* IMAGE PLACEHOLDER */
.img-placeholder {
    background: var(--bg-card);
    border: 2px dashed var(--border-hi);
    border-radius: var(--r-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
    font-size: .8rem;
    text-align: center;
    padding: 24px;
    transition: border-color var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.img-placeholder:hover {
    border-color: var(--green);
}

.img-placeholder svg {
    opacity: .4;
}

.img-placeholder .img-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(74, 138, 84, 0.15);
    border: 1px solid var(--border-hi);
    color: var(--green);
    font-size: .7rem;
    padding: 3px 10px;
    border-radius: 6px;
}

.img-placeholder.tall {
    min-height: 420px;
}

.img-placeholder.medium {
    min-height: 280px;
}

.img-placeholder.wide {
    min-height: 240px;
}

.device-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.spec-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(74, 138, 84, 0.1);
    border: 1px solid var(--border);
    color: var(--green-xli);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: .85rem;
    font-family: 'JetBrains Mono', monospace;
}

.spec-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

/* ===== HOW IT WORKS ===== */
.how-section {
    background: var(--bg);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px;
    transition: border-color var(--transition), transform var(--transition);
    position: relative;
    overflow: hidden;
}

.step-card:hover {
    border-color: var(--border-hi);
    transform: translateY(-4px);
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--green), transparent);
}

.step-num {
    font-family: 'DM Serif Display', serif;
    font-size: 3rem;
    color: rgba(74, 138, 84, 0.15);
    line-height: 1;
    margin-bottom: 12px;
}

.step-title {
    font-weight: 600;
    color: var(--white);
    margin-bottom: 8px;
    font-size: 1rem;
}

.step-desc {
    color: var(--text-muted);
    font-size: .88rem;
    line-height: 1.65;
}

/* ===== COMPARTMENT ===== */
.compartment-section {
    background: var(--bg-2);
}

.comp-grid {
    display: grid;
    grid-template-columns:repeat(3, 1fr);
    gap: 20px;
    margin-top: 48px;
}

.comp-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px 24px;
    text-align: center;
    transition: all var(--transition);
}

.comp-card:hover {
    transform: translateY(-6px);
}

.comp-card.organic {
    border-top: 3px solid var(--green-li);
}

.comp-card.anorganic {
    border-top: 3px solid #4a7ab0;
}

.comp-card.b3 {
    border-top: 3px solid var(--red);
}

.comp-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 16px;
}

.comp-icon.o {
    background: rgba(74, 138, 84, 0.15);
}

.comp-icon.a {
    background: rgba(74, 122, 176, 0.15);
}

.comp-icon.b {
    background: rgba(192, 81, 74, 0.15);
}

.comp-name {
    font-family: 'DM Serif Display', serif;
    font-size: 1.3rem;
    color: var(--white);
    margin-bottom: 8px;
}

.comp-desc {
    font-size: .85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.comp-examples {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: .73rem;
    padding: 3px 10px;
    border-radius: 100px;
    font-family: 'JetBrains Mono', monospace;
}

/* ===== MECHANISM DETAIL ===== */
.mechanism-section {
    background: var(--bg);
}

.mechanism-layout {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 48px;
    align-items: start;
    margin-top: 48px;
}

.mechanism-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mstep {
    display: flex;
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.mstep:last-child {
    border-bottom: none;
}

.mstep-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: .8rem;
    color: var(--green);
    background: var(--bg-card);
}

.mstep-content {
    flex: 1;
}

.mstep-title {
    font-weight: 600;
    color: var(--white);
    margin-bottom: 6px;
}

.mstep-desc {
    font-size: .88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===== TECH STACK ===== */
.tech-section {
    background: var(--bg-2);
}

.tech-grid {
    display: grid;
    grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 48px;
}

.tech-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 20px;
    transition: border-color var(--transition);
}

.tech-card:hover {
    border-color: var(--border-hi);
}

.tech-card-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: .7rem;
    color: var(--green);
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.tech-card-value {
    font-weight: 600;
    color: var(--white);
    font-size: .95rem;
}

.tech-card-desc {
    font-size: .8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== VIDEO SECTION ===== */
.video-section {
    background: var(--bg);
}

.video-grid {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 24px;
    margin-top: 48px;
}

.video-placeholder {
    background: var(--bg-card);
    border: 2px dashed var(--border-hi);
    border-radius: var(--r-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 48px 24px;
    min-height: 280px;
    position: relative;
    cursor: pointer;
    transition: border-color var(--transition);
}

.video-placeholder:hover {
    border-color: var(--green);
}

.video-play {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(74, 138, 84, 0.2);
    border: 2px solid var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green);
    font-size: 1.4rem;
}

.video-label {
    color: var(--text-muted);
    font-size: .88rem;
    text-align: center;
}

.video-label strong {
    display: block;
    color: var(--text);
    font-weight: 600;
    margin-bottom: 4px;
}

.video-tag {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(74, 138, 84, 0.12);
    border: 1px solid var(--border-hi);
    color: var(--green);
    font-size: .7rem;
    padding: 3px 10px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
}

/* ===== GALLERY ===== */
.gallery-section {
    background: var(--bg-2);
}

.gallery-grid {
    display: grid;
    grid-template-columns:repeat(3, 1fr);
    gap: 16px;
    margin-top: 48px;
}

.gallery-item {
    position: relative;
    border-radius: var(--r);
    overflow: hidden;
}

/* ===== DOWNLOAD ===== */
.download-section {
    background: var(--bg);
}

.download-card {
    background: var(--bg-card);
    border: 1px solid var(--border-hi);
    border-radius: var(--r-lg);
    padding: 48px;
    display: grid;
    grid-template-columns:1fr auto;
    gap: 32px;
    align-items: center;
    margin-top: 48px;
    position: relative;
    overflow: hidden;
}

.download-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 138, 84, 0.12), transparent 70%);
}

.download-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    color: var(--white);
    margin-bottom: 8px;
}

.download-desc {
    color: var(--text-muted);
    margin-bottom: 20px;
    max-width: 480px;
}

.download-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.download-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
}

.download-meta-item svg {
    color: var(--green);
}

.download-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-direction: column;
    background: linear-gradient(135deg, var(--green), #2d6b38);
    color: #fff;
    padding: 18px 32px;
    border-radius: 14px;
    text-decoration: none;
    transition: all var(--transition);
    box-shadow: 0 4px 24px rgba(74, 138, 84, 0.4);
    font-family: 'DM Sans', sans-serif;
    border: none;
    cursor: pointer;
    min-width: 180px;
    text-align: center;
}

.btn-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(74, 138, 84, 0.55);
}

.btn-download-icon {
    font-size: 1.6rem;
}

.btn-download-text {
    font-weight: 700;
    font-size: 1rem;
}

.btn-download-sub {
    font-size: .72rem;
    opacity: .7;
    font-family: 'JetBrains Mono', monospace;
}

.btn-download.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
    filter: grayscale(100%);
}

.download-warning {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--amber);
    font-size: .75rem;
    margin-top: 10px;
    font-family: 'JetBrains Mono', monospace;
    background: rgba(212, 147, 58, 0.08);
    border: 1px solid rgba(212, 147, 58, 0.2);
    padding: 6px 12px;
    border-radius: 6px;
}

/* ===== FOOTER ===== */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 40px 24px;
    text-align: center;
}

.footer-name {
    font-family: 'DM Serif Display', serif;
    color: var(--green-li);
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.footer-sub {
    color: var(--text-dim);
    font-size: .82rem;
    font-family: 'JetBrains Mono', monospace;
}

.footer-divider {
    width: 40px;
    height: 1px;
    background: var(--border);
    margin: 20px auto;
}

.footer-copy {
    color: var(--text-dim);
    font-size: .78rem;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--green);
    border-radius: 3px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    nav {
        padding: 14px 20px;
    }

    .nav-links {
        display: none;
    }

    .device-grid, .mechanism-layout, .video-grid,
    .download-card {
        grid-template-columns:1fr;
    }

    .comp-grid {
        grid-template-columns:1fr;
    }

    .gallery-grid {
        grid-template-columns:1fr 1fr;
    }

    .download-card {
        padding: 28px;
    }

    .download-btn {
        align-items: flex-start;
    }
}

/* ===== FADE IN ANIMATION (MODIFIED FOR JS) ===== */
.fade-up {
    opacity: 0;
    transform: translateY(28px);
}

.fade-up.visible {
    animation: fadeUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.delay-1 {
    animation-delay: .1s;
}

.delay-2 {
    animation-delay: .2s;
}

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

.delay-4 {
    animation-delay: .4s;
}