/* ============================================================
   VitalSync — Shared Site CSS
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800;900&family=Geist+Mono:wght@400;500&family=Instrument+Serif:ital@0;1&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  /* Background */
  --bg:         #f6f6f6;
  --bg2:        #eeeceb;
  --bg3:        #e6e3e0;
  --bg4:        #dbd8d4;
  --bg-dark:    #1d2732;

  /* Foreground */
  --fg:         #1a1a1a;
  --fg-dim:     #777777;
  --fg-faint:   #9a9a9a;
  --fg-muted:   rgba(26,26,26,0.60);

  /* Brand — steel blue replaces red */
  --brand:      #5e86a6;
  --brand-80:   rgba(94,134,166,0.80);
  --brand-60:   rgba(94,134,166,0.60);
  --brand-40:   rgba(94,134,166,0.40);
  --brand-20:   rgba(94,134,166,0.20);

  /* Borders */
  --bord:       rgba(26,26,26,0.08);
  --bord-mid:   rgba(26,26,26,0.14);
  --bord-brand: rgba(152,187,217,0.20);

  /* CTA — mint green */
  --cta:        #0da177;

  /* Clinical alarm states only */
  --red:        #C2351A;
  --red-deep:   #9A2712;
  --red-glow:   rgba(194,53,26,0.18);

  /* Status */
  --green:      #22c55e;
  --green-light:#4ade80;
  --red-alert:  #f87171;

  /* Elevation */
  --shadow:     0 2px 8px rgba(0,0,0,0.07);
  --shadow-lg:  0 16px 56px rgba(0,0,0,0.10);
  --radius:     12px;
  --radius-lg:  20px;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Geist', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

/* ── Typography ─────────────────────────────────────────────── */
h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 600; line-height: 1.08; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.9rem, 3.5vw, 3rem); font-weight: 600; line-height: 1.12; letter-spacing: -0.025em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; }
h4 { font-size: 1.05rem; font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; }
p  { line-height: 1.72; letter-spacing: -0.02em; }

.serif { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400; }

.hero-sub {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(20px, 2.5vw, 28px);
  letter-spacing: -0.01em;
}

.section-lead {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: 20px;
  letter-spacing: 0;
  line-height: 1.5;
}

.section-watermark {
  position: absolute;
  font-size: 260px;
  font-weight: 300;
  color: rgba(94, 134, 166, 0.04);
  z-index: -1;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  line-height: 1;
}

/* ── Layout ─────────────────────────────────────────────────── */
.s {
  border-top: 1px solid var(--bord);
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 128px 56px;
}

.wrap-sm {
  max-width: 800px;
  margin: 0 auto;
  padding: 128px 56px;
}

/* ── Eyebrow ─────────────────────────────────────────────────── */
.ew {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin-bottom: 20px;
}
.ew::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 100px;
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all 0.22s ease;
  white-space: nowrap;
  cursor: pointer;
  border: 1.5px solid transparent;
  text-decoration: none;
}

.btn-red {
  background: var(--cta);
  color: #fff;
  border-color: var(--cta);
}
.btn-red:hover {
  background: #0b9068;
  border-color: #0b9068;
  transform: scale(1.02);
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--bord-mid);
}
.btn-ghost:hover {
  background: var(--bg3);
  border-color: var(--fg);
  transform: scale(1.02);
}

.btn-white {
  background: #fff;
  color: var(--fg);
  border-color: rgba(255,255,255,0.3);
}
.btn-white:hover {
  background: var(--bg2);
  transform: translateY(-1px);
}

.btn-outline-white {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.45);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
}

/* ── Scroll Reveal ───────────────────────────────────────────── */
.rv, .rv-l, .rv-r, .rv-sc {
  opacity: 0;
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.rv    { transform: translateY(28px); }
.rv-l  { transform: translateX(-36px); }
.rv-r  { transform: translateX(36px); }
.rv-sc { transform: scale(0.94); }

.rv.in, .rv-l.in, .rv-r.in, .rv-sc.in {
  opacity: 1;
  transform: none;
}

.d1 { transition-delay: 0.10s; }
.d2 { transition-delay: 0.22s; }
.d3 { transition-delay: 0.34s; }
.d4 { transition-delay: 0.46s; }
.d5 { transition-delay: 0.58s; }

/* ── Navigation ─────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 68px;
  background: transparent;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}

#nav.scrolled {
  background: rgba(246,246,246,0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 1px 0 var(--bord);
}

/* Logo */
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.logo-mark svg {
  width: 100%;
  height: 100%;
}

.logo-txt {
  font-family: 'Geist', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: #fff;
  transition: color 0.3s ease;
}

#nav.scrolled .logo-txt { color: var(--fg); }

#nav.scrolled .logo-mark svg circle {
  stroke: var(--brand);
}
#nav.scrolled .logo-mark svg polyline {
  stroke: var(--brand);
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,0.08); }

#nav.scrolled .nav-item { color: var(--fg-dim); }
#nav.scrolled .nav-item:hover { color: var(--fg); background: var(--bg3); }

.nav-item::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.6;
  transition: transform 0.2s ease;
}
.nav-item:hover::after { transform: rotate(225deg) translateY(-2px); }

.nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  transition: color 0.2s ease, background 0.2s ease;
  text-decoration: none;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,0.08); }
#nav.scrolled .nav-link { color: var(--fg-dim); }
#nav.scrolled .nav-link:hover { color: var(--fg); background: var(--bg3); }

/* Dropdown */
.nav-drop {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  min-width: 220px;
  padding: 10px 6px 6px; /* top padding bridges the gap so hover doesn't break */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 300;
}

.nav-drop-inner {
  background: #fff;
  border: 1px solid var(--bord);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
}

.nav-item:hover .nav-drop {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.nav-drop-inner a {
  display: block;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg-dim);
  transition: background 0.15s ease, color 0.15s ease;
  text-decoration: none;
}
.nav-drop-inner a:hover { background: var(--bg2); color: var(--fg); }

/* Nav CTA */
.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 9px 20px;
  background: var(--cta);
  color: #fff;
  border-radius: 100px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-cta:hover {
  background: #0b9068;
  transform: scale(1.02);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: background 0.3s ease;
}
#nav.scrolled .nav-hamburger span { background: var(--fg); }

/* Mobile nav */
.nav-mobile {
  display: none;
  position: fixed;
  top: 68px; left: 0; right: 0;
  background: rgba(250,250,248,0.97);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--bord);
  padding: 16px 24px 24px;
  z-index: 199;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-lg);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  display: block;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--fg-dim);
  transition: background 0.15s, color 0.15s;
}
.nav-mobile a:hover { background: var(--bg3); color: var(--fg); }
.nav-mobile-section {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--fg-faint);
  padding: 12px 14px 4px;
}

/* ── Inner Page Hero ─────────────────────────────────────────── */
.page-hero {
  background: var(--bg2);
  padding: 200px 56px 120px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse 60% 60% at 80% 30%, rgba(94,134,166,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.page-hero h1 {
  max-width: 760px;
  margin-bottom: 24px;
}
.page-hero p {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--fg-dim);
  max-width: 560px;
  line-height: 1.65;
  margin-bottom: 36px;
}
.page-hero .btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: rgba(246,246,246,0.70);
  border: 1px solid var(--bord-brand);
  border-radius: var(--radius-lg);
  padding: 40px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.card:hover {
  border-color: rgba(152,187,217,0.35);
  transform: translateY(-3px);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 20px;
}

/* ── Grid utilities ──────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-2x2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* ── CTA Banner ──────────────────────────────────────────────── */
.cta-banner {
  background: var(--fg);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 64px;
  text-align: center;
}
.cta-banner h2 { color: #fff; margin-bottom: 12px; }
.cta-banner p { color: rgba(255,255,255,0.6); margin-bottom: 32px; font-size: 1.05rem; }
.cta-banner .btn-row { justify-content: center; display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Stat callout ─────────────────────────────────────────────── */
.stat-num {
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--fg);
  line-height: 1;
  display: block;
}
.stat-label {
  font-size: 0.88rem;
  color: var(--fg-dim);
  margin-top: 6px;
  line-height: 1.45;
}

/* ── Tag / Badge ─────────────────────────────────────────────── */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: var(--bg3);
  color: var(--fg-dim);
}
.tag-red {
  background: var(--brand-20);
  color: var(--brand);
}

/* ── Section header helper ───────────────────────────────────── */
.sec-hd {
  margin-bottom: 56px;
}
.sec-hd h2 {
  margin-top: 8px;
  margin-bottom: 16px;
}
.sec-hd p {
  font-size: 1.05rem;
  color: var(--fg-dim);
  max-width: 540px;
}

/* ── Quote ───────────────────────────────────────────────────── */
.blockquote {
  border-left: 3px solid var(--brand);
  padding: 4px 0 4px 24px;
  margin: 0;
}
.blockquote p {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--fg);
  line-height: 1.6;
}
.blockquote cite {
  display: block;
  margin-top: 12px;
  font-style: normal;
  font-size: 0.88rem;
  color: var(--fg-faint);
  font-family: 'Geist Mono', monospace;
}

/* ── Step flow ───────────────────────────────────────────────── */
.step-num {
  font-family: 'Geist Mono', monospace;
  font-size: 3rem;
  font-weight: 500;
  color: var(--bg4);
  line-height: 1;
  display: block;
  margin-bottom: 12px;
}

/* ── Image placeholder ───────────────────────────────────────── */
.img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg3);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-faint);
  font-size: 13px;
  font-family: 'Geist Mono', monospace;
}

.avatar-placeholder {
  width: 100%;
  aspect-ratio: 1/1;
  background: var(--bg3);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-faint);
  font-size: 32px;
  margin-bottom: 16px;
  overflow: hidden;
}
.avatar-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

/* ── Form ────────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-dim);
  font-family: 'Geist Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--bord-mid);
  border-radius: 10px;
  font-family: 'Geist', sans-serif;
  font-size: 15px;
  background: #fff;
  color: var(--fg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-20);
}
.form-group textarea {
  resize: vertical;
  min-height: 120px;
}
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--bord);
  padding: 80px 56px 0;
}
.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 64px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-logo { margin-bottom: 4px; }
.footer-logo .logo-txt-dark {
  font-family: 'Geist', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.footer-brand .footer-tagline {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.4;
}
.footer-brand .footer-sub {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--fg-faint);
  text-transform: uppercase;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-col-title {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--fg-faint);
  margin-bottom: 8px;
}
.footer-col a {
  font-size: 14px;
  color: var(--fg-dim);
  transition: color 0.2s ease;
  padding: 4px 0;
  line-height: 1.4;
}
.footer-col a:hover { color: var(--fg); }
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--bord);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-faint);
  flex-wrap: wrap;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .wrap { padding: 96px 40px; }
  .wrap-sm { padding: 96px 40px; }
  .page-hero { padding: 180px 40px 100px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 768px) {
  #nav { padding: 0 24px; }
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }

  .wrap { padding: 72px 24px; }
  .wrap-sm { padding: 72px 24px; }
  .page-hero { padding: 140px 24px 80px; }
  .site-footer { padding: 60px 24px 32px; }

  .grid-2, .grid-2x2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }

  .cta-banner { padding: 40px 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
  .form-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  .page-hero { padding: 130px 20px 64px; }
  .wrap { padding: 60px 20px; }
}
