/* kai landing — design system per spec */

:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --muted: #525252;
  --muted-soft: #737373;
  --border: #e5e5e5;
  --divider: #f0f0f0;
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --accent-bg: #eff6ff;
  --mono-bg: #fafafa;
  --content-max: 720px;
  --pad-x: 16px;
  --pad-x-desktop: 48px;
  --section-gap: 48px;
  --section-gap-desktop: 72px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: "ss01", "cv11";
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

code, .mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92em;
  background: var(--mono-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
}

main {
  display: block;
}

.hero,
.section,
footer {
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
  text-transform: lowercase;
}

p { margin: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

ul { margin: 0; padding: 0; list-style: none; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-transform: lowercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 200ms ease, border-color 200ms ease, transform 200ms ease;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: #a3a3a3;
  text-decoration: none;
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.cta-row-center { justify-content: center; }

/* ---------- hero ---------- */

.hero {
  padding-top: 64px;
  padding-bottom: var(--section-gap);
}

.wordmark {
  margin-bottom: 40px;
}
.wordmark-name {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.wordmark-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 6px;
}

.hero h1 {
  font-size: 32px;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.subheadline {
  font-size: 20px;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 48px;
}

.mono-emphasis {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

/* ---------- generic section ---------- */

.section {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
  border-top: 1px solid var(--divider);
}

.section h2 {
  font-size: 28px;
  margin-bottom: 16px;
}

.section-intro {
  font-size: 17px;
  color: var(--muted);
  margin-bottom: 48px;
  max-width: 640px;
}

/* ---------- audit items (section 2) ---------- */

.audit-item {
  margin-bottom: 48px;
}
.audit-item:last-child { margin-bottom: 0; }

.audit-item h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}
.audit-item h3 .num {
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.audit-item > p {
  color: var(--muted);
  margin-bottom: 16px;
}

.arrow-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  line-height: 1.55;
}
.boundaries .arrow-list li {
  text-wrap: balance;
}
.arrow-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--muted);
}

.recommendation {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
  font-style: normal;
}

/* ---------- sample finding callout (section 3) ---------- */

.finding-callout {
  background: var(--accent-bg);
  border: 1px solid #c7d6f7;
  border-radius: 8px;
  padding: 24px;
}

.finding-line, .finding-block {
  margin: 0 0 8px 0;
  line-height: 1.55;
}
.finding-block { margin-top: 12px; margin-bottom: 12px; }

.finding-callout .label {
  color: var(--muted);
  font-weight: 500;
}
.finding-callout .sep { color: var(--muted); }

.finding-callout code {
  background: rgba(255, 255, 255, 0.65);
  border-color: #c7d6f7;
}

/* ---------- two column layout (sections 4 + 7) ---------- */

.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.col-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 16px;
  font-family: 'JetBrains Mono', monospace;
  text-transform: lowercase;
}

.deliverable-mockup {
  max-width: 100%;
  max-height: 480px;
  width: auto;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

.col-mockup {
  align-self: start;
}

/* ---------- how it works steps (section 5) ---------- */

.step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.step:last-child { margin-bottom: 0; }

.step-num {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--muted);
  padding-top: 2px;
}

.step-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.step-body p {
  color: var(--muted);
}

/* ---------- pricing (section 6) ---------- */

.pricing-section {
  text-align: center;
}

.pricing-card {
  max-width: 520px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 40px 48px;
  background: #ffffff;
  text-align: center;
}

.pricing-card-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.price {
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin: 0;
}

.price-sub {
  font-size: 16px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.4;
}

.pricing-card-divider {
  height: 1px;
  background: var(--divider);
  margin: 32px 0;
}

.pricing-spec {
  display: grid;
  grid-template-columns: 120px 1fr;
  row-gap: 12px;
  column-gap: 16px;
  text-align: left;
  align-items: baseline;
}

.spec-label {
  color: var(--muted);
  font-weight: 400;
  font-size: 14px;
}

.spec-value {
  color: var(--ink);
  font-weight: 500;
  font-size: 14px;
}

.price-fineprint {
  margin: 32px auto 0 auto;
  font-size: 13px;
  color: var(--muted-soft);
  max-width: 520px;
}

/* ---------- quick scan band (section 8) ---------- */

.quick-scan-band {
  background: var(--mono-bg);
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
  padding: 96px 0;
  margin: 0;
}

.quick-scan-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  text-align: center;
}

.quick-scan-band h2 {
  font-size: 28px;
  margin-bottom: 8px;
}

.quick-scan-sub {
  font-size: 20px;
  color: var(--muted);
  margin-bottom: 32px;
}

.quick-scan-body {
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 32px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.quick-scan-foot {
  font-size: 14px;
  color: var(--muted);
  margin-top: 16px;
}

/* ---------- FAQ (section 9) ---------- */

.qa {
  margin-bottom: 24px;
}
.qa:last-child { margin-bottom: 0; }

.qa .q {
  font-weight: 600;
  margin-bottom: 4px;
}

.qa .a {
  color: var(--ink);
}

.qa .a a { color: var(--accent); text-decoration: none; }
.qa .a a:hover { text-decoration: underline; }

/* ---------- final CTA (section 10) ---------- */

.final-cta {
  text-align: center;
}

.final-cta h2 {
  font-size: 28px;
  margin-bottom: 32px;
}

/* ---------- footer ---------- */

footer {
  padding: 48px 0 64px 0;
  border-top: 1px solid var(--divider);
  text-align: center;
}

.foot-line {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.foot-fine {
  font-size: 10px;
  color: var(--muted);
  opacity: 0.85;
  margin-top: 16px;
}

footer a { color: var(--muted); }
footer a:hover { color: var(--ink); }

/* ---------- focus states (a11y) ---------- */

.btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- responsive (768px+) ---------- */

@media (min-width: 768px) {
  .hero,
  .section,
  footer,
  .quick-scan-inner {
    padding-left: var(--pad-x-desktop);
    padding-right: var(--pad-x-desktop);
  }

  .hero { padding-top: 80px; }
  .hero h1 { font-size: 48px; }
  .wordmark { margin-bottom: 56px; }

  .section {
    padding-top: var(--section-gap-desktop);
    padding-bottom: var(--section-gap-desktop);
  }
  .section h2 { font-size: 32px; }

  .quick-scan-band h2 { font-size: 32px; }
  .final-cta h2 { font-size: 32px; }

  .two-col {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }
}

/* ---------- responsive (under 768px — mobile pricing card) ---------- */

@media (max-width: 767px) {
  .pricing-card {
    max-width: 100%;
    margin: 0 16px;
    padding: 32px 24px;
  }
  .pricing-spec {
    grid-template-columns: 1fr;
    row-gap: 16px;
  }
  .spec-label {
    margin-bottom: -8px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12px;
  }
}

/* ---------- legal pages (privacy + terms) ---------- */

.legal-page {
  max-width: var(--content-max);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
  padding-top: 48px;
  padding-bottom: 96px;
}

.legal-nav {
  margin-bottom: 24px;
}

.legal-nav a {
  display: inline-block;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}

.legal-nav a:hover {
  text-decoration: none;
  color: var(--accent);
}

.legal-page h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: lowercase;
  margin: 24px 0 8px 0;
  line-height: 1.2;
}

.legal-updated {
  font-size: 14px;
  color: var(--muted-soft);
  margin-bottom: 48px;
}

.legal-body {
  color: var(--ink);
}

.legal-body > p,
.legal-body > ul {
  margin-bottom: 16px;
}

.legal-body p {
  line-height: 1.65;
}

.legal-body h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: lowercase;
  margin: 48px 0 16px 0;
  line-height: 1.3;
}

.legal-body h3 {
  font-size: 16px;
  font-weight: 700;
  text-transform: lowercase;
  margin: 24px 0 8px 0;
  line-height: 1.4;
}

.legal-body ul {
  list-style: disc;
  padding-left: 22px;
}

.legal-body ul ul {
  margin-top: 6px;
  margin-bottom: 6px;
  list-style: circle;
}

.legal-body ol.legal-steps {
  list-style: decimal;
  padding-left: 22px;
  margin-bottom: 16px;
}

.legal-body ul li,
.legal-body ol.legal-steps li {
  margin-bottom: 6px;
  line-height: 1.6;
}

.legal-body ol.legal-steps li {
  margin-bottom: 12px;
}

.legal-body strong {
  font-weight: 700;
  color: var(--ink);
}

.legal-body a {
  color: var(--accent);
  text-decoration: none;
}

.legal-body a:hover {
  text-decoration: underline;
}

.legal-table-wrap {
  overflow-x: auto;
  margin-bottom: 24px;
}

.legal-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.legal-body th,
.legal-body td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--divider);
  vertical-align: top;
}

.legal-body th {
  font-weight: 600;
  color: var(--muted);
  text-transform: lowercase;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

.legal-contact {
  font-style: normal;
  line-height: 1.7;
  margin-bottom: 16px;
}

.legal-foot {
  text-align: center;
  margin-top: 96px;
  font-size: 12px;
  color: var(--muted);
}

.legal-foot a {
  color: var(--muted);
}

.legal-foot a:hover {
  color: var(--ink);
  text-decoration: none;
}

@media (min-width: 768px) {
  .legal-page {
    padding-left: var(--pad-x-desktop);
    padding-right: var(--pad-x-desktop);
    padding-top: 64px;
  }
  .legal-page h1 {
    font-size: 32px;
  }
  .legal-body h2 {
    font-size: 22px;
    margin-top: 56px;
  }
}
