/* ── Tokens ────────────────────────────────────────────────────── */
:root {
  --ink: #0c1424;
  --ink-soft: #45556c;
  --ink-faint: #8696b3;
  --bg: #ffffff;
  --bg-soft: #f6f8fc;
  --bg-card: #ffffff;
  --line: #e3e8f2;
  --brand: #0a4ab0;
  --brand-soft: #2a6fd8;
  --brand-tint: #eaf1fd;
  --ok: #1f9d6e;

  --chat-bg: #0b1220;
  --chat-bg-soft: #131b2e;
  --chat-fg: #e7ecf6;
  --chat-fg-soft: #99a6c4;
  --chat-line: #25314c;
  --chat-accent: #2a8cff;
  --chat-accent-2: #7a4eff;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 4px 18px rgba(11, 30, 70, 0.06);
  --shadow-chat: 0 16px 48px rgba(8, 14, 34, 0.32);
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
}

/* ── Base ──────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-soft); }
h1, h2, h3 { color: var(--ink); margin: 0 0 16px 0; line-height: 1.2; }
h1 { font-size: 44px; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 30px; font-weight: 650; letter-spacing: -0.01em; }
h3 { font-size: 18px; font-weight: 600; }
p { margin: 0 0 14px 0; color: var(--ink-soft); }
.lede { font-size: 18px; color: var(--ink-soft); }
.section-lede { font-size: 17px; color: var(--ink-soft); max-width: 720px; margin-bottom: 32px; }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer; transition: transform 0.06s ease, background 0.18s, border-color 0.18s;
}
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-soft); color: #fff; }
.btn.ghost { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn.ghost:hover { background: var(--brand-tint); color: var(--brand); }
.btn:active { transform: translateY(1px); }

/* ── Header ────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; color: var(--ink); }
.brand-mark { color: var(--brand); font-size: 22px; line-height: 1; }
.brand-name { font-size: 16px; letter-spacing: -0.01em; }
.site-nav { display: flex; gap: 24px; }
.site-nav a { color: var(--ink-soft); font-size: 14px; }
.site-nav a:hover { color: var(--ink); }

/* ── Hero ──────────────────────────────────────────────────────── */
.hero { padding: 64px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero-copy h1 { margin-bottom: 18px; }
.hero-copy .lede { margin-bottom: 28px; max-width: 540px; }
.hero-actions { display: flex; gap: 12px; }
.hero-image img { border-radius: var(--radius); box-shadow: var(--shadow-card); }

/* Hero stats grid (used when no hero image is available) */
.hero-stats { display: flex; align-items: center; justify-content: center; }
.hero-stat-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
  width: 100%; max-width: 460px;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.hero-stat {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.hero-stat .stat-label { font-size: 12px; color: var(--ink-faint); font-weight: 500; }
.hero-stat .stat-value { font-size: 20px; font-weight: 650; color: var(--brand); letter-spacing: -0.01em; }

/* ── Problems ──────────────────────────────────────────────────── */
.problems { padding: 56px 0; background: var(--bg-soft); }
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex; flex-direction: column;
}
.card h3 { color: var(--brand); margin-bottom: 8px; }
.card p { margin: 0; font-size: 14px; color: var(--ink-soft); flex: 1; }

/* Clickable cards (problem + hardware) */
.is-clickable {
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.is-clickable:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: 0 6px 22px rgba(10, 74, 176, 0.12);
}
.card-cta {
  display: inline-block;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  opacity: 0.7;
  transition: opacity 0.15s, transform 0.15s;
}
.is-clickable:hover .card-cta { opacity: 1; transform: translateX(2px); }
.hardware-card.is-clickable .card-cta { padding: 0 20px 18px 20px; margin-top: 0; }

/* ── How it works ──────────────────────────────────────────────── */
.how-it-works { padding: 72px 0; }
.journey-image img { border-radius: var(--radius); margin-bottom: 32px; box-shadow: var(--shadow-card); }
.journey-steps { padding-left: 0; list-style: none; counter-reset: step; display: grid; gap: 14px; }
.journey-steps li {
  counter-increment: step;
  padding-left: 56px; position: relative;
  color: var(--ink-soft); font-size: 15px;
}
.journey-steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand-tint); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
}
.journey-steps li strong { color: var(--ink); }

/* ── Hardware ──────────────────────────────────────────────────── */
.hardware { padding: 64px 0; background: var(--bg-soft); }
.hardware-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hardware-grid-2 { grid-template-columns: repeat(2, 1fr); max-width: 820px; margin: 0 auto; }
.hardware-card-icon {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--brand-tint) 0%, #ffffff 100%);
  font-size: 64px; color: var(--brand); font-weight: 700;
  border-bottom: 1px solid var(--line);
}
.hardware-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.hardware-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.hardware-card h3 { padding: 18px 20px 4px 20px; }
.hardware-card p { padding: 0 20px 20px 20px; font-size: 14px; }

/* ── Compliance ────────────────────────────────────────────────── */
.compliance { padding: 64px 0; }
.compliance-image img { border-radius: var(--radius); margin-bottom: 24px; max-width: 560px; box-shadow: var(--shadow-card); }
.compliance p { font-size: 16px; max-width: 760px; }

/* ── CTA ───────────────────────────────────────────────────────── */
.cta { padding: 64px 0; background: linear-gradient(135deg, #0a4ab0 0%, #2a6fd8 100%); color: #fff; text-align: center; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, 0.86); max-width: 580px; margin: 0 auto 24px auto; font-size: 17px; }
.cta .btn.primary { background: #fff; color: var(--brand); }
.cta .btn.primary:hover { background: #f1f5fb; color: var(--brand); }

/* ── Footer ────────────────────────────────────────────────────── */
.site-footer { padding: 32px 0; border-top: 1px solid var(--line); background: var(--bg); }
.footer-grid { display: flex; justify-content: space-between; align-items: center; }
.site-footer p { margin: 0; font-size: 13px; color: var(--ink-faint); }
.agent-ready-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--bg-soft); border: 1px solid var(--line);
  font-size: 12px; font-weight: 600; color: var(--ink-soft);
}
.agent-ready-badge:hover { background: var(--brand-tint); color: var(--brand); border-color: var(--brand); }
.agent-ready-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(31, 157, 110, 0.18);
}

/* ── Chat widget ──────────────────────────────────────────────── */
.rplay-chat-bubble {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, var(--chat-accent) 0%, var(--chat-accent-2) 100%);
  color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-chat);
  transition: transform 0.16s ease, opacity 0.16s ease;
}
.rplay-chat-bubble:hover { transform: scale(1.05); }
.rplay-chat-bubble.is-hidden { opacity: 0; pointer-events: none; transform: scale(0.85); }
.rplay-chat-bubble svg { width: 26px; height: 26px; }

.rplay-chat-panel {
  position: fixed; bottom: 24px; right: 24px; z-index: 91;
  width: 400px; max-width: calc(100vw - 32px);
  height: 600px; max-height: calc(100vh - 48px);
  background: var(--chat-bg); color: var(--chat-fg);
  border-radius: 18px;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-chat);
  border: 1px solid var(--chat-line);
  overflow: hidden;
  transform: translateY(8px); opacity: 0; pointer-events: none;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.rplay-chat-panel.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }

.rplay-chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--chat-line);
  background: var(--chat-bg-soft);
}
.rplay-chat-title { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.rplay-chat-title .orb {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--chat-accent) 0%, var(--chat-accent-2) 100%);
  box-shadow: 0 0 10px rgba(42, 140, 255, 0.6);
}
.rplay-chat-subtitle { font-size: 11px; color: var(--chat-fg-soft); font-weight: 500; }
.rplay-chat-close {
  background: transparent; border: none; color: var(--chat-fg-soft);
  width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.rplay-chat-close:hover { background: rgba(255, 255, 255, 0.06); color: var(--chat-fg); }

.rplay-chat-thread {
  flex: 1; overflow-y: auto;
  padding: 18px 16px;
  display: flex; flex-direction: column; gap: 14px;
  scroll-behavior: smooth;
}
.rplay-chat-thread::-webkit-scrollbar { width: 6px; }
.rplay-chat-thread::-webkit-scrollbar-thumb { background: var(--chat-line); border-radius: 3px; }

.rplay-msg { max-width: 86%; font-size: 14px; line-height: 1.5; word-wrap: break-word; }
.rplay-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--chat-accent) 0%, var(--chat-accent-2) 100%);
  color: #fff;
  padding: 10px 14px; border-radius: 16px 16px 4px 16px;
}
.rplay-msg.assistant {
  align-self: flex-start;
  background: var(--chat-bg-soft);
  color: var(--chat-fg);
  padding: 10px 14px; border-radius: 16px 16px 16px 4px;
  border: 1px solid var(--chat-line);
}
.rplay-msg.assistant img {
  border-radius: 10px; margin: 8px 0;
  max-width: 100%; border: 1px solid var(--chat-line);
}
.rplay-msg.assistant strong { color: #fff; font-weight: 650; }
.rplay-msg.assistant ul, .rplay-msg.assistant ol { padding-left: 20px; margin: 8px 0; }
.rplay-msg.assistant code { background: rgba(255,255,255,0.06); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.rplay-msg.assistant p { color: inherit; margin: 0 0 6px 0; }
.rplay-msg.assistant p:last-child { margin-bottom: 0; }
.rplay-msg.user.is-transcribing {
  opacity: 0.55;
  font-style: italic;
}
.rplay-msg.error {
  align-self: flex-start;
  background: rgba(220, 60, 60, 0.12);
  color: #ff9d9d;
  border: 1px solid rgba(220, 60, 60, 0.3);
  padding: 10px 14px; border-radius: 12px;
  font-size: 13px;
}
.rplay-msg.typing { color: var(--chat-fg-soft); font-style: italic; }
.rplay-msg.typing::after { content: '●●●'; letter-spacing: 2px; animation: rplay-dots 1.2s infinite; }
@keyframes rplay-dots { 0%, 20% { opacity: 0.2; } 50% { opacity: 1; } 100% { opacity: 0.2; } }

.rplay-chat-shortcuts {
  padding: 0 16px 12px 16px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.rplay-chat-shortcuts.is-hidden { display: none; }
.rplay-shortcut {
  background: var(--chat-bg-soft); color: var(--chat-fg-soft);
  border: 1px solid var(--chat-line); border-radius: 999px;
  padding: 6px 12px; font-size: 12px; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.rplay-shortcut:hover {
  background: rgba(42, 140, 255, 0.12);
  color: var(--chat-fg);
  border-color: var(--chat-accent);
}

.rplay-chat-input-row {
  padding: 12px 12px 14px 12px;
  border-top: 1px solid var(--chat-line);
  background: var(--chat-bg-soft);
  display: flex; gap: 8px; align-items: flex-end;
}
.rplay-chat-input {
  flex: 1;
  background: var(--chat-bg); color: var(--chat-fg);
  border: 1px solid var(--chat-line); border-radius: 12px;
  padding: 10px 14px; font: inherit; font-size: 14px;
  resize: none; min-height: 40px; max-height: 120px;
  outline: none;
}
.rplay-chat-input:focus { border-color: var(--chat-accent); }
.rplay-chat-input::placeholder { color: var(--chat-fg-soft); }
.rplay-chat-send {
  background: linear-gradient(135deg, var(--chat-accent) 0%, var(--chat-accent-2) 100%);
  color: #fff; border: none; cursor: pointer;
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.rplay-chat-send:disabled { opacity: 0.4; cursor: not-allowed; }
.rplay-chat-send svg { width: 18px; height: 18px; }

.rplay-chat-mic {
  background: var(--chat-bg); color: var(--chat-fg-soft);
  border: 1px solid var(--chat-line); cursor: pointer;
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.2s;
}
.rplay-chat-mic:hover { color: var(--chat-fg); border-color: var(--chat-accent); }
.rplay-chat-mic svg { width: 18px; height: 18px; }
.rplay-chat-mic.is-live {
  background: linear-gradient(135deg, #ff3d6b 0%, #c2185b 100%);
  color: #fff; border-color: transparent;
  animation: rplay-mic-pulse 1.6s ease-in-out infinite;
}
@keyframes rplay-mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 61, 107, 0.55); }
  50%      { box-shadow: 0 0 0 8px rgba(255, 61, 107, 0); }
}

.rplay-chat-voice-status {
  padding: 8px 16px;
  background: var(--chat-bg-soft);
  border-bottom: 1px solid var(--chat-line);
  color: var(--chat-fg-soft);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.02em;
}
.rplay-chat-voice-status.is-hidden { display: none; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .hardware-grid { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
}
@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
  .rplay-chat-panel { width: calc(100vw - 24px); right: 12px; bottom: 12px; height: calc(100vh - 80px); }
  .rplay-chat-bubble { right: 16px; bottom: 16px; }
}
