/* ══════════════════════════════════════════════════════════════════
   MTEC — page-chrome.css
   Shared styles consumed by quienes-somos and service pages.
   Includes: reset, vars, body bg, bg-gear container, reveal system,
   page-hero base, section blocks, and footer. NO page-specific
   content rules — those live in service-page.css or inline.
   ══════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { line-height: 1.15; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: "Inter", sans-serif; font-weight: 400;
  color: #EDF1F5;
  background: #1B6CA8 url('../../brand_assets/background%202.0.png') center top / cover no-repeat fixed;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  position: relative;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: rgba(27,108,168,0.45); color: #fff; }

:root {
  --acero:        #1B6CA8;
  --acero-light:  #2B82B9;
  --acero-deep:   #0B3554;
  --platino:      #B2BEC9;
  --azul:         #0D1B2E;
  --plomo:        #536073;
  --vapor:        #EDF1F5;
  --page-pad:     clamp(2rem, 10vw, 200px);
}

/* ══ BACKGROUND GEAR ══════════════════════════════
   Positioning + opacity only — the SVG geometry lives in
   partials/bg-gear.html and is built by assets/js/bg-gear.js.
   ══════════════════════════════════════════════════ */
.bg-gears {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: -3;
  overflow: hidden;
}
.bg-gear {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: clamp(360px, 32vw, 580px);
  aspect-ratio: 1;
  /* Center horizontally and push down by half so the gear's geometric
     center sits at the viewport bottom edge — only the upper half shows.
     SVG transform="rotate(deg 500 500)" spins it on its own axis. */
  transform: translate(-50%, 50%);
  opacity: 0.38;
  mix-blend-mode: screen;
}
.bg-gear svg { width: 100%; height: 100%; display: block; overflow: visible; }
@media (prefers-reduced-motion: reduce) {
  .bg-gear-spin { transform: none !important; }
}

/* ══ PAGE HERO BASE ════════════════════════════════ */
.page-hero {
  padding-top: clamp(80px, 9vh, 100px);
  position: relative; overflow: hidden;
}

/* ── BREADCRUMB BAR — editorial, world-class spacing ──────────────
   Sits flush under the navbar with generous breathing room and a
   barely-there platino hairline beneath. The navbar is position:fixed
   so top padding compensates for its height. The bottom padding +
   border-bottom create the divider between page metadata and the hero. */
.breadcrumb-bar {
  background: transparent;
  position: relative;
  z-index: 2;
}
.breadcrumb-bar-inner {
  margin: 0 auto;
  padding:
    calc(clamp(80px, 9vh, 100px) + 32px)
    var(--page-pad)
    20px;
  border-bottom: 1px solid rgba(178,190,201,0.14);
}
.breadcrumb-bar .page-breadcrumb {
  margin-bottom: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  gap: 14px;
}
/* Parent links — animated underline grows on hover, color shifts in. */
.breadcrumb-bar .page-breadcrumb a {
  color: rgba(255,255,255,0.55);
  position: relative;
  padding-bottom: 3px;
  transition: color 0.35s cubic-bezier(.22,1,.36,1);
}
.breadcrumb-bar .page-breadcrumb a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.55s cubic-bezier(.22,1,.36,1);
}
.breadcrumb-bar .page-breadcrumb a:hover {
  color: rgba(255,255,255,0.96);
}
.breadcrumb-bar .page-breadcrumb a:hover::after { transform: scaleX(1); }
.breadcrumb-bar .page-breadcrumb a:focus-visible {
  outline: 2px solid #2B82B9;
  outline-offset: 4px;
  border-radius: 2px;
}
/* Separators — barely there, decorative only. */
.breadcrumb-bar .page-breadcrumb .sep {
  color: rgba(178,190,201,0.32);
  font-weight: 400;
  letter-spacing: 0;
  user-select: none;
}
/* Current page — slightly emphasized so the user knows where they are. */
.breadcrumb-bar .page-breadcrumb > span:not([class]) {
  color: rgba(255,255,255,0.92);
  font-weight: 600;
}

/* When a breadcrumb-bar precedes the page-hero, the bar absorbs the
   navbar clearance and the hero drops its own top padding. */
body:has(.breadcrumb-bar) .page-hero { padding-top: 0; }

/* ──────────────────────────────────────────────────────────────────
   MOBILE ≤720px — breadcrumb removed (limited vertical real estate),
   but the bar element stays as a navbar-height spacer so the first
   content element still clears the fixed nav (which is position:fixed
   top:0 and would otherwise overlap content beneath it).
─────────────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .breadcrumb-bar .page-breadcrumb { display: none; }
  .breadcrumb-bar-inner {
    padding:
      calc(68px + 24px)   /* mobile navbar height + breathing room */
      var(--page-pad)
      0;
    border-bottom: none;
  }
}

/* ── EDITORIAL PAGINATOR — shared by service-page carousels,
      industry carousel on que-hacemos, and any future paged grid. */
.consid-paginator {
  display: flex; align-items: center; gap: 14px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(178,190,201,0.18);
  justify-content: flex-end;
}
.consid-paginator[hidden] { display: none; }
.consid-nav {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid rgba(178,190,201,0.30);
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  border-radius: 999px;
  transition: background 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
}
.consid-nav:hover {
  background: rgba(178,190,201,0.10);
  border-color: rgba(178,190,201,0.55);
  color: #fff;
}
.consid-nav:focus-visible {
  outline: 2px solid #2B82B9;
  outline-offset: 2px;
}
.consid-nav:disabled {
  opacity: 0.30; cursor: not-allowed;
  background: transparent;
}
.consid-nav svg { width: 12px; height: 12px; }
.consid-counter {
  font-family: ui-monospace, "JetBrains Mono", "Menlo", monospace;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.10em;
  color: rgba(255,255,255,0.55);
  min-width: 44px; text-align: center;
}
.page-hero-inner {
  margin: 0 auto;
  padding: 80px var(--page-pad) 24px;
  position: relative; z-index: 1;
}
.page-breadcrumb {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 28px;
}
.page-breadcrumb a { color: rgba(255,255,255,0.65); transition: color 0.2s; }
.page-breadcrumb a:hover { color: #fff; }
.page-breadcrumb span.sep,
.page-breadcrumb > span:not([class]) { opacity: 0.5; }
.page-accent-line {
  width: 48px; height: 3px;
  background: var(--platino); margin-bottom: 24px;
}
.page-title {
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 700; color: #fff;
  letter-spacing: -0.02em; line-height: 1.05;
  margin-bottom: 20px;
}
.page-subtitle {
  font-size: clamp(14px, 1.4vw, 17px);
  font-weight: 400; color: rgba(255,255,255,0.85);
  max-width: 58ch; line-height: 1.65;
}

/* ══ CONTENT SECTIONS ══════════════════════════════ */
.content-wrap { margin: 0 auto; padding: 0 var(--page-pad); }
.section-block {
  padding: 72px 0;
  border-bottom: 1px solid rgba(178,190,201,0.20);
  position: relative;
}
.section-block:last-of-type { border-bottom: none; }
.section-block.section-tinted { background: rgba(178,190,201,0.12); }
.section-h2 {
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 600; color: #fff;
  letter-spacing: -0.01em; line-height: 1.15;
  margin-bottom: 20px;
}
.section-lead {
  font-size: clamp(15px, 1.3vw, 17px);
  font-weight: 400; color: rgba(255,255,255,0.85);
  max-width: 60ch; line-height: 1.7;
  margin-bottom: 28px;
}
.section-body {
  font-size: clamp(14px, 1.15vw, 16px);
  font-weight: 400; color: rgba(255,255,255,0.78);
  max-width: 60ch; line-height: 1.75;
  margin-bottom: 22px;
}
.section-body:last-child { margin-bottom: 0; }
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px; align-items: start;
}
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; gap: 40px; } }

.section-tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  margin-bottom: 24px;
}
.section-tag::before {
  content: ''; display: block;
  width: 24px; height: 2px; background: var(--platino);
}

/* ══ REVEAL SYSTEM — bidirectional ════════════════
   Toggled by assets/js/reveals.js (MTEC.initReveals).
   ════════════════════════════════════════════════ */
.reveal       { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.22,1,.36,1), transform .9s cubic-bezier(.22,1,.36,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-x     { opacity: 0; transform: translateX(-32px); transition: opacity .95s cubic-bezier(.22,1,.36,1), transform .95s cubic-bezier(.22,1,.36,1); }
.reveal-x.visible { opacity: 1; transform: translateX(0); }
.reveal-x-r   { opacity: 0; transform: translateX(32px); transition: opacity .95s cubic-bezier(.22,1,.36,1), transform .95s cubic-bezier(.22,1,.36,1); }
.reveal-x-r.visible { opacity: 1; transform: translateX(0); }
.reveal-scale { opacity: 0; transform: scale(.94); transition: opacity .9s cubic-bezier(.22,1,.36,1), transform .9s cubic-bezier(.22,1,.36,1); }
.reveal-scale.visible { opacity: 1; transform: scale(1); }
.blur-reveal  { opacity: 0; filter: blur(5px); transform: translateY(14px); transition: opacity .95s ease, filter 1.1s ease, transform .95s cubic-bezier(.22,1,.36,1); }
.blur-reveal.visible { opacity: 1; filter: blur(0); transform: translateY(0); }
.line-wrap    { display: block; overflow: hidden; }
.line-reveal  { display: block; transform: translateY(108%) skewY(1.5deg); transition: transform 1.15s cubic-bezier(.16,1,.3,1); }
.line-reveal.visible { transform: translateY(0) skewY(0deg); }

/* Stagger delays — only on .visible so exits snap together when
   scrolling back up (no awkward delayed fade-outs). */
[data-delay="50"].visible  { transition-delay: .05s; }
[data-delay="100"].visible { transition-delay: .1s; }
[data-delay="150"].visible { transition-delay: .15s; }
[data-delay="200"].visible { transition-delay: .2s; }
[data-delay="250"].visible { transition-delay: .25s; }
[data-delay="300"].visible { transition-delay: .3s; }
[data-delay="400"].visible { transition-delay: .4s; }
[data-delay="500"].visible { transition-delay: .5s; }
[data-delay="600"].visible { transition-delay: .6s; }

/* Section-tag fades like the rest of the chrome */
.section-tag {
  opacity: 0; transform: translateY(6px);
  transition: opacity .7s cubic-bezier(.22,1,.36,1),
              transform .7s cubic-bezier(.22,1,.36,1),
              margin-bottom 0s;
}
.section-tag.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 720px) {
  .reveal-x, .reveal-x-r { transform: none !important; }
}

/* ══ FOOTER ════════════════════════════════════════ */
.footer {
  position: relative;
  background: transparent;
  padding: 96px 0 32px;
  z-index: 2;
}
.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.14) 18%,
    rgba(255,255,255,0.14) 82%,
    rgba(255,255,255,0) 100%
  );
  pointer-events: none;
}
.footer-inner { margin: 0 auto; padding: 0 var(--page-pad); display: flex; flex-direction: column; }
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 64px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.footer-cluster { display: flex; gap: 56px; flex: 0 1 auto; }
@media (max-width: 960px) {
  .footer-grid { flex-direction: column; gap: 40px; }
  .footer-cluster { flex-wrap: wrap; gap: 36px 48px; }
}
@media (max-width: 600px) {
  .footer-grid { padding-bottom: 40px; }
  .footer-cluster { flex-direction: column; gap: 32px; }
}
.footer-brand { display: flex; flex-direction: column; gap: 22px; max-width: 42ch; }
.footer-logo { height: 144px; width: auto; opacity: 0.95; align-self: flex-start; }
.footer-tagline { font-size: 14px; line-height: 1.65; color: rgba(255,255,255,0.75); margin: 0; }
.footer-channels { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; letter-spacing: 0.02em; }
.footer-address {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; line-height: 1.5;
  color: rgba(255,255,255,0.55);
  margin: 8px 0 0; letter-spacing: 0.01em;
  transition: color 0.2s;
}
.footer-address:hover { color: rgba(255,255,255,0.85); }
.footer-address:hover svg { color: var(--platino); }
.footer-address svg { color: rgba(255,255,255,0.45); flex-shrink: 0; transition: color 0.2s; }
.footer-channel {
  color: rgba(255,255,255,0.85);
  border-bottom: 1px solid rgba(255,255,255,0.30);
  padding-bottom: 2px; transition: color 0.2s, border-color 0.2s;
}
.footer-channel:hover { color: #fff; border-color: #fff; }
.footer-sep { color: rgba(255,255,255,0.30); }
.footer-col { display: flex; flex-direction: column; gap: 18px; }
.footer-col-kicker { font-size: 10px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255,255,255,0.55); }
.footer-links {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 12px;
  font-size: 14px;
}
.footer-links a {
  color: rgba(255,255,255,0.78);
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}
.footer-links a:hover { color: #fff; transform: translateX(3px); }
.footer-link-static { color: rgba(255,255,255,0.40); cursor: default; }
.footer-erres {
  display: flex; flex-direction: column; align-items: flex-end;
  justify-content: flex-start;
  gap: 18px;
  text-decoration: none;
}
.footer-erres-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.22em;
  text-transform: uppercase; color: rgba(255,255,255,0.55);
  transition: color 0.25s ease;
}
.footer-erres-logo {
  height: 38px; width: auto; display: block;
  opacity: 0.85;
  transition: opacity 0.25s ease;
}
.footer-erres:hover .footer-erres-kicker { color: rgba(255,255,255,0.9); }
.footer-erres:hover .footer-erres-logo { opacity: 1; }
.footer-erres-arrow { display: inline-flex; transition: transform 0.25s ease; }
.footer-erres:hover .footer-erres-arrow { transform: translate(2px, -2px); }
@media (max-width: 960px) { .footer-erres { align-items: flex-start; } }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  padding-top: 24px;
  font-size: 12px; color: rgba(255,255,255,0.55);
  letter-spacing: 0.02em;
}
.footer-legal { display: flex; align-items: center; gap: 10px; }
.footer-legal a { color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer-legal a:hover { color: #fff; }

/* ══ MOBILE ════════════════════════════════════════ */
@media (max-width: 720px) {
  :root { --page-pad: 22px; }
  body { overflow-wrap: break-word; word-wrap: break-word; }
  .page-hero-inner { padding-top: 56px; padding-bottom: 20px; }
  .section-block { padding: 48px 0; }
  .section-h2 { font-size: clamp(24px, 6.5vw, 34px); }
  .section-lead { font-size: 14px; line-height: 1.65; margin-bottom: 20px; }
  .section-body { font-size: 13.5px; line-height: 1.7; margin-bottom: 16px; }
  .two-col { gap: 32px; }
  .footer { padding: 64px 0 24px; }
  .footer-logo { height: 110px; }
  .footer-tagline { font-size: 13px; }
  .footer-erres-logo { height: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
}
@media (min-width: 721px) and (max-width: 960px) {
  :root { --page-pad: clamp(2rem, 6vw, 80px); }
}

/* ══ REDUCED MOTION ════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-x, .reveal-x-r, .reveal-scale,
  .line-reveal, .blur-reveal, .section-tag {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}
