/* ==========================================================================
   LionStepCare — Responsive layer (mobile-first refinements)
   Breakpoints: 375 / 390 / 430 / 768 / 1024 / 1440 / 1920
   ========================================================================== */

/* Base mobile-first adjustments for the components authored desktop-first above */

/* ---------- Header brand block (phone default, mobile-first) ---------- */
.site-header .brand__mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
}

.site-header .brand {
  font-size: 1rem;
  gap: 8px;
  min-width: 0;
}

/* 手机：品牌名允许换行完整显示（不截断），隐藏 tagline 小字 */
.site-header .brand__name {
  white-space: normal;
  line-height: 1.15;
}

.site-header .brand__name small {
  display: none;
}

/* ---------- Contact info: allow long email/address to wrap fully on mobile ---------- */
.site-footer .footer-contact li,
.contact-item p,
.contact-item a {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ---------- ≤ 1024px (tablet / small laptop) ---------- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .sah-grid-3,
  .sah-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }


  .hero__media {
    aspect-ratio: 16 / 11;
    order: -1;
  }

  .intro-mark {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .intro-mark__quote {
    max-width: none;
  }
}

/* ---------- ≤ 860px : collapse primary nav into mobile menu ---------- */
@media (max-width: 860px) {
  .nav,
  .header__cta {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .mobile-nav {
    display: block;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .nav-scrim {
    display: block;
    position: fixed;
    inset: var(--header-height) 0 0 0;
    background: rgba(23, 32, 31, 0.35);
    z-index: 85;
  }

  .split,
  .content-row {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .split--reverse .split__media {
    order: -1;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .stat-band {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

/* ---------- ≤ 768px ---------- */
@media (max-width: 768px) {
  :root {
    --header-height: 76px;
    --container-pad: 18px;
  }

  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .sah-grid-2,
  .sah-grid-3 {
    grid-template-columns: 1fr;
  }

  /* 手机上烘焙文字的宽幅 banner 会缩得很小，按钮改为图下方静态块，保证可点 */
  .sah-banner__cta {
    position: static;
    transform: none;
    display: flex;
    width: max-content;
    max-width: calc(100% - 36px);
    margin: 14px auto 0;
  }

  .hero {
    padding-block: var(--space-6);
  }
}

/* ---------- ≤ 560px ---------- */
@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    grid-template-columns: 1fr;
  }

  .sah-grid-4 {
    grid-template-columns: 1fr;
  }

  .hero__cta .btn,
  .cta-band .cta-actions .btn {
    width: 100%;
  }

  .h1 {
    font-size: var(--fs-2xl);
  }

  .h2 {
    font-size: var(--fs-xl);
  }

  .intro-mark__quote {
    font-size: var(--fs-xl);
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero__badge {
    position: static;
    margin: 14px var(--container-pad) 0;
    inset: auto;
  }
}

/* ---------- ≥ 561px (tablet): restore logo size & single-line tagline ---------- */
@media (min-width: 561px) {
  .site-header .brand__mark {
    width: 56px;
    height: 56px;
    border-radius: 11px;
  }

  .site-header .brand {
    font-size: 1.15rem;
    gap: 11px;
  }

  .site-header .brand__name small {
    display: block;
    font-size: .58rem;
    letter-spacing: .12em;
    margin-top: 1px;
  }
}

/* ---------- ≥ 1025px : restore desktop brand styling explicitly ---------- */
@media (min-width: 1025px) {
  .site-header .brand__mark {
    width: 75px;
    height: 75px;
  }

  .site-header .brand {
    font-size: 1.28rem;
  }

  .site-header .brand__name small {
    display: block;
    font-size: .62rem;
    letter-spacing: .22em;
  }
}

/* ---------- ≥ 1440px : comfortable max width breathing room ---------- */
@media (min-width: 1440px) {
  :root {
    --container-width: 1240px;
  }
}
