:root {
  --bg: #070b16;
  --bg-2: #0b1120;
  --panel: #121a2b;
  --panel-2: #16203400;
  --line: #1f2a40;
  --text: #eef2f8;
  --muted: #9aa7bd;
  --muted-2: #6b7890;
  --accent: #e8615f;       /* coral red CTA */
  --accent-dark: #d24b49;
  --blue: #3aa6e6;
  --green: #2fbf8f;
  --purple: #8b6cf0;
  --amber: #e0a14a;
  --teal: #2bb3a3;
  --radius: 18px;
  --radius-lg: 26px;
  --maxw: 1140px;
  --shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.85);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ECG grid backdrop */
.grid-backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 500px at 80% -5%, rgba(232, 97, 95, 0.10), transparent 60%),
    radial-gradient(800px 600px at 0% 10%, rgba(58, 166, 230, 0.08), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 40%);
}
.grid-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(120, 150, 200, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 150, 200, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 5vw, 48px);
  background: rgba(7, 11, 22, 0.7);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* Layout helpers */
main { display: block; }
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) clamp(18px, 5vw, 48px);
}
.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head h2 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
}
.section-head p { color: var(--muted); font-size: 1.08rem; margin-top: 14px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 14px 26px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s;
}
.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 14px 34px -12px rgba(232, 97, 95, 0.65);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 44px -12px rgba(232, 97, 95, 0.75); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); transform: translateY(-2px); }

/* Hero */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(50px, 8vw, 96px) clamp(18px, 5vw, 48px) clamp(40px, 6vw, 80px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}
.pulse-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(47, 191, 143, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 191, 143, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(47, 191, 143, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 191, 143, 0); }
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 22px 0 18px;
}
.hero h1 .accent { color: var(--accent); }
.lede { color: var(--muted); font-size: 1.12rem; max-width: 520px; }
.hero-cta { display: flex; gap: 14px; margin: 30px 0 38px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 36px;
  list-style: none;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.hero-stats span { font-size: 0.85rem; color: var(--muted); }

.hero-art { position: relative; display: flex; justify-content: center; }
.phone {
  width: clamp(230px, 30vw, 320px);
  border-radius: 44px;
  box-shadow: var(--shadow);
  border: 7px solid #000;
  outline: 1px solid rgba(255, 255, 255, 0.08);
  background: #000;
}
.hero-phone { transform: rotate(2deg); }
.phone-glow {
  position: absolute;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(232, 97, 95, 0.28), transparent 65%);
  filter: blur(20px);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: linear-gradient(180deg, var(--panel), rgba(18, 26, 43, 0.5));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: transform 0.18s ease, border-color 0.2s;
}
.feature-card:hover { transform: translateY(-4px); border-color: #2c3a58; }
.ico {
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border-radius: 14px;
  font-size: 1.4rem;
  margin-bottom: 18px;
  color: #fff;
}
.ico-blue   { background: rgba(58, 166, 230, 0.16);  color: var(--blue); }
.ico-red    { background: rgba(232, 97, 95, 0.16);   color: var(--accent); }
.ico-green  { background: rgba(47, 191, 143, 0.16);  color: var(--green); }
.ico-purple { background: rgba(139, 108, 240, 0.16); color: var(--purple); }
.ico-amber  { background: rgba(224, 161, 74, 0.16);  color: var(--amber); }
.ico-teal   { background: rgba(43, 179, 163, 0.16);  color: var(--teal); }
.feature-card h3 { font-size: 1.12rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 0.96rem; }

/* Workflow */
.workflow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.step {
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
}
.step-num {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-weight: 800;
  font-family: "JetBrains Mono", monospace;
  margin-bottom: 16px;
}
.step h3 { font-size: 1.05rem; margin-bottom: 7px; }
.step p { color: var(--muted); font-size: 0.93rem; }

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  align-items: start;
}
.shot { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.shot img {
  width: 100%;
  border-radius: 30px;
  border: 6px solid #000;
  outline: 1px solid rgba(255, 255, 255, 0.08);
  background: #000;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.shot:hover img { transform: translateY(-6px); }
.shot figcaption { font-size: 0.86rem; color: var(--muted); text-align: center; }

.ipad-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 56px;
}
.ipad-showcase img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow);
}

/* Languages */
.section-languages { text-align: center; }
.section-languages .section-head { margin: 0 auto 40px; }
.lang-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}
.lang-chip {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), rgba(18, 26, 43, 0.4));
  font-weight: 600;
  font-size: 1.02rem;
}
.lang-chip span { font-size: 1.3rem; }

/* Final CTA */
.cta-final { padding: 0 clamp(18px, 5vw, 48px) clamp(70px, 9vw, 120px); }
.cta-card {
  max-width: var(--maxw);
  margin: 0 auto;
  text-align: center;
  padding: clamp(48px, 7vw, 84px) 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(700px 300px at 50% 0%, rgba(232, 97, 95, 0.14), transparent 70%),
    linear-gradient(180deg, var(--panel), var(--bg-2));
}
.cta-card img { width: 64px; height: 64px; border-radius: 16px; margin-bottom: 22px; }
.cta-card h2 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.cta-card p { color: var(--muted); margin: 14px 0 30px; font-size: 1.08rem; }

/* App Store badge */
.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 22px 11px 18px;
  border-radius: 14px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.2s;
}
.appstore-badge:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.5); }
.appstore-logo { width: 26px; height: 26px; }
.appstore-text { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.appstore-text small { font-size: 0.68rem; letter-spacing: 0.02em; }
.appstore-text strong { font-size: 1.22rem; font-weight: 600; letter-spacing: -0.01em; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px clamp(18px, 5vw, 48px);
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
}
.foot-brand { display: flex; align-items: center; gap: 14px; }
.foot-brand img { width: 40px; height: 40px; border-radius: 10px; }
.foot-brand strong { display: block; font-weight: 700; }
.foot-policy {
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.2s;
}
.foot-policy:hover { color: var(--text); text-decoration: underline; }

/* Responsive */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .hero-cta, .hero-stats { justify-content: center; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .workflow { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery .shot:nth-child(4), .gallery .shot:nth-child(5) { grid-column: span 1; }
}
@media (max-width: 620px) {
  .feature-grid { grid-template-columns: 1fr; }
  .workflow { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .ipad-showcase { grid-template-columns: 1fr; }
  .site-footer { justify-content: center; text-align: center; }
}
