:root {
  --bg: #0b1020;
  --card: #101731;
  --muted: #9aa4b2;
  --text: #e7ecf4;
  --brand: #6ee7ff;
  --brand2: #7c3aed;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

html {
  scroll-behavior: smooth;
}

:target {
  /* adjust this to your header height */
  scroll-margin-top: 100px;
}

/* ---------- FULLSCREEN BACKDROP ---------- */
.hero-stage {
  position: fixed;
  inset: 0;
  z-index: 0; /* FIX: was -1 (hidden behind body) */
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  pointer-events: none; /* keep whole layer non-interactive */
}

.hero-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1000px 400px at 60% 20%, rgba(10, 15, 30, .35), transparent 60%),
    linear-gradient(180deg, rgba(8, 12, 24, .55), rgba(8, 12, 24, .75));
  pointer-events: none;
}

#logoStarsFull {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* ---------- HEADER ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(11, 16, 32, 0.95), rgba(11, 16, 32, 0.6) 60%, rgba(11, 16, 32, 0));
  backdrop-filter: blur(6px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 12px;
}

.logo {
  font-weight: 800;
  font-size: 20px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.logo span {
  color: var(--brand);
}

.logo small {
  color: var(--muted);
}

.nav nav a {
  margin: 0 10px;
  color: #cdd6e6;
  opacity: .9;
}

.nav .cta {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px dashed rgba(255, 255, 255, .2);
}

/* desktop-only helper for CTA */
.hide-on-mobile {
  display: inline-flex;
}

.header-wave {
  position: absolute;
  inset: auto 0 auto 0;
  transform: translateY(0);
  height: 80px;
  pointer-events: none;
}

.waves {
  width: 100%;
  height: 100%;
}

.wave {
  animation: drift 12s linear infinite;
  fill: rgba(124, 58, 237, 0.2);
}

.wave2 {
  animation-duration: 16s;
  fill: rgba(110, 231, 255, 0.18);
}

.wave3 {
  animation-duration: 20s;
  fill: rgba(110, 231, 255, 0.12);
}

.wave4 {
  animation-duration: 24s;
  fill: rgba(124, 58, 237, 0.1);
}

@keyframes drift {
  from {
    transform: translate3d(-90px, 0, 0)
  }
  to {
    transform: translate3d(85px, 0, 0)
  }
}

/* Header Logo Styling */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
}

.header-logo {
  height: 38px; /* adjust as needed */
  width: auto;
  border-radius: 6px; /* optional */
  object-fit: contain;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-text span {
  color: var(--brand);
  font-size: 20px;
  font-weight: 800;
}

.logo-text small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

/* ---------- HERO ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  padding: 90px 0 40px;
}

.hero h1 {
  font-size: clamp(28px, 4vw, 54px);
  line-height: 1.05;
  margin: 0 0 14px;
}

.gradient {
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  color: var(--muted);
  font-size: 18px;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.btn {
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .1);
  display: inline-block;
}

.btn.primary {
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  color: #0b1020;
  font-weight: 700;
}

.btn.ghost {
  color: var(--text);
}

/* Float animation (used for images elsewhere) */
.floaty {
  animation: float 6s ease-in-out infinite;
}

.floaty.slow {
  animation-duration: 10s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0)
  }
  50% {
    transform: translateY(-8px)
  }
}

/* ---------- SECTIONS / CARDS ---------- */
.pillars,
.services,
.health,
.features,
.product-details,
.how {
  padding: 70px 0;
}

.pillars-grid,
.services-grid,
.features-grid,
.details-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card,
.service {
  background:
    radial-gradient(1200px 300px at 50% 0, rgba(110, 231, 255, .08), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  padding: 18px;
  min-height: 150px
}

.services h2,
.how h2 {
  margin: 0 0 10px
}

.health-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center
}

/* Health section image sizing */
.health .media img {
  width: 90%;              /* reduce the image size */
  max-width: 800px;        /* cap the maximum size */
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 12px;     /* optional: rounded edges */
  box-shadow: 0 0 20px rgba(110, 231, 255, 0.15);
}

@media (max-width: 900px) {
  .health .media img {
    width: 70%;
    max-width: 280px;
  }
}

.health .media img.floaty {
  animation: float 8s ease-in-out infinite;
}

.section-wave {
  height: 60px;
}

.waves.small {
  height: 100%;
}

.pillars .card:hover,
.service:hover {
  transform: translateY(-3px);
  transition: .2s ease
}

.pillars .card h3,
.service h3,
.features .card h3 {
  margin: 0 0 8px
}

/* ---------- PRODUCT PAGE (iHealth DR) ---------- */
.product-hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 36px;
  padding: 70px 0 30px;
}

.media-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}

.product-details .details-grid {
  grid-template-columns: 1fr 1fr
}

/* CTA band */
.cta-band {
  text-align: center;
  padding: 60px 0
}

.cta-band h3 {
  margin-bottom: 10px
}

/* ---------- FOOTER (base) ---------- */
.site-footer {
  margin-top: 60px;
  border-top: 1px solid rgba(255, 255, 255, .08)
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 24px;
  padding: 30px 0
}

.footer-bottom {
  text-align: center;
  padding: 14px 0;
  color: var(--muted)
}

/* ---------- RESPONSIVE (base) ---------- */
@media (max-width: 900px) {
  .hero,
  .product-hero,
  .health-inner {
    grid-template-columns: 1fr
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr
  }
}

/* ===== iHealth DR page ===== */
/* Hero area (title + retina preview) */
.product-hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 36px;
  padding: 70px 0 30px;
}

.product-hero .copy h1 {
  margin: 0 0 10px;
}

.product-hero .copy p {
  color: var(--muted);
  margin: 8px 0 16px;
}

.product-hero .hero-ctas {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

/* Control the retina preview size */
.product-hero .media img {
  width: 85%;
  max-width: 320px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 14px;
  box-shadow: 0 0 24px rgba(110, 231, 255, 0.12);
}

/* Feature cards refinement */
.features .features-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.features .card p {
  color: var(--muted);
}

/* "How it works" list with clean numbered steps" */
.how h2 {
  margin: 0 0 8px;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 8px 0 22px;
}

.steps li {
  position: relative;
  margin: 10px 0;
  padding-left: 44px;
  color: var(--text);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  font-weight: 700;
  color: #0b1020;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(110, 231, 255, 0.20);
}

/* Grad-CAM / LIME pair */
.media-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
  align-items: start;
}

.media-pair figure {
  margin: 0;
  background:
    radial-gradient(900px 200px at 50% 0, rgba(110, 231, 255, 0.05), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  padding: 12px;
}

.media-pair figure img {
  width: 90%;
  max-width: 220px; /* makes them not huge */
  height: auto;
  display: block;
  margin: 6px auto 8px;
  border-radius: 10px;
  box-shadow: 0 0 22px rgba(110, 231, 255, 0.12);
}

.media-pair figure figcaption {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* Details grid (Integrations / Clinical notes) */
.product-details .details-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1fr;
}

.product-details .details-grid h3 {
  margin-top: 0;
}

.product-details .details-grid ul {
  margin: 8px 0 0 18px;
  color: var(--muted);
}

/* CTA band spacing on this page */
.product-details + .cta-band {
  padding-top: 40px;
}

/* Responsive tweaks */
@media (max-width: 1020px) {
  .product-hero {
    grid-template-columns: 1fr;
  }

  .product-hero .media img {
    width: 70%;
    max-width: 460px;
  }
}

@media (max-width: 900px) {
  .media-pair {
    grid-template-columns: 1fr;
  }

  .media-pair figure img {
    width: 80%;
    max-width: 360px;
  }

  .product-details .details-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .product-hero .media img {
    width: 82%;
    max-width: 320px;
  }

  .media-pair figure img {
    width: 86%;
    max-width: 300px;
  }
}

/* ===== Contact Page ===== */
.contact-hero {
  padding: 70px 0 10px;
  text-align: center;
}

.contact-hero .muted {
  color: var(--muted);
}

.email-line {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  color: var(--text);
  opacity: .9;
  margin-top: 6px;
}

.email-line a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* form shell */
.contact-wrap {
  padding: 20px 0 80px;
  display: flex;
  justify-content: center;
}

.contact-card {
  width: min(760px, 92%);
  background:
    radial-gradient(1200px 300px at 50% 0, rgba(110, 231, 255, .08), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 40px rgba(10, 15, 30, .25);
  backdrop-filter: blur(2px);
}

/* fields */
.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}

.field label {
  font-size: 14px;
  color: #cbd4e7;
  margin: 6px 0;
}

.field input,
.field textarea {
  background: #0c1226;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  font-size: 16px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #7f8aa4;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(110, 231, 255, .45);
  box-shadow: 0 0 0 3px rgba(110, 231, 255, .15);
  transform: translateY(-1px);
}

/* send button */
.send-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
  cursor: pointer;
}

.send-btn .send-icon {
  transition: transform .25s ease;
}

.send-btn:hover .send-icon {
  transform: translateX(3px);
}

/* messages */
.form-success,
.form-error {
  margin: 8px 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 600;
}

.form-success {
  background: rgba(34, 197, 94, .18);
  border: 1px solid rgba(34, 197, 94, .35);
}

.form-error {
  background: rgba(239, 68, 68, .18);
  border: 1px solid rgba(239, 68, 68, .35);
}

/* anti-bot honeypot field hidden from users */
.hp {
  position: absolute !important;
  left: -99999px;
  width: 0;
  height: 0;
  opacity: 0;
}

@media (max-width: 640px) {
  .contact-card {
    padding: 14px;
  }
}

/* ===== Footer: Semi-transparent, compact, minimal ===== */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 40px;
  background: rgba(11, 16, 32, 0.35); /* transparent dark tint */
  backdrop-filter: blur(6px);          /* soft glass effect */
  -webkit-backdrop-filter: blur(6px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25) inset;
  padding: 20px 0 10px;               /* shorter footer height */
  transition: background 0.3s ease;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 16px;
  padding: 12px 0 0;
}

.footer-grid h4 {
  color: var(--brand);
  font-size: 0.9rem;
  margin: 0 0 8px;
}

.footer-grid p {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--muted);
  margin: 0;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid li {
  margin-bottom: 4px;
}

.footer-grid a {
  color: #e7ecf4;
  font-size: 0.85rem;
  opacity: 0.8;
  transition: opacity .2s ease, color .2s ease;
}

.footer-grid a:hover {
  color: var(--brand);
  opacity: 1;
}

.footer-bottom {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;          /* smaller text */
  border-top: 1px solid rgba(255, 255, 255, .05);
  margin-top: 12px;
  padding-top: 8px;
}

.footer-bottom .designer {
  color: var(--brand);
  font-size: 0.75rem;         /* small credit */
  opacity: 0.8;
  display: block;
  margin-top: 2px;
}

/* Responsive footer adjustments */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* ---------- MOBILE NAV ---------- */
.menu-toggle,
.mobile-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, .06);
  backdrop-filter: saturate(120%) blur(6px);
  color: #e7ecf4;
  cursor: pointer;

  /* stack the bars vertically like a hamburger */
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* hamburger bars */
.menu-toggle .bar,
.mobile-toggle .bar {
  display: block;
  width: 18px;
  height: 2px;
  background: #f9fafb;
  border-radius: 999px;
  margin: 0px 0;
}

.site-header .nav nav {
  display: flex;
  gap: 14px;
  align-items: center;
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: auto 0 0 0; /* bottom sheet on mobile */
  background: rgba(12, 17, 34, .92);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 14px 18px 24px;
  z-index: 60;
}

.mobile-nav a {
  display: block;
  padding: 10px 2px;
  color: #e7ecf4;
  opacity: .95;
}

/* ---------- MOBILE HERO / LAYOUT ---------- */
@media (max-width: 900px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 55
  }

  .site-header .nav {
    padding: 12px 0
  }

  .site-header .nav nav {
    display: none
  } /* hide desktop menu */

  .menu-toggle,
  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px
  }

  /* hide desktop CTA on mobile */
  .hide-on-mobile {
    display: none;
  }

  .header-wave {
    display: none
  } /* that big svg band—hide on mobile */

  .hero {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 80px 0 28px
  }

  .hero h1 {
    font-size: clamp(24px, 7vw, 34px);
    line-height: 1.12;
    margin-bottom: 10px;
  }

  .hero p {
    font-size: 16px
  }

  .hero-ctas {
    flex-wrap: wrap
  }

  .btn {
    padding: 11px 16px;
    border-radius: 12px
  }

  /* Media blocks/images */
  .media img,
  .hero .media img,
  .health .media img {
    max-width: 88%;
    height: auto;
    display: block;
    margin: 6px auto 0;
  }

  /* Cards tighter */
  .pillars,
  .services,
  .health,
  .features,
  .product-details,
  .how {
    padding: 48px 0
  }

  .pillars-grid,
  .services-grid,
  .features-grid,
  .details-grid {
    gap: 14px
  }
}

/* ---------- FULLSCREEN BACKDROP ON MOBILE ---------- */
@media (max-width: 900px) {
  .hero-stage::after {
    /* soften the vignette on mobile so text stays readable */
    background:
      radial-gradient(800px 300px at 60% 15%, rgba(8, 12, 24, .28), transparent 60%),
      linear-gradient(180deg, rgba(8, 12, 24, .55), rgba(8, 12, 24, .75));
  }

  /* keep the canvas behind & non-blocking */
  #logoStarsFull {
    pointer-events: none;
    mix-blend-mode: screen;
  }
}

/* ---------- FOOTER MOBILE ---------- */
@media (max-width: 900px) {
  .site-footer .footer-grid {
    grid-template-columns: 1fr;
    gap: 12px
  }

  .footer-bottom {
    font-size: 12px
  }
}

/* Optional: reduce hero-stage paint area on very small screens */
@media (max-width: 420px) {
  .container {
    width: min(100%, 92vw);
  }
}

.mobile-nav.open {
  display: block;
}
