/* ══════════════════════════════════════════
   NovaBio — Verdant Light Design System
   Palette: White + natural green
   Inspired by: Leaf Biotech editorial aesthetic
   ══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+SC:wght@300;400;500;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg: #FAFAF8;
    --bg-white: #FFFFFF;
    --bg-soft: #F2F2EE;
    --bg-muted: #EAEBE5;

    --ink: #1A1D1A;
    --ink-secondary: #5A5F5A;
    --ink-dim: #9CA09C;
    --ink-faint: #C8CBC8;

    --green: #1B8C3D;
    --green-deep: #146B30;
    --green-bright: #22A84A;
    --green-light: #E8F5EC;
    --green-ultra-light: #F2FAF4;

    --font-en: 'Inter', -apple-system, sans-serif;
    --font-cn: 'Noto Sans SC', 'PingFang SC', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-gentle: cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.03);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-cn);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    line-height: 1.75;
}

::selection { background: rgba(27, 140, 61, 0.15); color: var(--ink); }

/* ─── Nav ─── */
nav {
    position: fixed; top: 0; left: 0; width: 100%;
    padding: 24px 6vw;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 100;
    transition: all 0.5s var(--ease);
}
nav.scrolled {
    backdrop-filter: blur(20px) saturate(1.4);
    background: rgba(250, 250, 248, 0.85);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
nav.hidden { transform: translateY(-100%); }

.logo {
    font-family: var(--font-en); font-size: 1.2rem; font-weight: 700;
    letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px;
    color: var(--ink);
}
.logo-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--green);
}

.nav-links { display: flex; gap: 40px; align-items: center; }
.nav-links a {
    text-decoration: none; color: var(--ink-secondary);
    font-size: 0.875rem; font-weight: 400;
    transition: color 0.3s var(--ease-gentle); position: relative;
}
.nav-links a:hover { color: var(--ink); }

.nav-cta {
    padding: 10px 28px;
    background: var(--green); color: #fff !important;
    border-radius: 100px; font-size: 0.8125rem; font-weight: 500;
    transition: all 0.4s var(--ease); cursor: pointer;
    text-decoration: none;
}
.nav-cta:hover {
    background: var(--green-deep);
    box-shadow: 0 4px 16px rgba(27,140,61,0.2);
    transform: translateY(-1px);
}

/* ─── Hero ─── */
.hero {
    height: 100vh; position: relative; overflow: hidden;
    display: flex; align-items: flex-end;
    padding: 0 6vw 80px;
    background: var(--bg);
}

#canvas-container {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative; z-index: 10;
    max-width: 520px;
}

.hero-title {
    font-family: var(--font-en);
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    color: var(--ink);
    margin-bottom: 24px;
    opacity: 0; transform: translateY(30px);
    animation: fadeUp 0.8s var(--ease) forwards 0.3s;
}

.hero-subtitle {
    font-size: 1.125rem; font-weight: 300;
    color: var(--ink-secondary); line-height: 1.8;
    max-width: 480px; margin-bottom: 0;
    opacity: 0; transform: translateY(20px);
    animation: fadeUp 0.8s var(--ease) forwards 0.6s;
}

.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
    border-radius: 100px;
    font-family: var(--font-mono); font-size: 0.6875rem;
    color: var(--green); letter-spacing: 1px;
    margin-bottom: 24px;
    opacity: 0; transform: translateY(20px);
    animation: fadeUp 0.8s var(--ease) forwards 0.1s;
}
.hero-badge-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--green);
    animation: blink 2s infinite;
}

/* ─── Scroll Hint ─── */
.scroll-hint {
    position: absolute;
    bottom: 40px; right: 6vw;
    z-index: 10;
    display: flex; align-items: center; gap: 16px;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--ink-dim);
    letter-spacing: 2px;
    opacity: 0;
    animation: fadeUp 0.8s var(--ease) forwards 1.5s;
}
.scroll-line {
    width: 48px; height: 1px;
    background: rgba(156,160,156,0.3);
    position: relative; overflow: hidden;
}
.scroll-line::after {
    content: '';
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--green);
    transform: translateX(-100%);
    animation: scrollPulse 2.5s infinite cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes scrollPulse { 100% { transform: translateX(100%); } }

/* ─── How-Section (merged About + Demo) ─── */
.how-section {
    padding: 140px 6vw 120px;
    scroll-margin-top: 0px;
    max-width: 1600px; margin: 0 auto;
}

.how-header {
    text-align: center;
    margin-bottom: 56px;
}

.how-eyebrow {
    font-family: var(--font-en); font-size: 0.6875rem;
    font-weight: 600; letter-spacing: 5px;
    text-transform: uppercase; color: var(--green);
    margin-bottom: 16px;
}
.how-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 600; letter-spacing: -0.01em;
    margin-bottom: 16px;
}
.how-subtitle {
    font-size: 1rem; color: var(--ink-secondary);
    font-weight: 300; max-width: 600px;
    margin: 0 auto; line-height: 1.9;
}

/* Tabs */
.how-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.how-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 100px;
    background: var(--bg-white);
    cursor: pointer;
    transition: all 0.4s var(--ease);
    font-family: var(--font-cn);
    outline: none;
}
.how-tab:hover {
    border-color: rgba(27,140,61,0.2);
    background: var(--green-ultra-light);
}
.how-tab.active {
    background: var(--green);
    border-color: var(--green);
    box-shadow: 0 4px 16px rgba(27,140,61,0.25);
}
.how-tab-num {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--green);
    transition: color 0.4s var(--ease);
}
.how-tab.active .how-tab-num {
    color: rgba(255,255,255,0.7);
}
.how-tab-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ink);
    transition: color 0.4s var(--ease);
}
.how-tab.active .how-tab-label {
    color: #fff;
}

/* Stage (panels + arrows) */
.how-stage {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.how-arrow {
    flex-shrink: 0;
    width: 48px; height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.08);
    background: var(--bg-white);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--ink);
    transition: all 0.3s var(--ease);
    outline: none;
}
.how-arrow:hover {
    border-color: var(--green);
    color: var(--green);
    box-shadow: var(--shadow-sm);
}
.how-arrow.disabled {
    opacity: 0.25;
    pointer-events: none;
}

/* Panels container */
.how-panels {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: var(--bg-white);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0,0,0,0.04);
}

.how-panel {
    display: none;
    animation: panelFadeIn 0.45s var(--ease);
}
.how-panel.active {
    display: block;
}
@keyframes panelFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Video panels */
.how-panel-video {
    position: relative;
    background: #0a0a0a;
}
.how-panel-video video {
    width: 100%;
    display: block;
}

.how-panel-info {
    padding: 32px 36px;
}

.how-panel-tag {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--green);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.how-panel-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 0.01em;
}
.how-panel-desc {
    font-size: 0.9375rem;
    color: var(--ink-secondary);
    font-weight: 300;
    line-height: 1.85;
}

/* Card grid (tab 4) */
.how-panel-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 36px;
}

.how-card {
    padding: 36px 32px;
    border-radius: 16px;
    background: var(--bg-soft);
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.5s var(--ease);
}
.how-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(27,140,61,0.08);
    background: var(--bg-white);
}
.how-card-wide {
    grid-column: 1 / -1;
}
.how-card-num {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--green);
    letter-spacing: 2px;
    margin-bottom: 16px;
}
.how-card-title {
    font-size: 1.125rem; font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}
.how-card-tag {
    font-family: var(--font-en);
    font-size: 0.6875rem; font-weight: 400;
    color: var(--ink-dim);
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}
.how-card-desc {
    font-size: 0.875rem;
    color: var(--ink-secondary);
    font-weight: 300;
    line-height: 1.85;
}

/* ─── Showcase (Analysis Results Gallery) ─── */
.showcase {
    padding: 120px 6vw 160px;
    scroll-margin-top: 0px;
    max-width: 1400px; margin: 0 auto;
}

.showcase-header {
    display: flex; justify-content: space-between;
    align-items: flex-end; margin-bottom: 80px;
    flex-wrap: wrap; gap: 24px;
}

.showcase-label {
    font-family: var(--font-en); font-size: 0.8125rem;
    font-weight: 700; letter-spacing: 0.15em;
    text-transform: uppercase; color: var(--ink);
    margin-bottom: 8px;
}
.showcase-label-cn {
    font-size: 1.125rem; color: var(--ink-secondary); font-weight: 300;
}

.showcase-intro {
    font-size: 0.9375rem; color: var(--ink-secondary);
    font-weight: 300; max-width: 400px; line-height: 1.8;
}

.showcase-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}

.showcase-card {
    background: var(--bg-white);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.5s var(--ease);
    box-shadow: var(--shadow-sm);
    cursor: default;
}
.showcase-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.showcase-img {
    height: 280px;
    background: var(--bg-soft);
    position: relative; overflow: hidden;
}
.showcase-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s var(--ease);
}
.showcase-card:hover .showcase-img img {
    transform: scale(1.03);
}

.showcase-img-placeholder {
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 12px;
    color: var(--ink-dim);
    background:
        radial-gradient(ellipse at 50% 50%, rgba(27,140,61,0.05) 0%, transparent 70%),
        var(--bg-soft);
}
.showcase-img-placeholder span {
    font-size: 0.75rem; font-weight: 300;
    letter-spacing: 0.05em;
}

.showcase-body { padding: 32px; }

.showcase-tag {
    display: inline-block; padding: 4px 12px;
    background: var(--green-light); color: var(--green);
    border-radius: 100px; font-size: 0.6875rem;
    font-weight: 500; font-family: var(--font-mono);
    margin-bottom: 16px; letter-spacing: 0.5px;
}

.showcase-name {
    font-size: 1.25rem; font-weight: 600;
    margin-bottom: 8px;
}
.showcase-desc {
    font-size: 0.875rem; color: var(--ink-secondary);
    font-weight: 300; line-height: 1.8;
}

/* ─── Team Section ─── */
.team {
    padding: 160px 6vw;
    scroll-margin-top: 0px;
    max-width: 1400px; margin: 0 auto;
}
.team-header {
    text-align: center; margin-bottom: 56px;
}
.team-eyebrow {
    font-family: var(--font-en); font-size: 0.6875rem;
    font-weight: 600; letter-spacing: 5px;
    text-transform: uppercase; color: var(--green);
    margin-bottom: 16px;
}
.team-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 600; letter-spacing: -0.01em;
    margin-bottom: 16px;
}
.team-subtitle {
    font-size: 1rem; color: var(--ink-secondary);
    font-weight: 300; max-width: 560px;
    margin: 0 auto; line-height: 1.9;
}
.team-intro {
    font-size: 1.0625rem; color: var(--ink-secondary);
    font-weight: 300; max-width: 640px;
    margin: 0 auto; line-height: 1.9;
}

.team-narrative {
    max-width: 960px;
    margin: 0 auto;
}

.narrative-block {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    padding: 36px 0;
    border-top: 1px solid rgba(26, 29, 26, 0.08);
    transition: all 0.5s var(--ease);
}
.narrative-block:last-child {
    border-bottom: 1px solid rgba(26, 29, 26, 0.08);
}
.narrative-block:hover {
    padding-left: 24px;
    background: rgba(255,255,255,0.5);
}

.narrative-num {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--green);
    flex-shrink: 0;
    width: 48px;
    padding-top: 4px;
}

.narrative-content {
    flex: 1;
}

.narrative-title {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 12px;
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.narrative-en {
    font-family: var(--font-en);
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--ink-dim);
    letter-spacing: 0.05em;
}

.narrative-text {
    font-size: 1rem;
    color: var(--ink-secondary);
    font-weight: 300;
    line-height: 1.9;
    letter-spacing: 0.02em;
}

/* ─── CTA ─── */
.cta-section {
    padding: 120px 6vw 120px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(27, 140, 61, 0.03) 15%,
        rgba(27, 140, 61, 0.08) 40%,
        rgba(27, 140, 61, 0.15) 70%,
        rgba(27, 140, 61, 0.22) 100%
    );
    text-align: center;
}
.cta-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 600; margin-bottom: 20px;
}
.cta-title .hl { color: var(--green); }
.cta-desc {
    font-size: 1rem; color: var(--ink-secondary); font-weight: 300;
    max-width: 460px; margin: 0 auto 40px; line-height: 1.9;
}
.btn-primary {
    padding: 16px 48px; background: var(--green); color: #fff;
    border: none; border-radius: 100px; font-size: 0.9375rem;
    font-family: var(--font-cn); font-weight: 600; cursor: pointer;
    transition: all 0.4s var(--ease);
    box-shadow: 0 4px 20px rgba(27,140,61,0.2);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(27,140,61,0.3);
    background: var(--green-deep);
}

/* ─── Footer ─── */
footer {
    padding: 32px 6vw;
    background: rgba(27, 140, 61, 0.22);
    text-align: center;
}
.footer-left {
    font-size: 0.8125rem;
    color: var(--ink-secondary);
    font-family: var(--font-en);
}

/* ─── Contact Modal ─── */
.modal-overlay {
    position: fixed; inset: 0;
    z-index: 9999;
    background: rgba(26, 29, 26, 0.4);
    backdrop-filter: blur(12px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.active {
    opacity: 1; visibility: visible;
}

.modal-card {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 48px 40px 40px;
    max-width: 420px; width: 90%;
    position: relative;
    box-shadow: 0 32px 80px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
    transform: translateY(24px) scale(0.97);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.active .modal-card {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute; top: 16px; right: 20px;
    background: none; border: none;
    font-size: 1.5rem; color: var(--ink-dim);
    cursor: pointer; padding: 4px 8px;
    line-height: 1;
    transition: color 0.2s;
}
.modal-close:hover { color: var(--ink); }

.modal-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.625rem; font-weight: 500;
    letter-spacing: 3px; color: var(--green);
    margin-bottom: 8px;
}
.modal-title {
    font-size: 1.5rem; font-weight: 600;
    margin-bottom: 8px;
}
.modal-desc {
    font-size: 0.875rem; color: var(--ink-secondary);
    font-weight: 300; margin-bottom: 32px;
}

.modal-items {
    display: flex; flex-direction: column; gap: 12px;
}
.modal-item {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    background: var(--bg-soft);
    text-decoration: none; color: var(--ink);
    transition: all 0.3s var(--ease);
    border: 1px solid transparent;
}
.modal-item:hover {
    background: var(--green-ultra-light);
    border-color: rgba(27,140,61,0.12);
    transform: translateX(4px);
}
.modal-item-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: rgba(27,140,61,0.08);
    display: flex; align-items: center; justify-content: center;
    color: var(--green); flex-shrink: 0;
}
.modal-item-label {
    font-size: 0.6875rem; font-weight: 500;
    color: var(--ink-dim); letter-spacing: 0.5px;
    margin-bottom: 2px; text-transform: uppercase;
    font-family: var(--font-en);
}
.modal-item-value {
    font-size: 1rem; font-weight: 500;
    font-family: var(--font-en);
    letter-spacing: 0.01em;
}

.modal-qrcode {
    display: flex;
    justify-content: center;
    padding: 8px 0 4px;
}
.modal-qrcode img {
    width: 160px;
    height: 160px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.06);
    object-fit: contain;
    background: #fff;
}

/* ─── Animations ─── */
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .hero { flex-direction: column; align-items: flex-start; justify-content: flex-end; padding-bottom: 40px; }
    .how-panel-cards { grid-template-columns: 1fr; }
    .how-card-wide { grid-column: auto; }
    .showcase-grid { grid-template-columns: 1fr; }
    .narrative-block { flex-direction: column; gap: 16px; }
    .how-tabs { gap: 6px; }
    .how-tab { padding: 10px 18px; }
}
@media (max-width: 768px) {
    nav { padding: 20px 5vw; }
    .nav-links { gap: 16px; font-size: 0.8125rem; }
    .hero { padding: 0 5vw 40px; }
    .hero-title { font-size: clamp(2.5rem, 10vw, 4rem); }
    .how-section { padding: 96px 5vw 80px; }
    .how-tabs { flex-direction: column; align-items: stretch; }
    .how-tab { justify-content: center; }
    .how-arrow { width: 36px; height: 36px; }
    .how-panel-info { padding: 24px 20px; }
    .how-panel-cards { padding: 20px; }
    .showcase { padding: 80px 5vw; }
    .team { padding: 96px 5vw; }
    .narrative-block { padding: 40px 0; }
    footer { padding: 24px 5vw; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
