/* =========================================================
   TRACOMEX — Sitio corporativo
   Lenguaje visual derivado de la portada oficial "45 años":
   navy profundo, diagonales, filo dorado, líneas de carretera.
   ========================================================= */

:root {
  --navy-900: #0B1F36;
  --navy-800: #062447;
  --blue-600: #075EA8;
  --blue-400: #168FE5;
  --white: #FFFFFF;
  --steel: #AAB4BF;
  --graphite: #2B3440;
  --gold: #D9A441;
  --gold-soft: #F2C76B;

  --paper: #F3F5F8;
  --paper-2: #E6EAF0;
  --ink: #0B1F36;
  --ink-soft: #3C4A5C;
  --line-light: rgba(11, 31, 54, .12);
  --line-dark: rgba(170, 180, 191, .18);

  --font-display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(80px, 11vw, 150px);
  --ease: cubic-bezier(.2, .7, .1, 1);

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F2440;
    --paper-2: #13294A;
    --ink: #EEF2F6;
    --ink-soft: #B9C3CF;
    --line-light: rgba(170, 180, 191, .2);
  }
}
:root[data-theme="dark"] {
  --paper: #0F2440;
  --paper-2: #13294A;
  --ink: #EEF2F6;
  --ink-soft: #B9C3CF;
  --line-light: rgba(170, 180, 191, .2);
}

*, *::before, *::after { box-sizing: inherit; }
html { scroll-behavior: smooth; scroll-padding-top: calc(76px + env(safe-area-inset-top, 0px)); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--navy-900);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 16px; top: -60px; z-index: 200;
  background: var(--gold); color: var(--navy-900); padding: 10px 16px;
  font-weight: 700; text-decoration: none; transition: top .2s;
}
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Tipografía ---------- */
h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -.01em; }
h2 {
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  line-height: 1.08;
  font-weight: 700;
  max-width: 18ch;
}
h3 { font-size: 1.2rem; line-height: 1.3; font-weight: 600; }
p { margin: 0; }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.25rem); line-height: 1.6; max-width: 58ch; }

/* Filo dorado: la diagonal de la portada como marcador de sección */
.slash {
  display: inline-block; width: 34px; height: 4px; margin-bottom: 22px;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  transform: skewX(-35deg);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 15px 26px; min-height: 50px;
  font-family: var(--font-display); font-size: .82rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; text-decoration: none; border: 1px solid transparent;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
  cursor: pointer;
}
.btn-gold { background: var(--gold); color: var(--navy-900); }
.btn-gold:hover { background: var(--gold-soft); }
.btn-line { border-color: rgba(255,255,255,.4); color: var(--white); background: transparent; }
.btn-line:hover { border-color: var(--gold-soft); color: var(--gold-soft); }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background .45s var(--ease), box-shadow .45s var(--ease);
  background: linear-gradient(180deg, rgba(6, 20, 38, .55), rgba(6, 20, 38, 0));
}
.site-header.is-solid { background: var(--navy-900); box-shadow: 0 1px 0 var(--line-dark); }
.header-inner {
  max-width: 1440px; margin: 0 auto; height: 76px;
  padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: flex-end; gap: 24px;
}
/* La portada ya muestra el logotipo: el wordmark sólo aparece con el header sólido */
.brand {
  margin-right: auto; display: flex; align-items: center; gap: 8px;
  text-decoration: none; opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.is-solid .brand { opacity: 1; transform: none; pointer-events: auto; }
.brand-logo { height: 34px; width: auto; display: block; }
@media (max-width: 520px) { .brand-logo { height: 26px; } }
.brand b { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; letter-spacing: .02em; }
.brand small { font-family: var(--font-display); font-size: .62rem; letter-spacing: .38em; color: var(--steel); font-weight: 600; }
.nav ul { display: flex; gap: clamp(18px, 2.4vw, 38px); list-style: none; margin: 0; padding: 0; }
.nav a {
  position: relative; display: block; padding: 8px 0;
  font-family: var(--font-display); font-size: .74rem; font-weight: 600; letter-spacing: .18em;
  text-decoration: none; color: rgba(255,255,255,.88); transition: color .25s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav a:hover, .nav a.is-active { color: var(--white); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.menu-toggle {
  display: none; width: 46px; height: 46px; background: none; border: 0; padding: 0; cursor: pointer; color: var(--white);
}
.menu-toggle span { display: block; width: 24px; height: 2px; margin: 5px auto; background: currentColor; transition: transform .3s, opacity .3s; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1180px) {
  .menu-toggle { display: block; }
  .nav {
    position: fixed; inset: 0; z-index: -1; background: var(--navy-900);
    padding: calc(110px + env(safe-area-inset-top, 0px)) var(--gutter) 40px;
    opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
  }
  .menu-open .nav { opacity: 1; visibility: visible; }
  .nav ul { flex-direction: column; gap: 6px; }
  .nav a { font-size: 1.15rem; padding: 14px 0; border-bottom: 1px solid var(--line-dark); }
  .menu-open .brand { opacity: 1; pointer-events: auto; transform: none; }
}

/* =========================================================
   HERO — portada oficial, sin texto adicional encima
   ========================================================= */
.hero {
  position: relative; width: 100%; height: 100vh; height: 100svh; min-height: 520px;
  overflow: hidden; background: var(--navy-900);
}
.hero-img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.scroll-cue {
  position: absolute; right: clamp(20px, 4vw, 56px); bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  font-family: var(--font-display); font-size: .68rem; letter-spacing: .3em; color: rgba(255,255,255,.8);
}
.scroll-cue i { position: relative; width: 1px; height: 46px; background: rgba(255,255,255,.28); overflow: hidden; }
.scroll-cue i::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--gold-soft);
  animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue { to { top: 100%; } }
.hero-strip { display: none; }

/* Pantallas verticales: la portada se muestra completa, sin recortar el logotipo */
@media (max-aspect-ratio: 5/4) {
  .hero { height: auto; min-height: 0; padding-top: calc(76px + env(safe-area-inset-top, 0px)); }
  .hero-img { height: auto; aspect-ratio: 1672 / 941; object-fit: cover; }
  .scroll-cue { display: none; }
  .hero-strip {
    display: flex; flex-wrap: wrap; gap: 12px; padding: 28px var(--gutter) 40px;
    background: linear-gradient(180deg, #0a1d33, var(--navy-900));
  }
  .hero-strip .btn { flex: 1 1 200px; justify-content: center; }
  .impact-cta .actions { display: none; }
}

/* =========================================================
   SECCIÓN DE IMPACTO
   ========================================================= */
.impact {
  position: relative; background: var(--navy-900);
  border-top: 1px solid rgba(217,164,65,.35);
}
.impact::before { /* línea de luz como la franja inferior de la portada */
  content: ""; position: absolute; top: -1px; left: 10%; width: 40%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-soft), transparent);
}
.impact-grid {
  display: grid; grid-template-columns: 1.25fr 1fr 1fr 1fr;
}
.impact-item {
  padding: clamp(36px, 5vw, 64px) clamp(18px, 2.6vw, 36px);
  border-right: 1px solid var(--line-dark);
}
.impact-item:last-child { border-right: 0; }
.impact-num {
  font-family: var(--font-display); font-weight: 800; line-height: .9;
  font-size: clamp(4rem, 8vw, 7rem);
  background: linear-gradient(180deg, var(--gold-soft) 10%, var(--gold) 70%, #a8761f);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.impact-word {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.15; color: var(--white);
}
.impact-label { margin-top: 14px; font-size: .92rem; color: var(--steel); max-width: 24ch; }
.impact-cta {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  padding: 30px 0 clamp(50px, 6vw, 80px); border-top: 1px solid var(--line-dark);
}
.impact-cta p { color: var(--steel); max-width: 52ch; }
.impact-cta .actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 860px) {
  .impact-grid { grid-template-columns: 1fr 1fr; }
  .impact-item:nth-child(2) { border-right: 0; }
  .impact-item:nth-child(-n+2) { border-bottom: 1px solid var(--line-dark); }
}
@media (max-width: 480px) {
  .impact-grid { grid-template-columns: 1fr; }
  .impact-item { border-right: 0; border-bottom: 1px solid var(--line-dark); }
}

/* =========================================================
   QUIÉNES SOMOS
   ========================================================= */
.about { background: var(--paper); color: var(--ink); padding: var(--section) 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.about-text { position: relative; padding-left: 36px; }
.about-text::before { /* línea de carretera vertical */
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px;
  background: repeating-linear-gradient(180deg, var(--blue-600) 0 22px, transparent 22px 36px);
}
.about-text h2 { margin-bottom: 28px; }
.about-text p + p { margin-top: 18px; }
.about-text p { color: var(--ink-soft); max-width: 54ch; }
.about-pillars {
  margin-top: 36px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0;
  border-top: 1px solid var(--line-light);
}
.about-pillars div { padding: 16px 0; border-bottom: 1px solid var(--line-light); font-weight: 600; font-size: .95rem; color: var(--ink); }
.about-pillars div:nth-child(odd) { padding-right: 16px; }
.about-figure { position: relative; margin: 0; }
.about-figure img {
  width: 100%; aspect-ratio: 5 / 4; object-fit: cover;
  clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%, 0 18%);
}
.about-figure::after {
  content: ""; position: absolute; left: -6px; top: 7%; width: 18%; height: 3px;
  background: var(--gold); transform: rotate(-52deg); transform-origin: left;
}
.about-figure figcaption { margin-top: 14px; font-size: .85rem; color: var(--ink-soft); }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }

/* Encabezado de sección compartido */
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 60px; margin-bottom: clamp(44px, 6vw, 72px); }
.section-head p { color: var(--steel); max-width: 46ch; }
.section-head .eyebrow { max-width: none; color: var(--gold); }

/* =========================================================
   SERVICIOS — tarjetas con fotografía
   ========================================================= */
.services { background: #061430; padding: var(--section) 0; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service {
  display: flex; flex-direction: column; background: #0D1E3C;
  border: 1px solid rgba(170,180,191,.14); transition: border-color .4s var(--ease), transform .4s var(--ease);
}
.service-img { aspect-ratio: 628 / 282; overflow: hidden; background: #0a1a33; }
.service-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease), filter .6s; filter: brightness(.95); }
.service-body { padding: 34px 32px 40px; flex: 1; display: flex; flex-direction: column; }
.service-body h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 14px; }
.service-body p { color: var(--steel); font-size: .98rem; line-height: 1.7; }
.service-body::after { content: ""; width: 40px; height: 1px; background: var(--gold); margin-top: 26px; transition: width .5s var(--ease); }
.service:hover { border-color: rgba(217,164,65,.45); }
.service:hover .service-img img { transform: scale(1.05); filter: brightness(1.1); }
.service:hover .service-body::after { width: 80px; }
@media (max-width: 960px) { .services-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .services-grid { grid-template-columns: 1fr; gap: 18px; } .service-body { padding: 26px 22px 30px; } }

/* =========================================================
   NUESTRA OPERACIÓN — recorrido conceptual
   ========================================================= */
.operation { background: var(--navy-900); padding: var(--section) 0; position: relative; }
.route { position: relative; margin-top: 20px; }
.route-track { position: absolute; left: 0; right: 0; top: 34px; height: 2px; background: var(--line-dark); }
.route-fill {
  position: absolute; left: 0; top: 34px; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--blue-600), var(--blue-400) 70%, var(--gold-soft));
  transition: width 3.4s var(--ease);
}
.route-carrier {
  position: absolute; top: 20px; left: 0; width: 56px; height: 28px; margin-left: -28px;
  transition: left 3.4s var(--ease); z-index: 2;
}
.route.is-live .route-fill { width: 100%; }
.route.is-live .route-carrier { left: 100%; }
.route-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; position: relative; }
.route-steps li { padding-top: 68px; position: relative; }
.route-steps li::before {
  content: ""; position: absolute; top: 28px; left: 0; width: 14px; height: 14px;
  border: 2px solid var(--steel); background: var(--navy-900); transform: rotate(45deg);
  transition: border-color .4s, background .4s;
}
.route.is-live .route-steps li::before { border-color: var(--gold); background: var(--gold); }
.route.is-live .route-steps li:nth-child(1)::before { transition-delay: .1s; }
.route.is-live .route-steps li:nth-child(2)::before { transition-delay: .9s; }
.route.is-live .route-steps li:nth-child(3)::before { transition-delay: 1.7s; }
.route.is-live .route-steps li:nth-child(4)::before { transition-delay: 2.4s; }
.route.is-live .route-steps li:nth-child(5)::before { transition-delay: 3.1s; }
.route-steps .step-n { font-family: var(--font-display); font-size: .78rem; font-weight: 700; color: var(--gold-soft); letter-spacing: .12em; }
.route-steps h3 { margin: 8px 0 10px; font-size: 1.15rem; }
.route-steps p { color: var(--steel); font-size: .92rem; }
.op-note { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line-dark); color: var(--steel); font-size: .9rem; max-width: 70ch; }
@media (max-width: 860px) {
  .route-track, .route-fill { left: 6px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .route-fill { height: 0; transition: height 3.4s var(--ease); }
  .route.is-live .route-fill { width: 2px; height: 100%; }
  .route-carrier { display: none; }
  .route-steps { grid-template-columns: 1fr; gap: 34px; }
  .route-steps li { padding: 0 0 0 44px; }
  .route-steps li::before { top: 4px; left: 0; }
}

/* =========================================================
   COBERTURA
   ========================================================= */
.coverage { background: var(--navy-800); padding: var(--section) 0; overflow: hidden; }
.coverage-grid { display: grid; grid-template-columns: .9fr 1.3fr; gap: clamp(30px, 5vw, 80px); align-items: center; }
.region-list { list-style: none; padding: 0; margin: 36px 0 0; border-top: 1px solid var(--line-dark); }
.region-list button {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0; background: none; border: 0; border-bottom: 1px solid var(--line-dark);
  color: var(--steel); font: 600 1.05rem var(--font-display); text-align: left; cursor: pointer;
  transition: color .25s, padding .35s var(--ease);
}
.region-list button span:last-child { font: 400 .85rem var(--font-body); color: var(--steel); opacity: .8; }
.region-list button:hover, .region-list button.is-on { color: var(--white); padding-left: 12px; }
.region-list button.is-on { box-shadow: inset 3px 0 0 var(--gold); }
.map-wrap { position: relative; }
.map-wrap svg { width: 100%; height: auto; }
.map-wrap circle { fill: rgba(170, 180, 191, .28); transition: fill .45s var(--ease), r .45s var(--ease); }
.map-wrap[data-active="all"] circle,
.map-wrap[data-active="norte"] circle.r-norte,
.map-wrap[data-active="centro"] circle.r-centro,
.map-wrap[data-active="bajio"] circle.r-bajio,
.map-wrap[data-active="golfo"] circle.r-golfo,
.map-wrap[data-active="pacifico"] circle.r-pacifico { fill: var(--blue-400); }
.map-wrap[data-active="all"] circle { fill: rgba(22, 143, 229, .75); }
.map-caption { margin-top: 16px; font-size: .85rem; color: var(--steel); text-align: right; }
@media (max-width: 900px) { .coverage-grid { grid-template-columns: 1fr; } .map-caption { text-align: left; } }

/* =========================================================
   PATIOS
   ========================================================= */
.patios { background: #061430; padding: var(--section) 0; border-top: 1px solid rgba(170,180,191,.12); }
.patios-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 24px; align-items: stretch; }
.patio-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: rgba(170,180,191,.18); border: 1px solid rgba(170,180,191,.18); align-content: start; align-self: start; }
.patio-tab {
  width: 100%; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: baseline;
  padding: 22px 26px; background: #0B1A36; border: 0; color: var(--white); text-align: left; cursor: pointer;
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
}
.patio-tab:hover { background: #102447; }
.patio-tab.is-on { background: #10264B; box-shadow: inset 3px 0 0 var(--gold); }
.pt-n { grid-row: span 2; font: 700 .8rem var(--font-display); letter-spacing: .12em; color: var(--steel); }
.patio-tab.is-on .pt-n { color: var(--gold-soft); }
.pt-t { font: 600 1.08rem var(--font-display); }
.pt-s { margin-top: 4px; font: 600 .72rem var(--font-display); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.patio-view { display: flex; flex-direction: column; border: 1px solid rgba(170,180,191,.18); background: #0B1A36; }
.patio-map { position: relative; flex: 1; min-height: 380px; background: #081733; }
.patio-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(.25) contrast(1.05); }
.patio-locator { position: absolute; inset: 0; display: grid; place-items: center; padding: 28px; }
.patio-locator svg { width: 100%; height: 100%; max-height: 420px; }
.patio-locator circle.d { fill: rgba(170,180,191,.22); }
.patio-locator circle.p { fill: var(--gold); opacity: .55; transition: opacity .3s; }
.patio-locator .pin { transition: transform .8s var(--ease); }
.patio-locator .pin circle.ring { fill: none; stroke: var(--gold-soft); stroke-width: 2; animation: ring 2s var(--ease) infinite; transform-origin: center; transform-box: fill-box; }
@keyframes ring { from { transform: scale(.4); opacity: 1; } to { transform: scale(2.4); opacity: 0; } }
.patio-info { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between; padding: 28px 32px 30px; border-top: 1px solid rgba(170,180,191,.18); }
.patio-info h3 { font-size: 1.3rem; }
.patio-cap { margin: 6px 0 12px; font: 600 .74rem var(--font-display); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.patio-addr { color: var(--steel); max-width: 52ch; }
.patio-info .btn { min-height: 44px; padding: 11px 18px; }
@media (max-width: 960px) {
  .patios-grid { grid-template-columns: 1fr; }
  .patio-list { grid-template-columns: 1fr 1fr; }
  .patio-map { min-height: 320px; }
}
@media (max-width: 520px) { .patio-list { grid-template-columns: 1fr; } .patio-tab { padding: 18px 20px; } .patio-info { padding: 22px 20px 24px; } }

/* =========================================================
   SEGURIDAD
   ========================================================= */
.safety { background: linear-gradient(180deg, #040F24, #081733); padding: var(--section) 0; }
.eyebrow { display: flex; align-items: center; gap: 18px; font: 600 .82rem var(--font-display); letter-spacing: .28em; color: var(--gold); margin-bottom: 30px; }
.eyebrow::before { content: ""; width: 54px; height: 1px; background: var(--gold); }
.safety-top { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 5vw, 90px); align-items: center; margin-bottom: clamp(56px, 7vw, 96px); }
.safety-top h2 { font-size: clamp(2.2rem, 4.4vw, 3.8rem); margin-bottom: 30px; }
.safety-top .lead { color: var(--steel); }
.safety-img { margin: 0; border: 1px solid rgba(170,180,191,.18); }
.safety-img img { width: 100%; height: auto; aspect-ratio: 947 / 677; object-fit: cover; }
.safety-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(170,180,191,.2); border-left: 1px solid rgba(170,180,191,.2); background: rgba(13,30,60,.55); }
.safety-cell { padding: 44px 48px 48px; border-right: 1px solid rgba(170,180,191,.2); border-bottom: 1px solid rgba(170,180,191,.2); }
.safety-cell h3 { font: 600 .82rem var(--font-display); letter-spacing: .24em; color: var(--gold); margin-bottom: 22px; }
.safety-cell p { color: rgba(255,255,255,.82); font-size: 1.02rem; line-height: 1.7; }
@media (max-width: 900px) { .safety-top { grid-template-columns: 1fr; } .safety-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .safety-grid { grid-template-columns: 1fr; } .safety-cell { padding: 30px 24px 34px; } }

/* =========================================================
   TECNOLOGÍA
   ========================================================= */
.tech { position: relative; background: #081733; padding: var(--section) 0; overflow: hidden; }
.tech-bg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .22; pointer-events: none; }
.tech .wrap { position: relative; }
.tech h2 { font-size: clamp(2.2rem, 4.4vw, 3.8rem); max-width: 20ch; margin-bottom: 28px; }
.tech .lead { color: var(--steel); max-width: 64ch; }
.tech-list { list-style: none; margin: clamp(44px, 6vw, 76px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 38px 40px; }
.tech-list li { border-left: 1px solid var(--blue-600); padding: 4px 0 4px 30px; font: 600 .9rem var(--font-display); letter-spacing: .16em; color: var(--white); }
@media (max-width: 900px) { .tech-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .tech-list { grid-template-columns: 1fr; gap: 20px; } }

/* =========================================================
   SUSTENTABILIDAD (ESG)
   ========================================================= */
.esg { background: var(--paper-2); color: var(--ink); padding: var(--section) 0; }
.esg .section-head p { color: var(--ink-soft); }
.esg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 2px solid var(--ink); }
.esg-item { padding: 26px 22px 30px 0; border-bottom: 1px solid var(--line-light); }
.esg-item:not(:nth-child(4n)) { border-right: 1px solid var(--line-light); }
.esg-item:not(:nth-child(4n+1)) { padding-left: 22px; }
.esg-tag { display: inline-block; font: 700 .72rem var(--font-display); letter-spacing: .14em; padding: 5px 9px; margin-bottom: 18px; background: var(--navy-900); color: var(--gold-soft); }
.esg-tag.s { background: var(--blue-600); color: var(--white); }
.esg-tag.g { background: var(--graphite); color: var(--white); }
.esg-item h3 { font-size: 1.08rem; margin-bottom: 8px; }
.esg-item p { color: var(--ink-soft); font-size: .92rem; }
.esg-foot { margin-top: 30px; color: var(--ink-soft); font-size: .88rem; max-width: 72ch; }
@media (max-width: 960px) {
  .esg-grid { grid-template-columns: 1fr 1fr; }
  .esg-item { padding: 24px 18px 26px !important; border-right: 0 !important; }
  .esg-item:nth-child(odd) { border-right: 1px solid var(--line-light) !important; }
}
@media (max-width: 520px) { .esg-grid { grid-template-columns: 1fr; } .esg-item:nth-child(odd) { border-right: 0 !important; } .esg-item { padding: 22px 0 !important; } }

/* =========================================================
   CALIDAD
   ========================================================= */
.quality { background: linear-gradient(180deg, #040F24, #061430); padding: var(--section) 0; }
.quality-grid { display: grid; grid-template-columns: .92fr 1.08fr; gap: clamp(40px, 6vw, 110px); align-items: start; }
.quality h2 { font-size: clamp(2.2rem, 3.9vw, 3.4rem); max-width: 17ch; margin-bottom: 30px; }
.quality .lead { color: var(--steel); }
.q-cells { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(170,180,191,.18); }
.q-cell { background: #0B1A36; padding: 42px 40px 46px; }
.q-cell h3 { font: 600 .8rem var(--font-display); letter-spacing: .24em; color: var(--gold); margin-bottom: 22px; }
.q-cell p { color: var(--steel); font-size: 1.02rem; line-height: 1.7; }
@media (max-width: 960px) { .quality-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .q-cells { grid-template-columns: 1fr; } .q-cell { padding: 30px 24px 34px; } }

/* =========================================================
   GALERÍA
   ========================================================= */
.gallery { background: var(--navy-900); padding: var(--section) 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.filters button {
  background: none; border: 1px solid var(--line-dark); color: var(--steel);
  padding: 10px 16px; min-height: 42px; font: 600 .72rem var(--font-display); letter-spacing: .16em; cursor: pointer;
  transition: color .25s, border-color .25s, background .25s;
}
.filters button:hover { color: var(--white); border-color: var(--steel); }
.filters button.is-on { background: var(--gold); border-color: var(--gold); color: var(--navy-900); }
.masonry { columns: 3 320px; column-gap: 16px; }
.tile {
  break-inside: avoid; margin: 0 0 16px; position: relative; overflow: hidden; cursor: zoom-in;
  background: var(--navy-800); display: block; width: 100%; border: 0; padding: 0; color: inherit; text-align: left;
}
.tile img { width: 100%; height: auto; transition: transform .9s var(--ease), filter .6s; }
.tile:hover img { transform: scale(1.04); }
.tile .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 20px 18px;
  background: linear-gradient(0deg, rgba(6,20,38,.9), transparent);
  font: 600 .72rem var(--font-display); letter-spacing: .2em; color: var(--white);
}
.tile.ph { aspect-ratio: 4 / 3; display: grid; place-items: center; cursor: default; background: repeating-linear-gradient(-45deg, #0d2745 0 14px, #0b223d 14px 28px); border: 1px dashed rgba(170,180,191,.3); }
.tile.ph.tall { aspect-ratio: 3 / 4; }
.tile.ph span { font-size: .85rem; color: var(--steel); text-align: center; padding: 0 20px; }
.tile.ph span b { display: block; font: 700 .72rem var(--font-display); letter-spacing: .2em; color: var(--gold-soft); margin-bottom: 6px; }
.tile.is-hidden { display: none; }

.lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(4, 12, 24, .94);
  display: grid; place-items: center; padding: calc(60px + env(safe-area-inset-top, 0px)) 20px calc(40px + env(safe-area-inset-bottom, 0px));
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-height: 82vh; width: auto; max-width: 100%; transform: scale(.97); transition: transform .45s var(--ease); }
.lightbox.is-open img { transform: none; }
.lightbox button {
  position: absolute; top: calc(18px + env(safe-area-inset-top, 0px)); right: 20px;
  width: 48px; height: 48px; background: none; border: 1px solid var(--line-dark); color: var(--white); font-size: 1.4rem; cursor: pointer;
}
.lightbox p { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); left: 0; right: 0; text-align: center; color: var(--steel); font: 600 .72rem var(--font-display); letter-spacing: .2em; }

/* =========================================================
   EMPRESA — línea de tiempo
   ========================================================= */
.history { background: var(--paper); color: var(--ink); padding: var(--section) 0; }
.history .section-head p { color: var(--ink-soft); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 2px solid var(--ink); }
.timeline li { padding: 26px 22px 0 0; position: relative; }
.timeline li::before { content: ""; position: absolute; top: -8px; left: 0; width: 14px; height: 14px; background: var(--paper); border: 2px solid var(--ink); transform: rotate(45deg); }
.timeline li:last-child::before { background: var(--gold); border-color: var(--gold); }
.timeline .when { font: 700 .76rem var(--font-display); letter-spacing: .14em; color: var(--blue-600); }
.timeline li:last-child .when { color: #a8761f; }
.timeline h3 { margin: 10px 0 10px; }
.timeline p { color: var(--ink-soft); font-size: .93rem; }
@media (max-width: 900px) {
  .timeline { grid-template-columns: 1fr; border-top: 0; border-left: 2px solid var(--ink); }
  .timeline li { padding: 0 0 36px 30px; }
  .timeline li::before { top: 4px; left: -8px; }
}

/* =========================================================
   CERTIFICACIONES — grid de logotipos
   ========================================================= */
.certs { background: #061430; padding: var(--section) 0; border-top: 1px solid rgba(217,164,65,.3); }
.certs .section-head p:not(.eyebrow) { color: var(--steel); max-width: 46ch; }
.cert-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; }
.cert-card { grid-column: span 2; display: flex; flex-direction: column; background: #0D1E3C; border: 1px solid rgba(170,180,191,.14); transition: border-color .4s var(--ease), transform .4s var(--ease); }
.cert-card:nth-child(4) { grid-column: 2 / span 2; }
.cert-logo { background: #FFFFFF; height: 170px; display: grid; place-items: center; padding: 28px 36px; }
.cert-logo img { max-height: 114px; width: auto; max-width: 100%; height: auto; object-fit: contain; }
.cert-body { padding: 30px 32px 36px; flex: 1; }
.cert-body h3 { font: 600 .82rem var(--font-display); letter-spacing: .24em; color: var(--gold); text-transform: uppercase; margin-bottom: 14px; }
.cert-body p { color: rgba(255,255,255,.8); font-size: .97rem; line-height: 1.7; }
.cert-card:hover { border-color: rgba(217,164,65,.5); transform: translateY(-4px); }
@media (max-width: 960px) { .cert-grid { grid-template-columns: 1fr 1fr; } .cert-card, .cert-card:nth-child(4) { grid-column: auto; } .cert-card:last-child { grid-column: 1 / -1; } }
@media (max-width: 560px) { .cert-grid { grid-template-columns: 1fr; } .cert-logo { height: 140px; } .cert-logo img { max-height: 92px; } }

/* =========================================================
   CONTACTO
   ========================================================= */
.contact { position: relative; background: var(--navy-800); padding: var(--section) 0; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; right: -10%; top: 0; bottom: 0; width: 45%;
  background: linear-gradient(115deg, transparent 0 30%, rgba(7,94,168,.18) 30% 60%, transparent 60%);
}
.contact-grid { position: relative; display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: end; }
.contact h2 { margin-bottom: 22px; }
.contact .lead { color: var(--steel); }
.contact-data { margin: 0; border-top: 1px solid var(--line-dark); }
.contact-data div { padding: 16px 0; border-bottom: 1px solid var(--line-dark); display: grid; grid-template-columns: 120px 1fr; gap: 16px; font-size: .95rem; }
.contact-data dt { color: var(--steel); font-size: .85rem; }
.contact-data dd { margin: 0; }
.contact-data a { text-decoration: none; border-bottom: 1px solid var(--gold); }
.contact-data dd { line-height: 1.7; }
.contact-data a.social { display: inline-flex; align-items: center; gap: 10px; border-bottom: 0; }
.contact-data a.social svg { width: 34px; height: 34px; padding: 8px; fill: var(--white); border: 1px solid rgba(170,180,191,.35); transition: border-color .3s, fill .3s; }
.contact-data a.social:hover svg { border-color: var(--gold); fill: var(--gold-soft); }
form { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 24px; align-content: start; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font: 600 .74rem var(--font-display); letter-spacing: .16em; color: var(--steel); }
.field input, .field textarea {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid rgba(170,180,191,.4);
  color: var(--white); font: 400 1rem var(--font-body); padding: 10px 0 12px; border-radius: 0;
  transition: border-color .3s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--gold); }
.field input:focus-visible, .field textarea:focus-visible { box-shadow: 0 2px 0 var(--gold); }
.field .err { min-height: 1em; font-size: .8rem; color: var(--gold-soft); }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.form-foot small { color: var(--steel); font-size: .82rem; max-width: 42ch; }
.form-status { grid-column: 1 / -1; font-size: .95rem; color: var(--gold-soft); min-height: 1.4em; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { form { grid-template-columns: 1fr; } .contact-data div { grid-template-columns: 1fr; gap: 2px; } }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: #081829; padding: 70px 0 calc(30px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgba(217,164,65,.35); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 50px; }
.footer-brand b { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; letter-spacing: .02em; display: block; }
.footer-brand span { color: var(--steel); font-size: .92rem; }
.footer-brand p { margin-top: 18px; color: var(--steel); font-size: .92rem; max-width: 36ch; }
.site-footer h3 { font-size: .74rem; letter-spacing: .18em; color: var(--gold-soft); margin-bottom: 18px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer ul a { text-decoration: none; color: rgba(255,255,255,.82); font-size: .94rem; }
.site-footer ul a:hover { color: var(--white); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line-dark); color: var(--steel); font-size: .82rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* =========================================================
   Aparición progresiva (única y discreta)
   ========================================================= */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   AVISO DE PRIVACIDAD
   ========================================================= */
.legal-page { background: var(--paper); color: var(--ink); padding: calc(140px + env(safe-area-inset-top, 0px)) 0 var(--section); }
.legal { max-width: 860px; margin: 0 auto; color: var(--ink-soft); font-size: 1rem; }
.legal h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.08; color: var(--ink); }
.legal-sub { margin: 12px 0 26px; font: 600 .85rem var(--font-display); letter-spacing: .2em; color: var(--ink); }
.legal h2 { font-size: 1.35rem; color: var(--ink); margin: 52px 0 16px; padding-top: 26px; border-top: 1px solid var(--line-light); max-width: none; }
.legal h3 { font-size: 1.02rem; color: var(--ink); margin: 26px 0 10px; }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 16px; padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal li::marker { color: var(--gold); }
.legal a { color: var(--blue-600); }
.legal .btn-line { color: var(--ink); border-color: var(--ink); text-decoration: none; }
.legal .btn-line:hover { color: var(--blue-600); border-color: var(--blue-600); }
.legal-table { overflow-x: auto; margin: 22px 0; }
.legal table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .94rem; }
.legal th { text-align: left; background: var(--navy-900); color: var(--white); font: 600 .78rem var(--font-display); letter-spacing: .14em; padding: 14px 16px; }
.legal td { padding: 14px 16px; border-bottom: 1px solid var(--line-light); vertical-align: top; }
.legal hr { border: 0; border-top: 2px solid var(--ink); margin: 44px 0 20px; }
.legal .eyebrow { color: #a8761f; }
