/* ==========================================================================
   MedPal marketing site — shared styles for every page.
   Dark "night shift" theme: deep navy (from the logo's background), the
   logo's cyan as the one action colour, violet used sparingly. Textbook
   serif headings, plain sans body. Motion is handled in js/site.js and
   always respects prefers-reduced-motion.
   ========================================================================== */

:root {
  /* Surfaces */
  --bg: #0b1220;
  --bg-elevated: #111a2b;
  --bg-elevated-2: #18233a;
  --border: rgba(148, 170, 200, 0.14);
  --border-strong: rgba(148, 170, 200, 0.28);

  /* Text */
  --text: #e9eff7;
  --text-muted: #a3b3c7;
  --text-dim: #7d8ea4;

  /* Brand + module colours (names kept: pages and js/plans.js use them) */
  --cyan: #3cc4f0;        /* primary action, Introductory Module */
  --cyan-hover: #6ad3f5;
  --on-cyan: #04131d;
  --purple: #a58bf6;      /* Infection & Defense */
  --amber: #f2b552;       /* Bundle */
  --green: #4fd39b;       /* correct / confirmed */
  --red: #f47c7c;

  --cyan-tint: rgba(60, 196, 240, 0.12);
  --purple-tint: rgba(165, 139, 246, 0.14);
  --amber-tint: rgba(242, 181, 82, 0.14);
  --green-tint: rgba(79, 211, 155, 0.13);
  --red-tint: rgba(244, 124, 124, 0.13);

  --gradient: var(--cyan);
  --gradient-soft: var(--cyan-tint);

  --font-head: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-body: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;

  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 9px;
  --maxw: 1120px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; color-scheme: dark; }

/* Keep section headings clear of the sticky menu when jumping to them. */
section[id], header[id] { scroll-margin-top: 72px; }
#top { scroll-margin-top: 200px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* One soft light source behind the hero — not a neon wash. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 78% -8%, rgba(60, 196, 240, 0.10), transparent 70%),
    radial-gradient(700px 480px at -10% 30%, rgba(165, 139, 246, 0.05), transparent 70%);
}

h1, h2, h3 { font-family: var(--font-head); color: var(--text); }
h1, h2 { font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: rgba(60, 196, 240, 0.35); color: #fff; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
@media (max-width: 480px) { .wrap { padding: 0 16px; } }

.bg-glow, .bg-grid { display: none; }

.section-tag { font-size: 14px; font-weight: 600; color: var(--cyan); margin-bottom: 6px; }

/* ---------- scroll progress ---------- */

.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--cyan);
  z-index: 100;
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 0;
  background: rgba(11, 18, 32, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, padding 0.25s ease;
}

.nav.scrolled { border-bottom-color: var(--border); padding: 10px 0; }

.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.brand img {
  width: 34px; height: 34px;
  border-radius: 8px;
  /* One heartbeat ("lub-dub") when the page opens, and again on hover. */
  animation: heartbeat 1.3s 0.4s ease-in-out 1;
  transition: box-shadow 0.3s ease;
}
.brand:hover img {
  animation: heartbeat 1.3s ease-in-out infinite;
  box-shadow: 0 0 18px rgba(60, 196, 240, 0.55);
}

@keyframes heartbeat {
  0%   { transform: scale(1); }
  12%  { transform: scale(1.14); }
  24%  { transform: scale(1); }
  36%  { transform: scale(1.09); }
  52%, 100% { transform: scale(1); }
}

.nav-links {
  position: relative;
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a { position: relative; padding: 6px 0; transition: color 0.2s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }

/* Underline that grows on hover and stays under the current section. */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.3s var(--ease);
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

a.nav-cta { display: none; }

@media (min-width: 760px) {
  a.nav-cta { display: inline-flex; }
  .nav-links { display: flex; }
  .menu-btn { display: none; }
}

@media (max-width: 759px) {
  .nav-links { display: none; }
  .menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    border-radius: 999px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    color: var(--text);
    cursor: pointer;
  }
  .menu-btn svg { width: 20px; height: 20px; }
}

.mobile-menu { max-height: 0; overflow: hidden; transition: max-height 0.3s var(--ease); }
.mobile-menu.open { max-height: 380px; }
.mobile-menu-inner { display: grid; padding: 12px 0 8px; }
.mobile-menu-inner a {
  padding: 13px 2px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  border-top: 1px solid var(--border);
}
.mobile-menu-inner a:first-child { border-top: none; }
.mobile-menu-inner .btn { margin-top: 12px; border-top: none; color: var(--on-cyan); }

/* ---------- buttons ----------
   Fully rounded. On hover a soft light follows the cursor inside the
   button and a glow ring appears around it (cursor position is set by
   js/site.js as --bx / --by). Keyboard focus gets the same glow. */

.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.35s ease, transform 0.3s var(--ease);
  white-space: nowrap;
}

/* The light inside the button. */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(120px circle at var(--bx, 50%) var(--by, 50%), var(--btn-light, rgba(255, 255, 255, 0.55)), transparent 70%);
}
.btn:hover::before, .btn:focus-visible::before { opacity: 1; }

.btn:active { transform: scale(0.97); }

.btn-primary {
  --btn-light: rgba(255, 255, 255, 0.45);
  background: var(--cyan);
  color: var(--on-cyan);
  box-shadow: 0 0 0 0 rgba(60, 196, 240, 0), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--cyan-hover);
  box-shadow:
    0 0 0 4px rgba(60, 196, 240, 0.18),
    0 0 28px 2px rgba(60, 196, 240, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-ghost {
  --btn-light: rgba(60, 196, 240, 0.28);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover, .btn-ghost:focus-visible {
  border-color: rgba(60, 196, 240, 0.75);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(60, 196, 240, 0.10), 0 0 22px rgba(60, 196, 240, 0.25);
}

.btn:focus-visible { outline: none; }

.btn-block { width: 100%; }
.btn-lg { min-height: 50px; padding: 13px 28px; font-size: 16px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.btn[disabled]::before { display: none; }

/* ---------- reveal on scroll (added by js/site.js) ---------- */

.js-reveal {
  opacity: 0;
  transform: translateY(26px);
  /* !important so card hover transitions don't cancel the entrance;
     js/site.js removes this class once the entrance has finished. */
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease) !important;
  transition-delay: calc(var(--i, 0) * 90ms) !important;
}
.js-reveal.in { opacity: 1; transform: none; }

.reveal, .reveal.in { opacity: 1; transform: none; }

/* Hero headline: words rise in one after another on load. */
.hero-title .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.45em);
  animation: wordIn 0.8s var(--ease) forwards;
  animation-delay: calc(var(--i) * 70ms + 120ms);
}
@keyframes wordIn { to { opacity: 1; transform: none; } }

.hero-fade { opacity: 0; animation: fadeUp 0.9s var(--ease) forwards; animation-delay: var(--d, 0.5s); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- hero ---------- */

.hero { padding: 64px 0 88px; position: relative; }

.hero-grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 40px; } }

.hero h1 { font-size: clamp(38px, 5.2vw, 60px); margin: 0 0 22px; max-width: 17ch; }

.hero p.lead { font-size: 18px; color: var(--text-muted); max-width: 34em; margin: 0 0 32px; }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }

.hero-trust { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 15px; color: var(--text-muted); }
.hero-trust li { display: flex; align-items: center; gap: 10px; }
.hero-trust svg { width: 18px; height: 18px; color: var(--green); flex-shrink: 0; }

/* ---------- phone with a live sample question ---------- */

.phone-stage {
  position: relative;
  display: flex;
  justify-content: center;
  perspective: 1200px;
  padding: 10px 0;
}

.phone-tilt {
  /* No preserve-3d here: it breaks click targets inside the phone. */
  transition: transform 0.6s var(--ease);
  will-change: transform;
}

.phone {
  width: min(320px, 84vw);
  aspect-ratio: 9 / 19;
  border-radius: 44px;
  background: linear-gradient(160deg, #1c2740, #0a1120);
  border: 1px solid var(--border-strong);
  padding: 12px;
  box-shadow:
    0 50px 100px -40px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 80px -20px rgba(60, 196, 240, 0.30);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(1.5deg); }
  50% { transform: translateY(-14px) rotate(1.5deg); }
}

.phone-screen {
  position: relative;
  height: 100%;
  border-radius: 33px;
  background: var(--bg);
  overflow: hidden;
  padding: 40px 16px 16px;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  position: absolute;
  top: 11px; left: 50%;
  transform: translateX(-50%);
  width: 84px; height: 22px;
  border-radius: 14px;
  background: #02060d;
}

.app-bar {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.app-bar span:first-child { color: var(--purple); }

.app-progress { height: 4px; border-radius: 4px; background: var(--bg-elevated-2); margin-bottom: 16px; overflow: hidden; }
.app-progress span { display: block; height: 100%; width: 2%; background: var(--purple); border-radius: 4px; animation: progressIn 1.6s 0.8s var(--ease) forwards; }
@keyframes progressIn { to { width: 34%; } }

.exam-q { font-family: var(--font-head); font-size: 17px; line-height: 1.38; margin: 0 0 14px; }

.exam-options { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }

.exam-opt {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 7px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s var(--ease);
}

.exam-opt:hover:not([disabled]) { border-color: var(--cyan); transform: translateX(3px); box-shadow: 0 0 16px rgba(60, 196, 240, 0.22); }

.exam-opt .letter {
  width: 26px; height: 26px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-elevated-2);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  transition: background 0.2s ease, color 0.2s ease;
}

.exam-opt .mark { margin-left: auto; font-size: 12px; font-weight: 600; }

.exam-opt[disabled] { cursor: default; }
.exam-opt.is-correct { border-color: var(--green); background: var(--green-tint); animation: pop 0.45s var(--ease); }
.exam-opt.is-correct .letter { background: var(--green); color: #04130c; }
.exam-opt.is-correct .mark { color: var(--green); }
.exam-opt.is-wrong { border-color: var(--red); background: var(--red-tint); animation: shake 0.4s ease; }
.exam-opt.is-wrong .letter { background: var(--red); color: #1d0505; }
.exam-opt.is-wrong .mark { color: var(--red); }

@keyframes pop { 40% { transform: scale(1.04); } 100% { transform: none; } }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

.exam-hint { margin: 12px 0 0; font-size: 12.5px; color: var(--text-dim); text-align: center; }

.exam-explain {
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--green);
  background: var(--bg-elevated);
  border-radius: 0 10px 10px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  animation: fadeUp 0.5s var(--ease);
}
.exam-explain strong { color: var(--text); }

.phone-float {
  position: absolute;
  display: flex;
  align-items: center;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: rgba(17, 26, 43, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 10px 13px;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

.phone-float svg { width: 16px; height: 16px; flex-shrink: 0; }
.phone-float-inner { display: inline-flex; align-items: center; gap: 8px; transition: opacity 0.3s ease, transform 0.3s ease; }
.phone-float-inner.swap { opacity: 0; transform: translateY(4px); }

.phone-float.f1 { top: 10%; left: 0; animation: floatSlow 5s ease-in-out infinite; }
.phone-float.f2 { bottom: 14%; right: 0; animation: floatSlow 5.5s ease-in-out infinite reverse; }

@media (min-width: 1100px) {
  .phone-float.f1 { left: -2%; }
  .phone-float.f2 { right: -2%; }
}
@media (max-width: 420px) { .phone-float { display: none; } }

@keyframes floatSlow { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- facts strip ---------- */

.facts { padding: 30px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: rgba(17, 26, 43, 0.5); }

.facts-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 32px;
}
@media (min-width: 860px) { .facts-list { grid-template-columns: repeat(4, 1fr); } }

.facts-list b {
  display: block;
  font-family: var(--font-head);
  font-size: 30px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: lining-nums tabular-nums;
}
.facts-list span { font-size: 14.5px; color: var(--text-muted); }

/* ---------- section shell ---------- */

.section { padding: 100px 0; }
.section-tight { padding: 72px 0; }
.section-alt { background: rgba(17, 26, 43, 0.55); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { max-width: 640px; margin: 0 0 48px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 42px); margin: 0 0 12px; }
.section-head p { color: var(--text-muted); font-size: 17px; margin: 0; }

/* ---------- spotlight: a soft light follows the cursor inside cards ---------- */

.spotlight { position: relative; }
.spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(60, 196, 240, 0.10), transparent 60%);
}
.spotlight:hover::before { opacity: 1; }

/* ---------- features ---------- */

.feature-groups { display: grid; gap: 24px; }
@media (min-width: 860px) { .feature-groups { grid-template-columns: repeat(2, 1fr); } }

.feature-group {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px 26px 6px;
  transition: border-color 0.3s ease;
}
.feature-group:hover { border-color: var(--border-strong); }

.feature-group h3 {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--cyan);
  margin: 0;
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--border);
}

.feature-list { list-style: none; margin: 0; padding: 0; }

.feature-list li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 4px 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.feature-list li:last-child { border-bottom: none; }

.feature-list svg {
  width: 40px; height: 40px;
  padding: 9px;
  border-radius: 11px;
  background: var(--cyan-tint);
  color: var(--cyan);
  grid-row: span 2;
  transition: transform 0.4s var(--ease), background 0.3s ease, color 0.3s ease;
}
.feature-list li:hover svg { transform: rotate(-8deg) scale(1.1); background: var(--cyan); color: var(--on-cyan); }

.feature-list h4 { margin: 0; font-family: var(--font-head); font-size: 19px; font-weight: 600; transition: color 0.2s ease; }
.feature-list li:hover h4 { color: var(--cyan); }
.feature-list p { grid-column: 2; margin: 0; font-size: 15.5px; color: var(--text-muted); max-width: 46ch; }

/* ---------- how it works ---------- */

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 36px; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; } }

.step { position: relative; padding-top: 22px; }

/* Line above each step draws itself in when the step scrolls into view. */
.step::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--border-strong);
}
.step::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 1s var(--ease);
  transition-delay: calc(var(--i, 0) * 250ms + 200ms);
}
.step.in::after { transform: scaleX(1); }

.step-num { font-family: var(--font-head); font-size: 44px; font-weight: 600; line-height: 1; color: var(--cyan); margin-bottom: 14px; }
.step h3 { font-size: 21px; font-weight: 600; margin: 0 0 8px; }
.step p { font-size: 15.5px; color: var(--text-muted); margin: 0; }
.step p b { color: var(--text); }

/* ---------- modules / pricing ---------- */

.modules-grid { display: grid; grid-template-columns: 1fr; gap: 22px; align-items: stretch; }
@media (min-width: 760px) { .modules-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .modules-grid { grid-template-columns: repeat(3, 1fr); } }

.module-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
  /* No preserve-3d: it breaks clicks on the button inside the tilted card. */
  transition: transform 0.4s var(--ease), border-color 0.3s ease, box-shadow 0.4s ease;
}

.module-card.cyan { --accent: var(--cyan); --accent-tint: var(--cyan-tint); --accent-rgb: 60, 196, 240; }
.module-card.purple { --accent: var(--purple); --accent-tint: var(--purple-tint); --accent-rgb: 165, 139, 246; }
.module-card.amber { --accent: var(--amber); --accent-tint: var(--amber-tint); --accent-rgb: 242, 181, 82; }

.module-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--accent-rgb), 0.13), transparent 60%);
}
.module-card:hover { border-color: rgba(var(--accent-rgb), 0.6); box-shadow: 0 30px 60px -30px rgba(var(--accent-rgb), 0.45); }
.module-card:hover::before { opacity: 1; }

/* Recommended bundle: a slowly rotating light runs around its border. */
@property --angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

.module-card.amber {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg-elevated), var(--bg-elevated)) padding-box,
    conic-gradient(from var(--angle), rgba(242, 181, 82, 0.15), var(--amber), rgba(242, 181, 82, 0.15) 30%, rgba(242, 181, 82, 0.15)) border-box;
  animation: spinBorder 6s linear infinite;
}
@keyframes spinBorder { to { --angle: 360deg; } }

.module-glow { display: none; }

.module-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 16px;
  background: var(--accent-tint, var(--cyan-tint));
  color: var(--accent, var(--cyan));
}

.module-card h3 { font-size: 24px; font-weight: 600; margin: 0 0 6px; }
.module-card .module-desc { color: var(--text-muted); font-size: 15px; margin: 0 0 22px; }

.module-price {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 0;
  margin-bottom: 20px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.module-price .price-row { display: flex; align-items: baseline; gap: 6px; }
.module-price .price-sub { display: flex; align-items: center; gap: 8px; }
.module-price .amount { font-family: var(--font-head); font-size: 36px; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }
.module-price .period { color: var(--text-muted); font-size: 15px; }

.price-original { text-decoration: line-through; color: var(--text-dim); font-size: 15px; }
.price-save {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-tint);
  padding: 2px 9px;
  border-radius: 999px;
}

.module-list { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 10px; flex: 1; }
.module-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; color: var(--text); }
.module-list svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px; color: var(--accent, var(--green)); }

/* ---------- FAQ ---------- */

.faq { max-width: 780px; display: grid; gap: 10px; }

.faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.25s ease, background 0.25s ease;
}
.faq-item:hover { border-color: var(--border-strong); }
.faq-item.open { border-color: rgba(60, 196, 240, 0.45); background: var(--bg-elevated-2); }

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-head);
  font-size: 18.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.faq-q .chev { width: 20px; height: 20px; flex-shrink: 0; color: var(--text-muted); transition: transform 0.3s var(--ease), color 0.2s ease; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); color: var(--cyan); }

.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease); }
.faq-a-inner { padding: 0 22px 22px; color: var(--text-muted); font-size: 16px; max-width: 62ch; }
.faq-item.open .faq-a { max-height: 320px; }

/* ---------- closing band ---------- */

.cta-band {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 20px;
  align-items: center;
  border-radius: 20px;
  padding: 40px;
  background: linear-gradient(135deg, #12304a, #0f1b33 60%);
  border: 1px solid rgba(60, 196, 240, 0.3);
}
@media (min-width: 760px) { .cta-band { grid-template-columns: 1fr auto; padding: 52px 56px; } }

.cta-band h2 { font-size: clamp(26px, 3vw, 36px); margin: 0 0 6px; }
.cta-band p { color: var(--text-muted); font-size: 17px; margin: 0; }

/* ---------- footer ---------- */

.footer { padding: 56px 0 32px; border-top: 1px solid var(--border); background: #080e1a; }

.footer-grid { display: grid; gap: 32px; margin-bottom: 40px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }

.footer-brand p { color: var(--text-muted); font-size: 15px; max-width: 300px; margin: 14px 0 0; }

.footer-col h4 { font-size: 14px; font-weight: 600; color: var(--text); margin: 0 0 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--text-muted); font-size: 15px; transition: color 0.2s ease, padding 0.25s var(--ease); }
.footer-col a:hover { color: var(--cyan); padding-left: 4px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-dim);
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(16px);
  background: var(--bg-elevated-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 13px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 20px 50px -16px rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 200;
  max-width: min(420px, calc(100vw - 32px));
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast svg { width: 18px; height: 18px; color: var(--green); flex-shrink: 0; }

/* ---------- plans / checkout pages ---------- */

.checkout-shell { padding: 48px 0 96px; }
.checkout-grid { display: grid; gap: 24px; }
@media (min-width: 900px) { .checkout-grid { grid-template-columns: 1fr 1fr; align-items: start; } }

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
@media (max-width: 480px) { .card { padding: 20px; } }

.module-toggle {
  display: flex;
  flex-wrap: wrap;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 24px;
}

.module-toggle button {
  flex: 1 1 auto;
  min-height: 44px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.3s ease;
}
.module-toggle button:hover { color: var(--text); background: var(--bg-elevated-2); }
.module-toggle button.active.im { background: var(--cyan); color: var(--on-cyan); box-shadow: 0 0 18px rgba(60, 196, 240, 0.35); }
.module-toggle button.active.id { background: var(--purple); color: #120a2a; box-shadow: 0 0 18px rgba(165, 139, 246, 0.35); }
.module-toggle button.active.bundle { background: var(--amber); color: #241703; box-shadow: 0 0 18px rgba(242, 181, 82, 0.35); }

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.summary-row:last-of-type { border-bottom: none; }
.summary-row .label { color: var(--text-muted); }
.summary-row .value { font-weight: 600; text-align: right; }
.summary-row .value.big { font-family: var(--font-head); font-size: 28px; }

.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--amber-tint);
  color: var(--amber);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}
.coming-soon-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }

.field-label { display: block; font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; }

.field-input {
  width: 100%;
  min-height: 46px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field-input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-tint); }
.field-input::placeholder { color: var(--text-dim); }

.field-hint { font-size: 14px; color: var(--text-muted); margin-top: 8px; line-height: 1.55; }
.field-hint b { color: var(--text); }

.divider { height: 1px; background: var(--border); margin: 22px 0; }

.soon-panel {
  display: none;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--cyan-tint);
  border-left: 3px solid var(--cyan);
  font-size: 15px;
  color: var(--text);
  align-items: flex-start;
  gap: 10px;
}
.soon-panel.show { display: flex; }
.soon-panel svg { width: 20px; height: 20px; color: var(--cyan); flex-shrink: 0; margin-top: 2px; }

.trust-mini { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 20px; font-size: 14px; color: var(--text-muted); }
.trust-mini span { display: inline-flex; align-items: center; gap: 6px; }
.trust-mini svg { width: 15px; height: 15px; color: var(--green); }

.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 15px; font-weight: 500; margin-bottom: 28px; transition: color 0.2s ease; }
.back-link svg { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.back-link:hover { color: var(--cyan); }
.back-link:hover svg { transform: translateX(-4px); }

.included-card ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.included-card li { display: flex; gap: 10px; font-size: 15px; align-items: flex-start; }
.included-card svg { width: 18px; height: 18px; color: var(--green); flex-shrink: 0; margin-top: 3px; }

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .js-reveal, .hero-title .w, .hero-fade { opacity: 1 !important; transform: none !important; }
}

/* ---------- hero heartbeat trace ---------- */

.hero { overflow: hidden; }
.hero > .wrap { position: relative; z-index: 1; }

.ecg {
  position: absolute;
  left: 0; right: 0;
  bottom: 18px;
  width: 100%;
  height: 120px;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}

.ecg path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.ecg-base {
  stroke: rgba(60, 196, 240, 0.22);
  stroke-width: 1.5;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: ecgDraw 2.6s 0.3s cubic-bezier(.45, 0, .2, 1) forwards;
}

.ecg-pulse {
  stroke: var(--cyan);
  stroke-width: 2.5;
  stroke-dasharray: 0.07 0.93;
  stroke-dashoffset: 1.07;
  opacity: 0;
  filter: drop-shadow(0 0 6px rgba(60, 196, 240, 0.9));
  animation: ecgPulse 4.2s 2.9s linear infinite;
}

@keyframes ecgDraw { to { stroke-dashoffset: 0; } }
@keyframes ecgPulse {
  0%   { stroke-dashoffset: 1.07; opacity: 1; }
  90%  { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

@media (max-width: 760px) { .ecg { height: 80px; bottom: 8px; } }

@media (prefers-reduced-motion: reduce) {
  .ecg-base { stroke-dashoffset: 0; animation: none; }
  .ecg-pulse { display: none; }
}

/* ---------- heartbeat rings behind the phone ----------
   Layers of rings travel outward on a loop, like a pulse spreading from
   the screen. Alternating tones give depth; they fade at the edge. */

.pulse-rings {
  position: absolute;
  left: 50%; top: 50%;
  width: 0; height: 0;
  z-index: -1;
  pointer-events: none;
}

.pulse-rings span {
  position: absolute;
  left: -260px; top: -260px;
  width: 520px; height: 520px;
  border-radius: 50%;
  border: 1px solid rgba(60, 196, 240, 0.22);
  background: radial-gradient(circle, transparent 58%, rgba(60, 196, 240, 0.05) 70%, transparent 71%);
  opacity: 0;
  transform: scale(0.35);
  animation: ringOut 7.2s linear infinite;
  animation-delay: calc(var(--r) * -1.2s);
}
.pulse-rings span:nth-child(even) { border-color: rgba(165, 139, 246, 0.16); }

@keyframes ringOut {
  0%   { transform: scale(0.35); opacity: 0; }
  12%  { opacity: 0.9; }
  70%  { opacity: 0.35; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* The phone "pops" in once on load, like the example's arch. */
.phone-stage.hero-fade .phone-tilt { animation: popIn 0.9s 0.6s var(--ease) backwards; }
@keyframes popIn { from { transform: scale(0.9); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 760px) {
  .pulse-rings span { left: -180px; top: -180px; width: 360px; height: 360px; }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-rings { display: none; }
}

/* ---------- hero headline: bold sans with gradient phrase ---------- */

.hero h1.hero-title {
  font-family: 'Inter', var(--font-body);
  font-weight: 800;
  font-size: clamp(36px, 5.4vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  max-width: 13ch;
}

.hero-title .grad {
  background: linear-gradient(135deg, #22d3ee, #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* After js/site.js splits the headline into words, each gradient word
   carries its own slice of the same sweep. */
.hero-title .grad-w {
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-image: linear-gradient(135deg, #22d3ee, #8b5cf6);
}
.hero-title .grad-w.g0.of2 { background-image: linear-gradient(135deg, #22d3ee, #5697f2); }
.hero-title .grad-w.g1.of2 { background-image: linear-gradient(135deg, #5697f2, #8b5cf6); }
.hero-title .nowrap { white-space: nowrap; }

/* ==========================================================================
   Heart-monitor theme across the whole page
   - Monitor-paper squares (small 1 mm-style squares inside bigger ones)
     run behind every section, so the page reads as one continuous strip.
   - No hard separator lines between sections: sections share one surface.
   - A heartbeat trace sits between sections; its pulse runs while that
     part of the page is on screen (added by js/site.js).
   ========================================================================== */

body { position: relative; }

body::before {
  position: absolute;
  inset: 0;
  height: 100%;
  background-image:
    linear-gradient(rgba(60, 196, 240, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(60, 196, 240, 0.075) 1px, transparent 1px),
    linear-gradient(rgba(60, 196, 240, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(60, 196, 240, 0.03) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  background-position: center top;
  /* Fade the paper out towards the left/right edges. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}

/* Remove full-width separator lines and two-tone section bands. */
.nav, .nav.scrolled { border-bottom-color: transparent; }
.nav.scrolled { box-shadow: 0 14px 30px -24px rgba(0, 0, 0, 0.9); }
.facts { border-top: 0; border-bottom: 0; background: transparent; }
.section-alt { background: transparent; border-top: 0; border-bottom: 0; }
.footer {
  border-top: 0;
  background: linear-gradient(to bottom, rgba(8, 14, 26, 0), #080e1a 120px);
}
.footer-bottom { border-top: 0; }

/* Heartbeat traces between sections. */
.ecg-divider {
  position: relative;
  height: 110px;
  margin: -55px 0;
  z-index: 0;
  pointer-events: none;
}
.ecg-divider svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ecg-divider path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ecg-divider .ecg-base {
  stroke: rgba(60, 196, 240, 0.28);
  stroke-width: 1.5;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: none;
  -webkit-mask-image: none;
}
.ecg-divider .ecg-pulse { animation: none; opacity: 0; }
.ecg-divider.live .ecg-base { animation: ecgDraw 2.2s cubic-bezier(.45, 0, .2, 1) forwards; }
.ecg-divider.live .ecg-pulse { animation: ecgPulse 4.2s 1.8s linear infinite; }
.ecg-divider { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }

.section, .facts, .footer, .section-tight { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .ecg-divider .ecg-base { stroke-dashoffset: 0; animation: none !important; }
  .ecg-divider .ecg-pulse { display: none; }
}
.ecg-divider.paused .ecg-pulse { animation-play-state: paused; }
