/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #060e07;
  --bg2:       #0d1a0f;
  --bg3:       #111f13;
  --surface:   #162019;
  --border:    #1f3022;
  --primary:   #90b20c;
  --primary-d: #72900a;
  --text:      #e8f0e9;
  --muted:     #8a9e6a;
  --radius:    12px;
  --font:      'Inter', sans-serif;
}

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }

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

/* ── Buttons ── */
.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: #060e07;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 28px;
  border-radius: 8px;
  transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover { background: var(--primary-d); transform: translateY(-1px); }

.btn-ghost {
  display: inline-block;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }

.btn-nav {
  display: inline-block;
  background: var(--primary);
  color: #060e07;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 8px 18px;
  border-radius: 6px;
  transition: background 0.2s;
}
.btn-nav:hover { background: var(--primary-d); }

/* External link icon (replaces ↗ unicode which renders as emoji on iOS) */
.ext-icon {
  width: 0.6em;
  height: 0.6em;
  vertical-align: -0.02em;
  margin-left: 2px;
  display: inline;
  flex-shrink: 0;
}

/* ── Nav ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(6, 14, 7, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--primary);
  letter-spacing: 0.02em;
}
.nav-logo .nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.88rem;
}
.nav-links a:not(.btn-nav) { color: var(--muted); transition: color 0.2s; }
.nav-links a:not(.btn-nav):hover { color: var(--text); }

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 100px 24px 80px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(144, 178, 12, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(144, 178, 12, 0.04) 0%, transparent 60%);
}
.hero-inner {
  position: relative;
  max-width: 760px;
}
.hero-badge {
  display: inline-block;
  background: rgba(74, 223, 134, 0.1);
  color: var(--primary);
  border: 1px solid rgba(74, 223, 134, 0.25);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: #fff;
}
.hero h1 span { color: var(--primary); }
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
  max-width: 580px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.hero-tagline {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(74, 223, 134, 0.5);
}
.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--border);
  font-size: 1.2rem;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ── Section labels ── */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}
.section-sub {
  color: var(--muted);
  max-width: 600px;
  margin: 12px 0 48px;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ── Mission ── */
.mission {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 72px 0;
  text-align: center;
}
.mission blockquote {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  line-height: 1.75;
  color: var(--text);
  font-style: italic;
  max-width: 760px;
  margin: 0 auto 20px;
}
.mission cite {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: normal;
}

/* ── What we monitor ── */
.monitors {
  padding: 96px 0;
}
.monitors h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}
.monitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.monitor-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}
.monitor-card:hover {
  border-color: rgba(74, 223, 134, 0.3);
  transform: translateY(-2px);
}
.monitor-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  overflow: hidden;
  flex-shrink: 0;
}
.monitor-icon img {
  width: 64px !important;
  height: 64px !important;
  max-width: 64px;
  max-height: 64px;
  display: block;
  object-fit: contain;
}
.monitor-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}
.monitor-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 16px;
}
.monitor-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  opacity: 0.7;
  letter-spacing: 0.04em;
}

/* ── Typical setup ── */
.setup-diagram {
  padding: 96px 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.setup-diagram h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}
.setup-img {
  display: block;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ── How it works ── */
.how {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 96px 0;
}
.how h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 48px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 32px;
}
.step {
  display: flex;
  gap: 16px;
}
.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: rgba(74, 223, 134, 0.12);
  border: 1px solid rgba(74, 223, 134, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 3px;
}
.step-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.step-body p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ── How AI hears ── */
.ai-hears {
  padding: 96px 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.ai-hears h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.pipeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 64px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.pipeline-step {
  display: flex;
  gap: 24px;
  padding: 28px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  transition: background 0.2s;
}
.pipeline-step:last-child { border-bottom: none; }
.pipeline-step:hover { background: #1a2b1d; }
.pipeline-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: rgba(144, 178, 12, 0.14);
  border: 1px solid rgba(144, 178, 12, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 2px;
}
.pipeline-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.pipeline-body p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.75;
}
.pipeline-body strong { color: var(--text); font-weight: 600; }

.subsection-label {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
}

.organism-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.organism-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s;
}
.organism-card:hover { border-color: rgba(144, 178, 12, 0.3); }
.organism-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
}
.organism-icon img {
  width: 40px !important;
  height: 40px !important;
  max-width: 40px;
  max-height: 40px;
  display: block;
  object-fit: contain;
}
.organism-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.organism-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.organism-card li {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  padding-left: 12px;
  position: relative;
}
.organism-card li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--primary);
  opacity: 0.6;
}
.organism-card li strong { color: var(--text); font-weight: 600; }

/* ── Soil Acoustic Index ── */
.soil-index {
  padding: 96px 0;
}
.soil-index h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}
.sai-intro {
  max-width: 720px;
  margin-bottom: 48px;
}
.sai-intro p {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.75;
}

.sai-components {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 48px;
}
.sai-component {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
}
.sai-component-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.sai-badge {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: rgba(144, 178, 12, 0.14);
  border: 1px solid rgba(144, 178, 12, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
}
.sai-component h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}
.sai-component p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 12px;
}
.sai-component p:last-child { margin-bottom: 0; }
.sai-component ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
  padding-left: 4px;
}
.sai-component li {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  padding-left: 14px;
  position: relative;
}
.sai-component li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 1.2rem;
  line-height: 1.2;
}
.sai-component li strong { color: var(--text); font-weight: 600; }
.sai-component em { color: var(--text); font-style: italic; }

.formula {
  display: flex;
  align-items: baseline;
  gap: 10px;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  padding: 14px 20px;
  margin: 16px 0;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  flex-wrap: wrap;
}
.formula-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
.formula-eq {
  font-size: 0.88rem;
  color: var(--text);
}
.formula-large { padding: 18px 24px; }
.formula-large .formula-label { font-size: 1.05rem; }
.formula-large .formula-eq { font-size: 1rem; }
.formula-note {
  font-size: 0.82rem !important;
  color: rgba(138, 158, 106, 0.75) !important;
  font-style: italic;
  margin-top: 4px !important;
}

.sai-final {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.sai-final h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
}
.sai-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}
.sai-term {
  display: flex;
  gap: 16px;
  align-items: baseline;
  font-size: 0.88rem;
  line-height: 1.6;
}
.sai-term-name {
  flex-shrink: 0;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  min-width: 80px;
}
.sai-term-desc { color: var(--muted); }
.sai-note {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.75;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ── Activity Index scale ── */
.activity-index {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.activity-index h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}
.activity-index p { font-size: 0.92rem; color: var(--muted); line-height: 1.75; margin-bottom: 14px; }
.activity-index p strong { color: var(--text); }
.activity-scale {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0;
}
.activity-band {
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
}
.band-low  { background: rgba(138,158,106,0.07); border-color: rgba(138,158,106,0.25); }
.band-mod  { background: rgba(200,160,0,0.07);   border-color: rgba(200,160,0,0.25); }
.band-high { background: rgba(144,178,12,0.10);  border-color: rgba(144,178,12,0.30); }
.band-range {
  font-family: 'JetBrains Mono','Fira Code',monospace;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.band-low  .band-range { color: var(--muted); }
.band-mod  .band-range { color: #c8a000; }
.band-high .band-range { color: var(--primary); }
.band-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 8px;
}
.band-low  .band-label { color: var(--muted); }
.band-mod  .band-label { color: #c8a000; }
.band-high .band-label { color: var(--primary); }
.band-desc { font-size: 0.82rem; color: var(--muted); line-height: 1.6; }
@media (max-width: 600px) {
  .activity-scale { grid-template-columns: 1fr; }
}

/* ── Screenshots ── */
.screenshots {
  padding: 96px 0;
}
.screenshots h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}
.screenshot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.screenshot-feature img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
}
.screenshot-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.screenshot-item img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
}
.screenshot-label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.4;
}

/* ── Open source ── */
.opensource {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 96px 0;
}
.opensource-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.opensource-text h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 20px;
}
.opensource-text p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 16px;
}
.opensource-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.opensource-install {
  background: #0a1209;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.install-label {
  padding: 12px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.opensource-install pre {
  padding: 24px 20px;
  overflow-x: auto;
}
.opensource-install code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  color: var(--primary);
  line-height: 1.8;
  white-space: pre-wrap;
}

/* ── Credits ── */
.credits {
  padding: 72px 0;
}
.credit-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.credit {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.credit-icon { width: 32px; height: 32px; flex-shrink: 0; margin-top: 2px; overflow: hidden; }
.credit-icon img { width: 32px !important; height: 32px !important; max-width: 32px; max-height: 32px; display: block; object-fit: contain; }
.credit strong { color: #fff; font-size: 0.9rem; display: block; margin-bottom: 2px; }
.credit div { font-size: 0.82rem; color: var(--muted); line-height: 1.5; }

/* ── Footer ── */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 56px 0 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 16px;
}
.footer-logo img { width: 32px; height: 32px; border-radius: 6px; }
.footer-left p { font-size: 0.88rem; color: var(--muted); margin-bottom: 6px; line-height: 1.6; }
.footer-muted { font-size: 0.78rem !important; opacity: 0.6; }
.footer-contrib-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
}
.footer-contributors {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.9;
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  font-size: 0.78rem;
  color: var(--muted);
}
.footer-bottom a { color: var(--primary); opacity: 0.7; }
.footer-bottom a:hover { opacity: 1; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links a:not(.btn-nav) { display: none; }

  .screenshot-grid { grid-template-columns: 1fr; }
  .screenshot-side { grid-template-columns: 1fr 1fr; }

  .opensource-inner { grid-template-columns: 1fr; gap: 40px; }

  .footer-inner { grid-template-columns: 1fr; gap: 32px; }

  .hero-actions { flex-direction: column; align-items: center; }

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

@media (max-width: 480px) {
  .screenshot-side { grid-template-columns: 1fr; }
  .monitor-grid { grid-template-columns: 1fr; }
}
