:root {
  --bg: #171a18;
  --panel: #1d211f;
  --panel-2: #222725;
  --border: #2e3531;
  --text: #f1eee6;
  --muted: #97a196;
  --accent: #8bb89a;
  --accent-strong: #a7d1b4;
  --radius: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Mono", "Consolas", monospace;
}

.landing-shell {
  width: min(860px, calc(100% - 48px));
  margin: 0 auto;
  padding: 48px 0 80px;
}

/* Header */

.landing-header {
  margin-bottom: 56px;
}

.landing-wordmark {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent-strong);
}

.landing-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}

/* Prefold */

.prefold {
  min-height: calc(100svh - 97px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--border);
}

.prefold-line {
  margin: 0 0 16px;
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(16px, 2.2vw, 28px);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  max-width: 720px;
}

.prefold-sub {
  margin: 0 0 40px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* Hero */

.hero {
  margin-bottom: 0;
  padding-bottom: 96px;
  border-bottom: 1px solid var(--border);
  min-height: calc(100svh - 97px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 10vh;
}

.hero-title {
  margin: 0 0 48px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(20px, 2.8vw, 36px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
  max-width: 860px;
  color: var(--text);
  white-space: nowrap;
}

.hero-sub {
  margin: 0 0 56px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  opacity: 0.7;
  max-width: 520px;
}

.cta-button {
  display: inline-block;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--accent-strong);
  padding: 14px 32px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 120ms ease;
  cursor: pointer;
}

.cta-button:hover {
  background: rgba(139, 184, 154, 0.08);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72em;
  font-weight: 400;
  background: #1a2420;
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 3px 10px;
  color: var(--accent-strong);
  display: inline-block;
  vertical-align: middle;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* Mobile-only elements — hidden on desktop */

.mobile-stats,
.hero-title-mobile,
.hero-sub-mobile,
.mobile-code-title {
  display: none;
}

/* How it works */

.how-to {
  margin-top: 96px;
  margin-bottom: 96px;
}

.how-to-title {
  margin: 0 0 32px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.screenshot-step {
  margin-bottom: 8px;
}

.screenshot-img {
  width: 100%;
  display: block;
  border: 1px solid var(--border);
}

.screenshot-caption {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.03em;
  line-height: 1.5;
}

.screenshot-arrow {
  text-align: center;
  color: var(--accent);
  font-size: 18px;
  margin: 16px 0;
  letter-spacing: 0;
}

/* Use cases */

.use-cases {
  margin-bottom: 96px;
}

.use-cases-title {
  margin: 0 0 28px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.use-case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.use-case-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.use-case-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 10px;
}

.use-case-text {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* Bottom CTA */

.bottom-cta {
  text-align: center;
  padding: 64px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

.bottom-cta-text {
  margin: 0 0 28px;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
}

/* Footer */

.landing-footer {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-legal {
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
}

.footer-legal:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Mobile */

@media (max-width: 600px) {
  .landing-shell {
    padding: 0 0 60px;
    width: 100%;
  }

  /* Prefold */
  .prefold {
    min-height: calc(100svh - 57px);
    padding: 0 24px 48px;
  }

  .prefold-line {
    font-size: clamp(20px, 6vw, 28px);
  }

  /* Header */
  .landing-header {
    padding: 20px 24px 16px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border);
  }

  .landing-wordmark {
    font-size: 20px;
  }

  /* Hero — fills viewport so nothing peeks below fold */
  .hero {
    min-height: calc(100svh - 57px);
    padding: 0 0 48px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  /* Stats bar */
  .mobile-stats {
    margin-top: 80px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--border);
    margin-bottom: 28px;
  }

  .mobile-stat {
    padding: 14px 16px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .mobile-stat:nth-child(3),
  .mobile-stat:nth-child(6) {
    border-right: none;
  }

  .mobile-stat-label {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
  }

  .mobile-stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-strong);
    font-family: "IBM Plex Mono", monospace;
  }

  /* Hero text */
  .hero-title {
    display: none;
  }

  .hero-signal {
    color: var(--accent-strong);
  }

  .hero-title-mobile {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(36px, 11vw, 52px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text);
    padding: 0 24px;
    margin: auto 0 48px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .hero-sub {
    display: none;
  }

  .hero-sub-mobile {
    display: none;
  }

  .hero-code {
    font-size: 0.85em;
    padding: 3px 8px;
  }

  .mobile-code-title {
    display: block;
    padding: 24px 24px;
    border-bottom: 1px solid var(--border);
  }

  .mobile-code-title p {
    margin: 0 0 10px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
  }

  .mobile-code-title p:last-child {
    margin-bottom: 0;
  }

  .hero-actions {
    padding: 0 24px 32px;
    flex-direction: row;
    gap: 10px;
  }

  .cta-button {
    font-size: 11px;
    padding: 12px 16px;
    text-align: center;
    flex: 1;
    box-sizing: border-box;
  }

  /* How it works */
  .how-to {
    margin-top: 48px;
    padding: 0 24px;
  }

  .screenshot-img {
    display: none;
  }

  .screenshot-step {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 18px;
    margin-bottom: 0;
  }

  .screenshot-caption {
    font-size: 14px;
    color: var(--text);
    opacity: 0.85;
    margin: 0;
    line-height: 1.7;
  }

  .screenshot-arrow {
    margin: 10px 0;
    font-size: 14px;
  }

  /* Use cases */
  .use-cases {
    padding: 0 24px;
  }

  .use-case-grid {
    grid-template-columns: 1fr;
  }

  /* Bottom CTA */
  .bottom-cta {
    padding: 40px 24px;
    margin: 0 0 48px;
  }

  .bottom-cta-text {
    font-size: 18px;
  }

  /* Footer */
  .landing-footer {
    padding: 0 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* Demo banner popup */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-box {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 24px;
  max-width: 420px;
  width: calc(100% - 48px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22);
}

.demo-banner-box {
  max-width: 600px;
  padding: 40px;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.demo-banner-heading {
  margin: 0 0 16px;
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 600;
  color: var(--accent-strong);
  line-height: 1.3;
}

.demo-banner-body {
  margin: 0 0 32px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  opacity: 0.85;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
}

.modal-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 16px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.modal-btn:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.modal-btn-confirm {
  border-color: var(--accent);
  color: var(--accent-strong);
}
