/* ============================================================
   Vital Sign Digital — Design System & Effects
   Premium dark "medical-tech" theme
   ============================================================ */

:root {
  --ink: #070B14;
  --ink-2: #0A1120;
  --surface: #0E1626;
  --surface-2: #131F33;
  --line: #1E2A3F;
  --vital: #22E4A7;
  --vital-cyan: #4CC9F0;
  --fg: #F1F5FB;
  --muted: #A9B6C8;
}

* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background-color: var(--ink);
  color: var(--fg);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, .font-display {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  letter-spacing: -0.02em;
}

::selection { background: rgba(34,228,167,0.28); color: #fff; }

/* ---------- Background ambience ---------- */
.bg-grid {
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 64px 64px;
}
.bg-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 15% 0%, rgba(34,228,167,0.14), transparent 60%),
    radial-gradient(55% 45% at 90% 10%, rgba(76,201,240,0.12), transparent 60%),
    radial-gradient(50% 60% at 50% 110%, rgba(34,228,167,0.08), transparent 70%);
}

/* ---------- Text gradients ---------- */
.text-gradient {
  background: linear-gradient(100deg, var(--vital) 0%, var(--vital-cyan) 60%, #8ff3d0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Glass surfaces ---------- */
.glass {
  background: linear-gradient(180deg, rgba(19,31,51,0.72), rgba(14,22,38,0.72));
  border: 1px solid rgba(255,255,255,0.07);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.card {
  background: linear-gradient(180deg, rgba(19,31,51,0.55), rgba(12,19,33,0.55));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 1rem;
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease, background .28s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  border-color: rgba(34,228,167,0.4);
  box-shadow: 0 20px 50px -20px rgba(34,228,167,0.28);
}

/* ---------- Accent ring / chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .8rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--vital);
  background: rgba(34,228,167,0.08);
  border: 1px solid rgba(34,228,167,0.24);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  font-weight: 600;
  border-radius: .75rem;
  padding: .9rem 1.4rem;
  line-height: 1;
  transition: transform .18s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease, color .2s ease;
  cursor: pointer;
  min-height: 48px;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  color: #04140E;
  background: linear-gradient(100deg, var(--vital), var(--vital-cyan));
  box-shadow: 0 10px 30px -10px rgba(34,228,167,0.5);
}
.btn-primary:hover { box-shadow: 0 14px 44px -8px rgba(34,228,167,0.65); transform: translateY(-2px); }
.btn-ghost {
  color: var(--fg);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.14);
}
.btn-ghost:hover { border-color: rgba(34,228,167,0.5); color: #fff; background: rgba(34,228,167,0.06); }
.btn-lg { padding: 1.05rem 1.8rem; font-size: 1.02rem; }

/* ---------- Section helpers ---------- */
.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.eyebrow {
  font-family: 'Space Grotesk', sans-serif;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .72rem;
  font-weight: 600;
  color: var(--vital);
}
.divider-line { height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent); }

/* ---------- ECG / pulse line ---------- */
.ecg-path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: ecg-draw 3.2s ease-in-out infinite;
}
@keyframes ecg-draw {
  0% { stroke-dashoffset: 1000; }
  55% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -1000; }
}
.pulse-dot { animation: pulse-glow 2.4s ease-in-out infinite; }
@keyframes pulse-glow {
  0%, 100% { opacity: .35; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.25); }
}

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; gap: 3.5rem; width: max-content; animation: marquee 32s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Scroll reveal ---------- */
/* Only hide for animation when JS is present (html.js). No-JS shows everything. */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Image frames ---------- */
.img-frame {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(135deg, #14263a, #0c1a2c 60%, #0a1524);
}
.img-frame img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.img-frame:hover img { transform: scale(1.06); }
.img-frame::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(7,11,20,0.55));
  pointer-events: none;
}
.img-tint { position: absolute; inset: 0; mix-blend-mode: soft-light; background: linear-gradient(120deg, rgba(34,228,167,0.35), rgba(76,201,240,0.25)); pointer-events: none; z-index: 1; }

/* Avatar monograms */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 999px;
  font-family: 'Space Grotesk', sans-serif; font-weight: 600; color: #04140E;
  background: linear-gradient(135deg, var(--vital), var(--vital-cyan));
}

/* ---------- Partner / certification badges ---------- */
.badge-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
/* 10 badges → 2 balanced rows of 5 on desktop, 5 balanced rows of 2 on mobile/tablet */
@media (min-width: 1024px) { .badge-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.badge-card {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .85rem 1rem;
  border-radius: .9rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.badge-card:hover { transform: translateY(-2px); border-color: rgba(34,228,167,0.35); background: rgba(255,255,255,0.05); }
.badge-mark {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.badge-mark svg, .badge-mark img { width: 26px; height: 26px; display: block; }
.badge-mark img { width: 100%; height: 100%; object-fit: contain; }
.badge-name { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: .9rem; line-height: 1.15; color: #fff; display: block; }
.badge-sub { font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); display: block; margin-top: .1rem; }

/* ---------- Nav ---------- */
.site-header { transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease; }
.site-header.scrolled {
  background: rgba(7,11,20,0.82);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav-link { color: var(--muted); font-size: .95rem; font-weight: 500; transition: color .2s ease; }
.nav-link:hover, .nav-link[aria-current="page"] { color: #fff; }
.nav-link[aria-current="page"] { position: relative; }

/* Mobile menu */
.mobile-menu { transition: opacity .25s ease, transform .25s ease; }
.mobile-menu[hidden] { display: none; }

/* ---------- FAQ accordion ---------- */
.faq-item { border-bottom: 1px solid rgba(255,255,255,0.08); }
.faq-q { width: 100%; text-align: left; cursor: pointer; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-icon { transition: transform .3s ease; }
.faq-item.open .faq-icon { transform: rotate(45deg); }

/* ---------- Stat counter ---------- */
.stat-num { font-variant-numeric: tabular-nums; }

/* ---------- Feature icon tile ---------- */
.icon-tile {
  width: 52px; height: 52px; border-radius: .8rem;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--vital);
  background: rgba(34,228,167,0.09);
  border: 1px solid rgba(34,228,167,0.22);
}
.icon-tile svg { width: 26px; height: 26px; }

/* ---------- Forms ---------- */
.field-label { font-size: .82rem; font-weight: 500; color: var(--muted); margin-bottom: .4rem; display: block; }
.field {
  width: 100%; background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.12); border-radius: .7rem;
  padding: .85rem 1rem; color: #fff; font-size: 1rem;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  min-height: 48px;
}
.field::placeholder { color: #61728a; }
.field:focus { outline: none; border-color: rgba(34,228,167,0.6); box-shadow: 0 0 0 3px rgba(34,228,167,0.16); background: rgba(255,255,255,0.05); }
select.field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A9B6C8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; background-size: 18px; padding-right: 2.6rem; }
.field.invalid { border-color: #f87171; box-shadow: 0 0 0 3px rgba(248,113,113,0.14); }
.field-error { color: #fca5a5; font-size: .8rem; margin-top: .35rem; display: none; }
.field-error.show { display: block; }

/* Anti-spam honeypot — visually hidden, off-screen (bots fill it, humans never see it) */
.hp-field { position: absolute !important; left: -9999px !important; top: auto; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

/* Focus visibility everywhere */
a:focus-visible, button:focus-visible, .field:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--vital);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--vital); color: #04140E; padding: .6rem 1rem; border-radius: .5rem; font-weight: 600;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

/* Utility */
.pattern-dots {
  background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 18px 18px;
}

@media (prefers-reduced-motion: reduce) {
  .ecg-path, .pulse-dot, .marquee__track { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .img-frame img { transition: none; }
}
