/* MTO · Maquinados Técnicos Operativos — hoja de estilos del sitio público */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --ink: #151617;
  --ink-2: #1f2124;
  --paper: #ffffff;
  --mist: #e7e8ea;
  --line: #d9dbde;
  --text: #17191c;
  --muted: #4b5058;
  --on-dark: #f3f4f6;
  --on-dark-muted: #b6bcc6;
  --blue: #0b3596;
  --blue-deep: #082670;
  --blue-hi: #8fb0ff;
  --yellow: #f8ec14;
  --red: #e8323a;

  --header-h: 6rem;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --section: clamp(4.5rem, 8vw, 7.5rem);
  --radius: 18px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #3a3d42 #ececee;
}

body {
  margin: 0;
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }

::selection { background: var(--blue); color: #fff; }
.dark ::selection, .hero ::selection { background: var(--yellow); color: var(--ink); }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.dark :focus-visible, .hero :focus-visible, .cta :focus-visible,
.site-header:not(.is-stuck) :focus-visible { outline-color: var(--yellow); }

h1, h2, h3 {
  margin: 0;
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 strong, h2 strong, h3 strong { font-weight: 800; }
h1 { font-size: clamp(2.6rem, 4.6vw + 1rem, 5.25rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 2.6vw + 1rem, 3.4rem); }
h3 { font-size: clamp(1.3rem, 0.8vw + 1.05rem, 1.65rem); font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }

.wide {
  font-stretch: 125%;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.78rem;
  line-height: 1.3;
}

.wrap { width: 100%; max-width: 92rem; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); position: relative; }
.lead { font-weight: 700; font-size: 1.125rem; line-height: 1.5; }
.prose { max-width: 62ch; }
.prose > * + * { margin-top: 1.25rem; }
.muted { color: var(--muted); }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--yellow); color: var(--ink); padding: 0.75rem 1.25rem; font-weight: 700;
  border-radius: 0 0 10px 10px; text-decoration: none;
}
.skip:focus { top: 0; }

/* ---------- Botones ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 0.85rem 0.85rem 0.85rem 1.5rem;
  border: 0; border-radius: 999px;
  background: var(--blue); color: #fff;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn .go {
  display: grid; place-items: center; flex: none;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: #fff; color: var(--blue);
  transition: transform 0.35s var(--ease);
}
.btn:hover { background: var(--blue-deep); }
.btn:hover .go { transform: rotate(45deg); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light .go { background: var(--blue); color: #fff; }
.btn--light:hover { background: var(--yellow); color: var(--ink); }
.btn--line { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn--line .go { background: currentColor; }
.btn--line .go svg { color: var(--ink); }
.btn--line:hover { background: rgba(255, 255, 255, 0.1); }
.btn--plain { padding: 0.85rem 1.5rem; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px;
  text-underline-offset: 0.3em; text-decoration-color: var(--blue);
  transition: text-decoration-color 0.2s, gap 0.3s var(--ease);
}
.link:hover { gap: 0.8rem; }
.dark .link { text-decoration-color: var(--yellow); }

/* ---------- Encabezado ---------- */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: stretch;
  height: var(--header-h);
  color: #fff;
  transition: height 0.35s var(--ease), background-color 0.35s var(--ease), box-shadow 0.35s var(--ease), color 0.2s;
}
.site-header.is-stuck {
  --header-h: 4.5rem;
  background: #fff; color: var(--text);
  box-shadow: 0 1px 0 rgba(21, 22, 23, 0.08), 0 14px 30px -18px rgba(21, 22, 23, 0.35);
}

.brand {
  position: relative; isolation: isolate; flex: none;
  display: flex; align-items: center;
  padding: 0 4.25rem 0 var(--gutter);
}
.brand::before {
  content: ""; position: absolute; inset: 0 0 0 -6rem; z-index: -1;
  background: #fff;
  transform-origin: bottom right; transform: skewX(-28deg);
  border-bottom-right-radius: 18px;
}
.brand img { height: 3.25rem; width: auto; transition: height 0.35s var(--ease); }
.is-stuck .brand img { height: 2.5rem; }

.header-panel { display: flex; align-items: stretch; margin-left: auto; }
.nav { display: flex; align-items: center; }
.nav ul { display: flex; gap: clamp(1.25rem, 2.4vw, 2.75rem); }
.nav a {
  position: relative; display: block; padding: 0.6rem 0;
  font-weight: 700; font-size: 0.97rem; text-decoration: none; white-space: nowrap;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.2rem; height: 3px;
  background: var(--yellow); transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.is-stuck .nav a::after { background: var(--blue); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

.header-quote {
  display: grid; align-content: center; gap: 0.1rem;
  margin-left: clamp(1.5rem, 3vw, 3.25rem);
  padding: 0 var(--gutter) 0 clamp(1.25rem, 2vw, 2rem);
  border-left: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 0.85rem; line-height: 1.35;
}
.is-stuck .header-quote { border-left-color: var(--line); }
.header-quote a { text-decoration: none; }
.header-quote a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
.header-quote .hq-cta { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 0.82rem; }
.hq-cta .dot {
  display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%;
  background: var(--blue); color: #fff;
}
.header-quote .hq-phone { font-weight: 800; font-size: 1rem; font-variant-numeric: tabular-nums; }
.header-quote .hq-mail { font-size: 0.78rem; opacity: 0.9; }
.is-stuck .hq-mail { display: none; }

.header-mobile { display: none; align-items: center; gap: 0.75rem; margin-left: auto; padding-right: var(--gutter); }
.btn--sm { padding: 0.6rem 1.1rem; font-size: 0.92rem; }
.nav-toggle {
  display: grid; place-content: center; gap: 6px;
  width: 2.9rem; height: 2.9rem; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: inherit; cursor: pointer;
  box-shadow: inset 0 0 0 1.5px currentColor;
}
.nav-toggle span { display: block; width: 1.15rem; height: 2px; background: currentColor; transition: transform 0.3s var(--ease); }
.menu-open .nav-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-open .nav-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 1099px) {
  :root { --header-h: 4.75rem; }
  .site-header.is-stuck { --header-h: 4.25rem; }
  .brand { padding-right: 3.25rem; }
  .brand img, .is-stuck .brand img { height: 2.4rem; }
  .header-mobile { display: flex; }
  .header-panel {
    position: fixed; inset: 0; z-index: -2;
    flex-direction: column; justify-content: space-between; gap: 2rem;
    margin: 0; padding: calc(var(--header-h) + 2.5rem) var(--gutter) 2.5rem;
    background: radial-gradient(120% 70% at 0% 0%, rgba(11, 53, 150, 0.6), transparent 60%), var(--ink);
    color: #fff; overflow-y: auto;
    visibility: hidden; opacity: 0;
  }
  .menu-open .header-panel { visibility: visible; opacity: 1; transition: opacity 0.3s var(--ease); }
  .menu-open .site-header { color: #fff; background: transparent; box-shadow: none; }
  .nav { align-items: flex-start; }
  .nav ul { flex-direction: column; gap: 0.25rem; }
  .nav a { font-size: clamp(1.9rem, 7vw, 2.6rem); font-weight: 300; padding: 0.35rem 0; }
  .nav a[aria-current="page"] { font-weight: 800; }
  .nav a::after, .is-stuck .nav a::after { background: var(--yellow); }
  .header-quote { margin: 0; padding: 1.5rem 0 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.24); font-size: 1rem; gap: 0.4rem; }
  .header-quote .hq-phone { font-size: 1.35rem; }
  .is-stuck .hq-mail { display: block; }
  .header-quote .hq-mail { font-size: 0.95rem; }
}
@media (max-width: 479px) {
  .brand { padding-right: 2.25rem; }
  .header-mobile { gap: 0.6rem; }
  .header-mobile .btn--sm { padding: 0.55rem 0.95rem; font-size: 0.88rem; }
  .nav-toggle { width: 2.6rem; height: 2.6rem; }
}
@media (max-width: 359px) {
  .header-mobile .btn--sm { display: none; }
}

/* ---------- Muescas ---------- */

.notch {
  position: absolute; z-index: 2; pointer-events: none;
  right: -4rem; bottom: -1px;
  width: calc(clamp(9rem, 24vw, 24rem) + 4rem);
  height: clamp(2.75rem, 5vw, 4.75rem);
  background: var(--notch, #fff);
  transform-origin: bottom left; transform: skewX(-35deg);
  border-top-left-radius: 16px;
}
.notch--tl {
  right: auto; bottom: auto; left: -4rem; top: -1px;
  transform-origin: top right;
  border-radius: 0 0 16px 0;
}

/* ---------- Hero ---------- */

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  min-height: min(100svh, 58rem);
  padding: calc(var(--header-h) + 3rem) 0 clamp(6rem, 11vw, 9rem);
  background: var(--ink); color: #fff;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }

/* Pase de imágenes de la portada: cada imagen entra con un barrido diagonal,
   el mismo corte de las muescas, y se acerca despacio mientras está en pantalla. */
.hero-slides { position: absolute; inset: 0; z-index: -2; overflow: hidden; background: var(--ink); }
.hero-slides img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.09); transition: transform 9s linear;
}
.hero-slides img.is-on { opacity: 1; transform: scale(1); }
.hero-slides img.is-top { z-index: 1; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to bottom, rgba(13, 14, 15, 0.72), transparent 26%),
    linear-gradient(100deg, rgba(13, 14, 15, 0.86) 8%, rgba(13, 14, 15, 0.48) 58%, rgba(8, 30, 88, 0.42));
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3rem; align-items: center; }
.hero h1 { max-width: 13ch; }
.hero h1 .u { position: relative; white-space: nowrap; }
.hero h1 .u::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -0.08em; height: 0.085em;
  background: var(--yellow); transform-origin: left;
}
.hero-lede { max-width: 34rem; margin-top: 1.5rem; font-size: clamp(1.05rem, 0.5vw + 1rem, 1.25rem); line-height: 1.55; color: var(--on-dark); }

.pill {
  display: inline-flex; flex-wrap: wrap; margin-top: 2.5rem;
  background: #fff; color: var(--ink); border-radius: 2.25rem;
  padding: 0.4rem; box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.7);
}
.pill a {
  display: inline-flex; align-items: center; gap: 0.65rem;
  padding: 0.95rem 1.5rem; border-radius: 999px;
  font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.pill a + a { position: relative; }
.pill a + a::before { content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: var(--line); }
.pill svg { color: var(--blue); flex: none; transition: color 0.25s; }
.pill a:hover { background: var(--blue); color: #fff; }
.pill a:hover svg { color: var(--yellow); }
.pill a:hover::before, .pill a:hover + a::before { opacity: 0; }

.hero-side { display: grid; gap: 2rem; padding-right: clamp(0rem, 4vw, 5rem); }
.hero-since { display: flex; align-items: center; gap: 1.25rem; }

.hero-ctrl { display: none; align-items: center; gap: 0.9rem; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55)); }
.js .hero-ctrl { display: flex; }
.hero-pause {
  display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.6);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.hero-pause:hover { background: #fff; color: var(--ink); box-shadow: none; }
.hero-pause .i-play, .is-paused .hero-pause .i-pause { display: none; }
.is-paused .hero-pause .i-play { display: block; }
.hero-dots { display: flex; gap: 0.4rem; }
.hero-dots button {
  position: relative; width: 2.4rem; height: 1.75rem; padding: 0;
  border: 0; background: none; cursor: pointer;
}
.hero-dots button::before, .hero-dots button::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px;
  background: rgba(255, 255, 255, 0.55); transition: background-color 0.2s;
}
.hero-dots button:hover::before { background: #fff; }
.hero-dots button::after { background: var(--yellow); transform: scaleX(0); transform-origin: left; }
.hero-dots [aria-current="true"]::after { transform: scaleX(1); }
.hero-since .stars { width: 4.5rem; height: auto; flex: none; }
.hero-since .wide { font-size: 1rem; line-height: 1.45; }
.hero-since .wide span { display: block; font-weight: 400; color: var(--on-dark); font-size: 0.8rem; }

.hero-words {
  position: absolute; left: 0; bottom: clamp(1.5rem, 3vw, 2.5rem);
  display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem;
  padding-inline: var(--gutter); max-width: 72%;
}
.hero-words li { display: flex; align-items: center; gap: 1.25rem; }
.hero-words li + li::before { content: ""; width: 2px; height: 1.1em; background: var(--yellow); }

@media (max-width: 899px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-since { display: none; }
  .hero-side { padding-right: 0; margin-top: -0.75rem; }
  .hero::before { background: linear-gradient(to bottom, rgba(13, 14, 15, 0.72), rgba(13, 14, 15, 0.58) 30%, rgba(13, 14, 15, 0.66)); }
  .hero-words { max-width: none; position: static; margin-top: 2.5rem; flex-direction: column; gap: 0.55rem; }
  .hero-words li { gap: 0.8rem; }
  .hero-words li:first-child::before { content: ""; width: 2px; height: 1.1em; background: var(--yellow); }
  .hero { padding-bottom: clamp(5rem, 16vw, 7rem); min-height: 0; }
  .pill { display: grid; border-radius: 1.5rem; width: 100%; max-width: 24rem; }
  .pill a { border-radius: 1.1rem; }
  .pill a + a::before { left: 1.5rem; right: 1.5rem; top: 0; bottom: auto; width: auto; height: 1px; }
}

/* Entrada del hero: una sola coreografía al cargar */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero-lede, .pill, .hero-since, .page-hero h1, .page-hero p { animation: rise 0.9s var(--ease) both; }
  .hero-lede, .page-hero p { animation-delay: 0.12s; }
  .pill { animation-delay: 0.22s; }
  .hero-since { animation-delay: 0.4s; }
  .hero h1 .u::after { animation: draw 0.9s 0.55s var(--ease) both; }
  .hero-bg { animation: settle 1.8s var(--ease) both; }
  .hero-ctrl { animation: rise 0.9s 0.5s var(--ease) both; }
  .hero-slides img.is-top { animation: wipe 1.5s cubic-bezier(0.65, 0, 0.35, 1) both; }
  .hero-dots [aria-current="true"]::after { animation: fill 6.5s linear both; }
  .is-paused .hero-dots [aria-current="true"]::after,
  .is-idle .hero-dots [aria-current="true"]::after { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
  /* Sin movimiento no hay avance automático: las barras cambian la imagen a mano. */
  .hero-pause { display: none; }
  .hero-slides img { transform: none; transition: none; }
}
@keyframes wipe {
  from { clip-path: polygon(0 0, 0 0, -45% 100%, 0 100%); }
  to { clip-path: polygon(0 0, 145% 0, 100% 100%, 0 100%); }
}
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(1.5rem); } }
@keyframes draw { from { transform: scaleX(0); } }
@keyframes settle { from { transform: scale(1.06); } }

/* ---------- Hero de páginas interiores ---------- */

.page-hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: flex-end;
  min-height: clamp(23rem, 42vw, 31rem);
  padding: calc(var(--header-h) + 3rem) 0 clamp(4.5rem, 8vw, 6.5rem);
  background: var(--ink); color: #fff;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to bottom, rgba(13, 14, 15, 0.75), transparent 32%),
    linear-gradient(95deg, rgba(13, 14, 15, 0.92) 10%, rgba(13, 14, 15, 0.5) 62%, rgba(8, 38, 112, 0.4));
}
.page-hero h1 { font-size: clamp(2.5rem, 3.6vw + 1rem, 4.5rem); max-width: 18ch; }
.page-hero p { margin-top: 1.1rem; max-width: 40rem; font-size: clamp(1.05rem, 0.4vw + 1rem, 1.2rem); line-height: 1.55; color: var(--on-dark); }

/* ---------- Cabeceras de sección ---------- */

.head { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.head--end { align-items: end; }
.head .prose > .btn { margin-top: 2rem; }
@media (max-width: 899px) { .head { grid-template-columns: 1fr; } }

.facts { border-top: 2px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); padding-top: 0.2rem; }
.facts dd { font-weight: 700; }
@media (max-width: 479px) { .facts div { grid-template-columns: 1fr; gap: 0.15rem; } }

/* ---------- Tarjetas de foto ---------- */

.cards { display: grid; gap: 1.1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(2.5rem, 5vw, 4.5rem); }
.cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1023px) { .cards, .cards--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) {
  .cards { grid-template-columns: 1fr; }
  .cards--4 {
    grid-auto-flow: column; grid-auto-columns: 78%; grid-template-columns: none;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
  }
  .cards--4 > * { scroll-snap-align: start; }
}

.pcard {
  position: relative; display: block; overflow: hidden; isolation: isolate;
  aspect-ratio: 16 / 9.2; border-radius: var(--radius);
  background: var(--ink-2); color: #fff; text-decoration: none;
}
.cards--4 .pcard { aspect-ratio: 4 / 3.3; }
.pcard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.pcard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(13, 14, 15, 0.45), transparent 45%); }
.pcard:hover img { transform: scale(1.05); }
.pcard-tab {
  position: absolute; left: 0; bottom: 0; z-index: 2; isolation: isolate;
  padding: 0.8rem 3.1rem 0.8rem 1.5rem;
  font-weight: 700; font-size: 1rem; line-height: 1.25;
}
.pcard-tab::before {
  content: ""; position: absolute; inset: 0 0 0 -3rem; z-index: -1;
  background: var(--blue); transform-origin: bottom right; transform: skewX(30deg);
  transition: background-color 0.3s var(--ease);
}
.pcard:hover .pcard-tab::before { background: var(--blue-deep); }
.pcard-go {
  position: absolute; right: 1rem; top: 1rem; z-index: 2;
  display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: #fff; color: var(--ink);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.4s var(--ease);
}
.pcard:hover .pcard-go { background: var(--yellow); transform: rotate(45deg); }
.equip p { margin-top: 1rem; color: var(--muted); }

.js .cards .pcard { clip-path: inset(0 0 100% 0 round var(--radius)); }
.js .cards.in .pcard { clip-path: inset(0 round var(--radius)); transition: clip-path 1s var(--ease); }
.js .cards.in .pcard:nth-child(2) { transition-delay: 0.08s; }
.js .cards.in .pcard:nth-child(3) { transition-delay: 0.16s; }
.js .cards.in .pcard:nth-child(4) { transition-delay: 0.24s; }
.js .cards.in .pcard:nth-child(5) { transition-delay: 0.32s; }
.js .cards.in .pcard:nth-child(6) { transition-delay: 0.4s; }
@media (prefers-reduced-motion: reduce) {
  .js .cards .pcard { clip-path: none; }
  .pcard img, .pcard-go, .btn .go { transition: none; }
}

/* ---------- Secciones oscuras ---------- */

.dark {
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(90% 80% at 0% 0%, rgba(11, 53, 150, 0.62), transparent 62%), var(--ink);
  color: var(--on-dark);
}
.dark .muted { color: var(--on-dark-muted); }
.dark h2, .dark h3 { color: #fff; }

.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 6.5rem); align-items: center; }
.split-photo { position: relative; margin-left: calc(var(--gutter) * -1); align-self: stretch; min-height: 26rem; }
.split-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0 clamp(3rem, 8vw, 7rem) 0 0; }
.split-photo::after {
  content: ""; position: absolute; left: 0; bottom: -1px; width: 62%; height: 34%;
  border: solid var(--ink); border-width: clamp(1.25rem, 2.6vw, 2.5rem) clamp(1.25rem, 2.6vw, 2.5rem) 0 0;
  border-top-right-radius: clamp(2.5rem, 6vw, 5rem);
}
.split--flip .split-photo { order: 2; margin-left: 0; margin-right: calc(var(--gutter) * -1); }
.split--flip .split-photo img { border-radius: clamp(3rem, 8vw, 7rem) 0 0 0; }
.split--flip .split-photo::after { display: none; }
@media (max-width: 899px) {
  .split { grid-template-columns: 1fr; }
  .split-photo, .split--flip .split-photo { order: 0; margin-inline: calc(var(--gutter) * -1) 0; min-height: 0; aspect-ratio: 4 / 3; }
  .split--flip .split-photo { margin-inline: 0 calc(var(--gutter) * -1); }
}

.routes { margin-top: 2.5rem; border-top: 1px solid rgba(255, 255, 255, 0.22); }
.route { padding: 1.9rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.22); display: grid; grid-template-columns: 1fr auto; gap: 0.6rem 2rem; align-items: center; }
.route p { grid-column: 1; color: var(--on-dark-muted); max-width: 46ch; }
.route .btn { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 639px) { .route { grid-template-columns: 1fr; } .route .btn { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 0.75rem; } }

/* ---------- Banner gris ---------- */

.banner {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  background: var(--mist); border-radius: calc(var(--radius) + 2px);
  min-height: 27rem;
}
.banner-photo { position: relative; }
.banner-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner-body { padding: clamp(2rem, 5vw, 4.5rem) clamp(1.5rem, 5vw, 5rem) clamp(5.5rem, 9vw, 8rem); align-self: center; }
.banner-body p { margin-top: 1.1rem; max-width: 44ch; }
.banner-body .btn { margin-top: 2rem; }
.ghost {
  position: absolute; right: clamp(1rem, 3vw, 3rem); bottom: -0.2em; z-index: -1;
  font-stretch: 125%; font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em;
  font-size: clamp(1.9rem, 5vw, 4.75rem); line-height: 1; white-space: nowrap;
  /* Rótulo de contorno en el azul de la marca, como el MTO del cierre */
  color: #b9bdc4;
}
@supports (-webkit-text-stroke: 1px black) {
  .ghost { color: transparent; -webkit-text-stroke: 1.5px rgba(11, 53, 150, 0.6); }
}
@media (max-width: 899px) {
  .banner { grid-template-columns: 1fr; }
  .banner-photo { aspect-ratio: 16 / 10; }
}

/* ---------- Cierre con MTO gigante ---------- */

.closing { padding-top: clamp(6rem, 12vw, 10rem); padding-bottom: 0; }
.closing-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.closing-title { font-size: clamp(2.2rem, 3.4vw + 1rem, 4.2rem); font-weight: 200; line-height: 1.05; }
.closing-title b { display: block; font-stretch: 125%; font-weight: 900; text-transform: uppercase; letter-spacing: 0.02em; }
.closing-title i { display: block; font-style: normal; text-align: right; }
.closing-head .prose p + .link { margin-top: 1.75rem; }
@media (max-width: 899px) { .closing-head { grid-template-columns: 1fr; } .closing-title i { text-align: left; } }

/* MTO gigante: relleno con las franjas del logotipo, contorno fino y trazos
   de luz que recorren el borde. Las medidas están en unidades del viewBox. */
.giant { display: block; width: 100%; height: auto; margin: clamp(3rem, 7vw, 6rem) 0 0; overflow: hidden; user-select: none; }
.giant text { font-family: "Archivo", system-ui, sans-serif; font-size: 300px; font-weight: 900; font-stretch: 125%; }
.giant-fill { fill: #fff; opacity: 0.09; transition: opacity 1.4s var(--ease) 0.6s; }
.giant-line { fill: none; stroke: rgba(255, 255, 255, 0.28); stroke-width: 1.4; }
.giant-run {
  fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round;
  stroke-dasharray: 90 330 40 520; /* suma 980: el ciclo de la animación */
  opacity: 0; transition: opacity 0.8s var(--ease) 1.6s;
}
.giant.in .giant-run { opacity: 1; animation: giant-run 10s linear infinite; }
.giant:not(.is-live) .giant-run { animation-play-state: paused; }
@keyframes giant-run { to { stroke-dashoffset: -980; } }

/* Entrada: el contorno se dibuja y después aparece el relleno */
.js .giant .giant-fill { opacity: 0; }
.js .giant.in .giant-fill { opacity: 0.09; }
.js .giant .giant-line { stroke-dasharray: 1600; stroke-dashoffset: 1600; }
.js .giant.in .giant-line { stroke-dashoffset: 0; transition: stroke-dashoffset 2.6s var(--ease); }

@media (max-width: 599px) {
  .giant-line { stroke-width: 3; }
  .giant-run { stroke-width: 5; }
}
@media (prefers-reduced-motion: reduce) {
  .js .giant .giant-fill, .js .giant.in .giant-fill { opacity: 0.09; transition: none; }
  .js .giant .giant-line { stroke-dasharray: none; transition: none; }
  .giant-run, .giant.in .giant-run { opacity: 1; animation: none; transition: none; }
}

/* ---------- Filas de contenido ---------- */

.rows { border-top: 2px solid var(--ink); }
.dark .rows { border-top-color: rgba(255, 255, 255, 0.5); }
.row { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 0.5rem clamp(1.5rem, 4vw, 4rem); padding: 1.6rem 0; border-bottom: 1px solid var(--line); }
.dark .row { border-bottom-color: rgba(255, 255, 255, 0.2); }
.row p { color: var(--muted); max-width: 56ch; }
.dark .row p { color: var(--on-dark-muted); }
@media (max-width: 699px) { .row { grid-template-columns: 1fr; } }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 5rem); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(1.5rem, 4vw, 4rem); }
@media (max-width: 899px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.value { padding: 1.6rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.2); }
.value p { margin-top: 0.4rem; color: var(--on-dark-muted); }

.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.feature + .feature { margin-top: clamp(4rem, 8vw, 7rem); }
.feature-photo { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--mist); }
.feature-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature:nth-child(even) .feature-photo { order: 2; }
.feature h2 { font-size: clamp(1.8rem, 2vw + 1rem, 2.8rem); }
.feature .prose > p:first-of-type { margin-top: 1.1rem; }
.ticks { margin-top: 1.5rem; border-top: 1px solid var(--line); }
.ticks li { display: flex; gap: 0.8rem; align-items: baseline; padding: 0.7rem 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.ticks li::before { content: ""; flex: none; width: 0.55rem; height: 0.55rem; background: var(--blue); transform: translateY(-0.05rem) rotate(45deg); }
.dark .ticks, .dark .ticks li { border-color: rgba(255, 255, 255, 0.2); }
.dark .ticks li::before { background: var(--yellow); }
.feature .link, .feature .btn { margin-top: 1.75rem; }
@media (max-width: 899px) {
  .feature { grid-template-columns: 1fr; }
  .feature:nth-child(even) .feature-photo { order: 0; }
}

.year { font-size: clamp(5rem, 14vw, 12rem); font-weight: 200; line-height: 0.85; letter-spacing: -0.04em; color: var(--blue); font-variant-numeric: lining-nums; }

/* ---------- Franja de cotización ---------- */

.cta { position: relative; overflow: hidden; isolation: isolate; background: var(--blue); color: #fff; padding-block: clamp(4rem, 7vw, 6.5rem); }
.cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.055) 0 14px, transparent 14px 19px);
  -webkit-mask-image: linear-gradient(105deg, transparent 45%, #000);
  mask-image: linear-gradient(105deg, transparent 45%, #000);
}
.cta-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem clamp(2rem, 5vw, 5rem); align-items: center; }
.cta p { margin-top: 1rem; max-width: 46ch; color: #dbe4fb; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }
@media (max-width: 899px) { .cta-grid { grid-template-columns: 1fr; } }

/* ---------- Formulario ---------- */

.contact { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
@media (max-width: 959px) { .contact { grid-template-columns: 1fr; } }

.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 1.25rem; margin-top: 2.25rem; }
.form .full { grid-column: 1 / -1; }
@media (max-width: 599px) { .form { grid-template-columns: 1fr; } }
.field label { display: block; margin-bottom: 0.45rem; font-weight: 700; font-size: 0.95rem; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.85rem 1rem;
  border: 1.5px solid #b9bdc4; border-radius: 10px; background: #fff;
  font: inherit; color: var(--text); caret-color: var(--blue);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 11rem; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #5d636b; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11, 53, 150, 0.2); }
.field [aria-invalid="true"] { border-color: #b3261e; }
.field .err { display: none; margin-top: 0.35rem; font-size: 0.9rem; color: #b3261e; font-weight: 600; }
.field [aria-invalid="true"] ~ .err { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { display: none; padding: 1rem 1.25rem; border-radius: 10px; font-weight: 600; }
.form-msg[data-state="ok"] { display: block; background: #e4f3ea; color: #0c4a2a; }
.form-msg[data-state="error"] { display: block; background: #fdeaea; color: #8a1c1c; }
.form-msg a { font-weight: 800; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.form-foot small { color: var(--muted); font-size: 0.9rem; }

.aside { border-top: 2px solid var(--ink); }
.aside > div { padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.aside dt { color: var(--muted); font-size: 0.95rem; }
.aside dd { font-weight: 700; font-size: 1.1rem; line-height: 1.45; margin-top: 0.15rem; }
.aside dd a { text-decoration: none; }
.aside dd a:hover { text-decoration: underline; text-underline-offset: 0.25em; text-decoration-color: var(--blue); }
.aside .big { font-size: clamp(1.6rem, 2vw + 1rem, 2.1rem); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.checklist { margin-top: 2.5rem; padding: 1.75rem; background: var(--mist); border-radius: var(--radius); }
.checklist h3 { font-size: 1.15rem; }
.checklist ol { margin-top: 0.9rem; counter-reset: c; }
.checklist li { counter-increment: c; display: flex; gap: 0.75rem; padding: 0.4rem 0; }
.checklist li::before { content: counter(c); flex: none; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-size: 0.8rem; font-weight: 800; margin-top: 0.05rem; }

.map { margin-top: var(--section); border-radius: var(--radius); overflow: hidden; background: var(--mist); }
.map iframe { display: block; width: 100%; height: clamp(20rem, 40vw, 30rem); border: 0; }

/* ---------- Pie ---------- */

.footer { background: #fff; padding-top: clamp(3.5rem, 6vw, 5.5rem); }
.footer-grid { display: grid; grid-template-columns: minmax(16rem, 1.5fr) repeat(3, minmax(0, 1fr)) auto; gap: 2.5rem clamp(1.5rem, 3vw, 3.5rem); align-items: start; }
.footer-brand img { width: min(100%, 19rem); }
.footer-brand ul { margin-top: 1.75rem; display: grid; gap: 0.7rem; font-weight: 700; font-size: 0.97rem; }
.footer-brand li { display: flex; gap: 0.75rem; align-items: flex-start; }
.footer-brand svg { color: var(--blue); flex: none; margin-top: 0.2rem; }
.footer-brand a { text-decoration: none; }
.footer-brand a:hover, .footer-col a:hover { text-decoration: underline; text-underline-offset: 0.25em; text-decoration-color: var(--blue); text-decoration-thickness: 2px; }
.footer-col h2 { font-size: 1.1rem; font-weight: 800; letter-spacing: 0; padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); }
.footer-col ul { margin-top: 1rem; display: grid; gap: 0.5rem; font-size: 0.97rem; }
.footer-col a { text-decoration: none; }
.footer-bottom { margin-top: clamp(3rem, 5vw, 4.5rem); padding-block: 1.4rem; border-top: 1px solid var(--line); text-align: center; font-size: 0.92rem; color: var(--muted); }
@media (max-width: 1199px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-cta { grid-column: 1 / -1; }
}
@media (max-width: 599px) { .footer-grid { grid-template-columns: 1fr; } }
