:root {
  --bg: #f4f1e8;
  --bg-alt: #ece7da;
  --panel: #fffdf7;
  --panel-strong: #fff7ea;
  --ink: #161916;
  --ink-soft: #495047;
  --brand: #d9562c;
  --brand-strong: #b63c16;
  --accent: #1d6f7b;
  --line: #d4c9b2;
  --ok: #2f9f6a;
  --shadow: 0 20px 45px rgba(22, 25, 22, 0.12);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-sm: 12px;
  --header-h: 76px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(212, 234, 236, 0.38) 0%, rgba(244, 241, 232, 0.95) 22%, rgba(244, 241, 232, 1) 100%),
    radial-gradient(circle at 20% 15%, rgba(233, 126, 81, 0.2) 0%, rgba(233, 126, 81, 0) 45%),
    radial-gradient(circle at 88% 8%, rgba(80, 165, 178, 0.18) 0%, rgba(80, 165, 178, 0) 42%),
    var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(79, 86, 75, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(79, 86, 75, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  z-index: -3;
}

.bg-glow {
  position: fixed;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: -2;
}

.bg-glow-a {
  top: -140px;
  left: -90px;
  background: rgba(223, 103, 53, 0.26);
}

.bg-glow-b {
  top: 160px;
  right: -130px;
  background: rgba(61, 141, 153, 0.2);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-h);
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0 3.6rem;
  background: rgba(253, 250, 242, 0.78);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(131, 123, 104, 0.16);
}

.logo {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 0.88rem;
}

.main-nav {
  justify-self: center;
  display: flex;
  gap: 1.3rem;
}

.main-nav a {
  font-size: 0.95rem;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--ink);
}

.cta-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--brand-strong);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  width: 42px;
  height: 42px;
  padding: 0;
  align-items: center;
  justify-content: center;
  position: relative;
}

.menu-toggle span {
  position: absolute;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.menu-toggle span:first-child {
  transform: translateY(-4px);
}

.menu-toggle span:last-child {
  transform: translateY(4px);
}

main {
  width: min(1140px, calc(100% - 2.4rem));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - var(--header-h));
  padding: 2.3rem 0 2rem;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 2.2rem;
  align-items: center;
}

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

h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
  margin: 0;
  line-height: 1.14;
}

h1 {
  margin-top: 0.65rem;
  font-size: clamp(2.2rem, 5.8vw, 4.4rem);
}

.hero-lead {
  margin-top: 1rem;
  color: var(--ink-soft);
  max-width: 54ch;
  font-size: clamp(1rem, 2vw, 1.12rem);
}

.hero-actions {
  margin-top: 1.55rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.74rem 1.24rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(125deg, var(--brand) 0%, var(--brand-strong) 100%);
  color: #fff;
  box-shadow: 0 10px 20px rgba(182, 60, 22, 0.25);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(120, 126, 112, 0.32);
}

.hero-stats {
  margin: 1.8rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 0.95rem;
  flex-wrap: wrap;
}

.hero-stats li {
  min-width: 126px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(123, 118, 105, 0.22);
  border-radius: var(--radius-sm);
  padding: 0.82rem 0.88rem;
}

.stat-value {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.36rem;
  font-weight: 700;
}

.stat-label {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.hero-panel {
  border-radius: var(--radius-xl);
  border: 1px solid rgba(117, 113, 94, 0.28);
  background:
    linear-gradient(165deg, rgba(255, 247, 234, 0.95) 0%, rgba(244, 253, 255, 0.86) 100%),
    var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid rgba(126, 121, 103, 0.24);
}

.panel-head p {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
}

.panel-head span {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.chat-stream {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.62rem;
}

.bubble {
  margin: 0;
  width: 84%;
  min-height: 64px;
  max-height: 64px;
  padding: 0.52rem 0.72rem;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.38;
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
}

.bubble-user {
  align-self: flex-end;
  background: linear-gradient(138deg, #387a83 0%, #215f68 100%);
  color: #fff;
}

.bubble-bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid rgba(112, 110, 98, 0.24);
  color: #242824;
}

.chat-stream .bubble-alert {
  align-self: flex-start;
  background: linear-gradient(136deg, #ffe0b8 0%, #ffd3c4 100%);
  border: 1px solid rgba(181, 95, 62, 0.32);
  color: #4f281a;
  font-weight: 600;
}

.chat-stream.sequence {
  min-height: 448px;
}

.js .chat-stream.sequence .bubble {
  display: none;
}

.js .chat-stream.sequence .bubble.is-mounted {
  display: flex;
  animation: bubble-in 0.28s ease forwards;
}

.chat-stream.sequence .bubble.is-typing {
  box-shadow: 0 0 0 2px rgba(40, 128, 139, 0.17);
}

.preview-flow {
  margin: 0.18rem 1rem 0;
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
}

.flow-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(122, 114, 92, 0.28);
  font-size: 0.76rem;
  font-weight: 600;
  color: #374238;
}

.flow-arrow {
  font-size: 0.84rem;
  color: rgba(43, 74, 79, 0.58);
}

.preview-note {
  margin: 0.6rem 1rem 0.95rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.section {
  padding: 4.2rem 0;
}

.section-heading {
  max-width: 760px;
}

.section-heading h2 {
  margin-top: 0.6rem;
  font-size: clamp(1.5rem, 3.9vw, 2.55rem);
}

.feature-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.95rem;
}

.feature-card {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(126, 118, 101, 0.3);
  border-radius: var(--radius-lg);
  padding: 1rem 1rem 1.05rem;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(183, 76, 38, 0.48);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.feature-card h3 {
  font-size: 1.1rem;
}

.feature-card p {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.command-box {
  margin-top: 1.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(83, 98, 78, 0.5);
  background: #102a24;
  color: #d8f6ec;
  box-shadow: var(--shadow);
}

.command-box pre {
  margin: 0;
  padding: 1rem 1.15rem;
  overflow: auto;
}

.command-box code {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.94rem;
  line-height: 1.68;
  white-space: pre;
}

.faq-list {
  margin-top: 1.3rem;
  display: grid;
  gap: 0.66rem;
}

.faq-item {
  border-radius: 14px;
  border: 1px solid rgba(124, 116, 97, 0.32);
  background: rgba(255, 255, 255, 0.7);
  overflow: hidden;
}

.faq-trigger {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0.82rem 0.96rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.94rem;
}

.faq-icon {
  font-size: 1.2rem;
  line-height: 1;
  font-weight: 400;
  color: var(--brand-strong);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 0.96rem;
  color: var(--ink-soft);
  font-size: 0.93rem;
  transition: max-height 0.24s ease, padding-bottom 0.24s ease;
}

.faq-item.open .faq-content {
  max-height: 220px;
  padding-bottom: 0.88rem;
}

.faq-item.open .faq-icon {
  color: var(--ok);
  transform: rotate(45deg);
}

.cta-section {
  border-radius: var(--radius-xl);
  border: 1px solid rgba(120, 111, 90, 0.36);
  background:
    radial-gradient(circle at 90% 25%, rgba(88, 168, 180, 0.22) 0%, rgba(88, 168, 180, 0) 42%),
    radial-gradient(circle at 15% 82%, rgba(221, 104, 60, 0.2) 0%, rgba(221, 104, 60, 0) 46%),
    rgba(255, 252, 245, 0.84);
  text-align: center;
}

.cta-section h2 {
  margin-top: 0.6rem;
}

.cta-section p {
  margin: 0.76rem auto 1.2rem;
  max-width: 64ch;
  color: var(--ink-soft);
}

.site-footer {
  width: min(1140px, calc(100% - 2.4rem));
  margin: 2.4rem auto 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(133, 124, 103, 0.28);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.reveal-up {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.58s ease,
    transform 0.58s ease;
  transition-delay: var(--delay, 0ms);
}

.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes bubble-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .site-header {
    padding: 0 1rem;
    grid-template-columns: auto auto 1fr auto;
  }

  .main-nav {
    position: absolute;
    top: calc(var(--header-h) - 2px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    padding: 0.9rem 1rem 1rem;
    background: rgba(251, 247, 238, 0.98);
    border-bottom: 1px solid rgba(130, 122, 103, 0.25);
  }

  .main-nav.open {
    display: flex;
  }

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

  .menu-toggle[aria-expanded="true"] span:first-child {
    transform: rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:last-child {
    transform: rotate(-45deg);
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 1.35rem;
    padding-top: 1.6rem;
  }

  .chat-stream.sequence {
    min-height: 440px;
  }

  .hero-stats li {
    min-width: 104px;
  }

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

  .cta-link {
    justify-self: end;
  }
}

@media (max-width: 700px) {
  main {
    width: min(1140px, calc(100% - 1.15rem));
  }

  .site-header {
    height: 68px;
    --header-h: 68px;
  }

  .cta-link {
    display: none;
  }

  h1 {
    font-size: clamp(1.96rem, 8.4vw, 2.52rem);
  }

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

  .bubble {
    width: 90%;
    min-height: 68px;
    max-height: 68px;
    font-size: 0.86rem;
  }

  .chat-stream.sequence {
    min-height: 472px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal-up {
    opacity: 1;
    transform: none;
  }

  .chat-stream.sequence .bubble {
    box-shadow: none !important;
  }
}
