/* KeyHealth Hub — mobile-first */
:root {
  --bg: #f5faf8;
  --surface: #ffffff;
  --ink: #07211d;
  --muted: #4d6763;
  --line: #dcebe6;
  --primary: #00b87c;
  --primary-dark: #00915f;
  --accent: #6e7bff;
  --hero: #05241f;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(4, 40, 34, 0.08);
  --shadow-lg: 0 20px 50px rgba(4, 40, 34, 0.14);
  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --header-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 20px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
  border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 250, 248, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(4, 40, 34, 0.06);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.brand-mark { height: 40px; width: auto; }
.brand-dot { color: var(--primary); }

.nav {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 12px 20px 20px;
  gap: 4px;
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  box-shadow: var(--shadow);
}
.nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 13px 8px;
  border-radius: 12px;
  transition: background 0.2s, color 0.2s;
}
.nav a:hover { background: #eef7f4; color: var(--primary-dark); }
.nav .nav-cta {
  margin-top: 6px;
  text-align: center;
  background: var(--primary);
  color: #fff;
}
.nav .nav-cta:hover { background: var(--primary-dark); color: #fff; }

.nav-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  display: grid;
  place-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}
.nav-toggle .bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: radial-gradient(120% 90% at 50% 0%, #0a3a31 0%, var(--hero) 55%, #031713 100%);
  color: #eafff7;
  padding: 72px 0 64px;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  pointer-events: none;
}
.hero-glow-a {
  width: 320px; height: 320px;
  background: #00b87c;
  top: -110px; right: -90px;
}
.hero-glow-b {
  width: 280px; height: 280px;
  background: var(--accent);
  bottom: -130px; left: -80px;
  opacity: 0.35;
}
.hero-inner { position: relative; z-index: 1; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 14px;
}
.hero .eyebrow { color: #6ff0c4; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 9vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 18px;
  max-width: 15ch;
}
.gradient-text {
  background: linear-gradient(92deg, #3ce8ad 0%, #7ce8ff 55%, #9d9bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  font-size: clamp(1rem, 3.4vw, 1.2rem);
  color: #b9d9d1;
  max-width: 56ch;
  margin: 0 0 28px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s, background 0.2s;
  border: 1px solid transparent;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 184, 124, 0.35);
}
.btn-primary:hover { box-shadow: 0 14px 34px rgba(0, 184, 124, 0.45); }
.btn-ghost {
  border-color: rgba(255, 255, 255, 0.28);
  color: #eafff7;
  background: rgba(255, 255, 255, 0.06);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn-lg { min-height: 56px; padding: 16px 30px; font-size: 1.05rem; }

.hero-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 26px;
}
.hero-stats li { display: flex; flex-direction: column; gap: 2px; }
.hero-stats strong {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 6vw, 2rem);
  color: #fff;
  letter-spacing: -0.02em;
}
.hero-stats span { font-size: 0.8rem; color: #9fc4bb; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section h2, .contact h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 6.5vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  max-width: 20ch;
}
.section-lead {
  color: var(--muted);
  max-width: 62ch;
  margin: 0 0 36px;
  font-size: 1.03rem;
}

/* Cards */
.card-grid { display: grid; gap: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.section-alt .card { background: var(--bg); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  font-size: 1.4rem;
  background: linear-gradient(135deg, #e4faf2, #e8ecff);
  border-radius: 14px;
  margin-bottom: 14px;
}
.card h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.card p { margin: 0; color: var(--muted); font-size: 0.97rem; }

/* Products */
.product-grid { display: grid; gap: 16px; }
.product {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.product:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #bfe8da;
}
.product-logo {
  aspect-ratio: 16 / 7;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  background: linear-gradient(160deg, #ffffff 0%, #eef6f3 100%);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 #fff;
  position: relative;
  overflow: hidden;
}
.product-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.product-logo::after {
  content: attr(data-domain);
  position: absolute;
  bottom: 7px;
  right: 11px;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(7, 33, 29, 0.35);
}
.product-logo span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 10vw, 2.6rem);
  line-height: 1;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.product-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.product-body p { margin: 0 0 12px; color: var(--muted); font-size: 0.95rem; }
.product-link { font-weight: 600; color: var(--primary-dark); font-size: 0.92rem; }

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  counter-reset: step;
}
.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.step-num {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--primary);
  font-size: 1rem;
  background: #e4faf2;
  border-radius: 10px;
  min-width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: none;
}
.step h3 { font-family: var(--font-display); font-size: 1.05rem; margin: 0 0 6px; }
.step p { margin: 0; color: var(--muted); font-size: 0.96rem; }

/* Contact */
.contact {
  background: radial-gradient(110% 100% at 50% 100%, #0a3a31 0%, var(--hero) 70%);
  color: #eafff7;
  text-align: center;
  padding: 72px 0;
}
.contact-inner { display: flex; flex-direction: column; align-items: center; }
.contact h2 { max-width: 18ch; }
.contact .section-lead { color: #b9d9d1; margin-bottom: 28px; }
.contact .eyebrow { color: #6ff0c4; }

/* Footer */
.site-footer {
  background: #031713;
  color: #8fb3aa;
  padding: 40px 0 32px;
  font-size: 0.92rem;
}
.footer-inner { display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
}
.footer-mark {
  height: 34px;
  width: auto;
  background: #fff;
  padding: 4px 6px;
  border-radius: 9px;
}
.footer-tag { margin: 0; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
}
.footer-links a { color: #a9d8cc; text-decoration: none; }
.footer-links a:hover { color: #3ce8ad; }
.footer-copy { margin: 8px 0 0; font-size: 0.82rem; color: #5f847b; }

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Tablet+ ---------- */
@media (min-width: 640px) {
  .container { padding-inline: 28px; }
  .hero { padding: 96px 0 84px; }
  .hero-glow-a { width: 460px; height: 460px; }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Desktop nav ---------- */
@media (min-width: 880px) {
  .nav-toggle { display: none; }
  .nav {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 0;
    padding: 0;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    transition: none;
  }
  .nav a { padding: 9px 14px; font-size: 0.94rem; }
  .nav .nav-cta {
    margin-top: 0;
    padding: 10px 20px;
    border-radius: 999px;
    background: var(--primary);
  }
  .section { padding: 96px 0; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-stats { max-width: 560px; }
}
