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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: #1b2430;
  background-color: #f7f4ee;
  background-image:
    linear-gradient(rgba(197, 203, 214, 0.28) 1px, transparent 1px),
    radial-gradient(ellipse at 12% 0%, rgba(61, 79, 138, 0.05), transparent 42%);
  background-size: 100% 32px, 100% 100%;
  background-attachment: fixed;
  min-height: 100vh;
}

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

a {
  color: #3d4f8a;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #2a6f73;
}

:focus-visible {
  outline: 2px solid #2a6f73;
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: #1b2430;
  color: #f7f4ee;
  padding: 8px 12px;
  z-index: 80;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
}

h1,
h2,
h3,
.wordmark,
.display {
  font-family: "Inter Tight", "IBM Plex Sans", sans-serif;
  letter-spacing: -0.03em;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  line-height: 1.12;
  margin: 0 0 16px;
}

h2 {
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  line-height: 1.25;
  margin: 0 0 12px;
}

h3 {
  font-size: 1.05rem;
  margin: 0 0 8px;
}

p {
  margin: 0 0 14px;
}

.lede {
  font-size: 1.08rem;
  color: #1b2430;
  max-width: 38rem;
}

.muted,
.eyebrow {
  color: #9aa3b0;
}

.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.rule {
  border: 0;
  border-top: 1px solid #c5cbd6;
  margin: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 244, 238, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #c5cbd6;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.wordmark {
  color: #1b2430;
  text-decoration: none;
  font-size: 1.2rem;
  position: relative;
  padding-bottom: 2px;
}

.wordmark::after {
  content: "";
  position: absolute;
  left: 0.62em;
  right: 0.12em;
  bottom: 3px;
  height: 1px;
  background: #3d4f8a;
}

.wordmark:hover {
  color: #3d4f8a;
}

.menu-toggle {
  display: none;
  border: 1px solid #c5cbd6;
  background: #f7f4ee;
  color: #1b2430;
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-nav a,
.site-nav button.nav-text {
  color: #1b2430;
  text-decoration: none;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.site-nav a:hover,
.site-nav button.nav-text:hover,
.site-nav a.is-active {
  color: #3d4f8a;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 10px 16px;
  font: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  line-height: 1.2;
}

.btn-primary,
.site-nav .btn-primary {
  background: #3d4f8a;
  color: #f7f4ee;
  border-color: #3d4f8a;
}

.btn-primary:hover,
.site-nav .btn-primary:hover {
  background: #324274;
  color: #f7f4ee;
}

.btn-secondary {
  background: transparent;
  color: #3d4f8a;
  border-color: #3d4f8a;
}

.btn-secondary:hover {
  background: rgba(61, 79, 138, 0.08);
  color: #3d4f8a;
}

.btn-ghost {
  background: transparent;
  color: #1b2430;
  border-color: #c5cbd6;
}

.hero {
  padding: 56px 0 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: start;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 22px 0 8px;
}

.copy-chip {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.86rem;
  border: 1px dashed #c5cbd6;
  background: #f7f4ee;
  color: #1b2430;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
}

.copy-chip.copied {
  border-color: #2a6f73;
  color: #2a6f73;
}

.trace-stage {
  margin: 28px 0 8px;
}

.trace-path {
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
}

.hero.is-ready .trace-path {
  animation: draw-trace 1.8s ease forwards;
}

@keyframes draw-trace {
  to {
    stroke-dashoffset: 0;
  }
}

.well {
  background: #efebe3;
  border: 1px solid #c5cbd6;
  border-left: 3px solid #3d4f8a;
  border-radius: 8px;
  padding: 16px;
}

.well h3 {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #3d4f8a;
}

.snippet-form {
  display: grid;
  gap: 8px;
}

.snippet-form input,
.snippet-form textarea,
.form-grid input,
.form-grid textarea,
.form-grid select {
  width: 100%;
  border: 1px solid #c5cbd6;
  background: #f7f4ee;
  color: #1b2430;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

.snippet-log {
  min-height: 132px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
}

.snippet-row {
  opacity: 0;
  transform: translateY(6px);
  animation: fade-row 280ms ease forwards;
}

.snippet-row:nth-child(1) { animation-delay: 0ms; }
.snippet-row:nth-child(2) { animation-delay: 120ms; }
.snippet-row:nth-child(3) { animation-delay: 240ms; }
.snippet-row:nth-child(4) { animation-delay: 360ms; }

@keyframes fade-row {
  to {
    opacity: 1;
    transform: none;
  }
}

.score {
  color: #2a6f73;
}

.section {
  padding: 56px 0;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 28px;
}

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

.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 18px;
  height: 1px;
  background: #c5cbd6;
}

.step {
  background: #f7f4ee;
  border: 1px solid #c5cbd6;
  border-radius: 8px;
  padding: 20px 18px 18px;
  position: relative;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #3d4f8a;
  color: #f7f4ee;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid #c5cbd6;
  border-radius: 999px;
  padding: 6px 12px;
  color: #1b2430;
  text-decoration: none;
  background: #f7f4ee;
  font-size: 0.92rem;
}

.chip:hover {
  border-color: #3d4f8a;
  color: #3d4f8a;
}

.split {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  background: #f7f4ee;
  border: 1px solid #c5cbd6;
  border-radius: 8px;
  padding: 20px;
}

.card h3 a {
  color: inherit;
  text-decoration: none;
}

.quotes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

blockquote {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.4;
}

.cite {
  display: block;
  margin-top: 12px;
  color: #9aa3b0;
  font-size: 0.9rem;
}

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

.stat {
  border-top: 1px solid #c5cbd6;
  padding-top: 12px;
}

.stat b {
  display: block;
  font-family: "Inter Tight", sans-serif;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.cta-band {
  background: #3d4f8a;
  color: #f7f4ee;
  border-radius: 8px;
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.cta-band h2,
.cta-band p,
.cta-band a {
  color: #f7f4ee;
}

.cta-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cta-band .btn-primary {
  background: #f7f4ee;
  color: #3d4f8a;
  border-color: #f7f4ee;
}

.cta-band .btn-secondary {
  color: #f7f4ee;
  border-color: #f7f4ee;
}

.site-footer {
  border-top: 1px solid #1b2430;
  background: #f7f4ee;
  padding: 28px 0 18px;
  min-height: 220px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 22px;
}

.footer-grid h2 {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9aa3b0;
  margin-bottom: 10px;
}

.footer-grid ul {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.footer-grid li {
  margin: 0 0 6px;
}

.footer-grid a {
  color: #1b2430;
  text-decoration: none;
}

.footer-grid a:hover {
  color: #3d4f8a;
}

.tagline {
  font-style: italic;
  color: #9aa3b0;
  margin: 8px 0 4px;
}

.legal-rail {
  display: flex;
  gap: 18px;
  align-items: center;
  border-top: 1px solid #c5cbd6;
  padding-top: 12px;
  color: #9aa3b0;
  font-size: 0.9rem;
}

.legal-rail a {
  color: #9aa3b0;
  text-decoration: none;
}

.page-hero {
  padding: 48px 0 12px;
}

.module {
  padding: 36px 0;
  border-top: 1px solid #c5cbd6;
}

.module-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: start;
}

.region-map {
  background: #efebe3;
  border: 1px solid #c5cbd6;
  border-radius: 8px;
  padding: 16px;
}

.graph-play {
  margin-top: 12px;
}

.graph-edge.live {
  stroke: #2a6f73;
  stroke-width: 2.4;
  animation: pulse-edge 900ms ease;
}

@keyframes pulse-edge {
  0% { stroke-dasharray: 1 80; }
  100% { stroke-dasharray: 80 0; }
}

.recall-card {
  margin-top: 12px;
  display: none;
}

.recall-card.is-on {
  display: block;
}

.use-grid,
.job-grid,
.team-grid,
.price-grid,
.note-grid {
  display: grid;
  gap: 16px;
}

.use-grid,
.job-grid,
.note-grid {
  grid-template-columns: 1fr 1fr;
}

.team-grid {
  grid-template-columns: repeat(3, 1fr);
}

.price-grid {
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
}

.price-card.keep {
  box-shadow: 0 0 0 2px #3d4f8a;
}

.price-card ul {
  padding-left: 18px;
  margin: 12px 0 18px;
}

.price-card li {
  margin: 0 0 6px;
}

.price {
  font-family: "Inter Tight", sans-serif;
  font-size: 1.8rem;
  letter-spacing: -0.03em;
  margin: 4px 0 12px;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 8px;
  margin-right: 6px;
}

.tag-user { background: rgba(42, 111, 115, 0.12); color: #2a6f73; }
.tag-session { background: rgba(61, 79, 138, 0.12); color: #3d4f8a; }
.tag-agent { background: rgba(154, 163, 176, 0.28); color: #1b2430; }

.docs-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 32px;
  padding: 28px 0 64px;
}

.docs-side {
  position: sticky;
  top: 84px;
  align-self: start;
}

.docs-side a {
  display: block;
  color: #1b2430;
  text-decoration: none;
  padding: 5px 0;
  font-size: 0.92rem;
}

.docs-side a:hover,
.docs-side a.is-active {
  color: #3d4f8a;
}

pre {
  margin: 0;
  overflow: auto;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.tab {
  border: 1px solid #c5cbd6;
  background: #f7f4ee;
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  cursor: pointer;
}

.tab.is-on {
  border-color: #3d4f8a;
  color: #3d4f8a;
}

.tab-panel[hidden] {
  display: none;
}

.faq details {
  border-top: 1px solid #c5cbd6;
  padding: 12px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-family: "Inter Tight", sans-serif;
}

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #c5cbd6;
  padding: 10px 0;
}

.ok {
  color: #2a6f73;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.82rem;
}

.portrait {
  width: 100%;
  height: 180px;
  border-radius: 8px;
  border: 1px solid #c5cbd6;
  margin-bottom: 12px;
  background: #efebe3;
}

.mail {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.9rem;
}

.form-grid {
  display: grid;
  gap: 12px;
  max-width: 36rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.success {
  display: none;
  border: 1px solid #2a6f73;
  color: #2a6f73;
  background: rgba(42, 111, 115, 0.08);
  border-radius: 8px;
  padding: 12px 14px;
}

.form.is-sent .success {
  display: block;
}

.form.is-sent .form-fields {
  display: none;
}

.legal h3 {
  margin-top: 22px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(27, 36, 48, 0.46);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 60;
}

.modal.is-open {
  display: flex;
}

.modal-card {
  width: min(440px, 100%);
  background: #f7f4ee;
  border: 1px solid #c5cbd6;
  border-radius: 8px;
  padding: 22px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.icon-close {
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
  color: #9aa3b0;
}

.key-out {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.86rem;
  background: #efebe3;
  border-radius: 8px;
  padding: 10px;
  margin-top: 8px;
}

@media (max-width: 900px) {
  .hero-grid,
  .two-col,
  .module-grid,
  .quotes,
  .split,
  .price-grid,
  .team-grid,
  .docs-layout,
  .stats,
  .timeline,
  .footer-grid,
  .use-grid,
  .job-grid,
  .note-grid,
  .form-row,
  .cta-band {
    grid-template-columns: 1fr;
    display: grid;
  }

  .timeline::before {
    display: none;
  }

  .docs-side {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    background: #f7f4ee;
    border-bottom: 1px solid #c5cbd6;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 18px;
    gap: 12px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero.is-ready .trace-path,
  .snippet-row,
  .graph-edge.live {
    animation: none;
    stroke-dashoffset: 0;
    opacity: 1;
    transform: none;
  }
}
