/*
 * SERPIFAI V1.13.2 homepage mobile hero optimization V1.0.0
 *
 * Scope:
 * - homepage only;
 * - mobile and tablet widths only;
 * - no copy, CTA, navigation, schema, JavaScript or motion-control changes.
 *
 * Root-cause corrections:
 * 1. restore horizontal gutters after the late full-site width:100%!important rule;
 * 2. directly target the current .hero-lede--focused markup;
 * 3. reduce mobile title and paragraph density;
 * 4. reduce the mobile decision-animation height while preserving its controls.
 */

@media (max-width: 900px) {
  body.sfv-family-home #top.hero {
    min-height: auto;
  }

  body.sfv-family-home #top > .container.hero-grid {
    width: min(calc(100% - 32px), 1180px) !important;
    max-width: 1180px !important;
    min-width: 0 !important;
    margin-inline: auto;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.sfv-family-home #top .hero-copy,
  body.sfv-family-home #top .hero-actions,
  body.sfv-family-home #top .trust-line,
  body.sfv-family-home #top .serpifai-decision-continuity-v13-2 {
    min-width: 0 !important;
  }
}

@media (max-width: 600px) {
  body.sfv-family-home #top.hero {
    padding-block: 28px 38px;
    align-items: start;
  }

  body.sfv-family-home #top > .container.hero-grid {
    width: min(calc(100% - 32px), 1180px) !important;
    gap: 24px;
  }

  body.sfv-family-home #top .hero-copy > .eyebrow {
    max-width: 100%;
    margin: 0 0 10px;
    font-size: 0.66rem;
    line-height: 1.25;
    letter-spacing: 0.14em;
    text-wrap: balance;
  }

  body.sfv-family-home #top .hero-copy > h1 {
    max-width: 100%;
    margin: 0;
    font-size: clamp(2.18rem, 9.8vw, 2.7rem);
    line-height: 0.96;
    letter-spacing: -0.045em;
    text-wrap: balance;
  }

  body.sfv-family-home #top .hero-copy > .hero-lede--focused {
    max-width: 37ch;
    margin-top: 18px;
    font-size: 0.96rem;
    line-height: 1.52;
  }

  body.sfv-family-home #top .hero-actions {
    gap: 10px;
    margin-top: 20px;
  }

  body.sfv-family-home #top .hero-actions > .button {
    min-height: 52px;
    padding: 13px 16px;
    font-size: 0.95rem;
    line-height: 1.2;
    border-radius: 13px;
  }

  body.sfv-family-home #top .trust-line--focused {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 16px;
    font-size: 0.8rem;
    line-height: 1.35;
  }

  body.sfv-family-home #top .trust-line--focused > span {
    padding-left: 14px;
  }

  body.sfv-family-home #top .trust-line--focused > span::before {
    top: 0.56em;
    width: 5px;
    height: 5px;
  }

  body.sfv-family-home #top .serpifai-decision-continuity-v13-2 {
    --sdi132-height: 500px;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 0;
  }

  body.sfv-family-home #top .sdi132-shell {
    border-radius: 20px;
  }
}

@media (max-width: 430px) {
  body.sfv-family-home #top.hero {
    padding-block: 25px 34px;
  }

  body.sfv-family-home #top > .container.hero-grid {
    width: min(calc(100% - 28px), 1180px) !important;
    gap: 22px;
  }

  body.sfv-family-home #top .hero-copy > h1 {
    font-size: clamp(2.08rem, 9.8vw, 2.5rem);
    line-height: 0.96;
  }

  body.sfv-family-home #top .hero-copy > .hero-lede--focused {
    max-width: 36ch;
    margin-top: 16px;
    font-size: 0.94rem;
    line-height: 1.5;
  }

  body.sfv-family-home #top .hero-actions {
    margin-top: 18px;
  }

  body.sfv-family-home #top .hero-actions > .button {
    min-height: 50px;
    padding-block: 12px;
    font-size: 0.93rem;
  }

  body.sfv-family-home #top .trust-line--focused {
    gap: 7px 14px;
    margin-top: 14px;
    font-size: 0.78rem;
  }

  body.sfv-family-home #top .serpifai-decision-continuity-v13-2 {
    --sdi132-height: 480px;
  }

  body.sfv-family-home #top .sdi132-shell {
    border-radius: 18px;
  }
}

@media (max-width: 360px) {
  body.sfv-family-home #top > .container.hero-grid {
    width: min(calc(100% - 24px), 1180px) !important;
    gap: 20px;
  }

  body.sfv-family-home #top .hero-copy > .eyebrow {
    font-size: 0.62rem;
  }

  body.sfv-family-home #top .hero-copy > h1 {
    font-size: 2.04rem;
  }

  body.sfv-family-home #top .hero-copy > .hero-lede--focused {
    font-size: 0.92rem;
  }

  body.sfv-family-home #top .trust-line--focused {
    display: grid;
    gap: 7px;
  }

  body.sfv-family-home #top .serpifai-decision-continuity-v13-2 {
    --sdi132-height: 460px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.sfv-family-home #top .serpifai-decision-continuity-v13-2,
  body.sfv-family-home #top .sdi132-shell {
    scroll-behavior: auto;
  }
}
