/* =============================================================
   Metal page styles
   Loaded AFTER css/modern.css + css/residential.css.
   All `.m-*` / `.r-*` classes here are scoped to metal.html.
   ============================================================= */

/* ─── Vertical centering for split sections ─── */
/* `.r-split` defaults to `align-items: center` in residential.css,
   which auto-centers whichever item is shorter (image when text is taller,
   text when image is taller). Pinned here so future tweaks to either
   file can't accidentally regress the centering. */
.r-split { align-items: center; }

/* ─── Skip-link (a11y keyboard navigation) ─── */
.m-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  background: var(--m-primary);
  color: #fff;
  font-family: var(--m-font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 0 0 var(--m-radius-md) 0;
}
.m-skip-link:focus { left: 0; }

/* ─── Header-only dark sections: tighten trailing space ─── */
.m-section--alt.m-section__header--center .m-section__header { margin-bottom: 0; }

/* ─── Dark section: split heading + lede contrast fix ─── */
.m-section--alt .r-split__heading {
  color: #fff;
  overflow-wrap: break-word;
  hyphens: auto;
  text-wrap: balance;
}
.m-section--alt .r-split__lede { color: rgba(255,255,255,0.78); }
.m-section--alt .r-split__divider { background: var(--m-accent); }

/* ─── Headings: prevent horizontal overflow on narrow viewports ─── */
.m-section--alt .m-h2 { overflow-wrap: break-word; hyphens: auto; text-wrap: balance; }

/* ─── Dark section overrides (header-only band) ─── */
/* Header-only dark sections with the seam signature (STAND SEAM, WHY US):
   rely on the brass seam rule + stat row as the visual signature —
   the radial glow would compete with that, so we drop it. */
.m-section--seam::before { display: none; }
.m-section--alt.m-section__header--center { scroll-margin-top: 80px; }

/* ─── Centered section header ─── */
.m-section__header--center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
/* Lede reused from CTA-form context (.m-cta-form__lede) needs centering
   when it appears in a centered header band — its own margin is `0 0 24px`
   (left fixed), max-width is 500px (CTA-form context), and has no text-align,
   so it lands flush left and narrow otherwise. */
.m-section__header--center .m-cta-form__lede {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  max-width: 640px;
}

/* ─── Tight section (reduces top padding for back-to-back sections) ─── */
.m-section--tight {
  padding-top: 0;
}

/* ─── Featured sheet-metal section (centered, narrow) ─── */
.r-featured {
  background: var(--m-bg-alt);
}

/* ─── Soft-bg section (subtle break between dark bands) ─── */
/* Same --m-bg-alt tone as .r-featured; applied to maintenance section
   to break up consecutive dark bands (Repair / Why us). */
.m-section--bg-soft {
  background: var(--m-bg-alt);
}
.r-featured__inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.r-featured__lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--m-text-muted);
  margin: 0;
  max-width: 620px;
}

/* ─── Heading inside split copy ─── */
.r-split__heading {
  font-family: var(--m-font-heading);
  font-weight: 900;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--m-text);
  margin: 0;
}

/* ─── Gallery (6 cells, 3×2 balanced grid) ─── */
/* Gallery: uses base .m-gallery (4-col) from modern.css, matching home/residential. */

/* ─── Systems (Editorial Bento: flagship + stack) ─── */
.m-systems {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 28px;
  align-items: start;
}
.m-system-flagship {
  background: var(--m-bg);
  border: 0;
  border-radius: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: start;
}
.m-system-flagship__media {
  background: var(--m-bg-alt);
  overflow: hidden;
  padding: 0;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 3 / 4;
  position: relative;
  border-radius: var(--m-radius-md);
}
.m-system-flagship__media img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
  border-radius: var(--m-radius-md);
}
.m-system-flagship__body {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: center;
}
.m-system-rule {
  width: 44px;
  height: 2px;
  background: var(--m-accent);
  border: 0;
  margin: 0;
}
.m-system-flagship__title {
  font-family: var(--m-font-heading);
  font-weight: 900;
  font-size: 28px;
  letter-spacing: -0.5px;
  color: var(--m-text);
  margin: 0;
  line-height: 1.15;
}
.m-system-flagship__desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--m-text-muted);
  margin: 0;
}
.m-system-stack {
  display: grid;
  grid-auto-rows: auto;
  gap: 16px;
  min-width: 0;
}
.m-system-mini {
  background: var(--m-bg);
  border: 0;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  gap: 0;
  padding: 0;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  align-items: stretch;
}
.m-system-mini__media {
  width: 120px;
  flex-shrink: 0;
  background: var(--m-bg-alt);
  overflow: hidden;
  padding: 0;
  min-width: 0;
  aspect-ratio: 3 / 4;
  align-self: stretch;
  position: relative;
  border-radius: var(--m-radius-md);
}
.m-system-mini__media img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
  border-radius: var(--m-radius-md);
}
.m-system-mini__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  min-width: 0;
  padding: 20px 24px;
}
.m-system-mini__title {
  font-family: var(--m-font-heading);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: -0.2px;
  color: var(--m-text);
  margin: 0;
  line-height: 1.25;
}
.m-system-mini__desc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--m-text-muted);
  margin: 0;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .m-systems { grid-template-columns: 1fr; }
  .m-system-flagship { grid-template-columns: 1fr; }
  .m-system-stack { grid-template-rows: auto; }
}

/* ─── Reduced motion: respect user preference ─── */
@media (prefers-reduced-motion: reduce) {
  .m-system,
  .m-system:hover { transition: none; transform: none; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ─── Signature: brass seam rule (standing seam panel metaphor) ─── */
.m-seam-rule {
  width: 72px;
  height: 3px;
  background: var(--m-accent);
  border: 0;
  margin: 28px auto 32px;
}

/* ─── Focus ring: visible for keyboard navigation ─── */
:focus-visible {
  outline: 3px solid var(--m-accent);
  outline-offset: 2px;
  border-radius: 2px;
}
.m-form input:focus-visible { outline-color: var(--m-primary); }
/* Standing seam CTA (7d6d9ac5): dark radial gradient depth (matches testimonials). */
.elementor-element-7d6d9ac5 {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(26, 122, 62, 0.20) 0%, transparent 58%),
    radial-gradient(ellipse at 85% 110%, rgba(201, 169, 110, 0.12) 0%, transparent 55%),
    #0e1410 !important;
}

/* Why-us CTA (9d0a5588): soften the radial glow + drop header margin. */
.elementor-element-9d0a5588::before { opacity: 0.1; }
.elementor-element-9d0a5588 .m-section__header { margin-bottom: 0; }

/* Why-us CTA (9d0a5588): same radial gradient as the seam CTA (drop ::before glow). */
.elementor-element-9d0a5588::before { display: none; }
.elementor-element-9d0a5588 {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(26, 122, 62, 0.20) 0%, transparent 58%),
    radial-gradient(ellipse at 85% 110%, rgba(201, 169, 110, 0.12) 0%, transparent 55%),
    #0e1410 !important;
}
