/* Shared photo heroes keep one source copy and a real CTA group after the image. */
.hero-heading,
.hero-description { display: contents; }

@media screen and (max-width: 960px) {
  .hero-mobile-layout {
    --hero-corner-radius: 18px;
    min-height: 0;
  }
  .hero-mobile-layout .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .hero-mobile-layout .hero-copy,
  .hero-mobile-layout .hero-intro { display: contents; }
  .hero-mobile-layout .hero-heading {
    display: block;
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 24px;
  }
  .hero-mobile-layout .hero-heading > :last-child { margin-bottom: 0; }
  .hero-mobile-layout .hero-media {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    margin: 0;
  }
  .hero-mobile-layout .hero-img {
    width: 100%;
    aspect-ratio: 4 / 5;
    max-height: min(520px, 68svh);
    border-radius: var(--hero-corner-radius);
  }
  .hero-mobile-layout .hero-img--matted { aspect-ratio: 4 / 3; }
  .hero-mobile-layout .hero-img--exterior img {
    width: min(calc(100% * 1009 / 1200), 520px, 68svh);
    max-width: none;
  }
  .hero-mobile-layout .home-hero-sticker { top: 12px; left: 12px; }
  .hero-mobile-layout .hero-description {
    display: flow-root;
    grid-column: 1;
    grid-row: 3;
    position: relative;
    z-index: 1;
    margin-top: 20px;
    padding: clamp(22px, 5vw, 32px);
    /* Match the photograph so its bottom corners stay covered at full overlap. */
    border-radius: var(--hero-corner-radius);
    background: var(--paper);
    /* Tint only the panel, keeping the text solid and the photo discernible. */
    background: color-mix(in srgb, var(--paper) 86%, transparent);
    box-shadow: 0 -5px 24px rgb(1 69 102 / 8%);
  }
  .hero-mobile-layout .hero-description > :last-child { margin-bottom: 0; }
  .hero-mobile-layout .hero-grid > .hero-actions {
    grid-column: 1;
    grid-row: 5;
    margin-top: 24px;
  }
  .hero-mobile-layout .hero-copy > :is(.trust, .hero-mat-check) {
    grid-column: 1;
    grid-row: 4;
  }
  .hero-mobile-scene {
    grid-column: 1;
    grid-row: 2;
    position: relative;
    isolation: isolate;
  }
  /* Natural scrolling lifts the translucent copy over the pinned photograph.
     No scroll handler, hidden copy, fixed text height or scroll trapping. */
  .hero-mobile-scene > .hero-media {
    position: sticky;
    top: calc(var(--header-height, 77px) + 12px);
    z-index: 0;
  }
  .hero-mobile-scene > .hero-description { margin-top: 0; }
}

@media screen and (min-width: 600px) and (max-width: 960px) {
  .hero-mobile-layout:not(.home-hero) { --hero-corner-radius: 24px; }
}

@media screen and (max-width: 960px) and (prefers-reduced-motion: reduce) {
  .hero-mobile-scene > .hero-media { position: relative; top: auto; }
  .hero-mobile-scene > .hero-description { margin-top: 20px; }
}

@media print {
  .hero-mobile-scene { display: contents; }
  .hero-mobile-scene > .hero-media { position: static; }
}

/* Center each icon over its supporting copy, in the same column as the heading. */
.hero-mobile-layout .hero-copy > .trust {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 28px;
  margin: 24px 0 0;
  text-align: center;
}
.hero-mobile-layout .trust li,
.hero-mobile-layout .trust .trust-award {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 12px;
}
.hero-mobile-layout .trust .stars { margin-inline: auto; }
.hero-mobile-layout .hero-grid > .hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-content: center;
  justify-self: center;
  width: 100%;
  max-width: 36rem;
  gap: 12px;
}
.hero-mobile-layout .hero-actions > .btn { min-width: 0; min-height: 48px; }

@media screen and (min-width: 961px) {
  /* Natural content sets the shared photo row. Stretch the trust list down to
     its bottom, rather than reserving an unrelated fixed-height intro gap. */
  .hero-mobile-layout { min-height: 0; }
  .hero-mobile-layout .hero-grid { align-items: stretch; row-gap: 24px; }
  .hero-mobile-layout .hero-copy {
    display: flex;
    flex-direction: column;
    grid-column: 1;
    grid-row: 1;
    align-self: stretch;
  }
  .hero-mobile-layout .hero-intro { min-height: 0; }
  .hero-mobile-layout .hero-copy > .trust { flex: 1; }
  .hero-mobile-layout .hero-media {
    grid-column: 2;
    grid-row: 1;
    align-self: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-mobile-layout .hero-media > .hero-photo-card { display: grid; min-width: 0; }
  .hero-mobile-layout .hero-media .hero-img { width: 100%; height: 100%; min-width: 0; }
  .hero-mobile-layout .hero-grid > .hero-actions {
    grid-column: 2;
    grid-row: 2;
    margin-top: 0;
  }
}

@media screen and (max-width: 960px) {
  .hero-mobile-layout .hero-copy > .trust { grid-row: 4; margin-top: 32px; }
  .hero-mobile-layout .hero-copy > .hero-mat-check { grid-row: 4; }
}

/* Section 101: crop 5% from each vertical edge without stretching the photo.
   The inner image keeps the original rendered height; its viewport shows 90%. */
.service-hero.hero-mobile-layout .hero-media .hero-img,
.home-hero.hero-mobile-layout .hero-media .hero-img {
  position: relative;
  height: 90%;
  align-self: start;
}
.service-hero-photo > .hero-img > img,
.home-hero-photo > .hero-img > img {
  position: absolute;
  top: calc(-100% / 18);
  left: 0;
  width: 100%;
  height: calc(100% / .9);
  max-width: none;
}
.service-hero.hero-mobile-layout .hero-actions > .btn,
.home-hero.hero-mobile-layout .hero-actions > .btn { min-height: 72px; font-size: 1.25rem; }
/* Service-page hero actions keep their inverse hover style. Homepage actions
   use the sticker shadow response in home-cta-pop.css instead. */
.service-hero .hero-actions > .btn-inverse,
.home-hero .hero-actions > .btn-inverse { background: var(--navy); color: var(--paper); border-color: var(--navy); }
.service-hero .hero-actions > .btn-inverse:is(:hover, :focus-visible) { background: transparent; color: var(--navy); }
.home-hero .hero-actions > .btn:focus-visible { outline: 3px solid var(--navy); outline-offset: 4px; }

.service-hero.hero-mobile-layout .home-trust li,
.service-hero.hero-mobile-layout .home-trust .trust-award,
.home-hero.hero-mobile-layout .home-trust li,
.home-hero.hero-mobile-layout .home-trust .trust-award { gap: 15px; }


@media screen and (min-width: 961px) {
  .service-hero.hero-mobile-layout .hero-grid > .service-actions,
  .home-hero.hero-mobile-layout .hero-grid > .home-actions {
    grid-column: 1 / -1;
    /* Twice each former half-column button, retaining the 12px middle gap. */
    width: min(100%, calc((100% - var(--layout-gap)) * .9 - 12px));
    max-width: calc(72rem - 12px);
  }
}

@media screen and (max-width: 960px) {
  .service-hero.hero-mobile-layout .hero-media .hero-img,
  .home-hero.hero-mobile-layout .hero-media .hero-img {
    height: auto;
    aspect-ratio: 4 / 4.5;
    max-height: min(468px, 61.2svh);
  }
  .service-hero.hero-mobile-layout .hero-grid > .service-actions,
  .home-hero.hero-mobile-layout .hero-grid > .home-actions {
    grid-template-columns: minmax(0, 1fr);
    width: calc(100% - 12px);
    max-width: calc(36rem - 12px);
  }
}

/* Section 101 credentials and local proof form two balanced rows. */
.service-hero.hero-mobile-layout .hero-copy > .home-trust,
.home-hero.hero-mobile-layout .hero-copy > .home-trust {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  align-content: start;
  gap: 28px 20px;
  flex: 0 0 auto;
  margin-top: 24px;
}
.service-hero.hero-mobile-layout .home-trust > li,
.service-hero.hero-mobile-layout .home-trust .trust-award,
.home-hero.hero-mobile-layout .home-trust > li,
.home-hero.hero-mobile-layout .home-trust .trust-award { justify-content: flex-start; }
/* VIP attribution is supporting text outside the award link. */
.service-hero.hero-mobile-layout .home-trust > .home-trust-vip,
.home-hero.hero-mobile-layout .home-trust > .home-trust-vip { gap: 0; }
.service-hero.hero-mobile-layout .home-trust :is(.trust-akc-badge, .trust-fear-free-badge),
.home-hero.hero-mobile-layout .home-trust :is(.trust-akc-badge, .trust-fear-free-badge) {
  width: auto;
  height: var(--trust-icon-size);
  max-width: 100%;
  flex: none;
}
/* Stacked Google rating badge in brand type and color (not Google's logo). */
.service-hero.hero-mobile-layout .home-trust .trust-rating,
.home-hero.hero-mobile-layout .home-trust .trust-rating {
  display: grid;
  justify-items: start;
  flex: none;
  line-height: 1;
  color: var(--navy);
}
.service-hero .home-trust .trust-rating-count,
.home-hero .home-trust .trust-rating-count { justify-self: end; margin: 0 .2em -.1em 0; font: 700 .86em/1 var(--font-body); color: var(--muted); }
.service-hero .home-trust .trust-rating-word,
.home-hero .home-trust .trust-rating-word { font: 700 clamp(2.25rem, 1.7rem + 1.6vw, 3rem)/1 var(--font-body); letter-spacing: -.02em; }
.service-hero .home-trust .trust-rating-score,
.home-hero .home-trust .trust-rating-score { display: flex; align-items: center; gap: 8px; margin-top: 4px; font: 700 1.1em/1 var(--font-body); }
.service-hero .home-trust .trust-rating img.stars,
.home-hero .home-trust .trust-rating img.stars { width: 110px; height: 20px; margin: 0; }
.service-hero .home-trust .trust-rating-sr,
.home-hero .home-trust .trust-rating-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Shared icon, heading and caption tracks align both columns, even when text wraps.
   Links keep real boxes and visible keyboard focus; VIP attribution stays outside its link. */
@supports (grid-template-rows: subgrid) {
  .service-hero.hero-mobile-layout .hero-copy > .home-trust,
  .home-hero.hero-mobile-layout .hero-copy > .home-trust { row-gap: 0; align-items: stretch; }
  .service-hero.hero-mobile-layout .home-trust > li,
  .service-hero.hero-mobile-layout .home-trust .trust-award,
  .home-hero.hero-mobile-layout .home-trust > li,
  .home-hero.hero-mobile-layout .home-trust .trust-award {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 3;
    align-items: start;
    justify-items: center;
    justify-content: stretch;
    gap: 0;
  }
  .service-hero.hero-mobile-layout .home-trust > li:nth-child(-n + 2),
  .home-hero.hero-mobile-layout .home-trust > li:nth-child(-n + 2) { padding-bottom: 28px; }
  .service-hero.hero-mobile-layout .home-trust .home-trust-vip > .trust-award,
  .home-hero.hero-mobile-layout .home-trust .home-trust-vip > .trust-award { grid-row: span 2; }
  .service-hero.hero-mobile-layout .home-trust .trust-award > :first-child,
  .home-hero.hero-mobile-layout .home-trust .trust-award > :first-child { margin-bottom: 15px; }
  .service-hero.hero-mobile-layout .home-trust .trust-caption,
  .home-hero.hero-mobile-layout .home-trust .trust-caption { grid-row: 3; }
}
@media screen and (max-width: 599px) {
  .service-hero.hero-mobile-layout .hero-copy > .home-trust,
  .home-hero.hero-mobile-layout .hero-copy > .home-trust { column-gap: 15px; }
  .service-hero.hero-mobile-layout .home-trust li,
  .home-hero.hero-mobile-layout .home-trust li { font-size: 1rem; }
}

/* Keep each title indicator attached to the final word at every viewport. */
.service-hero .home-trust .trust-title-tail,
.home-hero .home-trust .trust-title-tail { white-space: nowrap; }

/* Homepage desktop positions follow the header-aligned, six-column design grid.
   Content may grow beyond a nominal cell when text is enlarged. */
@media screen and (min-width: 961px) {
  .home-main .home-hero {
    --home-design-cell: calc((min(100vw, var(--max)) - 2 * var(--page-gutter)) / 6);
  }
  .home-main section.home-hero.hero-mobile-layout .hero-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: minmax(min-content, calc(2 * var(--home-design-cell) - 56px)) repeat(2, minmax(72px, var(--home-design-cell))) minmax(var(--home-design-cell), auto);
    gap: 0;
    margin-bottom: var(--home-trust-offset, 0px);
  }
  .home-main section.home-hero.hero-mobile-layout .hero-copy { display: contents; }
  .home-main .home-hero .hero-copy .hero-intro {
    grid-column: 1 / 4;
    grid-row: 1;
    width: calc(100% - 32px);
    max-width: calc(100% - 32px);
    margin-inline: auto;
    text-align: left;
  }
  .home-main section.home-hero.hero-mobile-layout .hero-media {
    grid-column: 4 / 7;
    grid-row: 1 / 4;
  }
  .home-main section.home-hero.hero-mobile-layout .hero-grid > .home-actions {
    grid-column: 1 / 4;
    grid-row: 2 / 4;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(72px, auto));
    gap: var(--home-heading-gap, 22px);
    /* Center boarding in guide row 3; preserve normal flow for enlarged text. */
    padding-top: max(0px, calc((var(--home-design-cell) - 72px) / 2));
    align-content: start;
    width: calc(100% - 32px);
    max-width: 36rem;
    margin: 0;
    transform: translateY(var(--home-cta-offset, 0px));
    align-items: start;
  }
  .home-main section.home-hero.hero-mobile-layout .hero-copy > .home-trust {
    --trust-icon-size: 48px;
    grid-column: 1 / -1;
    grid-row: 4;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 0;
    gap: 0;
    align-items: center;
    align-content: start;
    padding-top: var(--home-heading-gap, 22px);
    transform: translateY(var(--home-trust-offset, 0px));
  }
  .home-main section.home-hero.hero-mobile-layout .home-trust > li,
  .home-main section.home-hero.hero-mobile-layout .home-trust .trust-award {
    display: flex;
    grid-row: auto;
    justify-content: center;
    align-items: center;
    gap: 8px;
  }
  .home-main section.home-hero.hero-mobile-layout .home-trust > li {
    padding: 8px;
    font-size: 1rem;
    line-height: 1.3;
  }
  .home-main section.home-hero.hero-mobile-layout .home-trust .trust-award > :first-child { margin-bottom: 0; }
  .home-main .home-hero .home-trust .trust-caption { font-size: .875rem; }
  .home-main .home-hero .home-trust .trust-rating-word { font-size: 1.75rem; }
  .home-main .home-hero .home-trust .trust-rating-count { font-size: .75rem; }
  .home-main .home-hero .home-trust .trust-rating-score { font-size: .875rem; margin-top: 2px; }
  .home-main .home-hero .home-trust .trust-rating img.stars { width: 77px; height: 14px; }
}
.home-hero.hero-mobile-layout .home-trust .trust-membership-badge {
  width: auto;
  height: var(--trust-icon-size);
  max-width: 100%;
  object-fit: contain;
}
/* Five proofs use two columns on phones and tablets, with the final proof centered. */
@media screen and (max-width: 960px) {
  .home-hero.hero-mobile-layout .home-trust > li,
  .home-hero.hero-mobile-layout .home-trust .trust-award { display: flex; grid-row: auto; align-items: center; }
  .home-hero.hero-mobile-layout .home-trust > li { padding: 0; }
  .home-hero.hero-mobile-layout .home-trust > li:last-child {
    grid-column: 1 / -1;
    width: calc((100% - 20px) / 2);
    justify-self: center;
  }
}

/* Homepage 101: retain 85% of the uncropped photo (5% top, 10% bottom),
   then display it at 80% size. Keep the sticker attached to the photo wrapper. */
.home-main section.home-hero.hero-mobile-layout .hero-media {
  width: 80%;
  height: 80%;
  justify-self: center;
}
.home-main .home-hero.hero-mobile-layout .hero-media .hero-img {
  height: 85%;
}
.home-main .home-hero-photo > .hero-img > img {
  top: calc(-100% * .05 / .85);
  height: calc(100% / .85);
}
@media screen and (max-width: 960px) {
  .home-main section.home-hero.hero-mobile-layout .hero-media { height: auto; margin-inline: auto; }
  .home-main .home-hero.hero-mobile-layout .hero-media .hero-img {
    height: auto;
    aspect-ratio: 4 / 4.25;
    max-height: min(353.6px, 46.24svh);
  }
}
