:root {
  --bg: #000000;
  --bg-soft: #0a1520;
  --navy: #1a3a52;
  --ink: #e8eef3;
  --muted: #8a9bab;
  --accent: #00a896;
  --accent-ink: #001510;
  --line: rgba(26, 58, 82, 0.55);
  --focus: rgba(0, 168, 150, 0.45);
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
  --shell: 42rem;
  --pad-x: 1.25rem;
  --pad-section: 3rem;
  --tap: 2.75rem;
  --radius: 0.3rem;
  --logo-h: 3.35rem;
  --logo-h-foot: 2.75rem;
  --logo-plate: #eef3f7;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 90% -5%, rgba(0, 168, 150, 0.12), transparent 55%),
    radial-gradient(640px 360px at -5% 40%, rgba(26, 58, 82, 0.45), transparent 50%),
    linear-gradient(180deg, #05090d 0%, var(--bg) 45%, #000000 100%);
  line-height: 1.55;
  overflow-x: hidden;
}

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

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.028;
  z-index: 50;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* —— Header —— */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(0, 0, 0, 0.88);
  border-bottom: 1px solid var(--line);
}

.top-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  min-height: calc(var(--logo-h) + 1.25rem);
  max-width: var(--shell);
  margin-inline: auto;
  padding: 0.65rem var(--pad-x);
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 0;
  flex-shrink: 0;
}

.logo-img {
  display: block;
  height: var(--logo-h);
  width: auto;
  max-width: 14rem;
  object-fit: contain;
  object-position: center;
  background: transparent;
  padding: 0;
}

.brand-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 0 1.15rem;
  width: 100%;
}

.brand-logo img {
  display: block;
  width: min(20rem, 86vw);
  height: auto;
  margin-inline: auto;
  object-fit: contain;
  background: transparent;
  padding: 0;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.top-link,
.top-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 0.7rem;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 550;
  white-space: nowrap;
}

.top-link {
  color: var(--muted);
}

.top-link:hover {
  color: var(--ink);
}

.top-cta {
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: var(--radius);
  padding-inline: 1rem;
  font-weight: 600;
}

.top-cta:hover {
  filter: brightness(1.05);
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0.75rem 1.3rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}

.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn.primary:hover {
  filter: brightness(1.05);
}

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

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

.btn.block {
  width: 100%;
}

/* —— Hero —— */
.hero {
  padding: 2rem 0 2.5rem;
}

.hero-inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad-x);
  display: grid;
  gap: 1.75rem;
  align-items: start;
}

.hero-copy {
  display: grid;
  gap: 1rem;
  text-align: center;
  justify-items: center;
}

.hero-copy .cta-row {
  justify-content: center;
}

.brand-mark {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.85rem, 12vw, 4.25rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  font-weight: 500;
  color: var(--ink);
  animation: rise 0.75s ease both;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.3rem, 4.2vw, 1.85rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  max-width: 24ch;
  color: var(--ink);
  animation: rise 0.85s 0.06s ease both;
}

.lede {
  margin: 0;
  max-width: 36ch;
  color: var(--muted);
  font-size: 1.05rem;
  animation: rise 0.85s 0.12s ease both;
}

.cta-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  animation: rise 0.85s 0.18s ease both;
  max-width: 22rem;
}

.cta-row .btn {
  width: 100%;
}

.hero-visual {
  animation: rise 0.95s 0.24s ease both;
  display: flex;
  justify-content: center;
}

.chat-panel {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 0.15rem);
  background: rgba(26, 58, 82, 0.28);
  padding: 1rem 1rem 1.15rem;
  width: 100%;
  max-width: 24rem;
  margin-inline: auto;
}

.chat-panel-label {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.chat {
  display: grid;
  gap: 0.5rem;
  min-height: 10.5rem;
  width: 100%;
}

.bubble {
  max-width: 90%;
  padding: 0.65rem 0.8rem;
  border-radius: 0.25rem 0.7rem 0.7rem 0.7rem;
  font-size: 0.92rem;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(8px);
  word-wrap: break-word;
}

.bubble.show {
  opacity: 1;
  transform: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.bubble.them {
  background: rgba(233, 236, 233, 0.07);
  justify-self: start;
}

.bubble.us {
  background: rgba(180, 196, 138, 0.16);
  justify-self: end;
  border-radius: 0.7rem 0.25rem 0.7rem 0.7rem;
}

/* —— Sections —— */
.section {
  padding: var(--pad-section) 0;
  border-top: 1px solid var(--line);
}

.section.muted {
  background: rgba(26, 58, 82, 0.22);
}

.section-inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad-x);
  text-align: center;
}

.section-inner .btn,
.section-inner .lead-form,
.section-inner .price-block,
.section-inner .steps {
  margin-inline: auto;
  text-align: left;
}

.section h2 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4.5vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.section-lede {
  margin: 0 auto 1.65rem;
  color: var(--muted);
  max-width: 42ch;
  font-size: 1.02rem;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.steps li {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  column-gap: 0.85rem;
  row-gap: 0.2rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}

.steps li:last-child {
  padding-bottom: 0;
}

.step-n {
  grid-row: 1 / span 2;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
  padding-top: 0.2rem;
  font-variant-numeric: tabular-nums;
}

.steps strong {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}

.steps span:not(.step-n) {
  color: var(--muted);
  font-size: 0.98rem;
}

/* —— Pricing —— */
.price-block {
  display: grid;
  gap: 0;
  max-width: 26rem;
  width: 100%;
}

.price-rule {
  height: 1px;
  background: var(--line);
  margin: 0;
}

.price-line {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 0.75rem 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.price-label {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  min-width: 0;
}

.price-line strong {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  justify-self: end;
}

.price-includes-title {
  margin: 1.35rem 0 0.55rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.price-includes {
  list-style: none;
  margin: 0 0 0.25rem;
  padding: 0;
  display: grid;
  gap: 0;
}

.price-includes li {
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.4;
  padding: 0.75rem 0 0.75rem 0.95rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.price-includes li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.1rem;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 1px;
  background: var(--accent);
  opacity: 0.85;
}

.price-includes li:last-child {
  border-bottom: none;
}

/* —— Form —— */
.lead-form {
  display: grid;
  gap: 1rem;
  max-width: 26rem;
  width: 100%;
}

.lead-form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

.lead-form input,
.lead-form textarea,
.demo-slug select,
.demo-row input {
  font: inherit;
  color: var(--ink);
  background: rgba(233, 236, 233, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem 0.9rem;
  min-height: var(--tap);
  width: 100%;
  max-width: 100%;
}

.lead-form textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.lead-form input:focus,
.lead-form textarea:focus,
.demo-slug select:focus,
.demo-row input:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--accent);
}

.form-status {
  margin: 0;
  color: var(--accent);
  font-size: 0.9rem;
}

/* —— Footer —— */
.foot {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.75rem;
}

.foot-inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad-x);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.foot-inner .logo-img {
  height: var(--logo-h-foot);
  max-width: 11rem;
  margin-inline: auto;
}

/* —— Demo page —— */
.demo-page {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 1.75rem var(--pad-x) 3rem;
  display: grid;
  gap: 1rem;
  width: 100%;
  justify-items: center;
  text-align: center;
}

.demo-page .chat-log,
.demo-page .demo-row,
.demo-page .demo-slug {
  width: 100%;
  text-align: left;
}

.demo-kicker {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.demo-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 5vw, 2.35rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.demo-lede {
  margin: 0;
  color: var(--muted);
}

.demo-slug {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  max-width: 16rem;
}

.chat-log {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 18rem;
  max-height: min(55vh, 28rem);
  overflow: auto;
  padding: 1rem;
  display: grid;
  gap: 0.5rem;
  align-content: start;
  background: rgba(233, 236, 233, 0.03);
  width: 100%;
}

.msg {
  max-width: 88%;
  padding: 0.65rem 0.85rem;
  border-radius: 0.7rem;
  font-size: 0.95rem;
  word-wrap: break-word;
}

.msg.user {
  justify-self: end;
  background: rgba(180, 196, 138, 0.16);
  border-radius: 0.7rem 0.25rem 0.7rem 0.7rem;
}

.msg.bot {
  justify-self: start;
  background: rgba(233, 236, 233, 0.07);
  border-radius: 0.25rem 0.7rem 0.7rem 0.7rem;
  white-space: pre-wrap;
}

.msg-bot-wrap {
  justify-self: start;
  display: grid;
  gap: 0.45rem;
  max-width: 100%;
  width: min(100%, 28rem);
}

.opt-box {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.opt-btn {
  background: rgba(233, 236, 233, 0.05);
  color: var(--ink);
  border: 1px solid var(--line);
  font: inherit;
  font-weight: 500;
  font-size: 0.88rem;
  min-height: var(--tap);
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
}

.opt-btn:hover {
  border-color: var(--accent);
}

.opt-row {
  width: 100%;
  display: grid;
  gap: 0.15rem;
}

.opt-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
}

.demo-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: stretch;
}

.demo-row input {
  flex: 1 1 12rem;
  min-width: 0;
}

.demo-row .btn {
  flex: 1 1 100%;
}

.demo-hint {
  margin: 0;
  font-size: 0.9rem;
}

.muted {
  color: var(--muted);
}

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

.muted a:hover {
  text-decoration: underline;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* —— Tablet —— */
@media (min-width: 560px) {
  .cta-row {
    flex-direction: row;
    flex-wrap: wrap;
    max-width: none;
  }

  .cta-row .btn {
    width: auto;
    flex: 0 1 auto;
  }

  .demo-row .btn {
    flex: 0 0 auto;
  }
}

/* —— Desktop —— */
@media (min-width: 880px) {
  :root {
    --shell: 68rem;
    --pad-x: 2.5rem;
    --pad-section: 4.5rem;
  }

  .top-inner {
    min-height: 4rem;
  }

  .hero {
    padding: 3.5rem 0 4rem;
    min-height: calc(100vh - 4rem);
    display: flex;
    align-items: center;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 3.5rem;
    align-items: center;
  }

  .brand-mark {
    font-size: clamp(4rem, 6vw, 5.25rem);
  }

  .hero h1 {
    font-size: clamp(1.7rem, 2.4vw, 2.1rem);
    max-width: 20ch;
  }

  .lede {
    font-size: 1.1rem;
    max-width: 38ch;
  }

  .chat-panel {
    max-width: none;
    padding: 1.35rem 1.4rem 1.5rem;
    margin-left: auto;
  }

  .chat {
    min-height: 14rem;
  }

  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 1.75rem;
    border-top: 1px solid var(--line);
  }

  .steps li {
    grid-template-columns: 1fr;
    padding: 1.35rem 0 0;
    border-top: none;
    gap: 0.35rem;
  }

  .step-n {
    grid-row: auto;
    padding-top: 0;
    margin-bottom: 0.35rem;
  }

  .section-lede {
    max-width: 48ch;
  }

  .price-block {
    max-width: 32rem;
  }

  .lead-form {
    max-width: 30rem;
  }

  .demo-page {
    max-width: 40rem;
  }

  .chat-log {
    max-height: 32rem;
    min-height: 22rem;
  }
}

@media (min-width: 1100px) {
  :root {
    --shell: 72rem;
    --pad-x: 3rem;
  }

  .hero-inner {
    gap: 4.5rem;
  }
}

@media (max-width: 360px) {
  .brand-mark {
    font-size: 2.6rem;
  }

  .top-link {
    font-size: 0.88rem;
    padding-inline: 0.45rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .brand-mark,
  .hero h1,
  .lede,
  .cta-row,
  .hero-visual,
  .bubble,
  .bubble.show {
    animation: none;
    transition: none;
    opacity: 1;
    transform: none;
  }
}
