/*
  U.S. Retaining Walls static migration.
  Bootstrap 5.3 supplies the base layout; this file preserves the source-backed
  black, red, and white industrial presentation.
*/

:root {
  --site-red: #c2020b;
  --site-red-dark: #8f0208;
  --site-black: #000000;
  --site-ink: #161616;
  --site-muted: #5a5a5a;
  --site-line: #d9d9d9;
  --site-surface: #ffffff;
  --site-page: #f7f7f7;
  --site-radius: 0.375rem;
  --site-section-padding: clamp(2.75rem, 6vw, 4.75rem);
}

html {
  scroll-padding-top: 8rem;
}

body {
  background: var(--site-page);
  color: var(--site-ink);
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6,
.site-brand {
  color: var(--site-black);
  font-family: "Roboto Slab", Georgia, serif;
  letter-spacing: 0;
  line-height: 1.18;
  text-transform: uppercase;
}

a {
  color: var(--site-black);
}

a:hover {
  color: var(--site-red-dark);
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible {
  outline: 3px solid rgba(194, 2, 11, 0.42);
  outline-offset: 3px;
  box-shadow: none;
}

.skip-link {
  background: var(--site-surface);
  border: 2px solid var(--site-red);
  border-radius: var(--site-radius);
  color: var(--site-black);
  left: 1rem;
  padding: 0.5rem 0.75rem;
  position: absolute;
  top: 1rem;
  transform: translateY(-150%);
  transition: transform 160ms ease;
  z-index: 2000;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  background: var(--site-black);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
}

.topbar {
  background: #171717 url("../images/branding/topbar-bg.jpg") center / cover no-repeat;
  color: var(--site-surface);
  padding: 1.1rem 0;
}

.site-brand {
  color: var(--site-surface);
  display: inline-block;
  font-size: clamp(1.45rem, 3.6vw, 2rem);
  font-weight: 700;
  text-decoration: none;
}

.site-brand:hover {
  color: var(--site-surface);
}

.header-contact {
  color: var(--site-surface);
  display: flex;
  flex-direction: column;
  font-size: 1rem;
  gap: 0.2rem;
  text-align: right;
}

.header-contact a,
.site-footer a {
  color: var(--site-surface);
}

.header-contact i {
  font-size: 0.95em;
  margin-left: 0.25rem;
  vertical-align: 0.02em;
}

.header-contact a:hover,
.site-footer a:hover {
  color: #ffffff;
}

.navigation {
  background: var(--site-black);
  border-top: 4px solid var(--site-red);
}

.navbar {
  --bs-navbar-padding-y: 0;
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.64);
  border-radius: var(--site-radius);
  margin: 0.55rem 0;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(194, 2, 11, 0.38);
}

.navbar-nav .nav-link {
  color: var(--site-surface);
  font-size: clamp(1.08rem, 1.45vw, 1.28rem);
  font-weight: 500;
  line-height: 1.2;
  padding: 1.05rem 1.45rem;
  text-transform: uppercase;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active {
  background: var(--site-red);
  color: var(--site-surface);
}

.page-shell {
  background: var(--site-surface);
}

.hero-video-band {
  background: var(--site-black);
  border-bottom: 4px solid var(--site-red);
  border-top: 4px solid var(--site-red);
}

.hero-video-frame {
  aspect-ratio: 16 / 7;
  background: #111111;
  overflow: hidden;
}

.hero-video-frame video {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.page-title-band {
  background: var(--site-surface);
  border-bottom: 1px solid var(--site-line);
  padding: clamp(2.25rem, 5vw, 3.75rem) 0;
}

.page-title-band h1,
.section-heading h2 {
  margin: 0;
}

.red-rule {
  background: var(--site-red);
  display: block;
  height: 4px;
  margin-top: 1rem;
  width: 5rem;
}

.site-section {
  padding: var(--site-section-padding) 0;
}

.content-narrow {
  max-width: 980px;
}

.content-flow > * + * {
  margin-top: 1rem;
}

.lead-copy {
  color: #2b2b2b;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
}

.btn-industrial {
  --bs-btn-bg: var(--site-black);
  --bs-btn-border-color: var(--site-black);
  --bs-btn-color: #ffffff;
  --bs-btn-hover-bg: var(--site-red);
  --bs-btn-hover-border-color: var(--site-red);
  --bs-btn-hover-color: #ffffff;
  --bs-btn-active-bg: var(--site-red-dark);
  --bs-btn-active-border-color: var(--site-red-dark);
  border-radius: var(--site-radius);
  font-weight: 700;
  text-transform: uppercase;
}

.system-card,
.portfolio-card {
  background: var(--site-surface);
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius);
  height: 100%;
  overflow: hidden;
}

.system-card img {
  aspect-ratio: 1200 / 481;
  border-bottom: 4px solid var(--site-red);
  height: auto;
  object-fit: cover;
  width: 100%;
}

.system-card-body {
  padding: clamp(1.1rem, 2.5vw, 1.5rem);
}

.system-card-body h2 {
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
  margin-bottom: 0.75rem;
}

.portfolio-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.portfolio-card {
  align-items: center;
  display: flex;
  min-height: 190px;
  padding: 1rem;
}

.portfolio-card img {
  display: block;
  height: auto;
  margin: auto;
  max-height: 200px;
  max-width: 100%;
  width: auto;
}

.service-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.service-badges img {
  height: 71px;
  width: 71px;
}

.site-footer {
  background: var(--site-black);
  border-top: 4px solid var(--site-red);
  color: #f4f4f4;
  font-size: 0.95rem;
  padding: 2.5rem 0;
}

.footer-heading {
  color: var(--site-surface);
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.back-to-top {
  bottom: 1rem;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  right: 1rem;
  transform: translateY(0.5rem);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 1030;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (max-width: 991.98px) {
  .navbar-nav .nav-link {
    font-size: 1rem;
    font-weight: 700;
    padding: 0.95rem 1rem;
  }
}

@media (max-width: 767.98px) {
  .topbar {
    padding: 0.95rem 0;
  }

  .header-contact {
    margin-top: 0.65rem;
    text-align: left;
  }

  .hero-video-frame {
    aspect-ratio: 16 / 10;
  }

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

@media (max-width: 399.98px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}
