/* Home page-specific responsive refinements. */
/* Prevent long text and grid children from forcing horizontal overflow. */
body[data-page="home"] main,
body[data-page="home"] main * {
  min-width: 0;
}

body[data-page="home"] .hero-home {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(4rem, 8vw, 7rem);
  background: linear-gradient(135deg, #fff 0%, #fbfaf7 55%, #f4efe4 100%);
}

body[data-page="home"] .hero-home h1 {
  max-width: 900px;
  font-size: clamp(2.7rem, 7.5vw, 6.8rem);
  overflow-wrap: anywhere;
}

body[data-page="home"] .hero-home .hero-lead {
  max-width: 650px;
}

body[data-page="home"] .hero-home .hero-grid {
  width: min(1180px, 92%);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr);
  align-items: center;
  gap: clamp(28px, 6vw, 84px);
}

body[data-page="home"] .hero-home .hero-copy {
  max-width: 720px;
}

body[data-page="home"] .hero-portrait {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  justify-self: end;
  padding: 12px;
  border: 1px solid rgba(181, 138, 43, .3);
  border-radius: 48% 48% 22px 22px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 24px 60px rgba(24, 33, 43, .12);
}

body[data-page="home"] .hero-portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 25%;
  border-radius: 48% 48% 16px 16px;
}

body[data-page="home"] .hero-home .hero-orb {
  max-width: 60vw;
  max-height: 60vw;
}

body[data-page="home"] .stat-card,
body[data-page="home"] .care-card,
body[data-page="home"] .evidence-card,
body[data-page="home"] .feature-copy {
  overflow-wrap: anywhere;
}

body[data-page="home"] .portrait-frame {
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
}

body[data-page="home"] .cta-inner > * {
  min-width: 0;
}

/* ── 1000px: tablet landscape ── */
@media (max-width: 1000px) {
  body[data-page="home"] .hero-home .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(200px, .65fr);
    gap: 24px;
  }

  body[data-page="home"] .hero-home {
    padding-top: 3rem;
    padding-bottom: 5.5rem;
  }

  body[data-page="home"] .stat-card {
    padding: 24px 18px;
  }

  body[data-page="home"] .hero-portrait {
    max-width: 340px;
  }
}

/* ── 680px: tablet portrait / large phones ── */
@media (max-width: 680px) {
  body[data-page="home"] .hero-home .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  body[data-page="home"] .hero-home {
    padding: 2rem 0 4rem;
  }

  body[data-page="home"] .hero-home h1 {
    font-size: clamp(2.4rem, 11vw, 3.4rem);
    line-height: 1.04;
  }

  body[data-page="home"] .hero-home .hero-lead {
    font-size: 1rem;
  }

  body[data-page="home"] .hero-portrait {
    width: min(100%, 340px);
    justify-self: center;
    margin-inline: auto;
  }

  body[data-page="home"] .hero-home .hero-orb {
    opacity: .55;
  }

  body[data-page="home"] .intro-band .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="home"] .stat-card {
    padding: 20px 14px;
  }

  body[data-page="home"] .stat-card strong {
    font-size: clamp(1.8rem, 9vw, 2.5rem);
  }

  body[data-page="home"] .evidence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="home"] .image-open img {
    height: clamp(125px, 38vw, 180px);
  }

  body[data-page="home"] .portrait-frame {
    padding: 16px;
  }

  body[data-page="home"] .portrait-frame:before {
    inset: 8px;
  }

  body[data-page="home"] .cta-inner {
    align-items: flex-start;
  }

  body[data-page="home"] .cookie-note {
    left: 4%;
    right: 4%;
    bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  body[data-page="home"] .split-feature {
    gap: 40px;
  }
}

/* ── 480px: standard phones — stack hero-actions, full-width CTA ── */
@media (max-width: 480px) {
  body[data-page="home"] .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  body[data-page="home"] .hero-actions .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
    white-space: normal;
  }

  body[data-page="home"] .hero-home h1 {
    font-size: clamp(2.1rem, 10vw, 3rem);
    line-height: 1.06;
  }

  body[data-page="home"] .hero-home .hero-lead {
    font-size: .95rem;
  }

  body[data-page="home"] .hero-portrait {
    width: min(100%, 300px);
  }

  body[data-page="home"] .stat-card strong {
    font-size: clamp(1.6rem, 8vw, 2.2rem);
  }

  body[data-page="home"] .care-card {
    min-height: 220px;
  }

  body[data-page="home"] .cta-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  body[data-page="home"] .cta-inner .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  body[data-page="home"] .section-head {
    margin-bottom: 32px;
  }
}

/* ── 380px: small/older phones ── */
@media (max-width: 380px) {
  body[data-page="home"] .brand {
    gap: 7px;
  }

  body[data-page="home"] .brand img {
    width: 40px;
    height: 40px;
  }

  body[data-page="home"] .brand strong {
    font-size: 1.05rem;
  }

  body[data-page="home"] .brand small {
    font-size: .48rem;
    letter-spacing: .08em;
  }

  body[data-page="home"] .menu-toggle {
    flex: 0 0 40px;
    width: 40px;
  }

  body[data-page="home"] .evidence-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="home"] .image-open img {
    height: 190px;
  }

  body[data-page="home"] .hero-home .hero-grid {
    gap: 20px;
  }

  body[data-page="home"] .hero-portrait {
    width: min(100%, 270px);
  }

  body[data-page="home"] .hero-home h1 {
    font-size: clamp(1.95rem, 10vw, 2.6rem);
  }

  body[data-page="home"] .intro-band .stat-grid {
    grid-template-columns: 1fr;
  }
}

/* ── 320px: absolute minimum phones (Galaxy Fold, etc.) ── */
@media (max-width: 320px) {
  body[data-page="home"] .hero-home h1 {
    font-size: 1.85rem;
  }

  body[data-page="home"] .hero-portrait {
    width: 100%;
    max-width: 230px;
  }

  body[data-page="home"] .hero-home .hero-lead {
    font-size: .88rem;
  }

  body[data-page="home"] .stat-card {
    padding: 16px 12px;
  }

  body[data-page="home"] .care-card {
    padding: 22px 16px;
    min-height: 180px;
  }

  body[data-page="home"] .hero-home {
    padding-bottom: 3rem;
  }
}
