/* Mobile layout follows content rather than desktop minimum heights. */
@media (max-width: 1024px) {
  body {
    padding-bottom: calc(76px + min(env(safe-area-inset-bottom, 0px), 24px));
  }
  .mobile-contact {
    padding: 10px 16px calc(10px + min(env(safe-area-inset-bottom, 0px), 24px)) !important;
    align-items: center;
  }
}

@media (max-width: 800px) {
  .header-inner { height: 68px; }
  .header nav#main-nav { top: 68px; max-height: calc(100dvh - 150px); }
  .topline .wrap { min-height: 56px; }
  .hero-reference { padding-block: 12px; }
  .hero-reference .hero-panel,
  .hero-reference .hero-slides {
    height: auto;
    min-height: 0;
  }
  .hero-reference .hero-slide {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: max-content max-content;
    align-content: start;
    align-items: start;
    min-height: 0;
    height: auto;
    padding: 22px 22px 48px;
    gap: 18px;
  }
  .hero-reference .hero-copy {
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 0;
    align-self: start;
  }
  .hero-reference .eyebrow {
    min-height: 0;
    font-size: .7rem;
    line-height: 1.6;
    margin: 0 0 12px;
  }
  .hero-reference .slide-title {
    min-height: 0;
    font-size: clamp(1.85rem, 7.4vw, 2.05rem);
    line-height: 1.2;
    margin: 0 0 16px;
  }
  .hero-reference .hero-lead {
    min-height: 0;
    height: auto;
    font-size: .94rem;
    line-height: 1.75;
    margin: 0;
  }
  /* The persistent bottom bar already provides both contact actions. */
  .hero-reference .hero-actions,
  .hero-reference .hero-badge {
    display: none;
  }
  .hero-reference .hero-visual {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto;
    aspect-ratio: 16 / 9;
    align-self: start;
    margin: 0;
    border-radius: 12px;
  }
  .hero-reference .hero-visual > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  .hero-reference .slider-controls {
    left: 22px;
    right: 22px;
    bottom: 8px;
  }
}

/* Safari's browser chrome can make the usable viewport shorter than the screen. */
@media (max-width: 800px) and (max-height: 780px) {
  .hero-reference .hero-slide {
    padding: 18px 20px 44px;
    gap: 14px;
  }
  .hero-reference .eyebrow { margin-bottom: 10px; }
  .hero-reference .slide-title {
    font-size: clamp(1.65rem, 7vw, 1.9rem);
    line-height: 1.2;
    margin-bottom: 12px;
  }
  .hero-reference .hero-lead {
    font-size: .875rem;
    line-height: 1.65;
  }
  .hero-reference .hero-visual {
    aspect-ratio: auto;
    height: clamp(130px, 22svh, 170px);
  }
}
/* Keep the compact strip paint-stable on mobile browsers; it remains swipeable. */
.brand-band-window { overflow-x: auto; scrollbar-width: none; }
.brand-band-window::-webkit-scrollbar { display: none; }
.brand-band-track { animation: none; transform: none; }
.brand-band-group[aria-hidden="true"] { display: none; }
