/* Landing page — light, clean, AI-tech feel.
 * Independent from styles.css (which powers the dark live ECG demo).
 * Loaded only by landing-demo.html.
 */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --bg-card: #ffffff;
  --fg: #0b1220;
  --fg-dim: #5b6a82;
  --fg-mute: #8a96ab;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);
  --accent: #06b6d4;       /* cyan */
  --accent-2: #6366f1;     /* indigo */
  --accent-soft: rgba(6, 182, 212, 0.12);
  --accent-2-soft: rgba(99, 102, 241, 0.12);
  --success: #10b981;
  --warn: #f59e0b;
  --err: #ef4444;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 1px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 6px 24px rgba(15, 23, 42, 0.06), 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.10), 0 6px 18px rgba(15, 23, 42, 0.06);
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.page-landing {
  overflow-x: hidden;
}

body.modal-open { overflow: hidden; }

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

img, iframe { display: block; max-width: 100%; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ───────── Nav ───────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 16px;
  color: var(--fg);
}
.nav__brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.75; }
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav__link {
  color: var(--fg-dim);
  font-size: 14px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}
.nav__link:hover {
  color: var(--fg);
  background: var(--bg-soft);
  text-decoration: none;
}
.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
}

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  background: var(--bg-card);
  color: var(--fg);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  text-decoration: none;
  transition: transform 80ms ease, box-shadow 120ms ease, background 120ms;
  white-space: nowrap;
}
.btn:hover { box-shadow: var(--shadow-sm); text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.30);
}
.btn--primary:hover { filter: brightness(1.04); }

.btn--ghost {
  background: transparent;
  border-color: var(--border-strong);
}

.btn--lg {
  height: 46px;
  padding: 0 22px;
  font-size: 15px;
}

.btn__icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

/* ───────── Hero ───────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 72px;
  background:
    radial-gradient(1100px 520px at 80% -10%, var(--accent-2-soft), transparent 60%),
    radial-gradient(900px 460px at -10% 10%, var(--accent-soft), transparent 60%),
    var(--bg);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(900px 600px at 50% 30%, #000 50%, transparent 90%);
  -webkit-mask-image: radial-gradient(900px 600px at 50% 30%, #000 50%, transparent 90%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: center;
}
@media (min-width: 980px) {
  .hero__inner {
    grid-template-columns: 1.05fr 0.95fr;
  }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: var(--accent-2-soft);
  border: 1px solid rgba(99, 102, 241, 0.20);
}
.eyebrow__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}
.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--fg);
}
.hero h1 .grad {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__sub {
  margin: 0 0 28px;
  font-size: 17px;
  color: var(--fg-dim);
  max-width: 560px;
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero__meta {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  font-size: 13px;
  color: var(--fg-mute);
}
.hero__meta code {
  font-family: var(--font-mono);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--fg);
  font-size: 12px;
}

/* Hero visual: animated dollar-bar "heartbeat" wave */
.hero__visual {
  position: relative;
  aspect-ratio: 5 / 4;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #0b1220 0%, #111827 100%);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.hero__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(400px 200px at 20% 0%, rgba(6, 182, 212, 0.30), transparent 60%),
    radial-gradient(400px 240px at 90% 100%, rgba(99, 102, 241, 0.30), transparent 65%);
  pointer-events: none;
}
.hero__visual svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__visual-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.40);
  border-radius: 9999px;
}
.hero__visual-badge span.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 10px #22d3ee;
}

/* ───────── Section common ───────── */
section.band { padding: 80px 0; }
.section-head { max-width: 720px; margin: 0 auto 36px; text-align: center; }
.section-head h2 {
  font-size: clamp(26px, 3vw, 36px);
  margin: 8px 0 10px;
  letter-spacing: -0.015em;
  font-weight: 800;
}
.section-head p {
  color: var(--fg-dim);
  font-size: 16px;
  margin: 0;
}

/* ───────── Sections ───────── */
.band--soft { background: var(--bg-soft); }

/* ───────── Features ───────── */
.features {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(1, 1fr);
}
@media (min-width: 720px) {
  .features { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 720px) {
  .features--four { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1080px) {
  .features--four { grid-template-columns: repeat(4, 1fr); }
}
.feature {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.feature__icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent-2-soft));
  color: var(--accent-2);
  margin-bottom: 14px;
}
.feature h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
}
.feature p {
  margin: 0;
  color: var(--fg-dim);
  font-size: 14px;
}

/* ───────── Live demo embed ───────── */
.demo-shell {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  background: #0b0e14;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.demo-shell__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: #11151c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #d6deeb;
  font-size: 12px;
  font-family: var(--font-mono);
}
.demo-shell__dots { display: inline-flex; gap: 6px; }
.demo-shell__dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.16);
}
.demo-shell__dots span:nth-child(1) { background: #ff5f57; }
.demo-shell__dots span:nth-child(2) { background: #febc2e; }
.demo-shell__dots span:nth-child(3) { background: #28c840; }
.demo-shell__url { color: #8492a6; }
.demo-shell__actions a { color: #c7d2fe; }
.demo-shell__frame {
  width: 100%;
  height: 540px;
  border: 0;
  display: block;
  background: #0b0e14;
}
@media (max-width: 720px) {
  .demo-shell__frame { height: 480px; }
}

/* ───────── MCP block ───────── */
.mcp {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 900px) {
  .mcp { grid-template-columns: 0.95fr 1.05fr; }
}
.mcp__copy h2 {
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.015em;
  margin: 6px 0 10px;
}
.mcp__copy p { color: var(--fg-dim); margin: 0 0 18px; }
.mcp__bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  gap: 10px;
}
.mcp__bullets li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--fg);
}
.mcp__bullets li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 8px;
  flex: 0 0 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.mcp__ctas { display: flex; flex-wrap: wrap; gap: 10px; }

.code {
  position: relative;
  border-radius: var(--radius);
  background: #0b1220;
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.code__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #0f172a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #9aa6bd;
  font-size: 11px;
}
.code__bar .tabs { display: inline-flex; gap: 4px; }
.code__bar .tab {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #9aa6bd;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
}
.code__bar .tab[aria-selected="true"] {
  color: #ffffff;
  background: rgba(99, 102, 241, 0.20);
  border-color: rgba(99, 102, 241, 0.40);
}
.code__bar .copy {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #c7d2fe;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.code__bar .copy:hover { background: rgba(99, 102, 241, 0.12); }
.code pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: inherit;
  font-size: inherit;
}
.code pre[hidden] { display: none; }

/* ───────── Roadmap ───────── */
.roadmap {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .roadmap { grid-template-columns: repeat(4, 1fr); }
}
.phase {
  position: relative;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.phase__tag {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 700;
}
.phase h4 {
  margin: 6px 0 6px;
  font-size: 16px;
  font-weight: 700;
}
.phase p {
  margin: 0;
  color: var(--fg-dim);
  font-size: 13.5px;
}
.phase__status {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--fg-dim);
  background: var(--bg-soft);
}
.phase--now { border-color: rgba(6, 182, 212, 0.40); }
.phase--now .phase__status { color: var(--success); border-color: rgba(16, 185, 129, 0.30); background: rgba(16, 185, 129, 0.08); }

/* ───────── Final CTA ───────── */
.endband {
  padding: 80px 0;
  background:
    radial-gradient(700px 320px at 50% 0%, var(--accent-soft), transparent 70%),
    var(--bg-soft);
}
.endband__card {
  text-align: center;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 48px 28px;
  box-shadow: var(--shadow-md);
}
.endband__card h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.015em;
}
.endband__card p {
  margin: 0 0 22px;
  color: var(--fg-dim);
  font-size: 16px;
}
.endband__ctas { display: inline-flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ───────── Footer ───────── */
.foot {
  border-top: 1px solid var(--border);
  padding: 28px 0 36px;
  color: var(--fg-mute);
  font-size: 13px;
}
.foot__row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  justify-content: space-between;
}
.foot__links { display: inline-flex; flex-wrap: wrap; gap: 16px; }
.foot__links a { color: var(--fg-dim); }
.foot__disclaimer {
  margin-top: 14px;
  font-size: 12px;
  color: var(--fg-mute);
}

/* ───────── CTA modals (light variant) ───────── */
.cta-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.cta-modal[hidden] { display: none; }
.cta-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.50);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.cta-modal__panel {
  position: relative;
  width: min(460px, 100%);
  max-height: min(90vh, 680px);
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 24px 24px 26px;
  box-shadow: var(--shadow-lg);
  color: var(--fg);
}
.cta-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: 0;
  font-size: 22px;
  line-height: 1;
  color: var(--fg-dim);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.cta-modal__close:hover { color: var(--fg); background: var(--bg-soft); }
.cta-modal__title { margin: 0 32px 16px 0; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.cta-form { display: flex; flex-direction: column; gap: 16px; }
.cta-field { display: flex; flex-direction: column; gap: 6px; }
.cta-field__label,
.cta-fieldset legend { font-size: 12px; font-weight: 600; color: var(--fg-dim); }
.cta-fieldset { border: 0; margin: 0; padding: 0; }
.cta-field input[type="email"],
.cta-field textarea {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  color: var(--fg);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}
.cta-field input:focus,
.cta-field textarea:focus {
  outline: 2px solid var(--accent-2-soft);
  border-color: var(--accent-2);
}
.cta-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cta-chip {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--fg-dim);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--bg);
  transition: border-color 120ms, color 120ms, background 120ms;
}
.cta-chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.cta-chip:has(input:checked) {
  border-color: var(--accent-2);
  color: var(--accent-2);
  background: var(--accent-2-soft);
}
.cta-btn--block { width: 100%; }
.cta-form-msg { font-size: 13px; margin: 0; color: var(--success); }
.cta-form-msg[data-state="error"] { color: var(--err); }

/* Primary CTA inside modal: reuse .btn--primary look. */
.cta-form .cta-btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #ffffff;
  border: 0;
  height: 44px;
  border-radius: 9999px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.30);
}
.cta-form .cta-btn--primary:hover { filter: brightness(1.04); }
