:root {
  --bg: #ffffff;
  --bg-raised: #f6f5f3;
  --bg-dark: #0d0d0d;
  --bg-dark-raised: #1a1a1a;
  --border: #e8e6e3;
  --border-dark: #2b2b2b;
  --text: #111111;
  --text-dim: #5b5652;
  --text-on-dark: #ffffff;
  --text-dim-on-dark: #9a9a9a;
  --accent: #0d6efd;
  --accent-soft: #eaf1ff;
  --ok: #1a8f5f;
  --ok-soft: #e6f7ef;
  --err: #c93a3a;
  --err-soft: #fdeaea;
  --mono: "Space Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --sans: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

/* Nav */
header.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

header.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 24px;
}

.logo {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.logo:hover { text-decoration: none; }
.logo span { color: var(--accent); }

nav.links { display: flex; gap: 32px; margin-right: auto; margin-left: 48px; }
nav.links a {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
}
nav.links a:hover { color: var(--text); text-decoration: none; }

.nav-cta { padding: 9px 20px; font-size: 13.5px; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  border: 1.5px solid transparent;
  font-family: var(--sans);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary, .btn-pill-primary {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}
.btn-primary:hover, .btn-pill-primary:hover { background: #000; }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--text); }

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

/* Hero */
.hero {
  padding: 96px 0 100px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent);
  background: var(--accent-soft);
  letter-spacing: 0.02em;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.hero h1 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 22px;
}

.hero p.lede {
  font-size: 18.5px;
  color: var(--text-dim);
  max-width: 520px;
  margin: 0 0 40px;
}

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* Hero visual: animated inbox mockup — agent reading + replying to email */
.hero-visual { position: relative; }
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -60px;
  background: radial-gradient(closest-side, var(--accent-soft), transparent 70%);
  opacity: 0.9;
  z-index: 0;
}
.hv-frame {
  position: relative;
  z-index: 1;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 30px 60px rgba(17, 17, 17, 0.12);
}
.hv-bar { display: flex; gap: 6px; padding: 2px 6px 14px; }
.hv-bar span { width: 9px; height: 9px; border-radius: 50%; background: #d6d3ce; }
.hv-bar span:nth-child(1) { background: #ff5f57; }
.hv-bar span:nth-child(2) { background: #febc2e; }
.hv-bar span:nth-child(3) { background: #28c840; }

.hv-screen {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  height: 320px;
  overflow: hidden;
}

.hv-block {
  position: absolute;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* top address/search bar */
.hv-topbar {
  top: 16px; left: 16px; right: 16px; height: 26px;
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
  border-radius: 999px;
  background: var(--bg-raised);
}
.hv-favicon { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.hv-url-text {
  font-family: var(--mono);
  font-size: 9px;
  color: #9a958d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* inbox list */
.hv-maillist { top: 52px; left: 16px; width: 120px; bottom: 16px; background: #fbfaf8; padding: 10px 8px; }
.hv-mail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 6px 6px;
  border-radius: 8px;
  margin-bottom: 8px;
}
.hv-mail-item.active { background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(13, 110, 253, 0.3); }
.hv-mail-avatar {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: #4d78ff; color: #fff;
  font-family: var(--sans); font-weight: 700; font-size: 7.5px;
  display: flex; align-items: center; justify-content: center;
}
.hv-mail-item.i2 .hv-mail-avatar { background: #2fb573; }
.hv-mail-item.i3 .hv-mail-avatar { background: #e8a323; }
.hv-mail-item.i4 .hv-mail-avatar { background: #e8735f; }
.hv-mail-lines { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.hv-mail-name {
  font-family: var(--sans); font-weight: 600; font-size: 9.5px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hv-mail-item.active .hv-mail-name { color: var(--accent); }
.hv-mail-snippet {
  font-family: var(--body); font-size: 8px; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* reading pane + reply */
.hv-panel { top: 52px; left: 148px; right: 16px; bottom: 16px; background: #ffffff; }
.hv-mail-from {
  position: absolute; top: 68px; left: 168px; width: 220px;
  font-family: var(--sans); font-weight: 700; font-size: 12px; color: var(--text);
}
.hv-mail-subject {
  position: absolute; top: 87px; left: 168px; width: 240px;
  font-family: var(--sans); font-weight: 500; font-size: 10px; color: var(--text-dim);
}
.hv-mail-body {
  position: absolute; top: 112px; left: 168px; width: 230px;
  font-family: var(--body); font-size: 9.5px; line-height: 1.55; color: var(--text-dim);
}

.hv-reply-input {
  top: 246px; left: 168px; width: 190px; height: 30px; border-radius: 999px;
  background: #fbfaf8; border-color: var(--border);
  display: flex; align-items: center; padding: 0 14px;
  font-family: var(--body); font-size: 9px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hv-send-btn {
  top: 246px; left: 366px; width: 56px; height: 30px;
  border-radius: 999px;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hv-cursor {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.1), 0 2px 6px rgba(17, 17, 17, 0.25);
  animation: hv-move 6s ease-in-out infinite;
}
@keyframes hv-move {
  0%, 14% { transform: translate(76px, 138px); }
  33%, 47% { transform: translate(263px, 261px); }
  66%, 80% { transform: translate(394px, 261px); }
  100% { transform: translate(76px, 138px); }
}

.hv-ripple {
  position: absolute;
  width: 30px;
  height: 30px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: hv-pulse 6s ease-out infinite;
}
.hv-ripple.r1 { top: 138px; left: 76px; animation-delay: 0s; }
.hv-ripple.r2 { top: 261px; left: 263px; animation-delay: 2s; }
.hv-ripple.r3 { top: 261px; left: 394px; animation-delay: 4s; }
@keyframes hv-pulse {
  0% { opacity: 0.9; transform: scale(0.4); }
  12% { opacity: 0; transform: scale(1.6); }
  100% { opacity: 0; transform: scale(1.6); }
}

.hv-check {
  position: absolute;
  top: 20px;
  right: 16px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: hv-check 6s ease-in-out infinite;
}
@keyframes hv-check {
  0%, 15% { opacity: 0; }
  20%, 26% { opacity: 1; }
  31%, 48% { opacity: 0; }
  53%, 59% { opacity: 1; }
  64%, 81% { opacity: 0; }
  86%, 92% { opacity: 1; }
  97%, 100% { opacity: 0; }
}

/* Sections */
section { padding: 88px 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: none; }

.section-label {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.section-label.light { color: #7db8ff; }

h2 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 34px;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}
h2.light { color: #fff; }

section p {
  color: var(--text-dim);
  font-size: 16px;
  max-width: 680px;
}
p.light { color: #b8b8b8; }

section p + p { margin-top: 14px; }

/* Vision: copy + compare stack */
.vision-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: center;
}
.vision-compare { display: flex; flex-direction: column; gap: 14px; }

.rc-col {
  border-radius: 14px;
  padding: 18px 20px;
  border: 1px solid var(--border);
}
.rc-wrong { background: var(--err-soft); }
.rc-right { background: var(--ok-soft); }
.rc-label {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.rc-wrong .rc-label { color: var(--err); }
.rc-right .rc-label { color: var(--ok); }
.rc-text { font-size: 14.5px; color: var(--text); max-width: none; }

/* Cards */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 36px;
}

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.card:hover { box-shadow: 0 8px 28px rgba(17, 17, 17, 0.06); transform: translateY(-2px); }

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card-icon svg { width: 22px; height: 22px; }

.card .status {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.status.live { background: var(--ok-soft); color: var(--ok); }
.status.soon { background: #fdf1de; color: #b8710f; }

.card h3 { font-family: var(--sans); font-size: 19px; margin: 0 0 10px; }
.card p { font-size: 14.5px; margin: 0; max-width: none; }

/* Example: device mockup + run steps */
.example-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  margin-top: 36px;
  align-items: start;
}

.mock-calc {
  background: var(--bg-dark);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 16px 40px rgba(17, 17, 17, 0.14);
}
.mock-calc-display {
  background: #000;
  border-radius: 12px;
  padding: 20px 18px;
  text-align: right;
  font-family: var(--mono);
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mock-calc-display .expr { color: #8a8f96; font-size: 15px; }
.mock-calc-display .ans { color: #fff; font-size: 30px; font-weight: 700; }

.mock-calc-keys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.key {
  background: #1c1c1e;
  border-radius: 10px;
  text-align: center;
  padding: 13px 0;
  font-family: var(--mono);
  font-size: 13.5px;
  color: #b8bcc2;
}
.key.op { color: #fff; background: #2c2c2e; }
.key.wide { grid-column: span 2; }
.key.active { animation: keypulse 4s ease-in-out infinite; }
@keyframes keypulse {
  0%, 92%, 100% { background: #1c1c1e; color: #b8bcc2; }
  4%, 12% { background: var(--accent); color: #fff; }
}
.key.op.active { animation-name: keypulse-op; }
@keyframes keypulse-op {
  0%, 92%, 100% { background: #2c2c2e; color: #fff; }
  4%, 12% { background: var(--accent); color: #fff; }
}

.run-steps { display: flex; flex-direction: column; gap: 16px; }

.run-step {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
}

.run-q {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--text);
}

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

.chip {
  font-family: var(--mono);
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 999px;
}
.chip.fail { background: var(--err-soft); color: var(--err); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }

.run-result {
  font-family: var(--mono);
  font-size: 14.5px;
  color: var(--text-dim);
}
.run-result strong { color: var(--accent); font-size: 16px; }

.root-cause {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 28px;
}

.caption {
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 24px;
  font-style: italic;
}

/* Final CTA band (dark, full-bleed) */
.cta-band {
  background: var(--bg-dark);
  border-bottom: none;
  text-align: center;
}
.cta-band .wrap { max-width: 620px; }
.cta-band .cta-row { justify-content: center; }

.waitlist-form {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}
.waitlist-form .hp {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.waitlist-form input[type="email"] {
  flex: 1;
  background: var(--bg-dark-raised);
  border: 1.5px solid var(--border-dark);
  border-radius: 999px;
  padding: 12px 18px;
  color: #fff;
  font-family: var(--body);
  font-size: 14px;
}
.waitlist-form input[type="email"]::placeholder { color: #7a7a7a; }
.waitlist-form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
}
.waitlist-form button {
  cursor: pointer;
  font-family: var(--sans);
}
.waitlist-form button:disabled { opacity: 0.6; cursor: default; }

.form-status {
  font-size: 14px;
  margin-top: 12px;
  min-height: 20px;
  color: #b8b8b8;
}
.form-status.ok { color: #4fd18a; }
.form-status.err { color: #f08080; }

.cta-band .caption { color: #8a8a8a; }
.cta-band .caption a { color: #7db8ff; }

/* Footer */
footer { padding: 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding: 64px 0 40px;
}
.footer-brand p {
  font-size: 14px;
  color: var(--text-dim);
  max-width: 280px;
  margin-top: 12px;
}
.footer-heading {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom .fine { color: var(--text-dim); font-size: 13px; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 480px; margin: 0 auto; }
  .vision-grid { grid-template-columns: 1fr; }
  .example-grid { grid-template-columns: 1fr; }
  .mock-calc { max-width: 340px; margin: 0 auto; }
}

@media (max-width: 780px) {
  .root-cause { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding: 48px 0 32px; }
}

@media (max-width: 640px) {
  .hero h1 { font-size: 36px; }
  .hero { padding: 56px 0 56px; }
  .cards { grid-template-columns: 1fr; }
  nav.links { display: none; }
  section { padding: 56px 0; }
  .waitlist-form { flex-direction: column; max-width: none; }
}
