/* ==========================================================================
   XUVO Technologies — sitio corporativo estático
   Identidad de marca 2021 (Customer Provided Brand/XUVO-Brand-Presentation-Paletas-V2.pdf)
   ========================================================================== */

:root {
  /* Colores primarios */
  --tech-blue: #229FBC;   /* Tech Blue */
  --x-gray:    #5C5C5C;   /* XGray */

  /* Colores secundarios */
  --x-aqua:    #97D3BA;   /* XAqua */
  --x-orange:  #F4AA6D;   /* XOrange */
  --x-sand:    #D0C7B8;   /* XSand */
  --x-brown:   #3F332B;   /* XBrown */

  /* Colores terciarios */
  --x-electric: #C0E7F1;  /* XElectric */
  --x-sky:      #77CFE0;  /* XSky */
  --x-metal:    #6C7285;  /* XMetal */
  --x-stone:    #262626;  /* XStone */

  /* Derivados para uso web (accesibilidad y superficies) */
  --blue-ink:  #187A92;   /* Tech Blue oscurecido: texto pequeño y botones con texto blanco (AA) */
  --blue-ink-2:#13667A;
  --stone-2:   #303030;
  --line:      #E4E4E4;
  --line-cool: #A6D5E2;   /* borde sobre fondos XElectric */

  /* Texto */
  --ink:   var(--x-stone);
  --ink-2: var(--x-gray);
  --ink-3: var(--x-metal);

  /* Tipografía */
  --font-display: "League Spartan", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter Tight", "Segoe UI", system-ui, -apple-system, sans-serif;

  --container: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 2px;
  --header-h: 80px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.62;
  color: var(--ink-2);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  font-weight: 700;
}
h2 { font-size: clamp(1.9rem, 3.3vw, 2.85rem); max-width: 24ch; }
h3 { font-size: 1.22rem; font-weight: 600; letter-spacing: 0; }
h4 { font-weight: 600; letter-spacing: 0; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--blue-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-ink-2); }
strong { font-weight: 700; color: var(--ink); }
address { font-style: normal; }

:focus-visible {
  outline: 3px solid var(--tech-blue);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--x-stone);
  color: #fff;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

section[id], .subhead[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

/* ---------- Franja de marca (bandas diagonales) ---------- */
.brand-strip { position: relative; height: 5px; }
.brand-strip::before,
.brand-strip::after { content: ""; position: absolute; top: 0; bottom: 0; }
.brand-strip::before {
  left: 0;
  width: 74%;
  background: var(--x-stone);
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.brand-strip::after {
  right: 0;
  width: calc(26% - 6px);
  background: var(--tech-blue);
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%);
}
.brand-strip-bottom { height: 8px; }
.brand-strip-bottom::before { width: 26%; background: var(--tech-blue); }
.brand-strip-bottom::after { width: calc(74% - 6px); background: var(--x-gray); }

/* ---------- Etiquetas con triángulo (el triángulo azul bajo la X) ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.86rem;
  line-height: 1.3;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue-ink);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 14px;
  height: 11px;
  background: var(--tech-blue);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  transform: translateY(-1px);
}
.eyebrow-light { color: var(--x-sky); }
.eyebrow-dark { color: var(--x-stone); }
.eyebrow-dark::before { background: #fff; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn-primary { background: var(--blue-ink); color: #fff; }
.btn-primary:hover { background: var(--blue-ink-2); color: #fff; }
.btn-ghost { border-color: rgba(255, 255, 255, 0.7); color: #fff; background: transparent; }
.btn-ghost:hover { background: #fff; border-color: #fff; color: var(--x-stone); }
.btn-dark { background: var(--x-stone); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-sm { min-height: 42px; padding: 8px 18px; font-size: 0.95rem; }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.2) blur(6px);
}
.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: calc(var(--header-h) - 5px);
}
.logo { flex: none; display: block; }
.logo img { width: auto; height: 52px; }

.nav-desktop { margin-left: auto; }
.nav-desktop ul { display: flex; gap: 2px; }
.nav-desktop a {
  position: relative;
  display: block;
  padding: 8px 12px;
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--ink);
  text-decoration: none;
}
.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  background: var(--tech-blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.nav-desktop a:hover { color: var(--ink); }
.nav-desktop a:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.lang-link:hover { border-color: var(--ink); color: var(--ink); }

/* Menú móvil sin JavaScript */
.nav-mobile { display: none; position: static; }
.nav-mobile summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.menu-icon {
  width: 16px;
  height: 12px;
  background:
    linear-gradient(var(--ink), var(--ink)) 0 0 / 100% 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 50% / 100% 2px no-repeat,
    linear-gradient(var(--tech-blue), var(--tech-blue)) 0 100% / 60% 2px no-repeat;
}
.nav-mobile[open] summary { background: var(--x-electric); }
.nav-mobile nav {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 3px solid var(--tech-blue);
  box-shadow: 0 18px 30px -18px rgba(0, 0, 0, 0.35);
  padding: 8px var(--gutter) 16px;
}
.nav-mobile nav a {
  display: block;
  padding: 12px 4px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.nav-mobile nav li:last-child a { border-bottom: 0; color: var(--blue-ink); }

/* ---------- Hero (XStone con la X de la marca) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse 60% 70% at 20% 10%, #2E2E2E 0%, rgba(38, 38, 38, 0) 70%),
    var(--x-stone);
  color: #fff;
  padding: clamp(64px, 9vw, 120px) 0 clamp(64px, 8vw, 110px);
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -7%;
  top: 50%;
  width: min(860px, 64vw);
  aspect-ratio: 1;
  transform: translateY(-50%);
  background: url("../img/x-motif.svg") no-repeat center / contain;
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(40px, 6vw, 80px);
}
.hero .eyebrow { color: var(--x-sky); }
.hero h1 {
  color: #fff;
  font-size: clamp(2.6rem, 5.6vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  max-width: 13ch;
  margin-bottom: 0.45em;
}
.hero h1 .accent { color: var(--tech-blue); }
.lead {
  font-size: clamp(1.08rem, 1.5vw, 1.24rem);
  color: #D2D2D2;
  max-width: 40ch;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-visual { position: relative; padding: 24px 0 0 36px; }

/* Tarjeta ilustrativa del flujo de un trámite */
.flow-card {
  position: relative;
  background: #fff;
  color: var(--ink-2);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  box-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.7), 0 2px 8px rgba(0, 0, 0, 0.2);
  max-width: 440px;
}
.flow-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--x-stone) 0 72%, var(--tech-blue) 72%);
}
.flow-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.mini-tri {
  width: 13px;
  height: 10px;
  background: var(--tech-blue);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.flow-card-label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
}
.pill-done { background: var(--x-aqua); color: var(--x-stone); margin-left: auto; }
.pill-live { background: var(--x-aqua); color: var(--x-stone); }
.pill-live::before {
  content: "";
  width: 8px;
  height: 7px;
  background: var(--x-stone);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.flow-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 16px;
}
.flow-steps { position: relative; margin-bottom: 20px; }
.flow-steps::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--line);
}
.flow-steps li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 7px 0;
  font-size: 0.97rem;
  color: var(--ink-2);
}
.step-box {
  position: relative;
  flex: none;
  width: 18px;
  height: 18px;
  background: var(--x-gray);
}
.step-box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.flow-steps li.current { color: var(--ink); font-weight: 600; }
.flow-steps li.current .step-box { background: var(--tech-blue); box-shadow: 0 0 0 4px rgba(34, 159, 188, 0.22); }
.flow-card-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.qr { flex: none; width: 64px; height: 64px; }
.foot-title { font-weight: 700; color: var(--ink); margin: 0 0 2px; font-size: 0.96rem; }
.foot-text { margin: 0; font-size: 0.88rem; color: var(--ink-3); line-height: 1.45; }

/* ---------- Cifras (numerales delineados, como el "2021" de la marca) ---------- */
.facts { background: #fff; border-bottom: 1px solid var(--line); }
.facts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fact { padding: 40px 28px 36px; border-left: 1px solid var(--line); }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact-num {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 5.4vw, 4.4rem);
  line-height: 0.9;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 14px;
}
@supports (-webkit-text-stroke: 1px #000) {
  .fact-num { color: transparent; -webkit-text-stroke: 1.6px var(--ink); }
}
.fact-num::after {
  content: "";
  flex: none;
  width: 14px;
  height: 11px;
  margin-top: 4px;
  background: var(--tech-blue);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.fact-text { margin: 0; color: var(--ink-2); font-size: 1rem; max-width: 30ch; line-height: 1.5; }

/* ---------- Secciones ---------- */
.section { padding: clamp(64px, 9vw, 116px) 0; }
.section-alt { background: var(--x-electric); }
/* Texto pequeño sobre XElectric: tonos más oscuros para mantener contraste AA */
.section-alt .eyebrow,
.section-alt .m-num { color: var(--blue-ink-2); }
.section-head { margin-bottom: clamp(32px, 4vw, 52px); }
.section-intro { font-size: 1.12rem; color: var(--ink-2); max-width: 62ch; margin-bottom: 0; }
.subhead { font-size: 1.45rem; margin: clamp(48px, 6vw, 72px) 0 20px; }

/* Nosotros */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: start;
}
.about-grid > div > p { color: var(--ink-2); max-width: 60ch; }
.fact-sheet { margin: 0 0 24px; border-top: 3px solid var(--ink); }
.fact-sheet div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.fact-sheet dt {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 3px;
}
.fact-sheet dd { margin: 0; font-weight: 600; color: var(--ink); }
.callout {
  background: var(--x-electric);
  border-left: 4px solid var(--tech-blue);
  padding: 22px 24px;
}
.callout-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: 8px;
}
.callout p:last-child { margin: 0; color: var(--ink-2); font-size: 0.98rem; }

/* Lo que resolvemos */
.shift-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.shift-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1.25fr);
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line-cool);
  padding: 22px 22px;
}
.shift-list .from { color: var(--ink-3); font-size: 0.96rem; line-height: 1.45; }
.shift-list .to { color: var(--ink); font-weight: 600; line-height: 1.45; }
.shift-list .arrow { position: relative; height: 16px; }
.shift-list .arrow::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 11px;
  height: 11px;
  border-top: 3px solid var(--tech-blue);
  border-right: 3px solid var(--tech-blue);
  transform: rotate(45deg);
}

/* Servicios */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.service {
  position: relative;
  padding: 30px 26px 32px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  transition: background-color .2s ease;
}
.service::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  width: 40px;
  height: 3px;
  background: var(--ink);
  transition: width .25s ease, background-color .25s ease;
}
.service:hover { background: #FCFCFB; }
.service:hover::before { width: calc(100% + 2px); background: var(--tech-blue); }
.service-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--x-gray);
  margin-bottom: 16px;
}
@supports (-webkit-text-stroke: 1px #000) {
  .service-num { color: transparent; -webkit-text-stroke: 1.2px var(--x-gray); }
  .service:hover .service-num { -webkit-text-stroke-color: var(--tech-blue); }
}
.service h3 { margin-bottom: 10px; }
.service p { margin: 0; color: var(--ink-2); font-size: 0.98rem; line-height: 1.55; }

/* Plataforma (sección XStone con banda en chevrón) */
.section-dark {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--x-stone);
  color: #fff;
}
.section-dark::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  right: 0;
  width: clamp(160px, 18vw, 260px);
  background: var(--stone-2);
  clip-path: polygon(0 0, 46% 0, 100% 50%, 46% 100%, 0 100%, 54% 50%);
}
.section-dark h2 { color: #fff; }
.section-dark .section-intro { color: #D2D2D2; }
.platform-head {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: end;
  margin-bottom: clamp(40px, 5vw, 60px);
}
.version-line { border-left: 2px solid rgba(255, 255, 255, 0.16); }
.version-line li {
  position: relative;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  column-gap: 16px;
  padding: 10px 0 10px 22px;
}
.version-line li::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 15px;
  width: 14px;
  height: 11px;
  background: var(--x-gray);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.version-line li:last-child::before { background: var(--tech-blue); }
.v-year { font-family: var(--font-display); font-weight: 600; color: var(--x-sky); font-size: 1rem; padding-top: 1px; }
.v-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: #fff; }
.v-note { grid-column: 2; font-size: 0.9rem; color: #ABABAB; }

.process {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: clamp(40px, 5vw, 56px);
}
.process li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  color: #fff;
}
.process li::after {
  content: "";
  position: absolute;
  left: 46px;
  right: 8px;
  top: 18px;
  height: 2px;
  background: rgba(255, 255, 255, 0.16);
}
.process li:last-child::after { display: none; }
.p-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--x-gray);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}
.process li:nth-child(5) .p-num { background: var(--tech-blue); color: var(--x-stone); }
.process li:nth-child(6) .p-num { background: var(--x-aqua); color: var(--x-stone); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.feature-grid li {
  position: relative;
  padding: 16px 0 16px 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #E6E6E6;
  font-size: 0.99rem;
  line-height: 1.45;
}
.feature-grid li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 22px;
  width: 8px;
  height: 8px;
  border-top: 2.5px solid var(--tech-blue);
  border-right: 2.5px solid var(--tech-blue);
  transform: rotate(45deg);
}

/* Experiencia */
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.case {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--ink);
  padding: 28px 26px;
}
.case-featured {
  border-top-color: var(--tech-blue);
  background: linear-gradient(180deg, #EEF8FB 0, #fff 140px);
}
.case-client {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-ink);
  margin-bottom: 6px;
  line-height: 1.4;
}
.case-years {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.case h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 12px; }
.case p:last-child { margin: 0; color: var(--ink-2); font-size: 0.98rem; }

.track-list { border-top: 3px solid var(--ink); }
.track-list li {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) 110px minmax(0, 2fr);
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.track-list-plain li { grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr); }
.track-client { font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; color: var(--ink); }
.track-years { font-family: var(--font-display); font-weight: 600; color: var(--blue-ink); }
.track-desc { color: var(--ink-2); font-size: 0.98rem; }

.entities {
  margin-top: clamp(40px, 5vw, 60px);
  padding: 28px;
  background: var(--x-electric);
}
.entities-title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chips li {
  padding: 7px 12px;
  background: #fff;
  border: 1px solid var(--line-cool);
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--ink);
}
.source-note { margin: 0; font-size: 0.88rem; color: var(--ink-3); }
.entities .entities-title,
.entities .source-note { color: var(--ink-2); }

/* Tecnología */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.tech-col {
  background: #fff;
  border: 1px solid var(--line-cool);
  padding: 24px 22px;
}
.tech-col h3 {
  font-size: 1.12rem;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  padding: 5px 10px;
  background: var(--x-electric);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
}

.method {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}
.method li { border-top: 4px solid var(--x-sand); padding-top: 18px; }
.method li:nth-child(1) { border-top-color: var(--x-stone); }
.method li:nth-child(2) { border-top-color: var(--x-gray); }
.method li:nth-child(3) { border-top-color: var(--x-metal); }
.method li:nth-child(4) { border-top-color: var(--tech-blue); }
.method li:nth-child(5) { border-top-color: var(--x-aqua); }
.m-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--blue-ink);
  margin-bottom: 6px;
}
.method h4 { font-size: 1.2rem; margin-bottom: 8px; }
.method p { margin: 0; font-size: 0.96rem; color: var(--ink-2); line-height: 1.55; }

/* Contacto (Tech Blue) */
.section-cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--tech-blue);
  color: var(--x-stone);
}
.section-cta::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -90px;
  bottom: -150px;
  width: 520px;
  aspect-ratio: 1;
  background: url("../img/x-motif.svg") no-repeat center / contain;
  opacity: 0.14;
  pointer-events: none;
}
.section-cta h2 { color: var(--x-stone); max-width: 26ch; }
.section-cta .section-intro { color: var(--x-stone); margin-bottom: 28px; }
.cta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}
.contact-list {
  background: var(--x-stone);
  padding: 10px 28px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.5);
}
.contact-list li { padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.contact-list li:last-child { border-bottom: 0; }
.c-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--x-sky);
  margin-bottom: 4px;
}
.contact-list a, .contact-list address {
  color: #fff;
  font-size: 1.06rem;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact-list a:hover { text-decoration: underline; color: #fff; }

/* ---------- Pie de página (XStone) ---------- */
.site-footer { background: var(--x-stone); color: #BDBDBD; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 0.8fr);
  gap: 40px;
  padding-top: 60px;
  padding-bottom: 44px;
}
.footer-brand img { width: auto; height: 54px; margin-bottom: 18px; }
.footer-brand p { color: #BDBDBD; max-width: 34ch; font-size: 0.98rem; margin: 0; }
.footer-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9A9A9A;
  margin-bottom: 12px;
}
.footer-nav li { margin-bottom: 6px; }
.footer-nav a, .footer-contact a { color: #fff; text-decoration: none; }
.footer-nav a:hover, .footer-contact a:hover { color: var(--x-sky); text-decoration: underline; }
.footer-contact p { color: #BDBDBD; line-height: 1.9; margin: 0; overflow-wrap: anywhere; }
.footer-bottom {
  position: relative;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-top: 18px;
  padding-bottom: 22px;
  font-size: 0.9rem;
  color: #9A9A9A;
}
.footer-bottom::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: #D2D2D2; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Página de error (404.html) ---------- */
.error-page { display: flex; flex-direction: column; min-height: 100vh; }
.error-page main { flex: 1 0 auto; display: flex; }
.error-page .header-actions { margin-left: auto; }
.error-hero { flex: 1; display: flex; align-items: center; }
.error-hero .container { position: relative; }
.error-code {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(6rem, 17vw, 11.5rem);
  line-height: 0.82;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 28px;
}
@supports (-webkit-text-stroke: 1px #000) {
  .error-code { color: transparent; -webkit-text-stroke: 2px #fff; }
}
.error-code::after {
  content: "";
  flex: none;
  width: clamp(22px, 3vw, 34px);
  height: clamp(17px, 2.3vw, 26px);
  margin-top: 0.08em;
  background: var(--tech-blue);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.hero.error-hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  line-height: 1.05;
  max-width: 20ch;
  margin-bottom: 0.4em;
}
.error-hero .lead { margin-bottom: 1.8rem; }
.error-alt {
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  max-width: 560px;
}
.error-alt-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  margin: 0 0 6px;
}
.error-alt p { color: #C9C9C9; margin: 0 0 10px; }
.error-alt a { color: var(--x-sky); font-weight: 600; }
.error-alt a:hover { color: #fff; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tech-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .method { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 32px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  :root { --header-h: 70px; }
  /* Sin JavaScript el menú no se cierra solo: el encabezado deja de ser fijo
     para que el menú abierto no tape la sección a la que se navega. */
  .site-header { position: relative; }
  section[id], .subhead[id] { scroll-margin-top: 8px; }
  .nav-desktop, .header-cta { display: none; }
  .nav-mobile { display: block; }
  .header-actions { margin-left: auto; }
  .logo img { height: 40px; }

  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { max-width: 16ch; }
  .hero::before { width: 110vw; right: -30vw; top: auto; bottom: 0; transform: none; }
  .hero-visual { padding: 32px 0 0; max-width: 480px; }

  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .platform-head { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .section-dark::before { display: none; }
  .case-grid { grid-template-columns: minmax(0, 1fr); }
  .cta-grid { grid-template-columns: minmax(0, 1fr); }
  .shift-list { grid-template-columns: minmax(0, 1fr); }
  .process { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 28px; }
  .process li:nth-child(3)::after { display: none; }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .facts-grid { grid-template-columns: minmax(0, 1fr); }
  .fact { border-left: 0; border-top: 1px solid var(--line); padding: 26px 0; }
  .fact:first-child { border-top: 0; }
  .service-grid { grid-template-columns: minmax(0, 1fr); }
  .tech-grid { grid-template-columns: minmax(0, 1fr); }
  .method { grid-template-columns: minmax(0, 1fr); }
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .track-list li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .shift-list li { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .section-cta::after { width: 360px; right: -140px; bottom: -120px; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .header-inner { gap: 12px; }
  .logo img { height: 36px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .flow-card { padding: 24px 18px 18px; }
  .pill-done { margin-left: 0; }
  .process { grid-template-columns: minmax(0, 1fr); row-gap: 14px; }
  .process li { flex-direction: row; align-items: center; }
  .process li::after { display: none; }
  .fact-sheet div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .version-line li { grid-template-columns: minmax(0, 1fr); }
  .v-note { grid-column: 1; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .entities { padding: 22px 18px; }
  .contact-list { padding: 6px 20px; }
}
