:root {
  --bg: #F6F1EA;
  --bg-soft: #EFE7DC;
  --card: #FBF8F3;
  --ink: #1F1A16;
  --muted: #6B6157;
  --line: #DED3C6;
  --accent: #1F6F5C;
  --accent-soft: #DCEBE4;
  --accent-2: #C2542D;
  --yes: #1F6F5C;
  --no: #B0452E;
  --mid: #A07A33;
  --shadow: 0 18px 50px -24px rgba(60, 42, 26, .35);
  --radius: 22px;
  --font-h: "Unbounded", system-ui, sans-serif;
  --font-b: "Inter", system-ui, sans-serif;
  --font-m: "JetBrains Mono", ui-monospace, monospace;
}

html[data-theme="dark"] {
  --bg: #14110F;
  --bg-soft: #1B1714;
  --card: #1A1613;
  --ink: #F3EDE4;
  --muted: #C8BBAB;
  --line: #3A322B;
  --accent: #58C4A8;
  --accent-soft: #1E3029;
  --accent-2: #E0794F;
  --yes: #58C4A8;
  --no: #E0794F;
  --mid: #D2A85C;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, .7);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-b);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
  background-image:
    radial-gradient(900px 500px at 85% -10%, rgba(31, 111, 92, .07), transparent 60%),
    radial-gradient(700px 400px at 0% 20%, rgba(194, 84, 45, .05), transparent 60%);
}

html[data-theme="dark"] body {
  background-image:
    radial-gradient(900px 500px at 85% -10%, rgba(88, 196, 168, .08), transparent 60%),
    radial-gradient(700px 400px at 0% 20%, rgba(224, 121, 79, .06), transparent 60%);
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 26px; }

a { color: inherit; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 14px 26px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-h);
  font-weight: 700;
  letter-spacing: -.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
}

.brand-name { font-size: 17px; }

.nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 14px;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  transition: color .18s ease;
}

.nav a:hover { color: var(--ink); }

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 13px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease;
}

.theme-toggle:hover { border-color: var(--accent); transform: translateY(-1px); }

/* ---------- type ---------- */
.kicker {
  font-family: var(--font-m);
  font-size: 11.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

h1, h2, h3 { font-family: var(--font-h); font-weight: 700; letter-spacing: -.03em; }

h1 {
  font-size: clamp(2rem, 4.7vw, 3.95rem);
  line-height: 1.07;
  margin: 0 0 26px;
  max-width: 980px;
}

h2 {
  font-size: clamp(1.65rem, 3.4vw, 2.6rem);
  line-height: 1.14;
  margin: 0 0 16px;
}

h3 { font-family: var(--font-b); font-weight: 600; font-size: 1.03rem; line-height: 1.35; margin: 0 0 8px; letter-spacing: -.01em; }

.accent { color: var(--accent); position: relative; white-space: nowrap; }

.lede {
  max-width: 780px;
  font-size: clamp(1.02rem, 1.6vw, 1.22rem);
  color: var(--muted);
  margin: 0 0 34px;
}

.section-head { max-width: 760px; margin-bottom: 46px; }

.section-head p { color: var(--muted); margin: 0; }

/* ---------- hero ---------- */
.hero { padding: clamp(84px, 12vw, 140px) 0 clamp(48px, 7vw, 84px); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.btn:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow); }

.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }

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

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-family: var(--font-m);
  font-size: 12px;
  color: var(--muted);
}

.hero-meta span::before { content: "✓"; color: var(--accent); margin-right: 7px; }

/* ---------- demo ---------- */
.demo { padding: clamp(48px, 7vw, 86px) 0; border-top: 1px solid var(--line); }

.demo-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 34px;
  align-items: start;
}

.chat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}

.chat-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-h);
  font-size: 14px;
}

.chat-who { display: flex; flex-direction: column; line-height: 1.2; }
.chat-who strong { font-size: 14px; }
.chat-status { font-size: 11.5px; color: var(--accent); font-family: var(--font-m); }
.chat-dots { margin-left: auto; color: var(--muted); letter-spacing: 2px; }

.chat-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 330px;
}

.msg {
  max-width: 84%;
  padding: 10px 13px 8px;
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 1.45;
  animation: pop .35s ease both;
}

.msg p { margin: 0 0 4px; }

.msg time {
  display: block;
  font-family: var(--font-m);
  font-size: 10px;
  color: var(--muted);
  text-align: right;
}

.msg-user {
  align-self: flex-end;
  background: var(--accent-soft);
  border-bottom-right-radius: 5px;
}

.msg-bot {
  align-self: flex-start;
  background: var(--bg-soft);
  border-bottom-left-radius: 5px;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 6px 0 4px;
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--card);
  border: 1px solid var(--line);
  font-family: var(--font-m);
  font-size: 11.5px;
}

.file-ico { color: var(--accent); }

.chat-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
  background: var(--card);
}

.send {
  display: grid; place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
}

.demo-side { display: flex; flex-direction: column; gap: 14px; }

.side-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  transition: border-color .18s ease, transform .18s ease;
}

.side-card:hover { border-color: var(--accent); transform: translateX(3px); }

.side-num {
  font-family: var(--font-m);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: .1em;
  margin-bottom: 7px;
}

.side-card p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- loop ---------- */
.loop { padding: clamp(52px, 8vw, 96px) 0; border-top: 1px solid var(--line); }

.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: left;
  padding: 15px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: all .2s ease;
}

.step:hover { border-color: var(--accent); transform: translateY(-2px); }

.step.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.step-num { font-family: var(--font-m); font-size: 11px; opacity: .75; }
.step-name { font-size: 14px; font-weight: 500; line-height: 1.25; }

.step-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 32px;
  min-height: 174px;
}

.step-panel h3 { font-size: 1.25rem; margin-bottom: 10px; }
.step-panel p { margin: 0 0 14px; color: var(--muted); max-width: 760px; }

.step-note {
  font-family: var(--font-m);
  font-size: 12.5px;
  color: var(--accent);
  border-left: 2px solid var(--accent);
  padding-left: 12px;
}

.loop-foot { margin: 20px 0 0; color: var(--muted); font-size: 14.5px; }

/* ---------- compare ---------- */
.compare { padding: clamp(52px, 8vw, 96px) 0; border-top: 1px solid var(--line); }

.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: auto;
  background: var(--card);
  box-shadow: var(--shadow);
}

.cmp { width: 100%; border-collapse: collapse; min-width: 720px; }

.cmp th, .cmp td {
  padding: 15px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  vertical-align: top;
}

.cmp thead th {
  position: sticky;
  top: 0;
  background: var(--bg-soft);
  font-family: var(--font-m);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 2;
}

.cmp thead th.cmp-hermes { color: var(--accent); }
.cmp tbody tr:last-child td { border-bottom: 0; }
.cmp tbody tr:hover td { background: var(--bg-soft); }

.cmp td:first-child { font-weight: 500; width: 24%; }

.yes, .no, .mid {
  display: inline-block;
  width: 18px;
  font-weight: 700;
  margin-right: 6px;
}

.yes { color: var(--yes); }
.no { color: var(--no); }
.mid { color: var(--mid); }

.score-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.score-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
}

.score-label { font-family: var(--font-m); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }

.dots { display: flex; gap: 6px; margin-bottom: 9px; }

.dots i {
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
}

.dots i.on { background: var(--accent); border-color: var(--accent); }

.score-note { font-size: 13px; color: var(--muted); }

/* ---------- features ---------- */
.features { padding: clamp(52px, 8vw, 96px) 0; border-top: 1px solid var(--line); }

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

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 20px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.card-ico {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 17px;
  margin-bottom: 14px;
}

.card p { margin: 0; color: var(--muted); font-size: 13.8px; line-height: 1.5; }

/* ---------- who ---------- */
.who { padding: clamp(52px, 8vw, 90px) 0; border-top: 1px solid var(--line); }

.who-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }

.who-col { padding: 30px 32px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); }

.who-hermes { border-color: var(--accent); background: var(--accent-soft); }

.who-col p { margin: 0; color: var(--muted); }

.who-hermes p { color: var(--ink); }

/* ---------- note ---------- */
.note { padding: 0 0 clamp(52px, 8vw, 90px); }

.note-box {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 30px 32px;
  background: transparent;
}

.note-box h3 { margin-bottom: 10px; }
.note-box p { margin: 0 0 12px; color: var(--muted); font-size: 14.5px; max-width: 820px; }

.note-links { display: flex; flex-wrap: wrap; gap: 18px; font-family: var(--font-m); font-size: 12.5px; }

.note-links a { color: var(--accent); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 22px 0 34px; }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  font-family: var(--font-m);
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@keyframes pop {
  from { opacity: 0; transform: translateY(6px) scale(.99); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .msg { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .demo-grid { grid-template-columns: 1fr; }
  .score-row { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav { display: none; }
  .topbar { gap: 14px; }
  br.desk { display: none; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step-name { font-size: 13px; }
  .who-grid { grid-template-columns: 1fr; }
  .cmp { min-width: 620px; }
  .step-panel { padding: 24px 22px; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero-meta { flex-direction: column; gap: 6px; }
  .chat-body { min-height: 300px; }
  .msg { max-width: 92%; }
}
