/* ── TOKENS — botanical green twin of biodeep.ai ────────────────────────── */
:root {
  --void:       #060C08;
  --surface:    #0A140C;
  --surface-hov:#0E1A10;
  --edge:       #162018;
  --edge-dim:   #0E1810;
  --text:       #D0E8D4;
  --muted:      #3A5444;
  --sub:        #5E8070;
  --signal:     #7EC8A0;
  --sig-deep:   #081A0E;
  --sig-mid:    #2A6040;
}

/* ── RESET ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { background: var(--void); color: var(--text); min-height: 100vh; font-family: 'IBM Plex Sans', sans-serif; }
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: var(--edge); border-radius: 2px; }
::selection { background: var(--sig-deep); color: var(--signal); }

/* ── UTILITY ─────────────────────────────────────────────────────────────── */
.signal     { color: var(--signal); }
.signal-text{ color: var(--signal); }
.text-muted { color: var(--muted); font-weight: 300; }

/* ── FADE ────────────────────────────────────────────────────────────────── */
.fade { opacity: 0; transform: translateY(28px); transition: opacity 0.85s ease, transform 0.85s ease; }
.fade.visible { opacity: 1; transform: none; }

/* ── ANIMATIONS ──────────────────────────────────────────────────────────── */
@keyframes heroIn { from { opacity:0; transform:translateY(22px); } to { opacity:1; transform:none; } }
@keyframes popIn  { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:none; } }

/* Plant cell ripple breathing */
@keyframes r1 { 0%,100%{transform:scale(1) rotate(0deg)} 50%{transform:scale(1.038) rotate(1.5deg)} }
@keyframes r2 { 0%,100%{transform:scale(1) rotate(0deg)} 50%{transform:scale(1.06)  rotate(-2deg)} }
@keyframes r3 { 0%,100%{transform:scale(1) rotate(0deg)} 50%{transform:scale(1.045) rotate(2.5deg)} }
@keyframes r4 { 0%,100%{transform:scale(1) rotate(0deg)} 50%{transform:scale(1.07)  rotate(-1.5deg)} }
.r1 { animation: r1 9s  ease-in-out infinite; transform-origin: 400px 400px; }
.r2 { animation: r2 12s ease-in-out infinite; transform-origin: 400px 400px; }
.r3 { animation: r3 7s  ease-in-out infinite; transform-origin: 400px 400px; }
.r4 { animation: r4 15s ease-in-out infinite; transform-origin: 400px 400px; }
@media (prefers-reduced-motion: reduce) { .r1,.r2,.r3,.r4 { animation: none; } }

/* ── NAV ─────────────────────────────────────────────────────────────────── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200; height: 60px;
  padding: 0 clamp(20px, 5vw, 64px);
  display: flex; align-items: center; justify-content: space-between;
  transition: background 0.45s, border-color 0.45s, backdrop-filter 0.45s;
  border-bottom: 1px solid transparent;
}
#nav.scrolled {
  background: rgba(6,12,8,0.93);
  backdrop-filter: blur(14px);
  border-color: var(--edge);
}
.nav-wordmark {
  background: none; border: none; cursor: pointer;
  font-family: 'IBM Plex Mono', monospace; font-size: 13.5px;
  letter-spacing: 0.04em; color: var(--text);
}
.nav-links { display: flex; align-items: center; gap: clamp(16px, 2.5vw, 32px); }
.nav-link {
  background: none; border: none; cursor: pointer;
  font-family: 'IBM Plex Sans', sans-serif; font-size: 13px;
  letter-spacing: 0.04em; color: var(--muted);
  transition: color 0.2s; text-transform: capitalize;
}
.nav-link:hover { color: var(--text); }
.nav-cta {
  background: none; border: 1px solid var(--sig-mid); color: var(--signal);
  font-family: 'IBM Plex Mono', monospace; font-size: 9px; letter-spacing: 0.18em;
  padding: 9px 20px; cursor: pointer; transition: background 0.25s, border-color 0.25s;
}
.nav-cta:hover { background: var(--sig-deep); border-color: var(--signal); }

/* ── HERO ────────────────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: 80px clamp(20px, 6vw, 72px) 60px;
  position: relative; overflow: hidden;
}
.ripple {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 840px); height: min(92vw, 840px);
  opacity: 0.055; pointer-events: none; user-select: none;
}
.hero-content {
  max-width: 860px; width: 100%; position: relative; z-index: 1;
}
.hero-in { animation: heroIn 1s ease 0.25s both; }

.eyebrow {
  display: block; font-family: 'IBM Plex Mono', monospace;
  font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 20px;
}
.hero .eyebrow { color: var(--signal); margin-bottom: 44px; }

h1 {
  font-family: 'Spectral', serif;
  font-size: clamp(38px, 6.5vw, 76px); font-weight: 300;
  line-height: 1.06; letter-spacing: -0.02em; color: var(--text); margin-bottom: 32px;
}
.hero-sub {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: clamp(15px, 1.8vw, 18px); line-height: 1.7;
  color: var(--muted); max-width: 560px;
}

/* ── LAYOUT ──────────────────────────────────────────────────────────────── */
.section    { padding: clamp(64px, 9vw, 120px) clamp(20px, 6vw, 72px); }
.wrap-wide  { max-width: 980px; margin: 0 auto; }
.bg-surface { background: var(--surface); }
.full-rule  { width: 100%; height: 1px; border: none; background: var(--edge); }

/* ── HEADINGS ────────────────────────────────────────────────────────────── */
h2 {
  font-family: 'Spectral', serif; font-weight: 400; line-height: 1.12;
  letter-spacing: -0.015em; color: var(--text);
  font-size: clamp(30px, 4.5vw, 50px); margin-bottom: clamp(40px, 6vw, 72px);
}
h2 em { font-style: italic; }

p {
  font-family: 'IBM Plex Sans', sans-serif; font-size: 15px; line-height: 1.85;
  color: var(--sub); margin-bottom: 22px;
}
p:last-child { margin-bottom: 0; }

/* ── TWO COLUMN ──────────────────────────────────────────────────────────── */
.two-col {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 7vw, 96px); align-items: start;
}
@media (max-width: 680px) { .two-col { grid-template-columns: 1fr; } }

/* ── PILLARS ─────────────────────────────────────────────────────────────── */
.pillars { display: flex; flex-direction: column; margin-top: 8px; }
.pillar {
  display: flex; gap: 16px; align-items: flex-start;
  padding-top: 18px; border-top: 1px solid var(--edge);
}
.pillar-dot {
  width: 5px; height: 5px; background: var(--signal);
  border-radius: 50%; margin-top: 8px; flex-shrink: 0;
}
.pillar-title { font-family: 'IBM Plex Sans', sans-serif; font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 4px; }
.pillar-desc  { font-family: 'IBM Plex Sans', sans-serif; font-size: 12px; color: var(--muted); line-height: 1.55; }

/* ── CAPABILITIES GRID ───────────────────────────────────────────────────── */
.cap-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1px; background: var(--edge);
}
.cap-card {
  background: var(--surface); padding: 36px 32px;
  border: 1px solid transparent; transition: border-color 0.3s, background 0.3s;
}
.cap-card:hover { border-color: var(--sig-mid); background: var(--surface-hov); }
.cap-code { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--signal); letter-spacing: 0.18em; margin-bottom: 20px; }
.cap-eye  { font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--muted); letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 10px; }
.cap-card h3 { font-family: 'Spectral', serif; font-size: clamp(17px, 2vw, 21px); font-weight: 500; color: var(--text); line-height: 1.3; margin-bottom: 16px; }
.cap-card p  { font-size: 13.5px; margin-bottom: 22px; }

/* ── TAGS ────────────────────────────────────────────────────────────────── */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: 'IBM Plex Mono', monospace; font-size: 9px;
  color: var(--muted); border: 1px solid var(--edge-dim);
  padding: 3px 9px; letter-spacing: 0.08em; transition: color 0.3s, border-color 0.3s;
}
.cap-card:hover .tag { color: var(--signal); border-color: var(--sig-deep); }

/* ── SCIENCE PRINCIPLES ──────────────────────────────────────────────────── */
.principles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(32px, 5vw, 56px); }
.principle-id   { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--signal); letter-spacing: 0.14em; margin-bottom: 14px; }
.principle-rule { width: 28px; height: 1px; background: var(--signal); margin-bottom: 20px; }
.principle h3   { font-family: 'Spectral', serif; font-size: clamp(17px, 1.8vw, 20px); font-weight: 500; color: var(--text); line-height: 1.3; margin-bottom: 14px; }
.principle p    { font-size: 13.5px; }

/* ── CHALLENGES ──────────────────────────────────────────────────────────── */
.challenges { display: flex; flex-direction: column; gap: 0; margin-top: 8px; }
.challenge {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 0; border-top: 1px solid var(--edge);
  font-family: 'IBM Plex Sans', sans-serif; font-size: 13.5px;
  color: var(--sub); line-height: 1.6;
}
.arrow { color: var(--sig-mid); flex-shrink: 0; margin-top: 2px; }

/* ── FORM ────────────────────────────────────────────────────────────────── */
.form-field { margin-bottom: 18px; }
.flabel {
  display: block; font-family: 'IBM Plex Mono', monospace;
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.field {
  display: block; width: 100%;
  background: var(--surface); border: 1px solid var(--edge);
  color: var(--text); padding: 13px 16px; resize: none;
  font-family: 'IBM Plex Sans', sans-serif; font-size: 14px;
  outline: none; border-radius: 0; transition: border-color 0.25s;
}
.field:focus { border-color: var(--signal); }
.field::placeholder { color: #1A3020; }
textarea.field { resize: vertical; }
.field-note { font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--muted); letter-spacing: 0.08em; margin-top: 8px; }
.form-note  { font-family: 'IBM Plex Sans', sans-serif; font-size: 11px; color: var(--muted); line-height: 1.7; margin-top: 14px; }

.submit-btn      { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: 0.18em; padding: 15px 32px; border: none; transition: background 0.25s, color 0.25s; }
.submit-disabled { background: var(--edge); color: var(--muted); cursor: not-allowed; }
.submit-active   { background: var(--signal); color: var(--void); cursor: pointer; }

/* ── FORM SUCCESS ────────────────────────────────────────────────────────── */
.form-success { border: 1px solid var(--sig-mid); padding: 44px 40px; animation: popIn 0.65s ease both; }
.success-label { font-family: 'IBM Plex Mono', monospace; font-size: 9px; letter-spacing: 0.22em; color: var(--signal); margin-bottom: 20px; }
.form-success h3 { font-family: 'Spectral', serif; font-size: 26px; font-weight: 400; color: var(--text); margin-bottom: 18px; }
.form-success p  { font-size: 14px; }

/* ── FOOTER ──────────────────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--edge); }
.footer-inner {
  max-width: 980px; margin: 0 auto;
  padding: 36px clamp(20px, 6vw, 72px);
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: flex-end; gap: 20px;
}
.footer-wordmark { font-family: 'IBM Plex Mono', monospace; font-size: 14px; color: var(--text); margin-bottom: 6px; }
.footer-desc     { font-family: 'IBM Plex Sans', sans-serif; font-size: 11px; color: var(--muted); }
.footer-link     { color: var(--signal); text-decoration: none; border-bottom: 1px solid var(--sig-mid); transition: border-color 0.2s; padding-bottom: 1px; }
.footer-link:hover { border-color: var(--signal); }
.footer-tagline  { font-family: 'Spectral', serif; font-size: 13px; font-style: italic; color: var(--muted); text-align: right; line-height: 1.9; }

/* ── LIGHT MODE ──────────────────────────────────────────────────────────── */
body { transition: background 0.5s ease, color 0.4s ease; }
body.light {
  --void:       #F5F8F4;
  --surface:    #EBF2E8;
  --surface-hov:#E4EEE0;
  --edge:       #C8DAC0;
  --edge-dim:   #D8E8D0;
  --text:       #161A14;
  --muted:      #607858;
  --sub:        #3A5838;
  --signal:     #2E7050;
  --sig-deep:   #E0F5E8;
  --sig-mid:    #1A5038;
}
body.light ::-webkit-scrollbar-track { background: #F5F8F4; }
body.light ::-webkit-scrollbar-thumb { background: #C8DAC0; }
body.light ::selection { background: #E0F5E8; color: #2E7050; }
body.light #nav.scrolled { background: rgba(245,248,244,0.93); border-color: #C8DAC0; }
body.light .field { background: #EBF2E8; border-color: #C8DAC0; color: #161A14; }
body.light .field::placeholder { color: #90A888; }
body.light .submit-disabled { background: #C8DAC0; }
body.light .form-success { border-color: #1A5038; }
body.light .cap-grid { background: #C8DAC0; }
body.light .cap-card { background: #EBF2E8; }
body.light .cap-card:hover { background: #E4EEE0; }
.theme-toggle { background:none;border:1px solid var(--border);border-radius:50%;cursor:pointer;color:var(--muted);transition:color 0.25s,border-color 0.25s;padding:0;width:32px;height:32px;display:flex;align-items:center;justify-content:center;margin-left:8px;flex-shrink:0; }
.theme-toggle:hover { color: var(--signal); border-color:var(--muted); }
.theme-toggle svg { width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round; }
.icon-sun  { display: none; }
.icon-moon { display: block; }
.light .icon-sun  { display: block; }
.light .icon-moon { display: none; }

/* ── MOBILE NAV ──────────────────────────────────────────────────────────── */
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-hamburger {
  display: none; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: transparent; border: 1px solid var(--edge);
  border-radius: 50%; cursor: pointer; color: var(--muted);
  transition: border-color 0.2s, color 0.2s;
}
.nav-hamburger:hover { color: var(--signal); border-color: var(--signal); }
.nav-hamburger svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.nav-dropdown {
  display: none; position: absolute; top: 52px; left: 0; right: 0;
  background: var(--void); border-bottom: 1px solid var(--edge);
  padding: 4px clamp(24px, 5vw, 64px);
}
.nav-dropdown.open { display: block; }
.nav-dropdown-link {
  display: block; width: 100%; background: none; border: none;
  cursor: pointer; text-align: left;
  font-family: 'IBM Plex Mono', monospace; font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); padding: 14px 0;
  border-bottom: 1px solid var(--edge); transition: color 0.25s;
}
.nav-dropdown-link:last-child { border-bottom: none; }
.nav-dropdown-link:hover { color: var(--signal); }
.nav-dropdown-cta { color: var(--signal); }
@media (max-width: 700px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}
