/* Shared layout safeguards: loaded after the page-specific styles. */
.statement > div,
.why-title,
.manufacturer-content,
.company-profile > *,
.company-facts > *,
.directions > *,
.inquiry-wrap > *,
.field-row > *,
.service-grid > *,
.asset-flow > *,
.cycle-line > *,
.why-grid > * {
  min-width: 0;
}

.statement,
.why,
.process {
  grid-template-columns: 220px minmax(0, 1fr);
}

.company-intro > span {
  white-space: normal !important;
}

.company-intro > br {
  display: none;
}

main p,
main dd,
main h1,
main h2,
main h3,
.asset-scope span {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

footer {
  grid-template-columns: minmax(0, 1fr) auto;
}

footer p {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Card height must follow wrapped copy; captions never overlay the text. */
.asset-flow {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.asset-flow article {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.asset-flow .asset-symbol {
  flex-shrink: 0;
}

.asset-flow article > small {
  position: static;
  display: block;
  margin-top: auto;
  padding-top: 20px;
  overflow-wrap: anywhere;
}

/* Switch while every navigation item still fits beside the logo. */
@media (max-width: 1400px) {
  .home-page .hero {
    min-height: 0;
    height: auto;
    padding-top: 160px;
    padding-bottom: 36px;
  }

  .hero .hero-actions {
    flex-wrap: wrap;
  }

  .hero .loop-visual {
    position: relative;
    top: auto;
    right: auto;
    width: min(100%, 320px);
    height: auto;
    aspect-ratio: 1;
    margin: 36px auto 0;
    opacity: .75;
  }

  .loop-visual .loop-ring { inset: 10%; }
  .loop-visual .ring-two { inset: 20%; }
  .loop-visual .loop-core { inset: 36%; }
  .loop-visual .loop-core strong { font-size: 28px; }
  .loop-visual .loop-core span { font-size: 7px; }
  .loop-visual .o1 { top: 5%; left: 43%; }
  .loop-visual .o2 { top: 48%; right: 0; }
  .loop-visual .o3 { bottom: 5%; left: 43%; }
  .loop-visual .o4 { top: 48%; left: 0; }

  .hero .hero-foot {
    position: relative;
    inset: auto;
    margin-top: 30px;
  }

  .site-header .menu-button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 44px;
    min-height: 44px;
    padding: 10px 7px;
    cursor: pointer;
  }

  .menu-button span {
    display: block;
    width: 27px;
    height: 2px;
    margin: 0;
    background: currentColor;
    border-radius: 2px;
  }

  .menu-button[aria-expanded="true"] span:first-child {
    transform: translateY(8px) rotate(45deg);
  }

  .menu-button[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .menu-button[aria-expanded="true"] span:last-child {
    transform: translateY(-8px) rotate(-45deg);
  }

  .site-header > nav {
    display: none;
    position: absolute !important;
    inset: 100% 0 auto !important;
    width: 100% !important;
    height: auto !important;
    max-height: calc(100dvh - 92px);
    overflow-y: auto;
    padding: 24px;
    background: #071629;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start !important;
    gap: 8px !important;
    pointer-events: auto;
  }

  .site-header > nav.open {
    display: flex;
  }

  .site-header > nav a,
  .site-header > nav a:not(.nav-contact),
  .site-header > nav a[href="#brands"],
  .site-header .nav-contact {
    position: static;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 12px 18px;
    text-align: left;
  }
}

/* Intermediate widths need the same shrinking rules as small screens. */
@media (max-width: 1180px) {
  .asset-flow,
  .asset-scope {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .statement,
  .why,
  .process,
  .business .section-heading,
  .lifecycle .section-heading,
  .circular-intro,
  .company-profile,
  .company-facts,
  .directions,
  .inquiry-wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .why-grid,
  .process ol,
  .circular-intro > p:last-child,
  .logo-brand-list,
  .brands .brand-list {
    grid-column: 1;
  }

  .home-page .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .statement,
  .why,
  .process {
    padding-top: 85px;
    padding-bottom: 85px;
    gap: 30px;
  }

  .company-profile,
  .company-facts,
  .directions,
  .inquiry-wrap {
    gap: 40px;
  }

  footer {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
}

@media (max-width: 560px) {
  .asset-flow,
  .asset-scope {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-page .hero {
    padding-top: 132px;
  }

  .hero .loop-visual {
    width: min(100%, 260px);
    margin-top: 28px;
  }

  .home-page .why-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
