:root {
  --bg: #f6f7fb;
  --bg-soft: #eef1f7;
  --text: #1c1e26;
  --text-muted: #5b6270;
  --accent: #ff6a4d;
  --accent-2: #6ecbff;
  --accent-3: #8b7cff;
  --button: #2b2f3a;
  --button-text: #ffffff;
  --line: #d9dee8;
  --card: #ffffff;
  --card-soft: #f4f6fb;
  --stripe-1: #eaf2fb;
  --stripe-2: #dbeafe;
  --stripe-3: #e9d5ff;
  --stripe-4: #ffe4e6;
  --stripe-5: #ffd7cc;
  --stripe-6: #ffbcae;
  --focus-ring: 0 0 0 3px rgba(110, 203, 255, 0.55);
  --shadow: none;
  --nav-h: 84px;
}

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

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

html {
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  overflow-x: hidden;
  overflow-y: auto;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(110, 203, 255, 0.22), transparent 24%),
    radial-gradient(circle at 80% 18%, rgba(139, 124, 255, 0.2), transparent 25%),
    radial-gradient(circle at 40% 92%, rgba(255, 106, 77, 0.12), transparent 20%),
    linear-gradient(180deg, var(--bg) 0%, #f3f6fc 100%);
}

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

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

::selection {
  background: rgba(110, 203, 255, 0.22);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--button);
  color: var(--button-text);
  font-size: 0.85rem;
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 160ms ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  box-shadow: var(--focus-ring);
}

.page {
  width: min(1280px, calc(100vw - 48px));
  min-height: calc(100vh - 48px);
  height: auto;
  margin: 24px auto 28px;
  display: grid;
  grid-template-rows: var(--nav-h);
  gap: 28px;
}

.nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "brand links cta";
  align-items: center;
  gap: 20px;
  min-height: var(--nav-h);
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 247, 251, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  padding: 6px 0;
}

.brand__logo {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
  object-position: center;
  flex: 0 0 auto;
  transform: translateY(-1px);
}

.nav__links {
  grid-area: links;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.9rem;
  color: rgba(28, 30, 38, 0.78);
}

.nav__links a {
  position: relative;
  padding: 8px 0;
  white-space: nowrap;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}

.nav__links a:hover::after,
.nav__links a:focus-visible::after {
  transform: scaleX(1);
}

.nav > .button {
  grid-area: cta;
  justify-self: end;
  white-space: nowrap;
}

/* ── Hero ─────────────────────────────────────────────── */

.hero {
  display: block;
  width: 100%;
  text-align: center;
}

.hero__lead {
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 14px;
  padding: 18px 0 12px;
}

.eyebrow {
  margin: 0;
  width: fit-content;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero__title {
  display: grid;
  gap: 0;
  width: 100%;
  max-width: 32ch;
  margin: 0 auto;
  justify-items: center;
  font-size: clamp(3rem, 4.2vw, 4.4rem);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.045em;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}

.hero__title-prefix,
.hero__title-lead-in,
.hero__title-rotator {
  display: block;
}

.hero__title-rotator {
  display: inline-flex;
  align-items: baseline;
  gap: 0.08em;
  min-height: 1.08em;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  color: var(--text);
  line-height: 1.08;
}

.hero__title-word {
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  line-height: 1.08;
  transition: opacity 320ms ease, transform 320ms ease;
}

.hero__title-word--fading {
  opacity: 0;
  transform: translateY(0.04em);
}

.hero__cursor {
  width: 1px;
  height: 0.82em;
  background: var(--accent);
  flex: 0 0 auto;
  transform: translateY(-0.01em);
  animation: caret-blink 1s steps(1) infinite;
}

@keyframes caret-blink {
  50% {
    opacity: 0;
  }
}

.hero__pain {
  margin: 4px 0 0;
  font-size: clamp(1.05rem, 1.1vw, 1.2rem);
  font-weight: 500;
  font-style: italic;
  letter-spacing: -0.01em;
  color: var(--accent);
}

.lede {
  max-width: 38rem;
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.signup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: min(100%, 44rem);
  padding: 16px;
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.signup input {
  -webkit-appearance: none;
  appearance: none;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #ffffff;
  color: var(--text);
}

.signup input::placeholder {
  color: rgba(28, 30, 38, 0.58);
}

.signup input:focus-visible {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: var(--focus-ring);
}

.signup__hint {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.signup__status {
  grid-column: 1 / -1;
  margin: 0;
  min-height: 1.2em;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.signup__status[data-state="success"] {
  color: var(--text);
}

.signup__status[data-state="error"] {
  color: var(--accent);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 18px;
  border-radius: 0;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  transition: opacity 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

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

.button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.button--dark {
  background: var(--button);
  color: var(--button-text);
}

.hero__notes {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  align-items: center;
  margin: 2px 0 0;
  padding: 0;
}

.hero__notes li {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(217, 222, 232, 0.9);
  background: rgba(255, 255, 255, 0.76);
  color: var(--text-muted);
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.hero__notes li:first-child {
  color: var(--text);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  .hero__cursor {
    animation: none;
  }
}

/* ── Section heads ────────────────────────────────────── */

.section-head {
  display: grid;
  gap: 8px;
  margin: 0 auto 26px;
  max-width: 64rem;
  justify-items: center;
  text-align: center;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.85rem, 2.6vw, 2.6rem);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.035em;
  color: var(--text);
}

/* ── Compare ──────────────────────────────────────────── */

.compare {
  padding: 28px 0 8px;
  border-top: 1px solid var(--line);
}

.compare__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.compare__col {
  padding: 22px 22px 24px;
  background: rgba(255, 255, 255, 0.84);
}

.compare__col + .compare__col {
  border-left: 1px solid var(--line);
}

.compare__col h3 {
  margin: 0 0 14px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
}

.compare__col--muted h3 {
  color: var(--text-muted);
}

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

.compare__col li {
  position: relative;
  padding-left: 18px;
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--text);
}

.compare__col--muted li {
  color: var(--text-muted);
}

.compare__col li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.compare__col--muted li::before {
  color: rgba(28, 30, 38, 0.32);
  content: "×";
}

/* ── Modes ────────────────────────────────────────────── */

.modes {
  padding: 28px 0 8px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0;
}

.mode {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2.4fr);
  gap: 28px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.mode:first-of-type {
  border-top: 0;
  padding-top: 6px;
}

.mode__head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
}

.mode__num {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  padding-top: 4px;
}

.mode__head h3 {
  margin: 0;
  font-size: clamp(1.5rem, 1.9vw, 1.9rem);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.mode__body {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.mode__trigger {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  font-style: italic;
  letter-spacing: -0.005em;
  color: var(--text);
}

.mode__frameworks {
  margin: 0;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.mode__frameworks span {
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  margin-right: 6px;
}

.mode__output {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.mode__output li {
  position: relative;
  padding-left: 18px;
  font-size: 0.96rem;
  line-height: 1.45;
  color: var(--text);
}

.mode__output li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.modes__cta {
  display: flex;
  justify-content: flex-end;
  padding: 20px 0 4px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}

/* ── How it works ─────────────────────────────────────── */

.how {
  padding: 28px 0 8px;
  border-top: 1px solid var(--line);
}

.how__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.how__step {
  padding: 22px 22px 22px;
  background: rgba(255, 255, 255, 0.84);
  border-left: 1px solid var(--line);
  display: grid;
  gap: 10px;
  align-content: start;
}

.how__step:first-child {
  border-left: 0;
}

.how__num {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.how__step h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.how__step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

/* ── Sample exchange ──────────────────────────────────── */

.sample {
  padding: 28px 0 8px;
  border-top: 1px solid var(--line);
}

.sample__chat {
  display: grid;
  gap: 14px;
  max-width: 64rem;
  margin: 0 auto;
}

.bubble {
  padding: 18px 22px 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
}

.bubble--user {
  justify-self: end;
  max-width: min(560px, 100%);
  background: rgba(43, 47, 58, 0.04);
}

.bubble--agent {
  justify-self: start;
  max-width: min(680px, 100%);
}

.bubble__role {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.bubble--user .bubble__role {
  color: var(--text-muted);
}

.bubble p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
}

.bubble ol {
  margin: 0;
  padding: 0 0 0 1.1em;
  display: grid;
  gap: 8px;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
}

.bubble strong {
  font-weight: 700;
}

/* ── FAQ ──────────────────────────────────────────────── */

.faq {
  padding: 28px 0 8px;
  border-top: 1px solid var(--line);
}

.faq__list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  max-width: 64rem;
  margin: 0 auto;
  width: 100%;
}

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

.faq__item:first-child {
  border-top: 0;
}

.faq__item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 36px 18px 0;
  position: relative;
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--text);
  user-select: none;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  transition: transform 200ms ease;
}

.faq__item[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq__item summary:focus-visible {
  box-shadow: var(--focus-ring);
}

.faq__item p {
  margin: 0;
  padding: 0 36px 20px 0;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

/* ── Final CTA ────────────────────────────────────────── */

.final-cta {
  padding: 36px 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
  max-width: 56rem;
  margin: 0 auto;
  width: 100%;
}

.final-cta h2 {
  margin: 0;
  font-size: clamp(1.85rem, 2.6vw, 2.6rem);
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: -0.035em;
  color: var(--text);
}

.final-cta p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.5;
}

/* ── Footer ───────────────────────────────────────────── */

.footer {
  display: grid;
  grid-template-rows: 20px auto;
  gap: 0;
  padding-bottom: 10px;
  margin-top: 8px;
}

.footer__bands {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  height: 20px;
}

.footer__bands span:nth-child(1) { background: var(--stripe-1); }
.footer__bands span:nth-child(2) { background: var(--stripe-2); }
.footer__bands span:nth-child(3) { background: var(--stripe-3); }
.footer__bands span:nth-child(4) { background: var(--stripe-4); }
.footer__bands span:nth-child(5) { background: var(--stripe-5); }
.footer__bands span:nth-child(6) { background: var(--stripe-6); }

.footer__content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  padding: 14px 2px 0;
}

.footer__title {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer__copy {
  margin: 0;
  max-width: 32ch;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-content: start;
  justify-content: flex-end;
  color: rgba(28, 30, 38, 0.88);
}

.footer__links a {
  position: relative;
}

.footer__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}

.footer__links a:hover::after,
.footer__links a:focus-visible::after {
  transform: scaleX(1);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 1180px) {
  .page {
    width: calc(100vw - 28px);
    min-height: calc(100vh - 28px);
    margin: 14px auto 18px;
    gap: 22px;
  }

  .nav {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand cta"
      "links links";
    row-gap: 10px;
    column-gap: 14px;
    align-items: start;
    min-height: 0;
    padding: 6px 12px 14px;
  }

  .nav__links {
    justify-self: start;
    width: 100%;
    justify-content: flex-start;
    gap: 18px;
    flex-wrap: wrap;
  }

  .nav > .button {
    align-self: start;
  }

  .mode {
    grid-template-columns: 1fr;
    gap: 14px;
  }

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

  .compare__col + .compare__col {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

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

  .how__step {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .how__step:first-child {
    border-top: 0;
  }
}

@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .page {
    width: calc(100vw - 20px);
    min-height: calc(100vh - 20px);
    margin: 10px auto 14px;
    padding: 14px;
    gap: 18px;
  }

  .nav {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "links"
      "cta";
    justify-items: start;
    gap: 10px;
    min-height: auto;
    padding: 8px 12px 14px;
  }

  .nav__links {
    width: 100%;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .nav > .button {
    width: 100%;
    justify-self: stretch;
  }

  .brand__logo {
    width: 30px;
    height: 30px;
  }

  .hero__title {
    font-size: clamp(2.4rem, 9vw, 3.3rem);
    max-width: 100%;
  }

  .hero__title-rotator {
    white-space: normal;
  }

  .signup {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .signup .button {
    width: 100%;
  }

  .modes__cta {
    justify-content: flex-start;
  }

  .bubble--user,
  .bubble--agent {
    max-width: 100%;
  }

  .footer__content {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .footer__links {
    justify-content: flex-start;
  }
}
