:root {
  --cream: #f6f5f1;
  --navy: #022043;
  --ink: #0f2e66;
  --card: #0e3d80;
  --tack: #6fc9d3;
  --orange: #ff7a18;
  --text: #f6f5f1;
  --muted: rgba(246, 245, 241, 0.76);
  --line: rgba(2, 32, 67, 0.1);
  --sans: "Source Sans 3", "Avenir Next", "Segoe UI", sans-serif;
  --display: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --radius: 28px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.45;
}

img { max-width: 100%; }

button, input { font-family: inherit; }

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

.nav {
  position: fixed;
  z-index: 20;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1080px, calc(100% - 28px));
  height: 64px;
  padding: 0 10px 0 22px;
  display: flex;
  align-items: center;
  gap: 28px;
  background: rgba(246, 245, 241, 0.88);
  border: 1px solid rgba(2, 32, 67, 0.08);
  border-radius: 999px;
  backdrop-filter: blur(16px);
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--navy);
}

.logo svg { width: 124px; height: 34px; display: block; }

.logo text {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.04em;
  fill: var(--navy);
}

.nav-links {
  display: flex;
  gap: 22px;
}

.nav-links a {
  color: var(--navy);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}

.nav-links a:hover { color: #0057ae; }

.nav-demo {
  margin-left: auto;
  text-decoration: none;
  background: var(--navy);
  color: white;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
}

.nav-demo:hover { background: #0b3a78; }

.hero {
  min-height: 92svh;
  display: flex;
  align-items: flex-end;
  padding: 120px 28px 72px;
  background:
    radial-gradient(880px 420px at 88% 0%, rgba(111, 201, 211, 0.22), transparent 60%),
    radial-gradient(640px 360px at 0% 100%, rgba(255, 122, 24, 0.1), transparent 55%),
    var(--cream);
}

.hero-inner { width: min(820px, 100%); }

.eyebrow {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0057ae;
}

.hero h1 {
  margin: 0;
  max-width: 11ch;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(52px, 7vw, 80px);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.lede {
  max-width: 38em;
  margin: 22px 0 0;
  font-size: 20px;
  color: #24384f;
}

.scroll-cue {
  margin-top: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
}

.scroll-cue svg { width: 22px; height: 22px; }

.scroll-cue:hover { color: #0057ae; }

.agents {
  position: relative;
  margin: 0 10px 10px;
  border-radius: 36px;
  background: var(--navy);
  color: var(--text);
  scroll-margin-top: 8px;
}

.agents-inner {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 108px 28px 72px;
}

.agents h2 {
  max-width: 640px;
  margin: 0 auto 28px;
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.tablist {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 32px;
  display: flex;
  gap: 4px;
  padding: 6px;
  background: var(--ink);
  border-radius: 999px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tablist::-webkit-scrollbar { display: none; }

.tablist button {
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 16px;
  white-space: nowrap;
  cursor: pointer;
}

.tablist button:hover:not([aria-selected="true"]) {
  background: rgba(255, 255, 255, 0.1);
}

.tablist button[aria-selected="true"] {
  background: #fff;
  color: var(--navy);
  font-weight: 600;
}

.tablist button:focus-visible,
.composer button:focus-visible,
.reset:focus-visible,
.chips button:focus-visible {
  outline: 2px solid var(--tack);
  outline-offset: 2px;
}

.stage {
  height: clamp(520px, calc(100svh - 300px), 720px);
}

.chat {
  border-radius: var(--radius);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.chat { position: relative; display: flex; }

.chat-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.chat-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 16, 36, 0.78) 0%, rgba(3, 16, 36, 0.5) 52%, rgba(3, 16, 36, 0.28) 100%);
}

.chat-ui {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 18px 16px 16px;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-head strong {
  display: block;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
}

.chat-head em {
  display: block;
  font-style: normal;
  font-size: 13px;
  color: var(--muted);
}

#agent-blurb {
  margin: 2px 0 0;
  max-width: 46em;
  font-size: 14px;
  line-height: 1.35;
  color: var(--muted);
}

.spark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(111, 201, 211, 0.18);
  color: var(--tack);
  flex: none;
}

.card .spark {
  width: 22px;
  height: 22px;
  background: #e5f6f7;
  color: #0d6e78;
}

.spark svg { width: 13px; height: 13px; }

.live {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tack);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.agents.is-live .live {
  opacity: 1;
  transform: none;
}

.live::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--tack);
  vertical-align: 1px;
}

.log {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
  scroll-behavior: smooth;
}

.log::-webkit-scrollbar { width: 8px; }
.log::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.22); border-radius: 99px; }

.hint {
  margin: auto 0;
  max-width: 34em;
  color: var(--muted);
  font-size: 15px;
}

.bubble {
  max-width: min(720px, 100%);
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(4, 22, 48, 0.78);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  font-size: 15px;
  line-height: 1.4;
  animation: rise 0.4s ease;
}

.card {
  align-self: flex-start;
  max-width: min(720px, 100%);
  background: #fff;
  color: var(--navy);
  border-radius: 18px;
  padding: 14px 14px 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
  animation: rise 0.4s ease;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
}

.kicker em {
  font-style: normal;
  font-weight: 500;
  color: #5c6e84;
}

.intro {
  margin: 8px 0 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: #1d3550;
}

.leads, .bullets { margin: 8px 0 0; padding: 0; list-style: none; }

.leads li, .bullets li {
  padding: 8px 0 0;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

.leads strong, .bullets li { font-size: 14px; }

.leads span {
  display: block;
  margin-top: 2px;
  color: #52667c;
  font-size: 13px;
  font-weight: 500;
}

.note {
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 12px;
  background: var(--cream);
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.45;
}

.typing {
  align-self: flex-start;
  display: flex;
  gap: 5px;
  padding: 14px 16px;
  border-radius: 16px;
  background: white;
}

.typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8aa0b8;
  animation: blink 1s infinite ease-in-out;
}

.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }

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

.chips button {
  border: 0;
  cursor: pointer;
  color: white;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
}

.chips button:hover { background: rgba(255, 255, 255, 0.24); }

.composer {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border-radius: 999px;
  padding: 5px 5px 5px 16px;
}

.composer input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--navy);
  font-size: 15px;
  padding: 8px 0;
}

.composer input::placeholder { color: #7d8b99; }

.composer button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
}

.composer button:hover { background: #0b3a78; }

.composer button.is-empty {
  opacity: 0.35;
  cursor: default;
}

.composer button svg { width: 18px; height: 18px; }

.reset {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: #0b4f9c;
  color: white;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.reset:hover { background: #0a63c4; }

.reset svg { width: 20px; height: 20px; }

.closer {
  width: min(1100px, calc(100% - 48px));
  margin: 28px auto 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.closer h3 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: -0.02em;
}

.closer p { margin: 0; color: #3d5168; font-size: 15px; }

.colophon {
  width: min(1100px, calc(100% - 48px));
  margin: 8px auto 36px;
  color: #7d8b99;
  font-size: 13px;
}

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

@keyframes blink {
  0%, 80%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}

@media (max-width: 1100px) {
  .nav-links { display: none; }
}

@media (max-width: 760px) {
  .hero { min-height: 88svh; padding-top: 112px; }
  .agents { margin: 0; border-radius: 28px 28px 0 0; }
  .agents-inner { padding: 96px 16px 88px; }
  .stage { height: auto; }
  .chat { height: auto; }
  .chat-ui { height: 70svh; min-height: 480px; }
  .closer { grid-template-columns: 1fr; gap: 18px; }
  .reset { right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bubble, .card, .typing span, .live {
    animation: none;
    transition: none;
  }
}
