/* ==========================================================
   Grupo Marmex — hoja de estilos principal
   ========================================================== */
:root {
  --ink: #1b1c1e;
  --ink-2: #3a3c40;
  --muted: #5f6368;
  --line: #d9dbde;
  --bg: #ffffff;
  --bg-soft: #f1f2f3;
  --bg-soft-2: #e7e8ea;
  --dark: #222325;
  --dark-2: #2c2d30;
  --cimbramex: #0f3a7d;
  --etal: #e2231a;
  --indux: #1590de;
  --radius: 8px;
  --shadow: 0 6px 18px rgba(0, 0, 0, .08);
  --shadow-lg: 0 14px 34px rgba(0, 0, 0, .14);
  --max: 1200px;
  --font: "Montserrat", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 1em; height: 1em; flex: none; }
svg.ico { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Encabezado ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 1px 0 var(--line); }
.header-inner { display: flex; align-items: center; gap: 32px; min-height: 92px; }
.brand { display: block; flex: none; }
.brand img { height: 50px; width: auto; display: block; }
.header-right { flex: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; padding: 8px 0; }
.topbar { display: flex; gap: 0; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.topbar a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; padding: 0 14px; border-left: 1px solid var(--line); }
.topbar a:first-child { border-left: 0; }
.topbar a:hover { color: var(--etal); }
.topbar .phone { font-weight: 800; font-size: 14px; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a { text-decoration: none; font-weight: 600; font-size: 14.5px; color: var(--ink); padding: 8px 14px; position: relative; }
.nav a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; border-radius: 2px; background: var(--ink); transform: scaleX(0); transition: transform .2s; }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.nav a.active { font-weight: 800; }
.nav a.btn-cta { background: var(--ink); color: #fff; border-radius: 6px; padding: 10px 22px; margin-left: 18px; }
.nav a.btn-cta::after { display: none; }
.nav a.btn-cta:hover { background: #000; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 10px; cursor: pointer; color: var(--ink); }
.menu-toggle svg { width: 28px; height: 28px; }

/* ---------- Hero de marcas ---------- */
.hero { position: relative; display: flex; height: 400px; overflow: hidden; background: var(--bg-soft); }
.hero-panel { position: relative; flex: 1; margin: 0 -40px; clip-path: polygon(80px 0, 100% 0, calc(100% - 80px) 100%, 0 100%); overflow: hidden; text-decoration: none; display: block; }
.hero-panel:first-child { margin-left: 0; clip-path: polygon(0 0, 100% 0, calc(100% - 80px) 100%, 0 100%); }
.hero-panel:last-child { margin-right: 0; clip-path: polygon(80px 0, 100% 0, 100% 100%, 0 100%); }
.hero-panel img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.hero-panel:hover img { transform: scale(1.05); }
.hero-panel .band { position: absolute; left: 0; right: 0; bottom: 0; height: 74px; display: flex; align-items: center; justify-content: center; }
.hero-panel.p-cimbramex .band { background: var(--cimbramex); }
.hero-panel.p-etal .band { background: linear-gradient(90deg, #b5130d, var(--etal)); }
.hero-panel.p-indux .band { background: var(--indux); }
.hero-panel.p-indux img { object-position: 40% 50%; }
.hero-panel.p-etal img { object-position: 50% 35%; }

/* Logotipos de marca (imagen oficial) */
.hero-panel .band img.logo-img { width: auto; height: 46px; object-fit: contain; transform: none !important; }
.hero-panel .band img.logo-etal-img { height: 64px; }
.page-hero img.page-logo { position: static; width: auto; height: 56px; opacity: 1; object-fit: contain; margin-bottom: 14px; }
.page-hero img.page-logo.logo-etal-img { height: 76px; }
@media (max-width: 600px) {
  .hero-panel .band img.logo-img { height: 38px; }
  .hero-panel .band img.logo-etal-img { height: 52px; }
  .page-hero img.page-logo { height: 44px; }
  .page-hero img.page-logo.logo-etal-img { height: 60px; }
}
/* Logotipos tipográficos (ya no se usan; se conservan como respaldo) */
.logo-badge { display: inline-flex; align-items: center; font-weight: 900; color: #fff; line-height: 1; letter-spacing: .01em; }
.logo-cimbramex { border: 2px solid #fff; border-radius: 8px; overflow: hidden; font-size: 26px; }
.logo-cimbramex span { padding: 6px 4px 6px 10px; background: #fff; color: var(--cimbramex); }
.logo-cimbramex b { padding: 6px 10px 6px 4px; font-weight: 900; }
.logo-etal { font-size: 40px; font-weight: 700; letter-spacing: -.02em; text-transform: lowercase; }
.logo-indux { font-size: 30px; border: 3px solid #fff; border-radius: 10px; padding: 4px 12px; letter-spacing: .04em; }

/* ---------- Secciones ---------- */
.section { padding: 64px 0; }
.section.soft { background: var(--bg-soft); }
.slash-title { display: flex; align-items: flex-start; gap: 18px; }
.slash-title::before { content: ""; flex: none; width: 22px; height: 40px; margin-top: 2px; background: #9a9ca0; transform: skewX(-22deg); }
.slash-title h2, .slash-title h1 { font-size: clamp(26px, 3.2vw, 36px); margin: 0; }
.slash-title.sm::before { height: 30px; width: 16px; }
.slash-title.sm h2 { font-size: clamp(22px, 2.6vw, 28px); }
.eyebrow { font-size: 19px; font-weight: 700; color: var(--muted); margin: 6px 0 16px; }
.lead { font-size: 16.5px; }

.intro-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; }
.intro-grid .col-left { padding-right: 40px; border-right: 1px solid var(--line); }
.intro-grid .col-left .body { padding-left: 40px; }
.feature { display: grid; grid-template-columns: 76px 1fr; gap: 22px; padding: 4px 0 26px; }
.feature + .feature { border-top: 1px solid var(--line); padding-top: 26px; }
.icon-tile { width: 76px; height: 76px; border-radius: 10px; background: var(--bg-soft-2); display: grid; place-items: center; color: var(--ink-2); }
.icon-tile svg { width: 40px; height: 40px; }
.feature h3 { font-size: 21px; }

/* Experiencia */
.experience { position: relative; display: grid; grid-template-columns: 1fr 1fr; min-height: 420px; background: linear-gradient(100deg, #eceded 0%, #f6f6f7 60%); overflow: hidden; }
.experience .text { padding: 56px 40px 56px max(24px, calc((100vw - var(--max)) / 2 + 24px)); align-self: center; position: relative; z-index: 1; }
.experience .media { position: relative; clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%); }
.experience .media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; position: absolute; inset: 0; }
/* Imagen #SomosMarmex: se muestra completa sobre fondo gris claro */
.experience .media.art { background: linear-gradient(135deg, #f7f7f7 0%, #ececec 100%); }
.experience .media.art img { object-fit: contain; object-position: 50% 50%; padding: 4% 4% 4% 17%; }
.experience .media.art::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: linear-gradient(90deg, var(--cimbramex) 0 33.3%, var(--etal) 33.3% 66.6%, var(--indux) 66.6% 100%); }/* Pilares */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); }
.pillar { padding: 8px 28px 8px; text-align: center; border-left: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; }
.pillar:first-child { border-left: 0; }
.pillar svg { width: 58px; height: 58px; color: var(--ink-2); margin-bottom: 14px; }
.pillar h3 { font-size: 18px; }
.pillar p { font-size: 14px; flex: 1; }
.link-more { font-weight: 700; font-size: 13.5px; text-decoration: none; color: var(--ink); border-bottom: 2px solid var(--ink); padding-bottom: 2px; }
.link-more:hover { color: var(--etal); border-color: var(--etal); }

/* Misión / Propósito / Valores */
.mpv-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; }
.mpv-tab { font: inherit; cursor: pointer; background: linear-gradient(#fbfbfb, #ececed); border: 1px solid #c9cbce; border-radius: var(--radius); padding: 18px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ink); font-size: 20px; font-weight: 800; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.mpv-tab svg { width: 42px; height: 42px; }
.mpv-tab:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.mpv-tab[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.mpv-panel { margin-top: 18px; background: var(--bg-soft); border-radius: var(--radius); padding: 26px 30px; font-size: 16px; }
.mpv-panel[hidden] { display: none; }
.mpv-panel h4 { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.chips li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; font-weight: 600; font-size: 14px; color: var(--ink); }

/* Razones */
.reasons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 28px; }
.reason { position: relative; background: linear-gradient(#fff, #f3f3f4); border: 1px solid #cfd1d4; border-radius: var(--radius); padding: 26px 22px 22px; text-align: center; box-shadow: var(--shadow); }
.reason .num { position: absolute; top: 12px; left: 12px; background: var(--ink-2); color: #fff; font-weight: 800; font-size: 15px; width: 30px; height: 28px; border-radius: 5px; display: grid; place-items: center; }
.reason svg { width: 52px; height: 52px; color: var(--ink-2); margin: 0 auto 10px; }
.reason h3 { font-size: 19px; margin-bottom: 12px; }
.reason { display: flex; flex-direction: column; }
.reason p { font-size: 13.5px; text-align: left; margin: 0; flex: 1; }
.reason::after { content: ""; display: block; height: 4px; background: #c8cacd; border-radius: 2px; margin: 18px 10px 0; }

/* ---------- Páginas internas ---------- */
.page-hero { position: relative; min-height: 300px; display: flex; align-items: flex-end; color: #fff; background: var(--dark); overflow: hidden; }
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,21,23,.85) 0%, rgba(20,21,23,.55) 45%, rgba(20,21,23,.1) 100%); z-index: 1; }
.page-hero.plain::before { display: none; }
.page-hero .container { position: relative; z-index: 2; padding-top: 70px; padding-bottom: 40px; }
.page-hero .accent { z-index: 2; }
.page-hero h1 { color: #fff; font-size: clamp(30px, 4.5vw, 48px); margin: 0; }
.page-hero .crumbs { font-size: 13px; opacity: .85; margin-bottom: 8px; }
.page-hero .crumbs a { text-decoration: none; }
.page-hero .crumbs a:hover { text-decoration: underline; }
.page-hero.plain { min-height: 200px; background: linear-gradient(110deg, var(--dark) 0%, #3b3d41 100%); }
.page-hero .accent { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; }
.page-hero.b-cimbramex .accent { background: var(--cimbramex); }
.page-hero.b-etal .accent { background: var(--etal); }
.page-hero.b-indux .accent { background: var(--indux); }
.page-hero .logo-badge { margin-bottom: 14px; }

.prose { max-width: 860px; }
.prose h2 { font-size: 24px; margin-top: 1.6em; }
.prose h3 { font-size: 19px; margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .35em; }
.prose .meta { color: var(--muted); font-size: 14px; }

.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.aside-card { background: var(--bg-soft); border-radius: var(--radius); padding: 26px; position: sticky; top: 120px; }
.aside-card h3 { font-size: 18px; }
.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 14.5px; padding: 12px 22px; border-radius: 6px; background: var(--ink); color: #fff; border: 0; cursor: pointer; font-family: inherit; }
.btn:hover { background: #000; }
.btn.outline { background: transparent; color: var(--ink); border: 2px solid var(--ink); }
.btn.outline:hover { background: var(--ink); color: #fff; }
.btn.b-cimbramex { background: var(--cimbramex); }
.btn.b-etal { background: var(--etal); }
.btn.b-indux { background: var(--indux); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

.timeline { list-style: none; margin: 28px 0 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 74px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { display: grid; grid-template-columns: 60px 1fr; gap: 30px; padding: 0 0 18px; position: relative; }
.timeline .year { font-weight: 800; color: var(--ink); font-size: 17px; text-align: right; }
.timeline li::before { content: ""; position: absolute; left: 69px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--brand, var(--ink)); }
.brand-cimbramex { --brand: var(--cimbramex); }
.brand-etal { --brand: var(--etal); }
.brand-indux { --brand: var(--indux); }

.product-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin-top: 26px; }
.product-group { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--brand, var(--ink)); border-radius: var(--radius); padding: 20px 22px; }
.product-group h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.product-group ul { margin: 0; padding: 0; list-style: none; }
.product-group li { padding: 6px 0; border-top: 1px solid var(--bg-soft-2); font-size: 14.5px; }
.product-group li:first-child { border-top: 0; }

.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.info-card { background: var(--bg-soft); border-radius: var(--radius); padding: 22px 24px; }
.info-card h3 { font-size: 17px; }
.info-card p { font-size: 14.5px; margin: 0; }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form .full { grid-column: 1 / -1; }
.form label { display: block; font-weight: 700; font-size: 13.5px; color: var(--ink); margin-bottom: 6px; }
.form input, .form textarea { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid #c4c7cb; border-radius: 6px; background: #fff; color: var(--ink); }
.form input:focus, .form textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.form textarea { min-height: 140px; resize: vertical; }
.form .hp { position: absolute; left: -9999px; }
.form .consent { font-size: 13px; color: var(--muted); display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.form .consent input { width: auto; margin-top: 3px; }
.alert { padding: 14px 18px; border-radius: 6px; margin-bottom: 18px; font-weight: 600; }
.alert.ok { background: #e6f4ea; color: #1e6b34; }
.alert.err { background: #fde8e7; color: #a31d16; }
.locations { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin-top: 26px; }
.location { background: var(--bg-soft); border-radius: var(--radius); padding: 20px 22px; border-left: 5px solid var(--brand, var(--ink)); font-size: 14px; }
.location h3 { font-size: 17px; margin-bottom: 8px; }
.location p { margin: 0 0 4px; }
.location a { text-decoration: none; font-weight: 600; }
.location a:hover { text-decoration: underline; }

/* ---------- Pie de página ---------- */
.site-footer { background: var(--dark); color: #d4d5d7; padding: 48px 0 0; font-size: 14px; position: relative; overflow: hidden; }
.site-footer::after { content: ""; position: absolute; right: -60px; bottom: -40px; width: 260px; height: 160px; background: var(--dark-2); transform: skewX(-35deg); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr .9fr; gap: 0; position: relative; z-index: 1; }
.footer-col { padding: 0 26px; border-left: 1px solid #45474b; }
.footer-col:first-child { padding-left: 0; border-left: 0; }
.footer-col h4 { color: #fff; font-size: 17px; margin: 0 0 6px; }
.footer-col h4::after { content: ""; display: block; width: 64px; height: 5px; border-radius: 3px; margin: 8px 0 18px; background: var(--bar, #8a8c90); }
.footer-col.f-cimbramex { --bar: #2f6fd6; }
.footer-col.f-etal { --bar: var(--etal); }
.footer-col.f-indux { --bar: var(--indux); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { text-decoration: none; color: #d4d5d7; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.contact-line { display: grid; grid-template-columns: 22px 1fr; gap: 12px; margin-bottom: 12px; }
.contact-line svg { width: 18px; height: 18px; margin-top: 2px; color: #fff; }
.footer-bottom { position: relative; z-index: 1; border-top: 1px solid #3a3c40; margin-top: 36px; padding: 18px 0; font-size: 12.5px; color: #9fa1a5; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.to-top { position: fixed; right: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; text-decoration: none; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40; box-shadow: var(--shadow-lg); }
.to-top.show { opacity: .9; pointer-events: auto; }
.to-top svg { width: 22px; height: 22px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1080px) {
  .nav a { padding: 8px 9px; font-size: 14px; }
  .nav a::after { left: 9px; right: 9px; }
  .nav a.btn-cta { margin-left: 8px; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); row-gap: 32px; }
  .footer-col:nth-child(4) { padding-left: 0; border-left: 0; }
}
@media (max-width: 900px) {
  .header-inner { min-height: 72px; }
  .brand img { height: 40px; }
  .menu-toggle { display: block; }
  .header-right { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; box-shadow: var(--shadow-lg); padding: 12px 24px 20px; align-items: stretch; flex-direction: column-reverse; }
  .site-header.open .header-right { display: flex; }
  .nav { flex-direction: column; align-items: stretch; gap: 0; }
  .nav a { padding: 12px 4px; border-bottom: 1px solid var(--bg-soft-2); }
  .nav a::after { display: none; }
  .nav a.btn-cta { margin: 12px 0 0; text-align: center; }
  .topbar { flex-direction: column; gap: 10px; padding-top: 14px; }
  .topbar a { border-left: 0; padding: 0 4px; }
  .hero { height: auto; flex-direction: column; }
  .hero-panel, .hero-panel:first-child, .hero-panel:last-child { margin: 0; clip-path: none; height: 190px; flex: none; }
  .hero-panel .band { height: 62px; }
  .intro-grid, .two-col, .contact-grid { grid-template-columns: 1fr; }
  .intro-grid .col-left { padding-right: 0; border-right: 0; }
  .intro-grid .col-left .body { padding-left: 0; }
  .experience { grid-template-columns: 1fr; }
  .experience .text { padding: 44px 24px; }
  .experience .media { min-height: 280px; clip-path: none; }
  .experience .media.art img { padding: 4%; }
  .pillars { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .pillar:nth-child(3) { border-left: 0; }
  .reasons { grid-template-columns: 1fr 1fr; }
  .cards-3 { grid-template-columns: 1fr; }
  .aside-card { position: static; }
}
@media (max-width: 600px) {
  body { font-size: 14.5px; }
  .container { padding: 0 16px; }
  .section { padding: 44px 0; }
  .pillars, .reasons, .mpv-tabs, .form { grid-template-columns: 1fr; }
  .pillar { border-left: 0; }
  .mpv-tabs { gap: 12px; }
  .mpv-tab { flex-direction: row; justify-content: center; gap: 14px; padding: 14px; }
  .mpv-tab svg { width: 30px; height: 30px; }
  .feature { grid-template-columns: 60px 1fr; gap: 16px; }
  .icon-tile { width: 60px; height: 60px; }
  .icon-tile svg { width: 32px; height: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-col { padding: 0 12px; }
  .footer-col:nth-child(odd) { padding-left: 0; border-left: 0; }
  .footer-col:first-child { grid-column: 1 / -1; }
  .footer-col:nth-child(4) { padding-left: 12px; border-left: 1px solid #45474b; }
  .timeline::before { left: 54px; }
  .timeline li { grid-template-columns: 44px 1fr; gap: 26px; }
  .timeline li::before { left: 49px; }
  .timeline .year { font-size: 15px; }
  .page-hero { min-height: 230px; }
}
