/* =========================================================
   Metal Fabrication Mexico — styles.css
   Single shared stylesheet. Page-specific overrides go in a
   local <style> block in that page's <head>, never here.
   ========================================================= */

:root {
  /* Brand palette — sampled directly from the logo, unique to this project */
  --color-primary: #FF6600;
  --color-primary-dark: #E65C00;
  --color-dark: #2E2E2E;
  --color-dark-deep: #1F1F1F;
  --color-silver: #D0D0D0;
  --color-silver-line: #E3E3E3;
  --color-light: #F7F7F5;
  --color-white: #FFFFFF;
  --color-text: #2E2E2E;
  --color-text-muted: #6B6B6B;

  --font-heading: 'Barlow Condensed', sans-serif;
  --font-body: 'Work Sans', sans-serif;

  --chamfer-lg: 18px;
  --chamfer-sm: 8px;

  --container-width: 1180px;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 .5em;
  color: var(--color-dark);
}
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; max-width: 62ch; }
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.container { width: 100%; max-width: var(--container-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section-alt { background: var(--color-light); }
.section-title {
  max-width: 46ch;
  margin-bottom: 40px;
}
.section-title p { color: var(--color-text-muted); }
.section-title--center { margin-left: auto; margin-right: auto; text-align: center; }

/* Signature "cut edge" device — chamfered corners instead of rounded ones,
   echoing the hexagon badge in the logo. Used on cards, image frames, buttons. */
.chamfer {
  clip-path: polygon(
    var(--chamfer-lg) 0, 100% 0,
    100% calc(100% - var(--chamfer-lg)), calc(100% - var(--chamfer-lg)) 100%,
    0 100%, 0 var(--chamfer-lg)
  );
}
.chamfer-sm {
  clip-path: polygon(
    var(--chamfer-sm) 0, 100% 0,
    100% calc(100% - var(--chamfer-sm)), calc(100% - var(--chamfer-sm)) 100%,
    0 100%, 0 var(--chamfer-sm)
  );
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 28px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-outline {
  background: transparent;
  border-color: var(--color-white);
  color: var(--color-white);
}
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-outline-dark {
  background: transparent;
  border-color: var(--color-dark);
  color: var(--color-dark);
}
.btn-outline-dark:hover { background: var(--color-dark); color: var(--color-white); }

/* ---------- Header ---------- */
.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-silver-line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-logo { display: flex; align-items: center; gap: 10px; }
.site-logo img { height: 64px; width: auto; }
.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.main-nav a {
  font-weight: 600;
  font-size: .98rem;
  color: var(--color-dark);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}
.main-nav a:hover { border-color: var(--color-primary); }
.header-cta { display: flex; align-items: center; gap: 20px; }
.header-cta .btn { padding: 11px 22px; font-size: .95rem; }
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.menu-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--color-dark);
  margin: 5px 0;
}

@media (max-width: 860px) {
  .header-inner { gap: 12px; padding: 10px 16px; }
  .site-logo img { height: 50px; }
  .main-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-silver-line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 16px;
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--color-silver-line); }
  .menu-toggle { display: block; flex-shrink: 0; }
  .header-cta .btn { padding: 10px 16px; font-size: .88rem; white-space: nowrap; }
}

@media (max-width: 360px) {
  .site-logo img { height: 42px; }
  .header-cta .btn { padding: 9px 12px; font-size: .82rem; }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--color-dark);
  color: var(--color-white);
  padding: 64px 0 76px;
  overflow: hidden;
}
.hero-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}
.hero-content h1 { color: var(--color-white); }
.hero-content > p {
  font-size: 1.15rem;
  color: #D8D8D8;
  max-width: 46ch;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 28px; }
.hero-badges {
  display: flex; flex-wrap: wrap; gap: 10px 24px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.18);
}
.hero-badges span {
  font-size: .9rem;
  color: #C9C9C9;
}
.hero-badges strong { color: var(--color-white); }

.hero-collage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 14px;
  min-width: 0;
}
.hero-collage > div { min-width: 0; }
.hero-collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-collage .collage-main {
  grid-row: 1 / 3;
  aspect-ratio: 3 / 4;
}
.hero-collage .collage-a { aspect-ratio: 4 / 3; }
.hero-collage .collage-b { aspect-ratio: 4 / 3; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-collage { order: -1; }
}

/* ---------- Card grids ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.card-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card-grid > *, .card-grid-2 > *, .card-grid-4 > * { min-width: 0; }

@media (max-width: 960px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .card-grid, .card-grid-2, .card-grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-silver-line);
  display: flex;
  flex-direction: column;
}
.card-media { aspect-ratio: 16 / 10; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: 10px; }
.card-body p { font-size: .95rem; color: var(--color-text-muted); margin-bottom: 18px; }
.card-link {
  margin-top: auto;
  font-weight: 600;
  font-size: .92rem;
  color: var(--color-primary);
}

/* Featured card — used for the one capability that gets its own
   distinct template (iron doors & gates today). Wider, horizontal. */
.card-featured {
  margin-top: 24px;
  flex-direction: row;
  align-items: stretch;
}
.card-featured-media { flex: 0 0 42%; overflow: hidden; }
.card-featured-media img { width: 100%; height: 100%; object-fit: cover; min-height: 260px; }
.card-featured-body {
  flex: 1;
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.card-featured-body h3 { font-size: 1.6rem; }
.card-featured-body p { max-width: 48ch; margin-bottom: 22px; }
.card-featured-body .btn { align-self: flex-start; }

@media (max-width: 700px) {
  .card-featured { flex-direction: column; }
  .card-featured-media img { min-height: 200px; }
  .card-featured-body { padding: 26px 24px; }
}

/* Product index groups */
.product-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px 32px;
}
.product-groups > * { min-width: 0; }
@media (max-width: 860px) { .product-groups { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .product-groups { grid-template-columns: 1fr; } }

.product-group h3 {
  font-size: 1.1rem;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--color-primary);
}
.product-group ul li { margin-bottom: 9px; }
.product-group ul li a {
  font-size: .96rem;
  color: var(--color-text);
  border-bottom: 1px solid transparent;
}
.product-group ul li a:hover { color: var(--color-primary); border-color: var(--color-primary); }

/* ---------- CTA / notice bands ---------- */
.cta-band {
  background: var(--color-dark);
  color: var(--color-white);
}
.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--color-white); margin-bottom: 8px; }
.cta-band p { color: #D8D8D8; margin: 0; }

.soft-cta {
  border-top: 1px solid var(--color-silver-line);
  border-bottom: 1px solid var(--color-silver-line);
}
.soft-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.soft-cta h2 { margin-bottom: 6px; }
.soft-cta p { color: var(--color-text-muted); margin: 0; max-width: 54ch; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-dark-deep);
  color: #C9C9C9;
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer-grid > * { min-width: 0; }
.footer-brand img { height: 56px; margin-bottom: 14px; }
.footer-brand p { color: #A8A8A8; font-size: .92rem; max-width: 30ch; }
.footer-grid h4 {
  color: var(--color-white);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .92rem;
  margin-bottom: 14px;
}
.footer-grid ul li { margin-bottom: 10px; }
.footer-grid ul li a { font-size: .92rem; color: #B8B8B8; }
.footer-grid ul li a:hover { color: var(--color-primary); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 22px;
  font-size: .85rem;
  color: #8A8A8A;
}

/* Minimal "leaf" footer — used on individual product/service pages */
.site-footer--minimal { padding: 36px 0; }
.site-footer--minimal .footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.site-footer--minimal img { height: 34px; }
.back-link { font-size: .9rem; color: #B8B8B8; font-weight: 600; }
.back-link:hover { color: var(--color-primary); }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

