/* ==========================================================================
   Health Mate — Marketing Site Stylesheet
   Single file · mobile-first · design tokens via CSS custom properties
   Brand colors sampled from the Health Mate logo & splash assets.
   ========================================================================== */

/* ---------- Design Tokens ------------------------------------------------ */
:root {
  /* Brand */
  --blue:          #004EDE;   /* wordmark / primary */
  --blue-bright:   #0068F8;   /* logo ring / accent */
  --blue-dark:     #0039A6;
  --green:         #22B449;   /* "Mate" / health */
  --green-dark:    #178A38;

  /* Neutrals */
  --ink:           #0B2447;   /* headings */
  --body:          #1A2533;   /* body text */
  --muted:         #5A6B7B;   /* secondary text */
  --line:          #E2E8F2;   /* borders */
  --surface:       #FFFFFF;
  --surface-soft:  #F5F9FF;

  /* Gradients (mirror the two-tone logo) */
  --grad-brand:    linear-gradient(120deg, var(--blue-bright) 0%, var(--blue) 45%, var(--green) 100%);
  --grad-bg:       linear-gradient(160deg, #E9F2FD 0%, #F4FAFF 38%, #FFFFFF 70%);
  --grad-soft:     linear-gradient(160deg, #E5EEF9 0%, #D5E8F2 100%);

  /* Type */
  --font-head: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  /* Spacing scale */
  --sp-1: .25rem;  --sp-2: .5rem;   --sp-3: .75rem;  --sp-4: 1rem;
  --sp-5: 1.5rem;  --sp-6: 2rem;    --sp-7: 3rem;    --sp-8: 4rem;  --sp-9: 6rem;

  /* Radius & shadow */
  --r-sm: 8px;  --r-md: 14px;  --r-lg: 22px;  --r-pill: 999px;
  --shadow-sm: 0 2px 8px rgba(11, 36, 71, .06);
  --shadow-md: 0 10px 30px rgba(11, 36, 71, .10);
  --shadow-lg: 0 24px 60px rgba(11, 36, 71, .14);

  --container: 1160px;
  --header-h: 72px;
}

/* ---------- Reset -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--body);
  background: var(--surface);
  line-height: 1.65;
  font-size: 1rem;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
ul { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.18; font-weight: 700; }

/* ---------- Layout helpers ---------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--sp-5); }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--soft { background: var(--surface-soft); }
.section--grad { background: var(--grad-soft); }
.eyebrow {
  font-family: var(--font-head); font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; font-size: .8rem; color: var(--blue-bright);
  margin-bottom: var(--sp-3);
}
.section-head { max-width: 720px; margin: 0 auto clamp(2rem, 4vw, 3rem); text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.section-head p { color: var(--muted); margin-top: var(--sp-3); font-size: 1.05rem; }
.text-grad {
  background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.text-green { color: var(--green); }

/* ---------- Buttons ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  padding: .8rem 1.5rem; border-radius: var(--r-pill); cursor: pointer;
  border: 1.5px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .2s;
  min-height: 48px; white-space: nowrap;
}
.btn--primary { background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-md); }
.btn--primary:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn--ghost { background: #fff; color: var(--blue); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--blue-bright); color: var(--blue-dark); transform: translateY(-2px); }
.btn--lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* Store badges */
.store-badges { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.store-badge { display: inline-block; border-radius: 12px; transition: transform .15s ease, box-shadow .15s; box-shadow: var(--shadow-sm); }
.store-badge:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.store-badge img { height: 54px; width: auto; }

/* ---------- Header ------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .85); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: var(--sp-5); }
.brand { display: flex; align-items: center; gap: var(--sp-3); font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 1.15rem; }
.brand img { height: 40px; }
.nav-links { display: flex; align-items: center; gap: var(--sp-6); }
.nav-links a { font-family: var(--font-head); font-weight: 500; color: var(--body); font-size: .98rem; position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--grad-brand); transition: width .2s ease;
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { width: 100%; }
.nav-links a[aria-current="page"] { color: var(--blue); }
.nav-actions { display: flex; align-items: center; gap: var(--sp-4); }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer;
  padding: 8px; border-radius: var(--r-sm);
}
.nav-toggle span { width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero --------------------------------------------------------- */
.hero { background: var(--grad-bg); position: relative; overflow: hidden; }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(10px); opacity: .35; z-index: 0;
}
.hero::before { width: 460px; height: 460px; background: radial-gradient(circle, #8FC9FF 0%, transparent 70%); top: -120px; right: -120px; }
.hero::after  { width: 420px; height: 420px; background: radial-gradient(circle, #9FE6B4 0%, transparent 70%); bottom: -160px; left: -120px; }
.hero-grid {
  position: relative; z-index: 1; display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: center; padding-block: clamp(3rem, 7vw, 5.5rem);
}
.hero-copy h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); letter-spacing: -.02em; }
.hero-tagline { font-family: var(--font-head); font-weight: 600; font-size: clamp(1.15rem, 2.6vw, 1.5rem); margin-top: var(--sp-4); }
.hero-sub { color: var(--muted); font-size: 1.1rem; margin-top: var(--sp-3); max-width: 48ch; }
.hero-cta { margin-top: var(--sp-6); }
.hero-cta .store-badges { margin-top: var(--sp-4); }
.hero-visual { display: flex; justify-content: center; }
.hero-visual img { width: min(420px, 90%); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.hero-badge-row { display: flex; align-items: center; gap: var(--sp-4); margin-top: var(--sp-5); flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.hero-badge-row .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

/* ---------- Feature grid ------------------------------------------------- */
.features-grid { display: grid; gap: var(--sp-5); grid-template-columns: 1fr; }
.feature-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--sp-6); box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
  position: relative; overflow: hidden;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #CFE0F7; }
.feature-card.is-highlight { border-color: transparent; background:
  linear-gradient(#fff, #fff) padding-box,
  var(--grad-brand) border-box; border: 1.5px solid transparent; }
.feature-icon {
  width: 56px; height: 56px; border-radius: var(--r-md); display: grid; place-items: center;
  background: var(--grad-soft); color: var(--blue); margin-bottom: var(--sp-4);
}
.feature-icon svg { width: 30px; height: 30px; stroke: var(--blue); }
.is-highlight .feature-icon { background: var(--grad-brand); }
.is-highlight .feature-icon svg { stroke: #fff; }
.feature-card h3 { font-size: 1.2rem; margin-bottom: var(--sp-2); }
.feature-card p { color: var(--muted); font-size: .97rem; }
.feature-tag {
  display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: .7rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--green-dark);
  background: #E6F7EC; padding: 3px 10px; border-radius: var(--r-pill); margin-bottom: var(--sp-3);
}

/* ---------- "Who it's for" / lists --------------------------------------- */
.audience-grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
.audience-item {
  display: flex; gap: var(--sp-3); align-items: flex-start; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-4) var(--sp-5); box-shadow: var(--shadow-sm);
}
.audience-item .check {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--grad-brand);
  display: grid; place-items: center; margin-top: 2px;
}
.audience-item .check svg { width: 14px; height: 14px; stroke: #fff; }
.audience-item span { color: var(--body); font-weight: 500; }

/* ---------- Split / about content --------------------------------------- */
.split { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.split.reverse .split-media { order: -1; }
.split-media img { border-radius: var(--r-lg); box-shadow: var(--shadow-md); }
.prose h3 { font-size: 1.4rem; margin: var(--sp-6) 0 var(--sp-3); }
.prose p { color: var(--body); margin-bottom: var(--sp-4); }
.prose ul.ticks { display: grid; gap: var(--sp-3); margin: var(--sp-4) 0; }
.prose ul.ticks li { position: relative; padding-left: 2rem; color: var(--body); }
.prose ul.ticks li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.mission-quote {
  font-family: var(--font-head); font-weight: 600; font-size: clamp(1.3rem, 3vw, 1.9rem);
  color: var(--ink); line-height: 1.4; text-align: center; max-width: 760px; margin: 0 auto;
}
.mission-quote .text-grad { font-weight: 700; }

/* ---------- Stats strip -------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-5); text-align: center; }
.stat .num { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.6rem); background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .label { color: var(--muted); font-size: .95rem; margin-top: var(--sp-1); }

/* ---------- CTA band ----------------------------------------------------- */
.cta-band { background: var(--grad-brand); border-radius: var(--r-lg); padding: clamp(2.5rem, 6vw, 4rem); text-align: center; color: #fff; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.5rem); }
.cta-band p { color: rgba(255,255,255,.9); margin-top: var(--sp-3); font-size: 1.1rem; }
.cta-band .store-badges { justify-content: center; margin-top: var(--sp-6); }

/* ---------- Contact ------------------------------------------------------ */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.6rem, 4vw, 2.5rem); box-shadow: var(--shadow-md); }
.field { margin-bottom: var(--sp-4); }
.field label { display: block; font-family: var(--font-head); font-weight: 500; font-size: .92rem; color: var(--ink); margin-bottom: var(--sp-2); }
.field input, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--body);
  padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface-soft);
  transition: border-color .15s, box-shadow .15s; min-height: 48px;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue-bright); box-shadow: 0 0 0 4px rgba(0,104,248,.12); background: #fff; }
.field textarea { resize: vertical; min-height: 140px; }
.field.invalid input, .field.invalid textarea { border-color: #E14B4B; }
.field .err { color: #C53030; font-size: .85rem; margin-top: var(--sp-2); display: none; }
.field.invalid .err { display: block; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }
.form-note { color: var(--muted); font-size: .85rem; margin-top: var(--sp-3); }
.form-alert { border-radius: var(--r-md); padding: var(--sp-4); margin-bottom: var(--sp-5); font-size: .95rem; display: none; }
.form-alert.show { display: block; }
.form-alert.success { background: #E6F7EC; color: var(--green-dark); border: 1px solid #B6E6C5; }
.form-alert.error { background: #FDECEC; color: #C53030; border: 1px solid #F5C2C2; }

.info-block { margin-bottom: var(--sp-6); }
.info-block h3 { font-size: 1.15rem; margin-bottom: var(--sp-2); }
.info-block a { font-weight: 500; }
.social-row { display: flex; gap: var(--sp-3); margin-top: var(--sp-3); }
.social-row a {
  width: 44px; height: 44px; border-radius: var(--r-md); display: grid; place-items: center;
  background: var(--surface-soft); border: 1px solid var(--line); color: var(--blue); transition: transform .15s, background .2s, color .2s;
}
.social-row a:hover { background: var(--grad-brand); color: #fff; transform: translateY(-2px); border-color: transparent; }
.social-row svg { width: 20px; height: 20px; }

/* ---------- Footer ------------------------------------------------------- */
.site-footer { background: var(--ink); color: #C7D3E3; padding-block: var(--sp-8) var(--sp-6); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-6); }
.footer-brand img { height: 44px; filter: brightness(0) invert(1); opacity: .95; }
.footer-brand p { color: #9FB0C7; margin-top: var(--sp-3); font-size: .92rem; max-width: 36ch; }
.footer-col h4 { color: #fff; font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: var(--sp-3); }
.footer-col a, .footer-col li { color: #B8C6DA; font-size: .95rem; line-height: 2.1; }
.footer-col a:hover { color: #fff; }
.footer-social { display: flex; gap: var(--sp-3); margin-top: var(--sp-3); }
.footer-social a { width: 38px; height: 38px; border-radius: var(--r-sm); display: grid; place-items: center; background: rgba(255,255,255,.08); color: #fff; transition: background .2s; }
.footer-social a:hover { background: var(--grad-brand); }
.footer-social svg { width: 18px; height: 18px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: var(--sp-6); padding-top: var(--sp-5); display: grid; gap: var(--sp-4); }
.disclaimer { font-size: .82rem; color: #8595AC; line-height: 1.6; }
.footer-legal { display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: space-between; align-items: center; font-size: .85rem; color: #8595AC; }

/* ---------- Reveal animation -------------------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive — tablet & up
   ========================================================================== */
@media (min-width: 600px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .audience-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; }
}

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr .95fr; }
  .features-grid { grid-template-columns: repeat(4, 1fr); }
  .features-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1.1fr .9fr; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.2fr; }
}

/* ==========================================================================
   Responsive — mobile nav (below 900px)
   ========================================================================== */
@media (max-width: 899px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
    padding: var(--sp-3) var(--sp-5) var(--sp-5);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: var(--sp-4) 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav-links a::after { display: none; }
  .nav-actions .btn--app { display: none; }
}

/* Hide the in-menu CTA on desktop (it also lives in nav-actions) */
.nav-links .btn--app-inline { display: none; }
@media (max-width: 899px) {
  .nav-links .btn--app-inline { display: inline-flex; margin-top: var(--sp-4); justify-content: center; }
}

/* ---------- Motion / a11y ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: #fff; color: var(--blue); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm); z-index: 100; }
.skip-link:focus { left: var(--sp-4); top: var(--sp-3); box-shadow: var(--shadow-md); }
