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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--font-body);
}

a { color: var(--sea); text-decoration-thickness: 1px; }
a:hover { color: var(--sea-light); }

img { max-width: 100%; display: block; }

/* ── Nav ── */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 6vw;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-bright);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.logo span { color: var(--sea); }

.nav-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.92rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
}

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

.nav-cta {
  padding: 0.45rem 1rem;
  background: var(--ink);
  color: var(--paper-bright) !important;
  border-radius: var(--radius);
  font-weight: 500;
}

.nav-cta:hover { background: var(--ink-soft); color: var(--paper-bright) !important; }

.hub-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
  text-decoration: none;
}

/* ── Layout ── */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 6vw;
}

section { padding: 4.5rem 0; }

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sea);
  margin: 0 0 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  font-weight: 600;
}

.section-lead {
  color: var(--muted);
  max-width: 52ch;
  margin: 0 0 2.5rem;
  font-size: 1.05rem;
}

/* ── Hero ── */
.hero {
  padding: 5rem 0 4rem;
  background:
    radial-gradient(ellipse 80% 60% at 70% 0%, rgba(74, 155, 142, 0.12), transparent),
    linear-gradient(180deg, var(--paper-bright) 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--rule);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  font-weight: 600;
}

.hero h1 em {
  font-style: italic;
  color: var(--sea);
}

.hero-sub {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 46ch;
  margin: 0 0 2rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: var(--sea);
  color: #fff;
}

.btn-primary:hover { background: var(--sea-light); color: #fff; }

.btn-ghost {
  background: transparent;
  border-color: var(--rule);
  color: var(--ink);
}

.btn-ghost:hover { border-color: var(--ink); }

.hero-card {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
}

.hero-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.hero-card-header strong { color: var(--amber-bright); font-weight: 500; }

.hero-card .line { opacity: 0.85; }
.hero-card .dim { opacity: 0.45; }
.hero-card .ok { color: #6dd4b8; }

/* ── Stats ── */
.stats {
  padding: 0;
  background: var(--ink);
  color: var(--paper);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat {
  padding: 2rem 1.5rem;
  border-right: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}

.stat:last-child { border-right: none; }

.stat-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--amber-bright);
  display: block;
}

.stat-label {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: 0.25rem;
}

/* ── Features ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  background: var(--paper-bright);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.feature-icon {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--sea);
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ── Pricing ── */
.pricing-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--paper-bright);
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.pricing-table th,
.pricing-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--rule);
}

.pricing-table thead th {
  font-family: var(--font-display);
  font-size: 1.1rem;
  background: var(--sand);
  font-weight: 600;
}

.pricing-table tbody tr:last-child td { border-bottom: none; }

.pricing-table .price {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--sea);
}

.pricing-table .featured {
  background: rgba(74, 155, 142, 0.06);
  outline: 2px solid var(--sea-light);
  outline-offset: -2px;
}

.pricing-table .check { color: var(--sea); }

/* ── FAQ ── */
.faq-list {
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper-bright);
}

.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item:last-child { border-bottom: none; }

.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: none;
  border: none;
  font: inherit;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
}

.faq-q:hover { background: var(--sand); }

.faq-q::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--muted);
  flex-shrink: 0;
}

.faq-item.open .faq-q::after { content: "−"; }

.faq-a {
  display: none;
  padding: 0 1.25rem 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.faq-item.open .faq-a { display: block; }

/* ── Docs ── */
.docs {
  background: var(--paper-bright);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.docs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
}

.docs-nav {
  position: sticky;
  top: 5rem;
  align-self: start;
  font-size: 0.88rem;
}

.docs-nav a {
  display: block;
  padding: 0.35rem 0;
  color: var(--muted);
  text-decoration: none;
}

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

.docs-body h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin: 2.5rem 0 0.75rem;
  font-weight: 600;
}

.docs-body h2:first-child { margin-top: 0; }

.docs-body h3 {
  font-size: 1.05rem;
  margin: 1.75rem 0 0.5rem;
  font-weight: 600;
}

.docs-body p,
.docs-body li {
  color: var(--muted);
  font-size: 0.95rem;
}

.docs-body ul { padding-left: 1.25rem; }

.docs-body code,
.docs-body pre {
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.docs-body pre {
  background: var(--ink);
  color: var(--paper);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.5;
}

.docs-body code:not(pre code) {
  background: var(--sand);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

.docs-body .note {
  border-left: 3px solid var(--amber);
  padding: 0.75rem 1rem;
  background: rgba(196, 132, 42, 0.08);
  margin: 1rem 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* ── Footer ── */
.site-footer {
  padding: 2.5rem 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.site-footer a { color: var(--amber); }

/* ── Inspector highlight ── */
[data-inspect-selected] {
  outline: 2px dashed var(--amber-bright) !important;
  outline-offset: 3px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .features-grid { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { position: static; display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); }
}
