/* =====================================================================
   MediWatch — AI & IoT Smart Healthcare Wearable
   Design system: dark neon health-tech (Neoconda-inspired)
   Self-contained, no framework dependencies.
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Brand — cyan/teal neon on near-black */
  --brand:      #2dd4bf;
  --brand-2:    #22e5c9;
  --brand-600:  #14b8a6;
  --brand-700:  #0d9488;
  --blue:       #4f8dff;
  --blue-2:     #7aa5ff;
  --safe:       #34d399;
  --alert:      #ff5c73;
  --amber:      #fbbf24;
  --violet:     #a78bfa;

  /* Ink & surfaces (dark-first) */
  --ink:        #eaf3f6;
  --ink-2:      #c3d6e0;
  --muted:      #83a0af;
  --line:       rgba(255,255,255,.09);
  --line-2:     rgba(255,255,255,.15);
  --bg:         #05080c;
  --bg-2:       #080d14;
  --surface:    rgba(255,255,255,.035);
  --surface-2:  rgba(255,255,255,.055);
  --night:      #030609;

  /* Effects */
  --grad-brand: linear-gradient(135deg, #2dd4bf 0%, #4f8dff 100%);
  --grad-hero:  radial-gradient(1100px 560px at 12% -10%, rgba(45,212,191,.16) 0%, transparent 60%),
                radial-gradient(900px 520px at 108% 8%, rgba(79,141,255,.16) 0%, transparent 55%),
                linear-gradient(160deg, #05080c 0%, #060a10 100%);
  --glow-brand: 0 0 0 1px rgba(45,212,191,.25), 0 0 34px rgba(45,212,191,.18);
  --shadow-sm:  0 1px 2px rgba(0,0,0,.3), 0 2px 10px rgba(0,0,0,.28);
  --shadow:     0 10px 34px rgba(0,0,0,.4);
  --shadow-lg:  0 26px 70px rgba(0,0,0,.55);
  --ring:       0 0 0 4px rgba(45,212,191,.18);

  --radius:     18px;
  --radius-sm:  12px;
  --radius-lg:  28px;
  --container:  1160px;

  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --font-head: "General Sans", var(--font);
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* theme-dependent surface tokens (dark defaults; overridden under [data-theme="light"]) */
  --grid-dot:        rgba(255,255,255,.06);
  --nav-bg:          rgba(5,8,12,.72);
  --nav-bg-scrolled: rgba(5,8,12,.92);
  --mobile-nav-bg:   rgba(5,8,12,.98);
  --input-bg:        rgba(255,255,255,.03);
  --select-bg:       #0a0f16;
}

/* ---------- Light theme override ---------- */
:root[data-theme="light"] {
  --ink:        #0b1f2a;
  --ink-2:      #33505f;
  --muted:      #667e8a;
  --line:       rgba(11,31,42,.10);
  --line-2:     rgba(11,31,42,.18);
  --bg:         #f5f9fa;
  --bg-2:       #eef4f5;
  --surface:    #ffffff;
  --surface-2:  #eef4f5;

  --shadow-sm:  0 1px 2px rgba(16,40,50,.05), 0 2px 10px rgba(16,40,50,.05);
  --shadow:     0 10px 34px rgba(16,40,50,.10);
  --shadow-lg:  0 26px 70px rgba(16,40,50,.16);

  --grid-dot:        rgba(11,31,42,.07);
  --nav-bg:          rgba(255,255,255,.78);
  --nav-bg-scrolled: rgba(255,255,255,.94);
  --mobile-nav-bg:   #ffffff;
  --input-bg:        #ffffff;
  --select-bg:       #ffffff;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink-2);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
/* fixed dot-grid backdrop across the whole site */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 28px 28px;
  transition: background-image .2s;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.9), rgba(0,0,0,.35) 60%, transparent 100%);
          mask-image: linear-gradient(180deg, rgba(0,0,0,.9), rgba(0,0,0,.35) 60%, transparent 100%);
}
body > * { position: relative; z-index: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.02em; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.85rem, 3.6vw, 3rem); }
h3 { font-size: 1.28rem; }
p  { margin: 0 0 1rem; color: var(--muted); }
strong { color: var(--ink); }
::selection { background: rgba(45,212,191,.32); color: #fff; }

/* ---------- Scroll progress bar ---------- */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0%; z-index: 100; background: var(--grad-brand); box-shadow: 0 0 12px rgba(45,212,191,.6); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 22px; }
.section { padding: 88px 0; }
.section--tight { padding: 60px 0; }
.center { text-align: center; }
.grid { display: grid; gap: 26px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Eyebrow / section head ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-weight: 500; font-size: .76rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--brand-2);
  background: rgba(45,212,191,.08); border: 1px solid rgba(45,212,191,.22);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.eyebrow.on-dark { color: var(--brand-2); background: rgba(45,212,191,.08); border-color: rgba(45,212,191,.22); }
.section-head { max-width: 720px; margin: 0 auto 54px; }
.section-head.center { text-align: center; }
.section-head p { font-size: 1.08rem; }
.lead { font-size: 1.15rem; color: var(--ink-2); }

/* ---------- Buttons ---------- */
.btn {
  --_bg: var(--grad-brand);
  display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; white-space: nowrap;
  font-family: var(--font-head); font-weight: 600; font-size: .96rem;
  padding: 13px 26px; border-radius: 999px; border: 0; cursor: pointer;
  background-image: var(--_bg); color: #04120f; box-shadow: 0 10px 28px rgba(45,212,191,.28), var(--glow-brand);
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(45,212,191,.4), var(--glow-brand); }
.btn--ghost {
  background: transparent; color: var(--ink); box-shadow: none;
  border: 1.5px solid var(--line-2); background-image: none;
}
.btn--ghost:hover { border-color: var(--brand); color: var(--brand-2); box-shadow: none; }
.btn--on-dark { background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.18); box-shadow: none; color: #fff; background-image: none; }
.btn--on-dark:hover { background: rgba(255,255,255,.12); }
.btn--lg { padding: 16px 32px; font-size: 1.04rem; }

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: var(--nav-bg); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent; transition: box-shadow .2s, border-color .2s, background .2s;
}
.nav.scrolled { box-shadow: var(--shadow-sm); border-color: var(--line); background: var(--nav-bg-scrolled); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--ink); letter-spacing: -.02em; }
.brand__mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--grad-brand); box-shadow: 0 0 0 1px rgba(45,212,191,.3), 0 6px 20px rgba(45,212,191,.35); flex: 0 0 auto;
}
.brand__mark svg { width: 22px; height: 22px; }
.brand small { display: block; font-family: var(--font-mono); font-size: .58rem; letter-spacing: .2em; color: var(--muted); font-weight: 500; }
.nav__links { display: flex; align-items: center; gap: 2px; flex-shrink: 1; min-width: 0; }
.nav__links a {
  font-family: var(--font-mono); font-weight: 500; font-size: .82rem; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-2);
  padding: 9px 10px; border-radius: 10px; transition: background .15s, color .15s; white-space: nowrap;
}
.nav__links a:hover { background: rgba(255,255,255,.06); color: var(--brand-2); }
.nav__links a.active { color: var(--brand-2); }
.nav__cta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav__cta .btn { padding: 11px 18px; }
.brand { flex-shrink: 0; }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: .25s; }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; flex: 0 0 auto;
  background: rgba(255,255,255,.05); border: 1px solid var(--line-2);
  color: var(--ink); cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.theme-toggle:hover { border-color: var(--brand); color: var(--brand-2); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun, .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--grad-hero); color: var(--ink); overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .6;
}
.hero__inner {
  position: relative; z-index: 2; display: grid;
  grid-template-columns: 1.05fr .95fr;
  grid-template-areas: "top watch" "bottom watch";
  column-gap: 48px; row-gap: 0;
  padding: 92px 0 100px;
}
.hero__copy-top { grid-area: top; }
.hero__copy-bottom { grid-area: bottom; align-self: end; }
.hero h1 { color: #fff; }
.hero h1 .grad { background: linear-gradient(90deg,var(--brand-2),var(--blue-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero h1 .word { display: inline-block; will-change: transform, opacity; }
.hero h1 .type-accent { color: var(--brand-2); }
.hero h1 .type-cursor { display: inline-block; width: 3px; height: .85em; margin-left: 2px; background: var(--brand-2); vertical-align: -.1em; }
.hero h1 .type-cursor.blink { animation: type-cursor-blink 1s step-end infinite; }
@keyframes type-cursor-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.hero p { color: #fff; font-size: 1.18rem; max-width: 560px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 26px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 22px; color: var(--muted); font-size: .9rem; }
.hero__trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero__trust svg { width: 16px; height: 16px; color: var(--brand-2); }

/* ---------- Hero / page-hero photo crossfade background ---------- */
.hero-bg-slides { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-bg-slides__img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0;
  animation-name: hero-slide-fade;
  animation-duration: var(--hero-cycle, 36s);
  animation-iteration-count: infinite;
}
.hero-bg-slides__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(4,7,10,.78) 0%, rgba(5,9,14,.52) 45%, rgba(4,7,10,.8) 100%);
}
/* Default/fallback timing (9 slides @ 4s) — pages override with exact
   percentages for their own photo count via an inline <style> block,
   since @keyframes offsets can't reference CSS custom properties. */
@keyframes hero-slide-fade {
  0%, 100% { opacity: 0; }
  2.778%   { opacity: 1; }
  13.889%  { opacity: 1; }
  16.667%  { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg-slides__img { animation: none; }
  .hero-bg-slides__img:first-child { opacity: 1; }
}

/* ---------- Watch mockup ---------- */
.watch-wrap { grid-area: watch; position: relative; display: grid; place-items: center; align-self: center; }
.watch {
  position: relative; width: 240px; height: 292px; border-radius: 56px;
  background: linear-gradient(160deg,#0d1c26,#060f16); padding: 18px;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255,255,255,.05), 0 0 60px rgba(45,212,191,.12);
  will-change: transform;
}
.watch::before, .watch::after { /* watch band */
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  width: 128px; height: 70px; background: linear-gradient(#0f2530,#081319); z-index: -1;
}
.watch::before { top: -54px; border-radius: 22px 22px 8px 8px; }
.watch::after { bottom: -54px; border-radius: 8px 8px 22px 22px; }
.watch__screen {
  height: 100%; border-radius: 42px; background: radial-gradient(120% 120% at 30% 0%, #0a2e30, #030c10);
  border: 1px solid rgba(45,212,191,.22); padding: 20px 18px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: inset 0 0 30px rgba(45,212,191,.14);
}
.watch__time { display: flex; justify-content: space-between; align-items: center; color: var(--brand-2); font-size: .72rem; font-family: var(--font-mono); }
.watch__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--safe); box-shadow: 0 0 10px var(--safe); animation: pulse 1.6s infinite; }
.watch__bpm { text-align: center; margin-top: 4px; }
.watch__bpm b { font-family: var(--font-mono); font-size: 2.4rem; color: #fff; line-height: 1; }
.watch__bpm b span { font-size: .9rem; color: var(--brand-2); }
.watch__bpm small { font-family: var(--font-mono); color: #6fa2ad; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; }
.watch__ecg { height: 34px; }
.watch__ecg svg { width: 100%; height: 100%; }
.watch__ecg path { stroke: var(--brand-2); stroke-width: 2; fill: none; stroke-dasharray: 300; stroke-dashoffset: 300; animation: ecg 2.4s linear infinite; filter: drop-shadow(0 0 4px rgba(45,212,191,.6)); }
.watch__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.watch__stat { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); border-radius: 12px; padding: 7px 9px; }
.watch__stat b { color: #fff; font-size: .95rem; font-family: var(--font-mono); }
.watch__stat small { font-family: var(--font-mono); color: #6fa2ad; font-size: .58rem; display: block; letter-spacing: .08em; text-transform: uppercase; }

/* floating alert chips around watch */
.chip {
  position: absolute; display: flex; align-items: center; gap: 9px; z-index: 3;
  background: rgba(10,16,22,.92); color: var(--ink); border: 1px solid var(--line-2); border-radius: 14px;
  padding: 10px 14px; box-shadow: var(--shadow-lg); font-size: .82rem; font-weight: 600;
  font-family: var(--font-head); animation: float 4s ease-in-out infinite; max-width: 190px;
  backdrop-filter: blur(10px);
}
.chip small { display: block; color: var(--muted); font-weight: 500; font-size: .7rem; }
.chip__ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; }
.chip__ic svg { width: 16px; height: 16px; }
.chip--tl { top: 8%; left: 0; }
.chip--ml { top: 46%; left: 0; animation-delay: 2.1s; }
.chip--br { bottom: 12%; right: 0; animation-delay: 1.2s; }
@media (max-width: 560px) {
  /* Shrink the watch so there's a real gutter on each side, then size the
     chips to whatever that gutter actually is (never more) — so they stay
     beside the watch, like on desktop, but can never overlap it. */
  .watch { width: 200px; height: 244px; padding: 15px; }
  .watch::before, .watch::after { width: 106px; height: 58px; }
  .watch::before { top: -45px; }
  .watch::after { bottom: -45px; }
  .watch__bpm b { font-size: 2rem; }
  .chip {
    max-width: max(54px, min(150px, calc((100vw - 44px - 200px) / 2 - 10px)));
    padding: 7px 9px; font-size: .68rem; gap: 6px;
  }
  .chip small { display: none; }
  .chip__ic { width: 22px; height: 22px; }
  .chip__ic svg { width: 13px; height: 13px; }
}
.ic-safe  { background: rgba(52,211,153,.14); color: var(--safe); }
.ic-alert { background: rgba(255,92,115,.14); color: var(--alert); }
.ic-blue  { background: rgba(79,141,255,.14); color: var(--blue-2); }

/* ---------- Stat band ---------- */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.stat { text-align: center; padding: 6px; }
.stat b { display: block; font-family: var(--font-mono); font-size: clamp(1.9rem,4vw,2.7rem); color: var(--ink); letter-spacing: -.03em; }
.stat b .u { color: var(--brand-2); }
.stat span { color: var(--muted); font-size: .92rem; }

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s, background .2s;
  backdrop-filter: blur(6px);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow), 0 0 0 1px rgba(45,212,191,.2), 0 0 34px rgba(45,212,191,.12); border-color: rgba(45,212,191,.35); background: rgba(255,255,255,.05); }

/* 360° rotating glow that chases around the card border on hover */
@property --card-glow-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
.card::before {
  content: "";
  position: absolute; inset: 0; z-index: 2;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--card-glow-angle, 0deg),
    var(--brand-2), var(--blue-2), var(--violet), var(--alert), var(--amber), var(--safe), var(--brand-2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.card:hover::before { opacity: 1; animation: card-glow-spin 2.4s linear infinite; }
@keyframes card-glow-spin { to { --card-glow-angle: 360deg; } }
@media (prefers-reduced-motion: reduce) {
  .card:hover::before { animation: none; opacity: .85; }
}

.card__ic { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 18px; background: var(--surface-2); color: var(--brand-2); }
.card__ic svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: .96rem; }
.card--brand .card__ic { background: var(--grad-brand); color: #04120f; }
.card--soft { background: var(--surface-2); border-color: transparent; }

/* ---------- Full-bleed photo card: image fills the card, text sits on a bottom scrim ---------- */
.card--photo {
  position: relative; padding: 0; overflow: hidden; min-height: 340px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.card__photo {
  position: absolute; inset: 0; z-index: 0; background-size: cover; background-position: center;
  transition: transform .5s ease;
}
.card--photo:hover .card__photo { transform: scale(1.06); }
.card--photo::after {
  /* scrim: transparent up top so the photo reads clearly, solid at the bottom so text is always legible */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(3,6,9,0) 42%, rgba(3,6,9,.55) 72%, rgba(3,6,9,.92) 100%);
}
.card--photo .card__body { position: relative; z-index: 2; padding: 22px 24px; }
.card--photo h3 { color: #fff; margin-bottom: 6px; }
.card--photo p { color: rgba(255,255,255,.82); font-size: .92rem; margin: 0; }

/* color variants for icons */
.ic-v-cyan  { background: rgba(45,212,191,.14);  color: var(--brand-2); }
.ic-v-blue  { background: rgba(79,141,255,.14);  color: var(--blue-2); }
.ic-v-green { background: rgba(52,211,153,.14); color: var(--safe); }
.ic-v-amber { background: rgba(251,191,36,.16); color: var(--amber); }
.ic-v-red   { background: rgba(255,92,115,.14);  color: var(--alert); }
.ic-v-violet{ background: rgba(167,139,250,.14); color: var(--violet); }

/* ---------- Solution / audience cards ---------- */
.audience { position: relative; overflow: hidden; border-radius: var(--radius-lg); color: #fff; min-height: 300px; display: flex; flex-direction: column; justify-content: flex-end; padding: 30px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.audience > .audience__photo {
  position: absolute; inset: 0; z-index: 0; background-size: cover; background-position: center;
  transition: transform .5s ease;
}
.audience:hover .audience__photo { transform: scale(1.06); }
/* colored gradient tint sits over the photo (multiply blend) so each audience keeps its brand color while the photo shows through */
.audience::before { content:""; position:absolute; inset:0; background: var(--_g, var(--grad-brand)); z-index:1; opacity:.82; mix-blend-mode: multiply; }
.audience:not(:has(.audience__photo))::before { opacity: .9; mix-blend-mode: normal; }
.audience::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, rgba(3,6,9,0) 15%, rgba(3,6,9,.86) 100%); z-index:2; }
.audience > * { position: relative; z-index: 3; }
.audience__ic { width: 52px; height: 52px; border-radius: 14px; background: rgba(255,255,255,.16); display: grid; place-items: center; margin-bottom: auto; }
.audience__ic svg { width: 26px; height: 26px; color: #fff; }
.audience h3 { color: #fff; margin-bottom: 6px; }
.audience p { color: rgba(255,255,255,.86); margin: 0; font-size: .93rem; }
.audience:hover { box-shadow: var(--shadow-lg), 0 0 40px rgba(45,212,191,.2); }
.g-chronic { --_g: linear-gradient(150deg,#0d9488,#0891b2); }
.g-child   { --_g: linear-gradient(150deg,#2563eb,#4f46e5); }
.g-elder   { --_g: linear-gradient(150deg,#059669,#0891b2); }
.g-mental  { --_g: linear-gradient(150deg,#7c3aed,#c026d3); }

/* ---------- Feature split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: center; }
.split--rev .split__media { order: 2; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; color: var(--ink-2); }
.checklist svg { width: 22px; height: 22px; flex: 0 0 auto; color: var(--safe); margin-top: 2px; filter: drop-shadow(0 0 4px rgba(52,211,153,.4)); }
.checklist b { color: var(--ink); }

/* media panel */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 24px; position: relative; overflow: hidden;
  backdrop-filter: blur(8px);
}
.panel--dark { background: var(--grad-hero); color: var(--ink); border-color: rgba(255,255,255,.1); }

/* ---------- Emergency flow ---------- */
.flow { display: grid; grid-template-columns: repeat(6,1fr); gap: 14px; }
.flow__step { text-align: center; position: relative; }
.flow__numwrap { position: relative; width: 56px; height: 56px; margin: 0 auto 12px; display: grid; place-items: center; }
.flow__num { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; color: #04120f; background: var(--grad-brand); box-shadow: 0 0 0 1px rgba(45,212,191,.3), 0 8px 20px rgba(45,212,191,.3); position: relative; z-index: 1; transition: box-shadow .3s; }
/* Rotating 360° glow ring: a bright arc spins once around the circle, then settles into a steady lit ring once the step is done. */
.flow__numwrap::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; padding: 3px;
  background: conic-gradient(from 0deg, var(--brand-2) 0deg 26deg, transparent 34deg 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  filter: drop-shadow(0 0 6px var(--brand)) drop-shadow(0 0 12px rgba(45,212,191,.7));
  opacity: 0;
}
.flow__step.is-active .flow__numwrap::before { opacity: 1; animation: flowRingSpin 1.1s linear 1; }
.flow__step.is-done .flow__numwrap::before { opacity: 1; background: conic-gradient(var(--brand-2), var(--brand)); animation: none; }
.flow__step.is-done .flow__num,
.flow__step.is-active .flow__num { box-shadow: 0 0 0 1px rgba(45,212,191,.4), 0 8px 24px rgba(45,212,191,.55); }
@keyframes flowRingSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.flow__step:not(:last-child)::after { content:""; position:absolute; top: 23px; left: 62%; width: 76%; height: 2px; background: repeating-linear-gradient(90deg,var(--brand) 0 6px,transparent 6px 12px); opacity:.45; }
/* Travelling light that "passes through" the dashed connector to the next step. */
.flow__step:not(:last-child)::before {
  content: ""; position: absolute; top: 23px; left: 62%; width: 0%; height: 2px; z-index: 1;
  background: var(--brand-2);
  box-shadow: 0 0 8px 2px var(--brand), 0 0 18px 4px rgba(45,212,191,.55);
  opacity: 0;
}
.flow__step.is-traveling::before { opacity: 1; animation: flowTravel .7s linear forwards; }
.flow__step.is-traveled::before { opacity: 1; width: 76%; }
@keyframes flowTravel { from { width: 0%; } to { width: 76%; } }
@keyframes flowTravelV { from { height: 0%; } to { height: 44px; } }
.flow__step h4 { font-size: .95rem; margin: 0 0 3px; color: var(--ink); }
.flow__step p { font-size: .8rem; margin: 0; }

/* ---------- Dashboard preview ---------- */
.dash { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.dash__tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; box-shadow: var(--shadow-sm); }
.dash__tile .row { display: flex; align-items: center; justify-content: space-between; }
.dash__label { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dash__val { font-family: var(--font-mono); font-size: 1.7rem; font-weight: 700; color: var(--ink); }
.dash__val .u { font-size: .8rem; color: var(--muted); }
.badge { font-family: var(--font-mono); display: inline-flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.badge--safe { background: rgba(52,211,153,.14); color: var(--safe); }
.badge--alert{ background: rgba(255,92,115,.14); color: var(--alert); }
.badge--warn { background: rgba(251,191,36,.16); color: var(--amber); }
.spark { height: 40px; margin-top: 10px; }
.spark svg { width: 100%; height: 100%; }
.spark path { fill: none; stroke: var(--brand-2); stroke-width: 2.5; filter: drop-shadow(0 0 3px rgba(45,212,191,.5)); }

/* ---------- CTA band ---------- */
.cta {
  background: var(--grad-hero); color: #fff; border-radius: var(--radius-lg);
  padding: 60px; text-align: center; box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
  border: 1px solid var(--line);
}
.cta h2 { color: #fff; }
.cta p { color: var(--ink-2); max-width: 560px; margin: 0 auto 26px; }
.cta__row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Page header (inner pages) ---------- */
.page-hero { background: var(--grad-hero); color: #fff; padding: 76px 0 84px; position: relative; overflow: hidden; }
.page-hero::after { content:""; position:absolute; inset:0; background-image: radial-gradient(rgba(255,255,255,.06) 1px,transparent 1px); background-size: 26px 26px; opacity:.6; }
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { color: #fff; max-width: 760px; }
.page-hero p { color: var(--ink-2); font-size: 1.15rem; max-width: 620px; }
.crumbs { display: flex; gap: 8px; color: var(--muted); font-size: .88rem; margin-bottom: 18px; }
.crumbs a:hover { color: var(--brand-2); }

/* ---------- Contact ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--font-head); font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 12px;
  font: inherit; font-size: .96rem; background: var(--input-bg); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.field select option { background: var(--select-bg); color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--brand); box-shadow: var(--ring); }
.field textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: .82rem; color: var(--muted); }
.form-ok { display: none; align-items: center; gap: 10px; background: rgba(52,211,153,.1); color: var(--safe); border: 1px solid rgba(52,211,153,.3); padding: 14px 16px; border-radius: 12px; font-weight: 600; }
.form-ok.show { display: flex; }
.contact-item { display: flex; gap: 14px; margin-bottom: 22px; }
.contact-item .card__ic { margin: 0; }
.contact-item h4 { margin: 0 0 2px; font-family: var(--font-head); color: var(--ink); }
.contact-item p { margin: 0; font-size: .92rem; }

/* ---------- Footer ---------- */
.footer { background: var(--night); color: var(--muted); padding: 66px 0 26px; border-top: 1px solid var(--line); }
.footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; }
.footer .brand { color: #fff; }
.footer .brand small { color: var(--muted); }
.footer p { color: var(--muted); font-size: .92rem; max-width: 300px; }
.footer h5 { font-family: var(--font-head); color: #fff; font-size: .95rem; margin: 0 0 16px; letter-spacing: .02em; }
.footer li { margin-bottom: 10px; }
.footer a { color: var(--muted); font-size: .92rem; transition: color .15s; }
.footer a:hover { color: var(--brand-2); }
.footer__socials { display: flex; gap: 10px; margin-top: 18px; }
.footer__socials a { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--line); display: grid; place-items: center; }
.footer__socials a:hover { background: var(--brand); color: #04120f; border-color: transparent; }
.footer__socials svg { width: 18px; height: 18px; }
.footer__bottom { border-top: 1px solid var(--line); margin-top: 46px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .85rem; color: var(--muted); }

/* ---------- Reveal animation (base state; GSAP drives the "in" transition) ---------- */
.reveal { opacity: 0; transform: translateY(28px); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Keyframes ---------- */
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes ecg { to { stroke-dashoffset: 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  /* Headline first, then the watch, then the rest of the copy (paragraph,
     CTAs, trust list) — instead of the two-column desktop layout. */
  .hero__inner {
    grid-template-columns: 1fr;
    grid-template-areas: "top" "watch" "bottom";
    row-gap: 36px;
  }
  .split { grid-template-columns: 1fr; gap: 34px; }
  .split--rev .split__media { order: 0; }
  .g-4 { grid-template-columns: repeat(2,1fr); }
  /* Below 6-across, switch to a vertical stepper: one column, with the
     connector line (and its travelling "color pass through" light) running
     down between each circle instead of across. */
  .flow { grid-template-columns: 1fr; row-gap: 44px; }
  .flow__step:not(:last-child)::after {
    top: 100%; left: 50%; bottom: auto; width: 2px; height: 44px; transform: translateX(-50%);
    background: repeating-linear-gradient(180deg,var(--brand) 0 6px,transparent 6px 12px);
  }
  .flow__step:not(:last-child)::before {
    top: 100%; left: 50%; width: 2px; height: 0; transform: translateX(-50%);
  }
  .flow__step.is-traveling::before { animation-name: flowTravelV; }
  .flow__step.is-traveled::before { width: 2px; height: 44px; }
  .dash { grid-template-columns: repeat(2,1fr); }
  .footer__top { grid-template-columns: 1fr 1fr; }
}
.nav__cta-mobile { display: none; }
@media (max-width: 1180px) {
  .nav__links, .nav__cta .btn { display: none; }
  .nav__toggle { display: block; }
  .nav.open .nav__links {
    display: flex; position: absolute; top: 74px; left: 0; right: 0; flex-direction: column;
    background: var(--mobile-nav-bg); padding: 14px 22px 22px; gap: 4px; box-shadow: var(--shadow); border-top: 1px solid var(--line);
  }
  .nav.open .nav__links a { padding: 12px; border-radius: 10px; }
  .nav.open .nav__cta-mobile {
    display: flex; flex-direction: column; gap: 10px; margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line);
  }
  .nav.open .nav__cta-mobile .btn { display: flex; justify-content: center; }
}
@media (max-width: 760px) {
  .section { padding: 62px 0; }
  .g-2, .g-3, .g-4, .stats { grid-template-columns: 1fr 1fr; }
  .cta { padding: 40px 24px; }
  .footer__top { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .g-2, .g-3, .g-4, .stats { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .chip, .watch__dot { animation: none; }
  .reveal { opacity: 1; transform: none; }
  .flow__numwrap::before, .flow__step::before { animation: none !important; }
}
