/* ---------- Design tokens (Sanford medical palette) ---------- */
:root {
  --bg: #f4f7fb;            /* cool off-white */
  --bg-2: #eef3f9;          /* paper */
  --ink: #0f2a44;           /* navy ink */
  --ink-2: #42607c;
  --muted: #6f829a;
  --line: #e2e8f0;
  --card: #ffffff;

  /* Primary accent */
  --accent: #0b5cad;        /* medical blue */
  --accent-2: #094e92;      /* deeper blue */
  --accent-soft: #e7f0fb;   /* accent wash */

  /* Secondary accent (complements without breaking) */
  --hd: #5d47a3;            /* violet (dialysis / secondary) */
  --hd-soft: #efeafd;

  /* Legacy token aliases — the rest of the CSS still references these */
  --olive: var(--accent);
  --olive-2: #2a7ed1;
  --olive-soft: var(--accent-soft);
  --indigo: var(--accent);
  --violet: var(--hd);
  --violet-soft: var(--hd-soft);

  --shadow-sm: 0 1px 2px rgba(12, 37, 65, 0.05), 0 1px 3px rgba(12, 37, 65, 0.06);
  --shadow-md: 0 6px 20px -8px rgba(12, 37, 65, 0.12), 0 2px 6px rgba(12, 37, 65, 0.06);
  --shadow-lg: 0 24px 60px -20px rgba(11, 92, 173, 0.25), 0 8px 24px -12px rgba(12, 37, 65, 0.12);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
.serif { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-style: italic; letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 28px; }

/* ---------- Ambient background blobs ---------- */
.ambient {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(680px 420px at 85% -10%, rgba(93, 71, 163, 0.10), transparent 60%),
    radial-gradient(600px 500px at -10% 20%, rgba(11, 92, 173, 0.14), transparent 65%),
    radial-gradient(900px 600px at 50% 110%, rgba(11, 92, 173, 0.10), transparent 60%);
  filter: blur(0.5px);
}
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  opacity: 0.35; mix-blend-mode: multiply;
  background-image: radial-gradient(rgba(12,37,65,0.05) 1px, transparent 1px);
  background-size: 3px 3px;
}

/* ---------- Nav ---------- */
header.nav-wrap {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: rgba(244, 247, 251, 0.78);
  border-bottom: 1px solid transparent;
  transition: border-color .35s var(--ease), background .35s var(--ease);
}
header.nav-wrap.scrolled { border-bottom-color: var(--line); background: rgba(244, 247, 251, 0.92); }
nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; font-size: 20px;
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 55%, var(--hd) 100%);
  position: relative; box-shadow: 0 6px 18px -8px rgba(11, 92, 173, .5);
  animation: brandFloat 7s var(--ease) infinite;
}
.brand-mark::before {
  content: ""; position: absolute; inset: 6px;
  border-radius: 6px; background: var(--bg);
}
.brand-mark::after {
  content: ""; position: absolute; inset: 10px; border-radius: 3px;
  background: linear-gradient(135deg, var(--hd), var(--accent));
}
@keyframes brandFloat {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-2px) rotate(-3deg); }
}

/* Pill tabs with sliding indicator */
.tabs {
  position: relative;
  display: flex; align-items: center; gap: 4px;
  padding: 5px; border-radius: 999px;
  background: rgba(12, 37, 65, 0.04);
  border: 1px solid var(--line);
}
.tab {
  position: relative; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  cursor: pointer; user-select: none;
  transition: color .3s var(--ease);
  background: transparent; border: none;
  text-decoration: none;
}
.tab svg { width: 15px; height: 15px; }
.tab:hover { color: var(--ink); }
.tab.active { color: #fff; }
.tab-indicator {
  position: absolute; top: 5px; left: 5px; height: calc(100% - 10px);
  border-radius: 999px; z-index: 1;
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 70%, var(--hd) 100%);
  box-shadow: 0 6px 18px -6px rgba(11, 92, 173, .5);
  transition: transform .45s var(--ease-spring), width .45s var(--ease-spring);
}

.cta-row { display: flex; align-items: center; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 500;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  cursor: pointer; transition: all .25s var(--ease);
  will-change: transform;
}
.btn:hover { transform: translateY(-1px); border-color: rgba(12,37,65,.2); }
.btn.primary {
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 70%, var(--hd) 100%);
  color: #fff; border-color: transparent;
  box-shadow: 0 10px 24px -10px rgba(11, 92, 173, 0.55);
}
.btn.primary:hover {
  box-shadow: 0 14px 30px -10px rgba(11, 92, 173, 0.7);
  transform: translateY(-2px);
}
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Hero ---------- */
main { position: relative; z-index: 2; }
.hero {
  padding: 88px 0 60px;
  position: relative;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 12.5px; font-weight: 500; letter-spacing: 0.01em;
  border: 1px solid rgba(11, 92, 173, 0.20);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 rgba(11,92,173,.5);
  animation: pulseDot 1.8s var(--ease) infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(11,92,173,.5); }
  70% { box-shadow: 0 0 0 10px rgba(11,92,173,0); }
  100% { box-shadow: 0 0 0 0 rgba(11,92,173,0); }
}

h1.hero-title {
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.98; letter-spacing: -0.035em;
  font-weight: 700; margin: 22px 0 18px;
  color: var(--ink);
}
h1.hero-title .grad {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 55%, var(--hd) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  background-size: 200% 100%;
  animation: shine 7s ease-in-out infinite;
}
@keyframes shine {
  0%,100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.hero-sub {
  max-width: 640px; color: var(--muted);
  font-size: clamp(16px, 1.4vw, 18.5px); line-height: 1.55;
  margin: 0 0 34px;
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-meta {
  margin-top: 46px;
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  color: var(--muted); font-size: 13.5px;
}
.hero-meta .avatars { display: flex; }
.hero-meta .avatars span {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--bg);
  margin-left: -8px; background: var(--accent-soft);
  display: grid; place-items: center; font-weight: 600; font-size: 11px; color: var(--accent);
}
.hero-meta .avatars span:nth-child(1){ background:#e7f0fb; color:#0b5cad; margin-left:0;}
.hero-meta .avatars span:nth-child(2){ background:#efeafd; color:#5d47a3;}
.hero-meta .avatars span:nth-child(3){ background:#dde9f8; color:#094e92;}
.hero-meta .avatars span:nth-child(4){ background:#e2ecf7; color:#2a5f94;}

/* Hero layout */
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: center;
}
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }

/* Hero visual: floating product card */
.hero-visual { position: relative; height: 520px; }
.card-stack {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  perspective: 1200px;
}
.product-card {
  width: 100%; max-width: 440px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform-style: preserve-3d;
  animation: floatY 7s var(--ease) infinite;
}
@keyframes floatY {
  0%,100% { transform: translateY(0) rotateX(4deg) rotateY(-6deg); }
  50% { transform: translateY(-10px) rotateX(2deg) rotateY(-4deg); }
}
.pc-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.pc-title { font-weight: 600; font-size: 14px; display:flex; align-items:center; gap:8px;}
.pc-title .badge { padding: 3px 8px; font-size: 11px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; }
.pc-dots { display: flex; gap: 5px; }
.pc-dots span { width: 9px; height: 9px; border-radius: 50%; background: rgba(12,37,65,.08);}
.pc-dots span:nth-child(1){ background:#E8A5A5; }
.pc-dots span:nth-child(2){ background:#F3D58A; }
.pc-dots span:nth-child(3){ background:#B8D8A8; }

.pc-body { padding-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font-size: 11.5px; padding: 5px 10px; border-radius: 999px;
  background: var(--bg-2); color: var(--ink-2); border: 1px solid var(--line);
}
.chip.olive { background: var(--accent-soft); color: var(--accent); border-color: rgba(11,92,173,.2); }
.chip.violet { background: var(--hd-soft); color: var(--hd); border-color: rgba(93,71,163,.25); }

.note {
  padding: 14px; border-radius: 12px; background: var(--bg-2);
  font-size: 13.5px; line-height: 1.5; color: var(--ink-2);
}
.note strong { color: var(--ink); }

.typing-line {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 12px; background: #eef5fc;
  border: 1px dashed rgba(11,92,173,.3);
  font-size: 13px; color: var(--ink-2);
}
.typing-line .spark {
  width: 16px; height: 16px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--hd), var(--accent));
  animation: spin 3s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.caret { display: inline-block; width: 2px; height: 14px; background: var(--accent); animation: blink 1s steps(2) infinite; vertical-align: middle; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }

/* Floating stat card */
.float-card {
  position: absolute;
  background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px;
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
}
.float-card.a { top: 30px; left: -10px; animation: floatA 6s var(--ease) infinite; }
.float-card.b { bottom: 36px; right: -8px; animation: floatB 7s var(--ease) infinite; }
@keyframes floatA {
  0%,100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-8px) rotate(-1deg); }
}
@keyframes floatB {
  0%,100% { transform: translateY(0) rotate(3deg); }
  50% { transform: translateY(-6px) rotate(1deg); }
}
.fc-icon {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
}
.fc-icon.olive { background: var(--accent-soft); color: var(--accent); }
.fc-icon.violet { background: var(--hd-soft); color: var(--hd); }
.fc-value { font-weight: 700; }
.fc-label { color: var(--muted); font-size: 11.5px; }

/* ---------- Marquee ---------- */
.trust {
  padding: 24px 0 48px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden; position: relative;
}
.trust-label {
  text-align: center; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin: 16px 0 18px;
}
.marquee { display: flex; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track {
  display: flex; gap: 56px; padding-right: 56px;
  animation: marquee 28s linear infinite;
  flex-shrink: 0;
  color: var(--muted);
  font-weight: 600; font-size: 15.5px; letter-spacing: -0.01em;
}
.marquee-track span { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.marquee-track span::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--hd));
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
section { padding: 100px 0; position: relative; }
.section-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent);
  padding: 5px 12px; border-radius: 999px; background: var(--accent-soft);
}
h2.section-title {
  font-size: clamp(30px, 4vw, 46px); line-height: 1.05; letter-spacing: -0.03em;
  font-weight: 700; margin: 18px 0 14px;
}
.section-sub { color: var(--muted); font-size: 17px; line-height: 1.55; }

/* Products grid */
.products {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
}
@media (max-width: 1040px) { .products { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .products { grid-template-columns: 1fr; } }

.product {
  position: relative;
  padding: 34px; border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease);
}
.product::before {
  content: ""; position: absolute; inset: -1px; border-radius: 22px;
  padding: 1px;
  background: linear-gradient(135deg, transparent 40%, rgba(11,92,173,.45), rgba(93,71,163,.5));
  -webkit-mask: linear-gradient(#000,#000) content-box, linear-gradient(#000,#000);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .4s var(--ease);
  pointer-events: none;
}
.product:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent;}
.product:hover::before { opacity: 1; }

.p-ico {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  margin-bottom: 22px; transition: transform .4s var(--ease-spring);
}
.product:hover .p-ico { transform: rotate(-6deg) scale(1.05); }
.p-ico.olive { background: linear-gradient(135deg, #e7f0fb, #cfe0f5); color: var(--accent); }
.p-ico.indigo { background: linear-gradient(135deg, #efeafd, #ddd3fb); color: var(--hd); }
.p-ico.teal  { background: linear-gradient(135deg, #dff0e6, #bfe1cc); color: #1f7a3f; }

.p-name { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.p-desc { color: var(--muted); font-size: 15.5px; line-height: 1.55; margin: 0 0 18px; }
.p-features { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.p-features li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.p-features svg { flex-shrink: 0; margin-top: 3px; }
.p-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600;
}
.p-link.olive { color: var(--accent); }
.p-link.indigo { color: var(--hd); }
.p-link.teal  { color: #1f7a3f; }
.p-link .arrow { transition: transform .3s var(--ease); }
.product:hover .p-link .arrow { transform: translateX(4px); }

/* Features strip */
.features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-top: 24px;
}
@media (max-width: 860px) { .features { grid-template-columns: 1fr; } }
.feature {
  padding: 26px; border-radius: 18px; background: var(--card);
  border: 1px solid var(--line);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature .f-ico {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--bg-2); margin-bottom: 16px; color: var(--accent);
}
.feature h3 { margin: 0 0 8px; font-size: 17px; letter-spacing: -0.01em; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }

/* Stats */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  padding: 36px; border-radius: 22px;
  background: linear-gradient(135deg, #f4f7fb 0%, #e7f0fb 100%);
  border: 1px solid var(--line);
}
@media (max-width: 780px){ .stats { grid-template-columns: 1fr 1fr;} }
.stat .num {
  font-size: clamp(32px, 3.6vw, 46px); font-weight: 700; letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--accent), var(--accent-2), var(--hd));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat .lbl { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* CTA block */
.cta-block {
  position: relative; overflow: hidden;
  padding: 64px; border-radius: 28px;
  background: linear-gradient(135deg, #0b5cad 0%, #094e92 55%, #0f2a44 100%);
  color: #f4f7fb; text-align: center;
}
.cta-block::before {
  content:""; position: absolute; inset: -40%;
  background: radial-gradient(closest-side, rgba(93,71,163,0.38), transparent 60%),
              radial-gradient(closest-side at 80% 60%, rgba(255,255,255,0.18), transparent 60%);
  animation: rotateBlob 18s linear infinite;
}
@keyframes rotateBlob { to { transform: rotate(360deg); } }
.cta-block > * { position: relative; z-index: 1; }
.cta-block h2 {
  font-size: clamp(30px, 4vw, 46px); letter-spacing: -0.03em; margin: 0 0 14px; line-height: 1.1;
}
.cta-block p { color: rgba(244, 247, 251, 0.78); margin: 0 auto 26px; max-width: 560px; font-size: 16.5px; }
.cta-block .btn.primary {
  background: #ffffff; color: #0b5cad;
  box-shadow: 0 14px 40px -10px rgba(0,0,0,.5);
}
.cta-block .btn.ghost {
  background: transparent; color: #f4f7fb; border-color: rgba(244,247,251,.25);
}
.cta-block .btn.ghost:hover { border-color: rgba(244,247,251,.55); }

/* Footer */
footer {
  padding: 40px 0 50px; color: var(--muted); font-size: 13.5px;
  border-top: 1px solid var(--line);
}
footer .row { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
footer .links { display: flex; gap: 22px; }
footer .links a { transition: color .2s var(--ease); }
footer .links a:hover { color: var(--ink); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.delay-1 { transition-delay: .08s; }
.reveal.delay-2 { transition-delay: .16s; }
.reveal.delay-3 { transition-delay: .24s; }
.reveal.delay-4 { transition-delay: .32s; }

/* mobile tabs: hide labels */
@media (max-width: 680px) {
  .tab span.txt { display: none; }
  .tab { padding: 9px 12px; }
  nav { height: 64px; }
  .cta-row .btn.outline { display: none; }
  .hero-visual { height: 420px; }
  .product { padding: 26px; }
  section { padding: 70px 0; }
  .cta-block { padding: 40px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
