/* The five main photo heroes share one responsive layout. Natural grid rows
   replace crop offsets: long copy and enlarged type can grow without overlap. */
#main .hero-mobile-layout {
  --hero-edge-gap: 56px;
  --trust-art-width: clamp(120px, 12vw, 160px);
  --hero-content-gap: 22px;
  --home-design-cell: calc((min(100vw, var(--max)) - 2 * var(--page-gutter)) / 6);
  padding-top: var(--hero-edge-gap);
  padding-bottom: 0;
  min-height: 0;
}
#main .hero-mobile-layout .hero-copy { padding-bottom: 0; }
#main .hero-mobile-layout .hero-grid { margin-bottom: 0; }
#main .hero-mobile-layout .hero-heading > :is(.home-family-headline, .grooming-headline, .boarding-headline, h1:only-child) {
  font: 700 clamp(1.7rem, 3.2vw, 2.75rem)/1.22 var(--font-head);
  margin: 0 0 var(--hero-content-gap);
}
#main .hero-mobile-layout .hero-description > .lede {
  font-size: var(--font-lede);
  min-width: 0;
}
#main .hero-mobile-layout .hero-description > :last-child { margin-bottom: 0; }
#main .hero-mobile-layout .hero-grid > .hero-actions {
  transform: none;
  padding: 0;
  gap: var(--hero-content-gap);
}
#main .hero-mobile-layout .hero-actions .btn { min-height: 72px; font-size: 1.25rem; }
#main .hero-mobile-layout .hero-media { position: relative; }
#main .hero-mobile-layout .hero-photo-card { width: 100%; height: 100%; }
#main .hero-mobile-layout .hero-media .hero-img {
  width: 100%;
  height: 100%;
  border-radius: 18px;
}
#main .hero-mobile-layout .hero-media .hero-img > img {
  position: absolute;
  top: calc(-100% * .05 / .85);
  left: 0;
  width: 100%;
  height: calc(100% / .85);
  max-width: none;
}
/* These source photographs require their original uncropped presentation. */
#main .hero-mobile-layout .hero-media .hero-img--matted > img {
  top: 50%;
  height: auto;
  transform: translateY(-50%);
  object-fit: contain;
}
#main .hero-mobile-layout .hero-media .hero-img--exterior > img {
  left: 50%;
  top: 50%;
  width: calc(100% * 1009 / 1200);
  height: auto;
  transform: translate(-50%, -50%) rotate(-90deg);
}
#main .hero-mobile-layout .hero-photo-label { bottom: 0; }
#main .hero-mobile-layout .hero-copy > .home-trust {
  transform: none;
  margin: 0;
  padding: 0;
  display: grid;
  align-items: start;
  --trust-icon-size: calc(var(--trust-art-width) * 492 / 602);
}
#main .hero-mobile-layout .home-trust > li,
#main .hero-mobile-layout .home-trust .trust-award {
  display: flex;
  flex-direction: column;
  grid-row: auto;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}
#main .hero-mobile-layout .home-trust > li { padding: 8px; font-size: 1rem; line-height: 1.3; }
/* Every proof shares one artwork row. Wide marks keep their natural ratio;
   square marks match the VIP badge's height, and supporting text lines up. */
#main .hero-mobile-layout .home-trust .trust-award > :first-child { margin-bottom: 0; }
#main .hero-mobile-layout .home-trust .trust-award { width: 100%; }
#main .hero-mobile-layout .home-trust .trust-caption { font-size: .875rem; }
#main .hero-mobile-layout .home-trust :is(.trust-akc-badge, .trust-fear-free-badge, .trust-membership-badge) {
  width: auto; height: var(--trust-icon-size); max-width: 100%; object-fit: contain;
}
#main .hero-mobile-layout .home-trust .trust-fear-free-badge {
  width: min(100%, var(--trust-art-width));
}
/* Crop only the NDGAA source's blank margins; match the square AKC badge size. */
#main .hero-mobile-layout .home-trust .trust-membership-badge {
  width: var(--trust-icon-size);
  height: var(--trust-icon-size);
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  flex: none;
}
/* The supplied two-time-winner PDF is rendered with only empty margins
   removed. Keep its full badge and natural colors, including both award years.
   Give the nearly square artwork enough room to read while retaining hover. */
#main .hero-mobile-layout .home-trust .home-trust-vip > .trust-award {
  width: 100%;
  min-width: 0;
}
/* Homepage external destinations belong only to the text, not the badges. */
#main.home-main .hero-mobile-layout .home-trust .trust-text-link { width: fit-content; max-width: 100%; }
#main .hero-mobile-layout .home-trust .trust-vip-art {
  width: min(100%, var(--trust-art-width));
  max-width: 100%;
  height: auto;
  flex: 0 0 auto;
  min-width: 0;
  mix-blend-mode: normal;
}
#main .hero-mobile-layout .home-trust .trust-vip-crop {
  display: block;
  width: 100%;
  aspect-ratio: 602 / 492;
  overflow: visible;
}
#main .hero-mobile-layout .home-trust .trust-vip-crop > img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}
#main .hero-mobile-layout .home-trust .trust-rating {
  width: min(100%, var(--trust-art-width));
  height: var(--trust-icon-size);
  align-content: center;
  justify-content: center;
}
#main .hero-mobile-layout .home-trust .trust-rating-word { font-size: calc(var(--trust-art-width) * .26); }
#main .hero-mobile-layout .home-trust .trust-rating-count { font-size: calc(var(--trust-art-width) * .09); }
#main .hero-mobile-layout .home-trust .trust-rating-score { font-size: calc(var(--trust-art-width) * .11); margin-top: 4px; }
#main .hero-mobile-layout .home-trust .trust-rating img.stars { width: calc(var(--trust-art-width) * .6875); height: auto; }
/* The first content begins exactly one header-to-hero gap after the trust bar. */
#main > .hero-mobile-layout + :is(.section, .hero-mat-check) { padding-top: 56px; margin-top: 0; }
@media screen and (min-width: 961px) {
  #main .hero-mobile-layout .hero-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: minmax(min-content, 1fr) auto auto;
    gap: 0;
    align-items: stretch;
  }
  #main .hero-mobile-layout .hero-copy { display: contents; }
  #main .hero-mobile-layout .hero-intro {
    grid-column: 1 / 4;
    grid-row: 1;
    width: calc(100% - 32px);
    max-width: calc(100% - 32px);
    min-height: 0;
    margin-inline: auto;
    text-align: left;
  }
  #main .hero-mobile-layout .hero-description > .lede { width: min(100%, calc(2 * var(--home-design-cell) - 32px)); }
  #main .hero-mobile-layout .hero-media .hero-img,
  #main .hero-mobile-layout .hero-media .hero-photo-card { min-height: 0; }
  #main .hero-mobile-layout .hero-media {
    grid-column: 4 / 7;
    grid-row: 1 / 3;
    width: 80%;
    height: calc((4 * var(--home-design-cell) - 56px) * .68);
    align-self: start;
    justify-self: center;
  }
  #main .hero-mobile-layout .hero-grid > .hero-actions {
    grid-column: 1 / 4;
    grid-row: 2;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(72px, auto));
    width: calc(100% - 32px);
    max-width: 36rem;
    margin: var(--hero-content-gap) 0 0;
    align-items: start;
    align-self: end;
  }
  #main .hero-mobile-layout .hero-copy > .home-trust {
    grid-column: 1 / -1;
    grid-row: 3;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    padding-top: var(--hero-content-gap);
  }
}
@media screen and (max-width: 960px) {
  #main .hero-mobile-layout { --hero-edge-gap: 32px; --trust-art-width: clamp(112px, 35vw, 160px); }
  #main .hero-mobile-layout .hero-heading > :is(.home-family-headline, .grooming-headline, .boarding-headline, h1:only-child) { font-size: clamp(1.7rem, 5.5vw, 2.75rem); }
  #main .hero-mobile-layout .hero-media { width: 80%; height: auto; margin-inline: auto; }
  #main .hero-mobile-layout .hero-media .hero-img { height: auto; aspect-ratio: 4 / 4.25; max-height: min(353.6px, 46.24svh); }
  #main .hero-mobile-layout .hero-grid > .hero-actions { grid-row: 4; grid-template-columns: minmax(0, 1fr); width: calc(100% - 12px); max-width: calc(36rem - 12px); margin-top: 24px; }
  #main .hero-mobile-layout .hero-copy > .home-trust { grid-row: 5; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; margin-top: 32px; }
  #main .hero-mobile-layout .home-trust > li { padding: 0; }
  #main .hero-mobile-layout .home-trust > li:last-child { grid-column: 1 / -1; width: calc((100% - 20px) / 2); justify-self: center; }
  #main > .hero-mobile-layout + :is(.section, .hero-mat-check) { padding-top: 32px; }
}
@media screen and (max-width: 960px) {
  #main .hero-mobile-layout .hero-mobile-scene > .hero-media { position: sticky; top: calc(var(--header-height, 77px) + 12px); }
}
@media screen and (max-width: 960px) and (prefers-reduced-motion: reduce) {
  #main .hero-mobile-layout .hero-mobile-scene > .hero-media { position: relative; top: auto; }
}
@media print {
  #main .hero-mobile-layout .hero-mobile-scene > .hero-media { position: static; }
}
/* The older homepage guide grid reserved five cells for both opening sections.
   Let their actual contents set those tracks so no invisible runway remains. */
@media screen and (min-width: 961px) {
  #main.home-main { grid-template-rows: auto auto; }
}

/* Homepage 101: enlarge the heading and its font-measured chalk animation by
   ten percent. The boarding-copy gap is scoped separately below. */
#main .home-hero.hero-mobile-layout .hero-heading > .home-family-headline {
  font-size: clamp(1.87rem, 3.52vw, 3.025rem);
}
#main .home-hero .hero-heading > .home-service-heading {
  font-size: clamp(1.2155rem, 1.7875vw, 1.43rem);
}
@media screen and (max-width: 960px) {
  #main .home-hero.hero-mobile-layout .hero-heading > .home-family-headline {
    font-size: clamp(1.87rem, 6.05vw, 3.025rem);
  }
}

/* Homepage 101: keep each sentence on its own line by sizing to the actual
   copy column, not the viewport. The rem floor and normal wrapping remain an
   escape hatch for enlarged user text rather than clipping or shrinking it. */
#main .home-hero .hero-heading { display: block; container-type: inline-size; }
#main .home-hero.hero-mobile-layout .hero-heading > .home-family-headline {
  font-size: clamp(1.625rem, 11.05cqi, 3.9325rem);
}
#main .home-hero .home-family-line { display: block; white-space: normal; }
#main .home-hero .hero-media {
  justify-self: end;
  margin-inline-start: auto;
  margin-inline-end: 0;
}

/* Homepage reference layout: service messages and their CTAs share one panel.
   Desktop uses two equal columns; mobile keeps the same reading order in a
   single stack beneath the photograph. No measured offsets or fixed text rows. */
#main .home-hero .hero-description > .lede,
#main .home-hero .home-actions > .lede {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  font: 500 1rem/1.55 var(--font-body);
  text-align: left;
}
#main .home-hero .hero-description .lede > strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy);
  font-size: 1.125rem;
  line-height: 1.3;
  font-weight: 700;
}
#main .home-hero .hero-description .lede > br { display: none; }
#main .home-hero .home-actions > .btn {
  width: 100%;
  min-width: 0;
  min-height: 56px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 1.25rem;
}
#main .home-hero .home-actions > .btn-rust {
  background: var(--rust);
  color: var(--paper);
  border-color: var(--rust);
}
@media screen and (min-width: 961px) {
  #main .home-hero { padding-top: 56px; }
  #main .home-hero .hero-grid { grid-template-rows: auto auto; }
  /* Pin the heading to the photo top and the service/CTA panel to its bottom.
     The shared row may grow for enlarged text rather than overlap or clip. */
  #main .home-hero .hero-intro {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  #main .home-hero .hero-heading > .home-service-heading { margin-bottom: 48px; }
  #main .home-hero .hero-description {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
  }
  #main .home-hero .home-actions { display: contents; }
  #main .home-hero .hero-description > .lede { grid-column: 1; grid-row: 1; }
  #main .home-hero .home-actions > .lede { grid-column: 2; grid-row: 1; }
  #main .home-hero .home-actions > .btn { grid-row: 2; margin-top: 16px; align-self: stretch; }
  #main .home-hero .home-actions > .btn-rust { grid-column: 1; }
  #main .home-hero .home-actions > .btn-inverse { grid-column: 2; }
  #main .home-hero .hero-media {
    grid-row: 1;
    align-self: stretch;
    height: 100%;
    min-height: calc((4 * var(--home-design-cell) - 56px) * .68);
    width: 100%;
    margin-top: 0;
  }
  #main .home-hero .hero-media .hero-img { aspect-ratio: auto; }
  #main .home-hero .hero-copy > .home-trust { grid-row: 2; }
  #main .home-hero .home-hero-sticker { width: 136px; height: 136px; }
}
@media screen and (max-width: 960px) {
  #main .home-hero .hero-description {
    margin-top: 60px;
    padding-top: calc(3 * clamp(22px, 5vw, 32px));
  }
  #main .home-hero .hero-mobile-scene > .hero-description { margin-top: 0; }
  #main .home-hero .home-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 0;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: none;
    transform: none;
  }
  #main .home-hero .home-actions > .btn { margin-top: 12px; }
  #main .home-hero .home-actions > .lede { margin-top: 28px; }
}
@media screen and (max-width: 960px) and (prefers-reduced-motion: reduce) {
  #main .home-hero .hero-mobile-scene > .hero-description { margin-top: 60px; }
}
