/* Brand motion — selective red accents + luxury ECG (How + Newsletter only) */

/* —— ECG heartbeat —— */
.nv-ecg {
  display: block;
  width: min(100%, 260px);
  height: 32px;
  margin: 16px auto 0;
  overflow: visible;
  opacity: 0.85;
}

.nv-ecg--start {
  margin-inline: 0 auto;
}

.nv-ecg--compact {
  width: min(100%, 160px);
  height: 26px;
  margin-top: 10px;
}

.nv-ecg--wide {
  width: min(100%, 320px);
  height: 34px;
}

.nv-ecg__svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.nv-ecg__path,
.nv-ecg__glow {
  stroke-width: 1.8;
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
  fill: none;
}

.nv-ecg__path {
  stroke: var(--nv-primary);
}

.nv-ecg__glow {
  stroke: var(--nv-primary);
  stroke-width: 4;
  opacity: 0.16;
  filter: blur(1.5px);
}

.nv-ecg.is-playing .nv-ecg__path,
.nv-ecg.is-playing .nv-ecg__glow {
  animation: nv-ecg-draw 2.8s var(--nv-ease) infinite;
}

.nv-ecg--light .nv-ecg__path {
  stroke: #fff;
}

.nv-ecg--light .nv-ecg__glow {
  stroke: #fda4af;
  opacity: 0.4;
}

@keyframes nv-ecg-draw {
  0% {
    stroke-dashoffset: 320;
    opacity: 0.3;
  }
  40% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  70% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  100% {
    stroke-dashoffset: -320;
    opacity: 0.3;
  }
}

/* Soft pulse on medical icons */
.nv-pulse {
  animation: nv-heartbeat 1.8s ease-in-out infinite;
  transform-origin: center;
}

@keyframes nv-heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.07);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.05);
  }
  56% {
    transform: scale(1);
  }
}

/* —— Background rhythm: white / soft gray / selective red —— */
.nv-section--alt {
  background: var(--nv-surface-alt);
}

.nv-section--how {
  background: #fff;
}

.nv-section--guarantees {
  background: #fff;
}

.nv-trust-strip {
  background: var(--nv-surface);
  border-block: 1px solid var(--nv-border-rose);
  box-shadow: inset 0 -1px 0 rgba(225, 29, 72, 0.03);
}

.nv-footer__band {
  background:
    radial-gradient(800px 240px at 10% 0%, rgba(255, 255, 255, 0.14), transparent 55%),
    var(--nv-grad-footer-band);
}

.nv-stats-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.16), transparent 45%);
  pointer-events: none;
}

.nv-hero__pill {
  border-color: rgba(225, 29, 72, 0.14);
  background: #fff;
}

.nv-btn--primary {
  box-shadow: var(--nv-shadow-glow);
}

.nv-guarantee::before {
  background: linear-gradient(90deg, var(--nv-primary), #FB7185 55%, transparent);
}

.nv-guarantee__icon {
  box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.28);
}

.nv-guarantee.is-visible .nv-guarantee__icon--heart,
.nv-guarantee:hover .nv-guarantee__icon--heart {
  animation: nv-icon-ring 2.4s ease-out infinite;
}

@keyframes nv-icon-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.3);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(225, 29, 72, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(225, 29, 72, 0);
  }
}

/* —— Hero background: live medical-monitor ECG —— */
.nv-hero {
  position: relative;
}

.nv-hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.nv-hero__grid {
  position: relative;
  z-index: 1;
}

/* Hero ECG monitor — redesigned from scratch */
.nv-hero-monitor {
  --nv-monitor-bpm: 72;
  --nv-monitor-beat: calc(60s / var(--nv-monitor-bpm));
  --nv-monitor-scroll: 48s;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3%;
  height: clamp(26px, 3.2vw, 36px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.68;
}

.nv-hero-monitor__viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
}

.nv-hero-monitor__viewport::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, transparent 49.5%, rgba(225, 29, 72, 0.06) 49.5%, rgba(225, 29, 72, 0.06) 50.5%, transparent 50.5%);
  pointer-events: none;
}

.nv-hero-monitor__strip {
  display: flex;
  width: 200%;
  height: 100%;
  will-change: transform;
  animation: nv-monitor-scroll var(--nv-monitor-scroll) linear infinite;
}

.nv-hero-monitor__svg {
  display: block;
  flex: 0 0 50%;
  width: 50%;
  height: 100%;
  overflow: visible;
}

.nv-hero-monitor__line {
  fill: none;
  stroke: var(--nv-primary);
  stroke-width: 1.75;
  stroke-linecap: butt;
  stroke-linejoin: miter;
  stroke-miterlimit: 10;
  vector-effect: non-scaling-stroke;
}

.nv-hero-monitor__cursor {
  position: absolute;
  top: 8%;
  bottom: 8%;
  left: 72%;
  width: 2px;
  z-index: 2;
  background: var(--nv-primary);
  opacity: 0.55;
  transform-origin: center bottom;
  animation: nv-monitor-pulse var(--nv-monitor-beat) ease-out infinite;
}

.nv-hero-monitor__cursor::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 6px;
  height: 6px;
  margin: 0 0 -3px -3px;
  border-radius: 50%;
  background: var(--nv-primary);
  opacity: 0;
  animation: nv-monitor-dot var(--nv-monitor-beat) ease-out infinite;
}

@keyframes nv-monitor-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes nv-monitor-pulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scaleY(1);
  }
  8% {
    opacity: 1;
    transform: scaleY(1.06);
  }
  24% {
    opacity: 0.5;
    transform: scaleY(1);
  }
}

@keyframes nv-monitor-dot {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.6);
  }
  8% {
    opacity: 0.95;
    transform: scale(1.2);
  }
  28% {
    opacity: 0;
    transform: scale(0.8);
  }
}

.nv-hero.is-monitor-hover .nv-hero-monitor {
  opacity: 0.92;
}

.nv-hero.is-monitor-hover .nv-hero-monitor__strip {
  animation-duration: calc(var(--nv-monitor-scroll) * 0.82);
}

.nv-hero-monitor.is-surge {
  opacity: 1;
}

.nv-hero-monitor.is-surge .nv-hero-monitor__strip {
  animation-duration: calc(var(--nv-monitor-scroll) * 0.55);
}

.nv-hero-monitor.is-surge .nv-hero-monitor__cursor,
.nv-hero-monitor.is-surge .nv-hero-monitor__cursor::after {
  animation-duration: calc(var(--nv-monitor-beat) * 0.65);
}

@media (max-width: 1023px) {
  .nv-hero-monitor {
    bottom: 2.5%;
    height: 28px;
  }
}

@media (max-width: 767px) {
  .nv-ecg {
    width: min(100%, 180px);
    height: 28px;
  }

  .nv-ecg--wide {
    width: min(100%, 220px);
  }

  .nv-hero-monitor {
    bottom: 2%;
    height: 22px;
    opacity: 0.68;
  }

  .nv-hero-monitor__line {
    stroke-width: 1.45;
  }

  .nv-hero-monitor__cursor {
    left: 76%;
    width: 1.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nv-ecg__path,
  .nv-ecg__glow,
  .nv-pulse,
  .nv-guarantee__icon--heart {
    animation: none !important;
  }

  .nv-ecg__path,
  .nv-ecg__glow {
    stroke-dashoffset: 0;
    opacity: 1;
  }

  .nv-hero-monitor__strip,
  .nv-hero-monitor__cursor,
  .nv-hero-monitor__cursor::after {
    animation: none !important;
  }

  .nv-hero-monitor__cursor::after {
    display: none;
  }

  .nv-hero-monitor {
    opacity: 0.55;
  }
}
