/* ==========================================================================
   X-SEEK — Health Monitor
   Clean, sophisticated wellness dashboard: restrained red/coral, clean white,
   smooth trend lines. Not a clinical/hospital aesthetic.
   ========================================================================== */

body[data-app="health"] {
  background: var(--app-surface);
  color: var(--text-on-light);
}
body[data-app="health"] .eyebrow { color: var(--accent); }
body[data-app="health"] .site-nav.is-scrolled { background: color-mix(in srgb, var(--app-surface) 92%, transparent); border-bottom-color: var(--app-line); }
body[data-app="health"] .nav-links a { color: var(--text-on-light-muted); }
body[data-app="health"] .nav-links a:hover, body[data-app="health"] .nav-links a[aria-current="page"] { color: var(--text-on-light); }
body[data-app="health"] .nav-brand, body[data-app="health"] .nav-menu-btn { color: var(--text-on-light); }
body[data-app="health"] .nav-brand__mark { background: var(--ink-950); color: var(--paper-100); }
body[data-app="health"] .nav-menu-btn { border-color: var(--paper-line-strong); }
body[data-app="health"] .btn-primary { background: var(--accent); color: #fff; }
body[data-app="health"] .btn-ghost-dark { color: var(--text-on-light); border-color: var(--paper-line-strong); }
body[data-app="health"] .btn-ghost-dark:hover { background: rgba(0,0,0,0.03); }
body[data-app="health"] .section-title { color: var(--text-on-light); font-size: var(--fs-10); margin-top: var(--sp-2); }

/* ---- Hero: pulse line morphing into chart ----------------------------------*/

.health-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #fff5f4, var(--app-surface) 65%);
  padding-top: clamp(2rem, 1rem + 3vw, 3.5rem);
  padding-bottom: var(--sp-8);
}
.health-hero-inner {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--page-pad);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  min-height: 60vh;
}
.health-hero__title { font-size: var(--fs-11); line-height: 1.03; color: var(--text-on-light); max-width: 12ch; }
.health-hero__title .accent-word { color: var(--accent); }

.health-hero__appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: var(--sp-3);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--paper-line-strong));
  background: var(--accent-soft);
  color: var(--text-on-light);
  font-size: var(--fs-4);
}
.health-hero__appstore-badge svg { flex: none; color: var(--accent); }
.health-hero__appstore-badge strong { font-weight: 700; }

.health-hero__sub { margin-top: var(--sp-4); font-size: var(--fs-7); color: var(--text-on-light-muted); max-width: 44ch; line-height: 1.6; }
.health-hero__actions { margin-top: var(--sp-5); }
.health-hero__footnote { margin-top: var(--sp-3); font-size: var(--fs-4); color: var(--text-on-light-faint); }

.health-pulse-stage {
  position: relative;
  height: clamp(280px, 30vw, 380px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.health-pulse-svg { width: 100%; height: auto; overflow: visible; }
.health-pulse-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: pulse-draw 2.6s var(--ease-out) forwards, pulse-loop 2.2s ease-in-out 2.6s infinite;
}
@keyframes pulse-draw { to { stroke-dashoffset: 0; } }
@keyframes pulse-loop {
  0%, 100% { stroke-dashoffset: 0; }
  50% { stroke-dashoffset: -60; }
}
@media (prefers-reduced-motion: reduce) {
  .health-pulse-line { animation: none; stroke-dashoffset: 0; }
}
.health-pulse-device {
  position: absolute;
  right: 4%;
  bottom: -6%;
  width: clamp(140px, 20vw, 210px);
}
.health-pulse-device .device-frame { box-shadow: var(--shadow-2); }

@media (max-width: 980px) {
  .health-hero-inner { grid-template-columns: 1fr; min-height: auto; }
  .health-pulse-stage { order: -1; flex-direction: column; height: auto; padding-block: var(--sp-4) 0; }
  .health-pulse-svg { width: 80%; max-width: 320px; flex: none; }
  .health-pulse-device { position: static; width: 55%; max-width: 220px; flex: none; margin: var(--sp-4) auto 0; }
}

/* ---- How it works ---------------------------------------------------------*/

.health-how-grid {
  margin-top: var(--sp-6);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}
.health-how-step {
  padding: var(--sp-5);
  border-radius: var(--radius-md);
  background: var(--app-surface-raised);
  border: 1px solid var(--app-line);
  box-shadow: var(--shadow-1);
}
.health-how-step__icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  margin-bottom: var(--sp-3);
}
.health-how-step h3 { font-size: var(--fs-7); color: var(--text-on-light); }
.health-how-step p { margin-top: 0.5rem; font-size: var(--fs-5); color: var(--text-on-light-muted); line-height: 1.6; }
@media (max-width: 820px) { .health-how-grid { grid-template-columns: 1fr; } }

/* ---- Metric grid (dashboard tiles) ------------------------------------------*/

.health-metric-grid {
  margin-top: var(--sp-6);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
}
.health-metric {
  padding: var(--sp-4);
  border-radius: var(--radius-md);
  background: var(--app-surface-raised);
  border: 1px solid var(--app-line);
}
.health-metric__label { font-size: var(--fs-4); color: var(--text-on-light-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.health-metric__row { display: flex; align-items: baseline; gap: 0.4rem; margin-top: 0.5rem; }
.health-metric__value { font-family: var(--font-display); font-size: var(--fs-9); color: var(--text-on-light); }
.health-metric__unit { font-size: var(--fs-4); color: var(--text-on-light-faint); }
.health-metric svg { margin-top: var(--sp-2); width: 100%; height: 32px; color: var(--accent); }
@media (max-width: 880px) { .health-metric-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .health-metric-grid { grid-template-columns: 1fr; } }

/* ---- Feature row (Apple Health sync) ---------------------------------------*/

.health-sync-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  margin-top: var(--sp-6);
}
.health-sync-row__copy h3 { font-size: var(--fs-9); color: var(--text-on-light); max-width: 14ch; }
.health-sync-row__copy p { margin-top: var(--sp-3); color: var(--text-on-light-muted); font-size: var(--fs-7); line-height: 1.6; max-width: 46ch; }
.health-sync-row__list { margin-top: var(--sp-4); display: flex; flex-direction: column; gap: 0.7rem; }
.health-sync-row__list li { display: flex; gap: 0.65rem; font-size: var(--fs-5); color: var(--text-on-light-muted); align-items: center; }
.health-sync-row__list svg { color: var(--accent); flex: none; }
@media (max-width: 880px) { .health-sync-row { grid-template-columns: 1fr; } .health-sync-row__visual { order: -1; } }

/* ---- Showcase --------------------------------------------------------------*/

.health-showcase-grid {
  margin-top: var(--sp-6);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
}
.health-showcase-grid figcaption { margin-top: var(--sp-2); font-size: var(--fs-4); color: var(--text-on-light-muted); text-align: center; }
@media (max-width: 880px) { .health-showcase-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .health-showcase-grid { grid-template-columns: 1fr; } }

/* ---- Wellness disclaimer note ------------------------------------------------*/

.health-note {
  border-top: 1px solid var(--app-line);
  background: var(--app-surface-raised);
}
.health-note-inner {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  max-width: 70ch;
  margin-inline: auto;
}
.health-note svg { flex: none; color: var(--accent); margin-top: 3px; }
.health-note p { font-size: var(--fs-5); color: var(--text-on-light-muted); line-height: 1.6; }
.health-note p b { color: var(--text-on-light); font-weight: 600; }

/* ---- Final CTA ---------------------------------------------------------------*/

.health-final { text-align: center; border-top: 1px solid var(--app-line); }
.health-final h2 { font-size: var(--fs-10); color: var(--text-on-light); max-width: 16ch; margin-inline: auto; }
.health-final p { margin-top: var(--sp-3); color: var(--text-on-light-muted); }
.health-final .btn-row { justify-content: center; margin-top: var(--sp-5); }

body[data-app="health"] .switcher, body[data-app="health"] .site-footer { background: var(--ink-950); color: var(--text-on-dark); }
