/* ==========================================================================
   TotMediX — Marketing Site Stylesheet
   Plain CSS, no build step. Theming via CSS custom properties.
   Palette source: docs/Color_Palette (Material Theme Builder values).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Light theme (default) */
  --primary: #445E91;
  --on-primary: #FFFFFF;
  --primary-container: #D8E2FF;
  --on-primary-container: #001A41;

  --secondary: #3E6837;
  --on-secondary: #FFFFFF;
  --secondary-container: #BFF0B1;
  --on-secondary-container: #002201;

  --tertiary: #6B538C;
  --on-tertiary: #FFFFFF;
  --tertiary-container: #EDDCFF;
  --on-tertiary-container: #250E44;

  --complementary: #8F4C32;
  --on-complementary: #FFFFFF;
  --complementary-container: #FFDBCE;
  --on-complementary-container: #380D00;

  --error: #904A48;
  --error-container: #FFDAD8;
  --on-error-container: #3B080B;

  --background: #F9F9FF;
  --on-background: #1A1B20;
  --surface: #F5FAFB;
  --on-surface: #171D1E;
  --surface-variant: #DBE4E6;
  --on-surface-variant: #3F484A;
  --outline: #6F797A;
  --outline-variant: #BFC8CA;
  --surface-container-low: #EFF5F6;
  --surface-container: #E9EFF0;
  --surface-container-high: #E3E9EA;
  --surface-container-highest: #DEE3E5;

  /* Brand source colors (semantic: blue=medications, green=symptoms,
     purple=vaccines, orange=alerts). Raw values for graphics/gradients only;
     text uses the accessible resolved tones below. */
  --brand-blue: #3A86FF;
  --brand-green: #6ECB63;
  --brand-purple: #A162F7;
  --brand-orange: #FF8A5C;

  /* Accessible text tones per semantic category (resolved Material tones) */
  --med-text: #445E91;
  --symptom-text: #3E6837;
  --vaccine-text: #6B538C;
  --alert-text: #8F4C32;

  --gradient-brand: linear-gradient(135deg, #6ECB63 0%, #3A86FF 50%, #A162F7 100%);
  /* Text/anything holding text uses the resolved deeper tones in light mode:
     raw #6ECB63 on the light background is 1.9:1, below WCAG AA large-text. */
  --gradient-text: linear-gradient(135deg, #3E6837 0%, #445E91 50%, #6B538C 100%);

  --shadow-soft: 0 2px 12px rgba(23, 29, 30, 0.06);
  --shadow-lift: 0 10px 30px rgba(23, 29, 30, 0.12);
  --nav-bg: rgba(249, 249, 255, 0.85);

  --font-heading: "Poppins", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  --radius-card: 20px;
  --radius-pill: 999px;
  --container: 1120px;

  color-scheme: light;
}

[data-theme="dark"] {
  --primary: #ADC6FF;
  --on-primary: #112F60;
  --primary-container: #2B4678;
  --on-primary-container: #D8E2FF;

  --secondary: #A3D397;
  --on-secondary: #0E380D;
  --secondary-container: #265022;
  --on-secondary-container: #BFF0B1;

  --tertiary: #D7BAFB;
  --on-tertiary: #3B255A;
  --tertiary-container: #533C73;
  --on-tertiary-container: #EDDCFF;

  --complementary: #FFB59A;
  --on-complementary: #552009;
  --complementary-container: #71361D;
  --on-complementary-container: #FFDBCE;

  --error: #FFB3B0;
  --error-container: #733332;
  --on-error-container: #FFDAD8;

  --background: #111318;
  --on-background: #E2E2E9;
  --surface: #0E1415;
  --on-surface: #DEE3E5;
  --surface-variant: #3F484A;
  --on-surface-variant: #BFC8CA;
  --outline: #899294;
  --outline-variant: #3F484A;
  --surface-container-low: #171D1E;
  --surface-container: #1B2122;
  --surface-container-high: #252B2C;
  --surface-container-highest: #303637;

  --med-text: #ADC6FF;
  --symptom-text: #A3D397;
  --vaccine-text: #D7BAFB;
  --alert-text: #FFB59A;

  --shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.35);
  --shadow-lift: 0 10px 30px rgba(0, 0, 0, 0.5);
  --nav-bg: rgba(17, 19, 24, 0.85);
  /* Raw brand gradient passes AA large-text on the dark background */
  --gradient-text: linear-gradient(135deg, #6ECB63 0%, #3A86FF 50%, #A162F7 100%);

  color-scheme: dark;
}

/* Smooth theme change (disabled under reduced motion, see bottom) */
.theme-transition,
.theme-transition * {
  transition: background-color 0.35s ease, color 0.35s ease,
    border-color 0.35s ease, fill 0.35s ease !important;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--on-background);
  background: var(--background);
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--on-surface);
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.4rem); font-weight: 600; }

p { margin: 0 0 1em; }

a { color: var(--primary); }

img { max-width: 100%; height: auto; display: block; }

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.1rem, 4vw, 2rem);
}

.section {
  padding: clamp(3.5rem, 9vw, 6.5rem) 0;
}

/* Keep anchored sections clear of the fixed nav */
[id] { scroll-margin-top: 84px; }

.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.9rem;
}

.section-intro {
  max-width: 620px;
  color: var(--on-surface-variant);
  font-size: 1.06rem;
}

.center { text-align: center; }
.center .section-intro { margin-left: auto; margin-right: auto; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 200;
  background: var(--primary);
  color: var(--on-primary);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

/* --------------------------------------------------------------------------
   3. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.7rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-lift);
}
.btn-primary:active { transform: translateY(0) scale(0.99); }

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--outline-variant);
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   4. Navigation
   -------------------------------------------------------------------------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.1rem 0;
  background: transparent;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.site-nav.scrolled {
  padding: 0.55rem 0;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}
.nav-brand img.brandmark { width: 34px; height: 34px; }
.nav-brand img.wordmark { height: 26px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a:not(.btn) {
  display: inline-block;
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--on-surface-variant);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-links a:not(.btn):hover { color: var(--on-surface); background: var(--surface-container); }

.nav-links a.active {
  color: var(--primary);
  background: var(--primary-container);
}
[data-theme="dark"] .nav-links a.active { color: var(--on-primary-container); }

.nav-links .btn { min-height: 42px; padding: 0.5rem 1.25rem; font-size: 0.95rem; }

/* Homepage nav: the CTA is redundant with the hero's own button until the
   nav condenses, so it fades in only once the nav is in its scrolled state.
   The opened mobile menu always shows it. */
.nav-cta-on-scroll .nav-links .btn { transition: opacity 0.3s ease, visibility 0.3s ease; }
.nav-cta-on-scroll:not(.scrolled) .nav-links:not(.open) .btn {
  opacity: 0;
  visibility: hidden;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--outline-variant);
  background: transparent;
  color: var(--on-surface-variant);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.theme-toggle:hover { background: var(--surface-container); transform: rotate(12deg); }
.theme-toggle svg { width: 20px; height: 20px; }
[data-theme="dark"] .icon-moon { display: none; }
html:not([data-theme="dark"]) .icon-sun { display: none; }

.nav-burger {
  display: none;
  width: 44px; height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
  padding: 10px;
}
.nav-burger span {
  display: block;
  height: 2px;
  background: var(--on-surface);
  border-radius: 2px;
  margin: 5px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-burger { display: block; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    background: var(--nav-bg);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-lift);
    padding: 0.8rem 1.2rem 1.2rem;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 0.8rem 0.8rem; }
  .nav-links .btn { margin-top: 0.4rem; }
}

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: clamp(7rem, 16vw, 10.5rem) 0 clamp(3.5rem, 8vw, 6rem);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.4;
  will-change: transform;
}
[data-theme="dark"] .blob { opacity: 0.22; }

/* Soft wash of the documented brand gradient: green top-right, blue center,
   purple bottom-left, along the 135° diagonal. */
.blob-1 {
  width: 440px; height: 440px;
  background: var(--brand-green);
  top: -140px; right: -100px;
  animation: drift1 18s ease-in-out infinite alternate;
}
.blob-2 {
  width: 520px; height: 520px;
  background: var(--brand-blue);
  top: 25%; left: calc(50% - 260px);
  animation: drift2 22s ease-in-out infinite alternate;
}
.blob-3 {
  width: 400px; height: 400px;
  background: var(--brand-purple);
  bottom: -160px; left: -120px;
  animation: drift3 26s ease-in-out infinite alternate;
}

@keyframes drift1 { from { transform: translate(0, 0) scale(1); } to { transform: translate(-50px, 40px) scale(1.08); } }
@keyframes drift2 { from { transform: translate(0, 0) scale(1); } to { transform: translate(60px, -30px) scale(1.05); } }
@keyframes drift3 { from { transform: translate(0, 0) scale(1); } to { transform: translate(-40px, -50px) scale(1.1); } }

.hero-inner {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.hero h1 {
  opacity: 0;
  transform: translateY(18px);
  animation: heroIn 0.9s ease 0.1s forwards;
}

.hero .tagline {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 600;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(18px);
  animation: heroIn 0.9s ease 0.3s forwards;
}
/* Gradient text fallback where clipping is unsupported */
@supports not (background-clip: text) {
  .hero .tagline { background: none; color: var(--primary); }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 1.8rem;
  opacity: 0;
  transform: translateY(18px);
  animation: heroIn 0.9s ease 0.5s forwards;
}

.hero-proof {
  margin-top: 1.6rem;
  font-size: 0.92rem;
  color: var(--on-surface-variant);
  opacity: 0;
  animation: heroIn 0.9s ease 0.7s forwards;
}
.hero-proof strong { color: var(--on-surface); font-weight: 600; }

@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   6. Trust bar
   -------------------------------------------------------------------------- */
.trust-bar {
  padding: 1.8rem 0 0.5rem;
}
.trust-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1.75rem, 5.5vw, 4rem);
}
.trust-badge {
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}
.trust-badge:hover { transform: translateY(-3px); }
.trust-badge img { height: 48px; width: auto; display: block; }
/* The square championship badge carries generous internal padding; give it
   more height so it reads at the same visual weight as the wordmarks */
.trust-badge img[src*="create-apps"] { height: 120px; }
.trust-badge img[src*="entrepreneur"] { height: 56px; border-radius: 10px; }
/* Marks are dark-on-light artwork; flip lightness (hue preserved) in dark theme.
   The Entrepreneur ME icon carries its own dark background, so it stays as-is. */
[data-theme="dark"] .trust-badge img { filter: invert(1) hue-rotate(180deg); }
[data-theme="dark"] .trust-badge img[src*="entrepreneur"] { filter: none; }

/* --------------------------------------------------------------------------
   7. Problem / stats
   -------------------------------------------------------------------------- */
.problem-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 820px) {
  .problem-grid { grid-template-columns: 1fr; }
}

.stat-card {
  background: var(--surface-container-low);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-card);
  padding: 2rem;
  text-align: center;
}
.stat-emoji {
  font-size: 2.1rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 4.5rem);
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}
.stat-desc {
  margin: 0.8rem 0 0.4rem;
  font-size: 1.02rem;
  color: var(--on-surface);
}
.stat-source {
  font-size: 0.8rem;
  color: var(--on-surface-variant);
}

/* --------------------------------------------------------------------------
   8. Patterns we're hearing
   -------------------------------------------------------------------------- */
.pattern-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-top: 2.2rem;
}
.pattern-card {
  background: var(--surface-container-low);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-card);
  padding: 1.6rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.pattern-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.pattern-card .pattern-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.pattern-card p { margin: 0; color: var(--on-surface-variant); font-size: 0.98rem; }
.pattern-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }

.icon-chip-blue   { background: var(--primary-container);      color: var(--on-primary-container); }
.icon-chip-green  { background: var(--secondary-container);    color: var(--on-secondary-container); }
.icon-chip-purple { background: var(--tertiary-container);     color: var(--on-tertiary-container); }
.icon-chip-orange { background: var(--complementary-container); color: var(--on-complementary-container); }

/* --------------------------------------------------------------------------
   9. Feature showcase (sticky scroll)
   -------------------------------------------------------------------------- */
.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.showcase-steps { min-width: 0; }

.showcase-step {
  min-height: 68vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0;
  opacity: 0.35;
  transition: opacity 0.4s ease;
}
.showcase-step.is-active { opacity: 1; }

.feature-icon {
  width: 46px; height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
}
.feature-icon svg { width: 24px; height: 24px; }

.showcase-step p { color: var(--on-surface-variant); max-width: 440px; }
.showcase-step .feature-note {
  font-size: 0.88rem;
  color: var(--on-surface-variant);
  border-left: 3px solid var(--outline-variant);
  padding-left: 0.8rem;
}

.showcase-visual {
  position: sticky;
  top: 90px;
  height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.visual-stage {
  position: relative;
  width: min(340px, 100%);
  aspect-ratio: 9 / 17.5;
}

.visual-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}
.visual-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.visual-slide > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 40px rgba(23, 29, 30, 0.18));
}

/* Mobile: stacked cards, no pinning */
@media (max-width: 767px) {
  .showcase-grid { display: block; }
  .showcase-visual { display: none; }
  .showcase-step {
    min-height: 0;
    opacity: 1;
    padding: 1.6rem 0;
  }
  .mobile-visual {
    margin: 1.4rem auto 0;
    width: min(280px, 82%);
  }
  .mobile-visual img { filter: drop-shadow(0 12px 26px rgba(23, 29, 30, 0.16)); }
}
@media (min-width: 768px) {
  .mobile-visual { display: none; }
}

/* --------------------------------------------------------------------------
   10. Phone-frame UI recreations (vaccines, care team)
   -------------------------------------------------------------------------- */
.phone {
  width: 100%;
  height: 100%;
  background: #101418;
  border-radius: 44px;
  padding: 10px;
  box-shadow: 0 18px 40px rgba(23, 29, 30, 0.22);
  display: flex;
}
.phone-screen {
  flex: 1;
  background: #F5FAFB;
  border-radius: 36px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-size: 13px;
  line-height: 1.45;
  color: #171D1E;
  font-family: var(--font-body);
}
/* App recreations always render the app's light UI (matches provided screenshots) */

.app-header {
  padding: 40px 18px 16px;
  color: #FFFFFF;
}
.app-header .app-title {
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 600;
  margin: 0;
  color: #FFFFFF;
}
.app-header-vaccines { background: linear-gradient(160deg, #533C73 0%, #6B538C 60%, #8a6fae 100%); }
.app-header-careteam { background: linear-gradient(160deg, #2B4678 0%, #445E91 60%, #5b76ab 100%); }

.app-header .app-chip {
  float: right;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
}

.app-action-card {
  margin: 12px 0 0;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.app-action-card .plus {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #445E91;
  font-size: 19px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.app-action-card small { display: block; opacity: 0.85; font-size: 11px; }

.app-body {
  flex: 1;
  padding: 14px 14px 8px;
  overflow: hidden;
  position: relative;
}
.app-section-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #3F484A;
  margin: 4px 2px 8px;
}

.app-card {
  background: #FFFFFF;
  border: 1px solid #E3E9EA;
  border-radius: 14px;
  padding: 11px 12px;
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.app-card .grow { flex: 1; min-width: 0; }
.app-card .app-card-title { font-weight: 600; font-size: 13px; }
.app-card .app-card-sub { color: #6F797A; font-size: 11.5px; }

.app-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 700;
  flex: none;
}
.avatar-purple { background: #EDDCFF; color: #533C73; }
.avatar-blue   { background: #D8E2FF; color: #2B4678; }
.avatar-green  { background: #BFF0B1; color: #265022; }
.avatar-orange { background: #FFDBCE; color: #71361D; }

.status-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3.5px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  flex: none;
}
.pill-done    { background: #BFF0B1; color: #002201; }
.pill-due     { background: #FFDBCE; color: #380D00; }
.pill-up      { background: #E9EFF0; color: #3F484A; border-color: #DEE3E5; }
.pill-role    { background: #EDDCFF; color: #250E44; }
.pill-role-b  { background: #D8E2FF; color: #001A41; }

.app-note {
  text-align: center;
  font-size: 10.5px;
  color: #6F797A;
  margin: 6px 0 2px;
}

.app-tabbar {
  display: flex;
  justify-content: space-around;
  padding: 8px 6px calc(12px + 6px);
  background: #FFFFFF;
  border-top: 1px solid #E3E9EA;
}
.app-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 9.5px;
  color: #6F797A;
  padding: 4px 10px;
  border-radius: 12px;
}
.app-tab svg { width: 17px; height: 17px; }
.app-tab.active-vaccines { color: #533C73; background: #EDDCFF; }
.app-tab.active-careteam { color: #2B4678; background: #D8E2FF; }

/* Interactive touches on recreations */
.app-card.tappable { cursor: pointer; }
.app-card.tappable:active,
.app-card.tappable.tapped { transform: scale(0.98); box-shadow: inset 0 0 0 1.5px #6B538C; }

.mini-toggle {
  width: 34px; height: 20px;
  border-radius: 999px;
  background: #DEE3E5;
  border: none;
  position: relative;
  cursor: pointer;
  flex: none;
  transition: background-color 0.25s ease;
  padding: 0;
}
.mini-toggle::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease;
}
.mini-toggle[aria-checked="true"] { background: #445E91; }
.mini-toggle[aria-checked="true"]::after { transform: translateX(14px); }

.vaccine-scroll {
  animation: gentleScroll 14s ease-in-out infinite;
}
@keyframes gentleScroll {
  0%, 28%   { transform: translateY(0); }
  46%, 78%  { transform: translateY(-56px); }
  96%, 100% { transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   11. Medical credibility
   -------------------------------------------------------------------------- */
.credibility {
  background: var(--surface-container-low);
}
/* Let the supporting paragraphs breathe across the section width instead of
   wrapping into narrow ragged columns */
.credibility .section-intro { max-width: 860px; }
.sources-line {
  font-size: 1.05rem;
  max-width: 860px;
  color: var(--on-surface);
}
.source-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
}
.source-chip {
  display: inline-block;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--outline-variant);
  background: var(--surface-container);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--on-surface);
}
.evidence-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.2rem;
  margin-top: 2rem;
}
.evidence-card {
  background: var(--surface);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-card);
  padding: 1.6rem;
}
.evidence-stat {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.1;
}
.evidence-card p { color: var(--on-surface-variant); font-size: 0.96rem; margin: 0.6rem 0 0.5rem; }
.evidence-source { font-size: 0.78rem; color: var(--on-surface-variant); }

/* --------------------------------------------------------------------------
   12. How it works
   -------------------------------------------------------------------------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
  margin-top: 2.4rem;
  counter-reset: step;
}
.step-card {
  position: relative;
  background: var(--surface-container-low);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-card);
  padding: 1.7rem 1.5rem 1.5rem;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--gradient-text);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: 1rem;
}
.step-card h3 { font-size: 1.1rem; }
.step-card p { color: var(--on-surface-variant); font-size: 0.95rem; margin: 0; }

/* --------------------------------------------------------------------------
   13. About / founder note
   -------------------------------------------------------------------------- */
.about-card {
  background: var(--surface-container-low);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-card);
  padding: clamp(1.8rem, 5vw, 3rem);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.4rem, 4vw, 2.5rem);
  align-items: center;
}
@media (max-width: 640px) {
  .about-card { grid-template-columns: 1fr; text-align: center; }
  .about-card img { margin: 0 auto; }
}
.about-card img {
  width: 132px; height: 132px;
  border-radius: 50%;
  object-fit: cover;
}
.about-card p { color: var(--on-surface-variant); }
.read-story {
  font-weight: 600;
  text-decoration: none;
}
.read-story:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   14. FAQ
   -------------------------------------------------------------------------- */
.faq-list {
  max-width: 760px;
  margin: 2.2rem auto 0;
}
.faq-item {
  border: 1px solid var(--outline-variant);
  border-radius: 16px;
  margin-bottom: 0.8rem;
  background: var(--surface-container-low);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  min-height: 48px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 600;
  text-align: left;
  color: var(--on-surface);
}
.faq-q .chev {
  flex: none;
  transition: transform 0.3s ease;
}
.faq-q[aria-expanded="true"] .chev { transform: rotate(180deg); }
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}
.faq-a > div { overflow: hidden; }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a p {
  padding: 0 1.3rem 1.2rem;
  margin: 0;
  color: var(--on-surface-variant);
  font-size: 0.98rem;
}

/* --------------------------------------------------------------------------
   15. Final CTA + disclaimer
   -------------------------------------------------------------------------- */
.final-cta {
  position: relative;
  text-align: center;
  overflow: hidden;
}
.final-cta .container { position: relative; }
.final-cta .section-intro { margin-inline: auto; }
.final-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-brand);
  opacity: 0.09;
  pointer-events: none;
}
[data-theme="dark"] .final-cta::before { opacity: 0.13; }

.disclaimer {
  background: var(--surface-container);
  border-top: 1px solid var(--outline-variant);
  padding: 2rem 0;
}
.disclaimer p {
  max-width: 820px;
  margin: 0 auto;
  font-size: 0.9rem;
  color: var(--on-surface-variant);
  text-align: center;
}

/* --------------------------------------------------------------------------
   16. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--surface-container-low);
  border-top: 1px solid var(--outline-variant);
  padding: 2.6rem 0 2rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}
.footer-brand img.brandmark { width: 30px; height: 30px; }
.footer-brand img.wordmark { height: 24px; width: auto; }
.footer-social {
  display: flex;
  gap: 0.4rem;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  color: var(--on-surface-variant);
  transition: color 0.2s ease, background-color 0.2s ease;
}
.footer-social a:hover {
  color: var(--primary);
  background: var(--surface-container);
}
.footer-brand p { font-size: 0.9rem; color: var(--on-surface-variant); max-width: 320px; margin: 0; }
.footer-col h4 {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin-bottom: 0.8rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.55rem; }
.footer-col a {
  color: var(--on-surface);
  text-decoration: none;
  font-size: 0.95rem;
}
.footer-col a:hover { text-decoration: underline; }
.footer-meta {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--outline-variant);
  font-size: 0.82rem;
  color: var(--on-surface-variant);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  justify-content: space-between;
}

/* --------------------------------------------------------------------------
   17. Cookie consent banner
   -------------------------------------------------------------------------- */
.consent-banner {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%) translateY(12px);
  width: min(680px, calc(100% - 2rem));
  z-index: 150;
  background: var(--surface-container-high);
  border: 1px solid var(--outline-variant);
  border-radius: 18px;
  box-shadow: var(--shadow-lift);
  padding: 1.1rem 1.3rem;
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.consent-banner.visible { display: block; }
.consent-banner.shown { opacity: 1; transform: translateX(-50%) translateY(0); }
.consent-banner p {
  margin: 0 0 0.9rem;
  font-size: 0.92rem;
  color: var(--on-surface-variant);
}
.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.consent-actions .btn { min-height: 42px; padding: 0.5rem 1.3rem; font-size: 0.92rem; }

/* --------------------------------------------------------------------------
   18. Scroll reveals
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Cursor-aware glow (desktop pointers only, added via JS) */
@media (pointer: fine) {
  .glow-card {
    position: relative;
  }
  .glow-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(58, 134, 255, 0.10), transparent 65%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }
  .glow-card:hover::after { opacity: 1; }
}

/* --------------------------------------------------------------------------
   19. Story page
   -------------------------------------------------------------------------- */
.story-hero {
  position: relative;
  padding: clamp(7.5rem, 16vw, 10rem) 0 clamp(2.5rem, 6vw, 4rem);
  text-align: center;
  overflow: hidden;
}
.story-hero img.founder-photo {
  width: 152px; height: 152px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.4rem;
  box-shadow: var(--shadow-lift);
}
.story-hero .role {
  color: var(--on-surface-variant);
  font-size: 1.05rem;
}

.story-body {
  max-width: 680px;
  margin: 0 auto;
}
.story-chapter { margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.story-chapter h2 {
  font-size: clamp(1.35rem, 3vw, 1.7rem);
}
.story-chapter .chapter-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}
.chapter-1 .chapter-label { color: var(--symptom-text); }
.chapter-2 .chapter-label { color: var(--med-text); }
.chapter-3 .chapter-label { color: var(--vaccine-text); }
.chapter-4 .chapter-label { color: var(--alert-text); }
.story-chapter p { color: var(--on-surface-variant); font-size: 1.05rem; }

.timeline {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  border-left: 2px solid var(--outline-variant);
}
.timeline li {
  position: relative;
  padding: 0 0 1.6rem 1.6rem;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gradient-brand);
}
.timeline .when {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

/* --------------------------------------------------------------------------
   20. Legal pages
   -------------------------------------------------------------------------- */
.legal-body {
  max-width: 760px;
  margin: 0 auto;
  padding-top: clamp(7.5rem, 15vw, 9rem);
}
.legal-body h2 { margin-top: 2.2rem; font-size: 1.3rem; }
.placeholder-note {
  background: var(--primary-container);
  color: var(--on-primary-container);
  border-radius: 14px;
  padding: 1rem 1.3rem;
  font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   21. Reduced motion — all animation off
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .hero h1,
  .hero .tagline,
  .hero-actions,
  .hero-proof {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .reveal { opacity: 1; transform: none; }
  .blob { animation: none; }
  .vaccine-scroll { animation: none; }
  .showcase-step { opacity: 1; }
}
