/* Home page only. The page markup is inline-styled (design export), so this
   file holds what inline styles cannot: keyframes, hover states, and the
   phone / tablet overrides, which need !important to beat inline styles. */
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes ecgTrace { 0% { stroke-dashoffset: 2600; } 55% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; } }
@keyframes ecgFade { 0%,70% { opacity: 1; } 92%,100% { opacity: 0; } }
@keyframes ecgBlip { 0%,38%,60%,100% { opacity: 0; transform: scale(.6); } 46% { opacity: 1; transform: scale(1); } }

main.home { display: block; background: #fff; color: #16233d; overflow-x: hidden; }
main.home a { text-decoration: none; color: inherit; }
main.home img, main.home picture { max-width: 100%; }

/* hover states from the design */
.hv1:hover { transform: translateY(-4px) !important; box-shadow: 0 24px 40px -24px rgba(225,27,27,.35) !important; border-color: #f4d3d3 !important; }
.hv2:hover { border-color: #e11b1b !important; }
.hv3:hover { box-shadow: 0 26px 46px -24px rgba(22,35,61,.45) !important; border-color: #f4d3d3 !important; }

/* ECG history strip: left-aligned so the first screenshot stays reachable
   when the strip overflows; auto margins centre it when it does not. */
.history-track { justify-content: flex-start !important; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.history-track > :first-child { margin-left: auto; }
.history-track > :last-child { margin-right: auto; }
.history-track img { scroll-snap-align: center; }

/* Cardiologist portrait placeholder (until a photo is supplied) */
.portrait-card { position: absolute; inset: 0; border-radius: 28px; overflow: hidden; background: linear-gradient(160deg,#16233d 0%,#0f1c34 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; box-shadow: 0 30px 60px -36px rgba(22,35,61,.6); }
.portrait-card svg.trace { position: absolute; left: 0; right: 0; top: 58%; width: 100%; height: 120px; opacity: .12; }
.portrait-card .monogram { position: relative; width: 132px; height: 132px; border-radius: 50%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 48px; font-weight: 800; letter-spacing: -1px; }
.portrait-card .caption { position: relative; color: rgba(255,255,255,.72); font-size: 14px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  main.home h1 { font-size: 46px !important; letter-spacing: -1.3px !important; }
  main.home h2 { font-size: 34px !important; }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  main.home > section:not(.hero) { padding-left: 20px !important; padding-right: 20px !important; }
  main.home > section:not(.hero):not(.trust):not(.download-section) { padding-top: 56px !important; padding-bottom: 36px !important; }
  main.home > section.download-section { padding-bottom: 56px !important; }
  main.home .hero-inner { padding: 40px 20px 48px !important; gap: 28px !important; }
  main.home h1 { font-size: 38px !important; line-height: 1.1 !important; letter-spacing: -1.1px !important; }
  main.home h2 { font-size: 29px !important; line-height: 1.15 !important; letter-spacing: -.6px !important; }
  main.home .hero-lead { font-size: 17px !important; }
  main.home .hero-cta { height: 54px !important; padding: 0 22px !important; font-size: 16px !important; }
  main.home .device-card { flex: 0 1 calc(50% - 7px) !important; min-width: 0 !important; height: auto !important; min-height: 150px; padding: 18px 12px 16px !important; }
  main.home .device-panel { padding: 32px 18px 24px !important; }
  main.home .report-grid { gap: 32px !important; }
  main.home .report-card-body { padding: 20px 18px !important; }
  main.home .context-card { padding: 22px 18px !important; }
  main.home .security-panel { padding: 32px 20px !important; }
  main.home .security-panel h2 { font-size: 27px !important; }
  main.home .history-track img { height: 440px !important; }
  main.home .download-band { padding: 34px 24px !important; gap: 24px !important; }
  main.home .download-band h2 { font-size: 30px !important; }
  main.home .download-cta { height: 54px !important; padding: 0 22px !important; font-size: 16px !important; }
  main.home .faq-grid { gap: 12px !important; }
  main.home .faq-card { padding: 18px 18px !important; }
}
