:root {
  --bg: #fffdf2;
  --surface: #f7f5e8;
  --surface-strong: #efecda;
  --ink: #1b1a17;
  --muted: #57534e;
  --border: #e2dec9;
  --accent: #15803d;
  --accent-ink: #14532d;
  --accent-soft: #dcfce7;
  --accent-2: #d97706;
  --accent-2-ink: #92400e;
  --accent-2-soft: #fef3c7;
  --radius: 16px;
  --shadow: 0 8px 28px rgba(27, 26, 23, 0.06);
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Newsreader", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: var(--font-mono); }

.container { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 253, 242, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 68px;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.65rem;
  font-weight: 800; font-size: 1.05rem; color: var(--ink);
}
.brand img { width: 32px; height: 32px; }
.nav-links { display: flex; align-items: center; gap: 1.25rem; }
.nav-links a { font-size: 0.94rem; font-weight: 600; color: var(--muted); }
.nav-links a.active, .nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-cta {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.5rem 0.95rem; border-radius: 999px;
  background: var(--accent); color: #fffdf2 !important;
  font-size: 0.88rem; font-weight: 700;
}
.nav-toggle {
  display: none; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 0.45rem 0.7rem; font-weight: 700; cursor: pointer;
}

.hero { padding: 4.5rem 0 3rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.32rem 0.85rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink);
  border: 1px solid #bbf7d0; font-size: 0.82rem; font-weight: 700;
}
.eyebrow-amber {
  background: var(--accent-2-soft); color: var(--accent-2-ink); border-color: #fde68a;
}
h1, h2, h3 { font-family: var(--font-serif); letter-spacing: -0.02em; line-height: 1.16; margin: 0 0 0.75rem; }
h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); margin-top: 1rem; }
h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); }
h3 { font-size: 1.28rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 68ch; margin: 0 0 1.75rem; }
.accent-word { color: var(--accent); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin: 1.5rem 0 2rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.78rem 1.35rem; border-radius: 12px; font-weight: 700; font-size: 0.95rem;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink); cursor: pointer;
}
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn-primary { background: var(--accent); color: #fffdf2; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-ink); }
.btn-amber { background: var(--accent-2-soft); color: var(--accent-2-ink); border-color: #fcd34d; }

.install-box {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 0.9rem 1.1rem; max-width: 640px; box-shadow: var(--shadow);
}
.install-box code { font-size: 0.9rem; overflow-x: auto; white-space: nowrap; }
.copy-btn {
  background: var(--bg); border: 1px solid var(--border); border-radius: 9px;
  padding: 0.42rem 0.8rem; font-weight: 700; font-size: 0.82rem; cursor: pointer;
}

.section { padding: 3rem 0; border-top: 1px solid var(--border); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.35rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.35rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow);
}
.card-white { background: #ffffff; }
.stat-value { font-family: var(--font-serif); font-size: 2.1rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 0.86rem; color: var(--muted); font-weight: 600; }

.badge {
  display: inline-block; padding: 0.2rem 0.65rem; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; background: var(--accent-soft); color: var(--accent-ink);
}
.badge-amber { background: var(--accent-2-soft); color: var(--accent-2-ink); }

.code-block {
  background: #1f1e1a; color: #f7f5e8; border-radius: 14px; padding: 1.1rem 1.25rem;
  overflow-x: auto; font-size: 0.86rem; line-height: 1.55; margin: 0.75rem 0 0;
}

.studio-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.95rem; }
.field label { font-size: 0.85rem; font-weight: 700; color: var(--ink); }
.field select, .field input {
  padding: 0.62rem 0.75rem; border-radius: 10px; border: 1px solid var(--border);
  background: #ffffff; color: var(--ink); font-family: var(--font-sans); font-size: 0.94rem;
}
.sms-preview {
  background: #1f1e1a; color: #dcfce7; border-radius: 14px; padding: 1rem 1.15rem;
  font-family: var(--font-mono); font-size: 0.9rem; line-height: 1.5; margin-top: 0.85rem;
}

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: #ffffff; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { padding: 0.82rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--surface); font-weight: 700; }
tr:last-child td { border-bottom: none; }

.docs-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 2.2rem; padding: 2.5rem 0 4rem; }
.docs-sidebar {
  position: sticky; top: 88px; align-self: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.15rem;
}
.docs-sidebar h4 { margin: 0 0 0.65rem; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.docs-sidebar a { display: block; padding: 0.38rem 0.6rem; border-radius: 8px; font-size: 0.9rem; font-weight: 600; color: var(--muted); }
.docs-sidebar a:hover, .docs-sidebar a.active { background: var(--accent-soft); color: var(--accent-ink); text-decoration: none; }
.docs-article section { padding: 1.75rem 0; border-bottom: 1px solid var(--border); }
.docs-article section:last-child { border-bottom: none; }

.toast {
  position: fixed; bottom: 20px; right: 20px; z-index: 60;
  background: #1f1e1a; color: #fffdf2; padding: 0.72rem 1.1rem; border-radius: 12px;
  font-size: 0.88rem; font-weight: 600; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.toast.show { opacity: 1; }

.footer {
  border-top: 1px solid var(--border); padding: 2.5rem 0; color: var(--muted); font-size: 0.9rem;
}
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.15rem; }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4, .studio-grid, .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0.85rem;
    background: var(--bg); padding: 1.25rem; border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
}
