/* ECG at Home - Concept 1: Clinical Modern
   Navy + gold from brand logo, light clinical theme, Figtree */

:root {
  --navy: #1c2b4a;
  --navy-deep: #142138;
  --ink: #223046;
  --body: #4b586e;
  --gold: #b3924f;
  --gold-deep: #98793a;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --line: #e3e9f2;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(28, 43, 74, 0.08);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Figtree", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; }

h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }

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

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn svg { width: 18px; height: 18px; }

.btn-primary {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 6px 18px rgba(28, 43, 74, 0.25);
}
.btn-primary:hover { background: var(--navy-deep); box-shadow: 0 10px 24px rgba(28, 43, 74, 0.3); }

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-deep); }

.btn-full { width: 100%; justify-content: center; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 249, 252, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--navy);
}
.brand-mark { width: 34px; height: 34px; }
.brand-text {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.brand-text em { font-style: normal; color: var(--gold-deep); font-weight: 600; }

.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}
.nav-links a {
  text-decoration: none;
  color: var(--body);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--navy); }

.nav-cta { padding: 10px 22px; font-size: 0.92rem; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 88px;
  overflow: hidden;
}
.hero-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.hero-sub {
  margin: 20px 0 32px;
  font-size: 1.15rem;
  max-width: 46ch;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-visual { position: relative; }

.ecg-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}
.ecg-card-head, .ecg-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.ecg-label {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.95rem;
}
.ecg-bpm { color: var(--body); font-size: 0.9rem; }
.ecg-bpm strong { color: var(--gold-deep); font-size: 1.5rem; font-variant-numeric: tabular-nums; }

.ecg-trace { width: 100%; height: 130px; margin: 12px 0; }
#trace {
  stroke-dasharray: 2200;
  stroke-dashoffset: 2200;
  animation: draw 4s linear infinite;
}
@keyframes draw {
  0% { stroke-dashoffset: 2200; }
  70% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}

.ecg-card-foot { font-size: 0.85rem; color: var(--body); }

.hero-chip {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--navy);
  box-shadow: var(--shadow);
}
.hero-chip-1 { top: -18px; right: 8px; }
.hero-chip-2 { bottom: -18px; left: 12px; border-color: var(--gold); color: var(--gold-deep); }

/* ---------- Trust strip ---------- */
.trust {
  background: var(--navy);
  padding: 36px 0;
}
.trust-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.82);
}
.trust-item svg { width: 30px; height: 30px; flex-shrink: 0; color: #fff; }
.trust-item p { font-size: 0.95rem; line-height: 1.4; }
.trust-item strong { color: #fff; }

/* ---------- Sections ---------- */
section h2 { margin-bottom: 10px; }
.section-sub { margin-bottom: 40px; font-size: 1.05rem; }

.services { padding: 96px 0; }

.service-single {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr;
  gap: 48px;
  background: var(--surface);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 44px 48px;
  align-items: center;
}
.service-single-info h3 { font-size: 1.5rem; margin-bottom: 12px; }
.service-desc { font-size: 1.02rem; max-width: 52ch; }

.service-includes {
  list-style: none;
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.service-includes li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.98rem;
  color: var(--ink);
}
.service-includes svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--gold-deep);
  margin-top: 2px;
}

.service-single-price {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  border-left: 1px solid var(--line);
  padding-left: 48px;
  align-self: stretch;
  justify-content: center;
}
.price {
  font-size: 3.4rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.duration { color: var(--body); font-size: 0.95rem; }
.service-single-price .btn { margin-top: 18px; }

/* ---------- How it works ---------- */
.how {
  padding: 96px 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.how h2 { margin-bottom: 48px; }
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.how-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--gold);
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 18px;
}
.how-step h3 { margin-bottom: 10px; }
.how-step p { font-size: 0.97rem; }

/* ---------- About ---------- */
.about { padding: 96px 0; }
.about-inner { max-width: 720px; }
.about-copy h2 { margin-bottom: 20px; }
.about-copy p { margin-bottom: 18px; }
.about-copy .btn { margin-top: 10px; }

/* ---------- Coverage ---------- */
.coverage {
  padding: 96px 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.coverage-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.coverage-chips li {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 20px;
  font-weight: 600;
  font-size: 0.93rem;
  color: var(--navy);
}
.coverage-chips .coverage-more {
  background: rgba(179, 146, 79, 0.1);
  border-color: var(--gold);
  color: var(--gold-deep);
}
.coverage-note { font-size: 0.97rem; }
.coverage-note a { color: var(--gold-deep); font-weight: 600; }

/* ---------- FAQs ---------- */
.faqs { padding: 96px 0; }
.faqs-inner { max-width: 780px; }
.faqs h2 { margin-bottom: 32px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  touch-action: manipulation;
  list-style: none;
  padding: 18px 22px;
  font-weight: 600;
  color: var(--ink);
  font-size: 1.02rem;
  position: relative;
  padding-right: 52px;
  transition: color 0.2s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--gold-deep);
  border-bottom: 2px solid var(--gold-deep);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.25s var(--ease);
}
.faq-item[open] summary { color: var(--gold-deep); }
.faq-item[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq-item p { padding: 0 22px 20px; font-size: 0.98rem; }

/* ---------- Contact ---------- */
.contact {
  padding: 96px 0;
  background: var(--navy);
}
.contact-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: start;
}
.contact-copy h2 { color: #fff; margin-bottom: 16px; }
.contact-copy p { color: rgba(255, 255, 255, 0.75); margin-bottom: 28px; max-width: 38ch; }
.contact-phone {
  display: inline-block;
  color: var(--gold);
  font-size: 1.8rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.contact-phone:hover { text-decoration: underline; }
.contact-phone-note {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
}

.contact-form {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-field { margin-bottom: 18px; display: flex; flex-direction: column; gap: 7px; }
.form-field label {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.92rem;
}
.optional { color: var(--body); font-weight: 400; }
.form-field input,
.form-field select,
.form-field textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  transition: border-color 0.2s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 3px solid rgba(179, 146, 79, 0.35);
  outline-offset: 1px;
  border-color: var(--gold);
}
.form-note {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--body);
  text-align: center;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.7);
  padding: 56px 0 28px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer .brand-text { color: #fff; font-size: 1.2rem; }
.footer-brand p { margin-top: 10px; font-size: 0.92rem; max-width: 34ch; }
.footer-contact { display: flex; flex-direction: column; gap: 8px; text-align: right; }
.footer-contact a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}
.footer-contact a:hover { text-decoration: underline; }
.footer-legal { padding-top: 24px; font-size: 0.85rem; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #trace { animation: none; stroke-dashoffset: 0; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .service-card { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero { padding: 48px 0 72px; }
  .service-single {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 30px 24px;
  }
  .service-single-price {
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 24px;
  }
  .trust-inner { grid-template-columns: 1fr; gap: 20px; }
  .how-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-inner { grid-template-columns: 1fr; gap: 40px; }
  .footer-contact { text-align: left; }
}

@media (max-width: 768px) {
  /* Tighter vertical rhythm on mobile */
  .services, .how, .about, .contact, .coverage, .faqs { padding: 64px 0; }
  .hero { padding: 40px 0 56px; }
  .hero-sub { font-size: 1.05rem; margin: 16px 0 26px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .section-sub { margin-bottom: 28px; }

  /* Floating chips become a static row under the ECG card
     (absolute positioning overlapped the card footer at small widths) */
  .hero-chip {
    position: static;
    box-shadow: none;
  }
  .hero-chips-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
  }

  .contact-phone { font-size: 1.5rem; }

  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  .nav.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 20px 24px;
    gap: 18px;
  }
  .nav.open .nav-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav.open .nav-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }

  .form-row { grid-template-columns: 1fr; gap: 0; }
  .contact-form { padding: 26px 20px; }
}
