
:root {
  --primary: #A80000;
  --primary-dark: #7A0000;
  --text: #111827;
  --muted: #374151;
  --subtle: #6B7280;
  --line: #E5E7EB;
  --bg: #FAFAFA;
  --card: #ffffff;
}

* { box-sizing: border-box; }
html, body { margin:0; padding:0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
.container { width: min(1100px, calc(100% - 48px)); margin: 0 auto; }

header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,250,250,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.navbar { display:flex; align-items:center; justify-content:space-between; gap:16px; padding: 14px 0; }
.brand { display:flex; align-items:center; gap:12px; }
.brand img { height: 38px; width:auto; }
.brand .tag { font-size: 12px; color: var(--subtle); letter-spacing: .2px; }

nav ul { list-style:none; display:flex; gap:18px; padding:0; margin:0; align-items:center; }
/* Nav links: keep baseline box-model identical across normal/hover/active
   to avoid vertical jitter and text misalignment */
nav a {
  font-size: 14px;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  white-space: nowrap;
  box-sizing: border-box;
  border: 1px solid transparent;
}

nav a.active {
  color: var(--text);
  background: #fff;
  border-color: var(--line);
}
.cta {
  display:inline-flex; align-items:center; justify-content:center;
  padding: 10px 14px; border-radius: 12px;
  background: var(--primary); color: #fff; font-weight: 600; font-size: 14px;
  border: 1px solid rgba(0,0,0,0.04);
}
.cta:hover { background: var(--primary-dark); color:#fff; }

.mobile-toggle { display:none; border:1px solid var(--line); background:#fff; padding: 10px 12px; border-radius: 12px; }

.hero {
  position: relative;
  border-bottom: 1px solid var(--line);
  background: #0b0f1a;
}
.hero .bg {
  position:absolute; inset:0;
  background-size: cover; background-position: center;
  filter: saturate(.95) contrast(1.02);
  opacity: .9;
}
.hero .overlay {
  position:absolute; inset:0;
  background: linear-gradient(90deg, rgba(10,12,18,.88) 0%, rgba(10,12,18,.62) 45%, rgba(10,12,18,.38) 100%);
}
.hero .content {
  position: relative;
  padding: 64px 0;
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 28px;
  align-items: center;
}
.kicker { color: rgba(255,255,255,.78); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; }
h1 { color:#fff; font-size: clamp(30px, 3.2vw, 44px); line-height: 1.08; margin: 10px 0 12px; }
.hero p { color: rgba(255,255,255,.84); font-size: 16px; line-height: 1.6; margin: 0 0 16px; }
.hero .panel {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  padding: 18px;
}
.hero .panel h3 { margin:0 0 8px; color:#fff; font-size: 16px; }
.hero .panel ul { margin:0; padding-left: 18px; color: rgba(255,255,255,.84); }
.hero .panel li { margin: 6px 0; }

main { padding: 34px 0 54px; }
.section { margin: 28px 0; }
.section h2 { font-size: 22px; margin: 0 0 10px; }
.section h3 { font-size: 17px; margin: 18px 0 8px; }
.section p { color: var(--muted); line-height: 1.7; margin: 0 0 10px; }
.section ul { color: var(--muted); line-height: 1.7; margin: 8px 0 0; padding-left: 18px; }
.grid-2 { display:grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 1px 0 rgba(17,24,39,.03);
}
.banner-img {
  /* Keep banner images visually consistent across pages
     regardless of the source image aspect ratio. */
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
  overflow: hidden;
  aspect-ratio: 21 / 9;
  max-height: 360px;
}
.banner-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.refs { columns: 2; column-gap: 24px; }
.refs li { break-inside: avoid; padding: 2px 0; }

footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 26px 0;
}
footer .footgrid { display:grid; grid-template-columns: 1.2fr .8fr; gap: 18px; align-items:start; }
.small { color: var(--subtle); font-size: 13px; line-height: 1.6; }
.legal-links a { color: var(--muted); }
.legal-links a:hover { color: var(--primary); }

@media (max-width: 900px) {
  .hero .content { grid-template-columns: 1fr; padding: 46px 0; }
  .grid-2 { grid-template-columns: 1fr; }
  .refs { columns: 1; }
  nav ul { display:none; }
  .mobile-toggle { display:inline-flex; }
  nav.open ul { display:flex; flex-direction:column; align-items:stretch; gap:8px; padding: 12px 0 0; }
  nav.open a { border: 1px solid var(--line); background:#fff; }
  .banner-img { aspect-ratio: 16 / 9; max-height: 320px; }
}

/* ===== GLOBAL POLISH ===== */

/* Typography hierarchy */
h1 {
  line-height: 1.15;
  letter-spacing: -0.01em;
}
h2 {
  line-height: 1.25;
}

/* Vertical rhythm */
section {
  padding-top: clamp(48px, 6vw, 80px);
  padding-bottom: clamp(48px, 6vw, 80px);
}

/* Content max width for readability */
.container, .content {
  max-width: 1200px;
}

/* Mobile refinements */
@media (max-width: 768px) {
  h1 {
    font-size: clamp(28px, 7vw, 34px);
  }
  nav a {
    padding: 10px 12px;
  }
}

/* Footer calm-down */
footer {
  padding-top: 40px;
  padding-bottom: 40px;
}


/* ===== BRAND COLOR TUNING: H2 in wine red ===== */
:root{
  --mt-wine-red: rgb(168, 0, 0);
}
h2{
  color: var(--mt-wine-red);
}


/* ===== Services page image adjustment ===== */
/* Move middle services image down slightly to reveal face */
.services .card:nth-child(2) .card-image,
.services .service-card:nth-child(2) .image {
  
}


/* ===== Services page image adjustment v2 ===== */
/* Push middle services image further down to fully reveal face */
.services .card:nth-child(2) .card-image,
.services .service-card:nth-child(2) .image {
  
}


/* ===== Services page image adjustment v3 ===== */
/* Push middle services image further down to fully reveal entire face */
.services .card:nth-child(2) .card-image,
.services .service-card:nth-child(2) .image {
  
}


/* ===== Services page image adjustment FINAL ===== */
/* Move image UP so the full face is visible */
.services .card:nth-child(2) .card-image,
.services .service-card:nth-child(2) .image {
  
}


/* ===== Services page image FACE FIX ===== */
/* Force image to align to top so face is fully visible */
.services .card:nth-child(2) .card-image,
.services .service-card:nth-child(2) .image {
  background-position: center top !important;
}

/* ===== Services hero image: keep top, crop bottom only ===== */
.page-services .hero .bg{
  background-position: center top !important; /* keep faces, crop bottom */
}


/* ===== Services: banner-img show faces (crop bottom only) ===== */
.page-services .banner-img img{
  object-position: center top;
}


/* ===== HERO images: keep top, crop bottom only ===== */
/* Applies to hero_1, hero_3, hero_5 (background images) */
.hero.hero-1,
.hero.hero-3,
.hero.hero-5{
  background-position: center top !important;
}

/* Applies to <img>-based hero images */
.hero-1 img,
.hero-3 img,
.hero-5 img{
  object-position: center top;
}


/* ===== Why MTmation: keep faces visible (crop bottom only) ===== */
.page-why .hero .bg,
.page-why .hero{
  background-position: center top !important;
}

/* If the page uses an <img> banner area */
.page-why .banner-img img{
  object-position: center top;
}


/* ===== ISO 9001 link + Why block ===== */
.footer-iso{
  display:inline-block;
  margin-left:16px;
  font-size:12px;
  opacity:0.85;
  text-decoration:none;
}
.footer-iso:hover{ opacity:1; text-decoration:underline; }

.iso9001-block{ padding: 28px 0; }
.iso9001-card{
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 18px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.75);
}
.iso9001-card h2{ margin: 0 0 8px 0; }
.iso9001-card p{ margin: 0 0 14px 0; }


/* ===== Footer ISO alignment fix ===== */
.site-footer{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
}

.footer-iso{
  margin-left:0;
  text-align:left;
  align-self:flex-start;
}


/* ===== Footer ISO alignment v2 ===== */
.footer-iso-wrap{
  margin-top:8px;
}
.footer-iso{
  display:inline-block;
  font-size:12px;
  opacity:0.85;
  text-decoration:none;
}
.footer-iso:hover{ opacity:1; text-decoration:underline; }

/* Footer alignment fix */
.footer-container,
footer .footer-container {
    display: flex;
    align-items: flex-start !important;
}

footer h3,
footer h4 {
    margin-top: 0 !important;
}


/* ===== Footer mobile layout fix ===== */
@media (max-width: 700px){
  .footgrid{
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .legal-links{
    margin-top: 6px;
  }
}


/* Footer mobile heading baseline fix */
@media (max-width: 768px){
  footer h3, footer h4{
    min-height: 2.6em;            /* reserve two lines */
    display: flex;
    align-items: flex-end;        /* align single-line titles to bottom */
  }
}
