*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f5f5f0;
  --text: #1e2a24;
  --muted: #5e6e67;
  --line: #e7e3da;
  --accent: #3d6b4f;
  --accent-light: #e8f0eb;
  --accent-strong: #2a4d38;
  --alert: #4a7c59;
  --header-height: 76px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: min(1080px, calc(100vw - 2.5rem));
  margin: 0 auto;
}

/* ── HEADER ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  padding: 1rem 0;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  background: var(--accent-strong);
  color: #fff;
  font-size: 0.9rem;
  line-height: 1;
}

.brand-name {
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  gap: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.nav a:hover { color: var(--text); }

/* ── BUTTONS ── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: opacity 0.15s, transform 0.15s;
  white-space: nowrap;
}

.button:hover { opacity: 0.85; transform: translateY(-1px); }

.button-primary {
  background: var(--accent-strong);
  color: #fff;
}

.button-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.button-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.button-lg { padding: 0.85rem 1.75rem; font-size: 1rem; }

/* ── HERO ── */
.hero {
  min-height: calc(100svh - var(--header-height));
}

.hero .container {
  min-height: inherit;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-copy {
  max-width: 50rem;
  padding: 0 0 1.5rem;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-dynamic {
  display: inline-block;
  min-width: 4.8ch;
  color: var(--accent-strong);
}

.hero-dynamic::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 0.9em;
  margin-left: 0.08em;
  background: currentColor;
  vertical-align: -0.08em;
  animation: blink 0.8s steps(1) infinite;
}

.lede {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── FEATURES ── */
.section { padding: 5rem 0; }

.feature-section { border-top: 1px solid var(--line); }

.feature-section-alt { background: var(--surface); }

.feature-section-proof {
  background: var(--surface-alt);
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.feature-grid-rev .feature-copy { order: 2; }
.feature-grid-rev .feature-visual { order: 1; }

.feature-copy h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0.5rem 0 1rem;
}

.copy-text {
  color: var(--muted);
  font-size: 0.98rem;
  margin-bottom: 1.5rem;
  max-width: 34rem;
}

.link-cta {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-strong);
  border-bottom: 1px solid var(--accent-strong);
  padding-bottom: 1px;
  transition: opacity 0.15s;
}

.link-cta:hover { opacity: 0.6; }

/* ── DEMO WINDOW ── */
.demo-window {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(30, 42, 36, 0.07);
}

.demo-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-alt);
}

.demo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}

.demo-title {
  margin-left: 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.demo-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.query-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: var(--bg);
  font-size: 0.9rem;
}

.query-prefix {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.query-text::after {
  content: "";
  display: inline-block;
  width: 1.5px;
  height: 0.9rem;
  margin-left: 1px;
  background: var(--accent-strong);
  vertical-align: middle;
  animation: blink 0.8s steps(1) infinite;
}

.result-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: var(--surface);
}

.result-card-alert {
  background: var(--accent-light);
  border-color: #c2d9c9;
}

.result-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--surface-alt);
  color: var(--muted);
  letter-spacing: 0.04em;
}

.result-badge-alert {
  background: var(--accent-light);
  color: var(--accent-strong);
}

.result-time {
  font-size: 0.78rem;
  color: var(--muted);
}

.result-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.3rem;
}

.result-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── ALERTS ── */
.alert-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.alert-row:last-child { border-bottom: none; }

.alert-row-muted { opacity: 0.55; }

/* ── COMPATIBILITY ── */
.compat-panel {
  padding: 1rem 0;
}

.compat-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.compat-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.compat-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #faf8f3;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.compat-pill-strong {
  color: var(--text);
  background: var(--surface);
}

.compat-pill-soft {
  background: var(--surface-alt);
}

.compat-note {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ── CTA SECTION ── */
.section-cta {
  background: var(--surface);
  color: var(--text);
  border-top: 1px solid var(--line);
}

.cta-shell {
  display: grid;
  gap: 1.5rem;
}

.cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding: 0;
}

.cta-panel .eyebrow { color: var(--accent); }

.cta-copy h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0.5rem 0 0.75rem;
  max-width: 18ch;
}

.cta-copy p {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 34rem;
}

.section-cta .button-primary {
  flex-shrink: 0;
}

/* ── FOOTER ── */
.footer-link {
  width: fit-content;
  font-size: 0.9rem;
  color: var(--muted);
  flex-shrink: 0;
}

.footer-link:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  justify-content: flex-start;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  flex-wrap: wrap;
}

/* ── ANIMATIONS ── */
@keyframes blink { 50% { opacity: 0; } }

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .hero .container,
  .feature-grid,
  .cta-panel { grid-template-columns: 1fr; gap: 2.5rem; }

  .feature-grid-rev .feature-copy,
  .feature-grid-rev .feature-visual { order: unset; }

  .hero {
    min-height: calc(100svh - var(--header-height));
  }

  .hero-copy {
    padding: 0 0 2rem;
  }

  .cta-panel { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
  .nav { display: none; }
  :root { --header-height: 68px; }
  .hero h1 { font-size: 2rem; }
  .hero-copy { padding: 0 0 1.5rem; }
  .footer-bottom { flex-direction: column; }
}
