/* TMAC — hoja única del sitio. Móvil primero; sin frameworks. */

:root {
  --navy-900: #061629;
  --navy-800: #09203c;
  --navy-700: #12305a;
  --blue-500: #1883ba;
  --blue-600: #13699a;
  --blue-100: #e3f1f9;
  --ink: #142235;
  --ink-soft: #4a5a6e;
  --line: #dbe3ec;
  --paper: #ffffff;
  --paper-alt: #f4f7fa;
  --on-dark: #ffffff;
  --on-dark-soft: #c3d1e0;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: 1.1875rem;
  --h1: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  --h2: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem);
  --h3: 1.25rem;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: clamp(3.5rem, 2.5rem + 4vw, 6rem);

  --radius: 12px;
  --shadow: 0 1px 2px rgb(9 32 60 / 6%), 0 8px 24px rgb(9 32 60 / 8%);
  --container: 72rem;
  --header-h: 4.5rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--space-2));
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}

button {
  font: inherit;
}

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

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--space-2);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); }

p,
ul,
ol,
dl,
address {
  margin: 0 0 var(--space-2);
}

address {
  font-style: normal;
}

a {
  color: var(--blue-600);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--navy-700);
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -3rem;
  z-index: 100;
  padding: var(--space-1) var(--space-2);
  background: var(--paper);
  border-radius: var(--radius);
}

.skip-link:focus {
  top: var(--space-1);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-2);
}

@media (min-width: 48rem) {
  .container {
    padding-inline: var(--space-4);
  }
}

/* ---------- Cabecera y menú ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy-800);
  color: var(--on-dark);
  box-shadow: 0 1px 0 rgb(255 255 255 / 8%);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: var(--space-2);
}

.brand img {
  width: 96px;
  height: auto;
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  display: block;
  width: 1.5rem;
  height: 2px;
  margin-inline: auto;
  background: currentColor;
  transition: transform 0.2s ease;
}

.nav-toggle__bar {
  position: relative;
}

.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bar::before { top: -7px; }
.nav-toggle__bar::after { top: 7px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: translateY(-7px) rotate(-45deg); }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: var(--on-dark-soft);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--on-dark);
  background: rgb(255 255 255 / 8%);
}

.site-nav a[aria-current="page"] {
  color: var(--on-dark);
  background: rgb(255 255 255 / 12%);
}

.site-nav li:last-child a {
  background: var(--blue-500);
  color: var(--on-dark);
}

.site-nav li:last-child a:hover {
  background: var(--blue-600);
}

/* Con JS, en pantallas angostas el menú se pliega detrás del botón. Sin JS queda visible. */
@media (max-width: 63.99rem) {
  .js .nav-toggle {
    display: block;
  }

  .js .site-nav {
    position: absolute;
    inset: var(--header-h) 0 auto 0;
    display: none;
    background: var(--navy-800);
    border-top: 1px solid rgb(255 255 255 / 10%);
    box-shadow: 0 12px 24px rgb(0 0 0 / 25%);
  }

  .js .site-nav.is-open {
    display: block;
  }

  .js .site-nav ul {
    flex-direction: column;
    padding: var(--space-1) var(--space-2) var(--space-2);
  }

  .js .site-nav a {
    padding: 0.75rem;
    font-size: var(--text-base);
  }

  .no-js .site-header__inner {
    flex-wrap: wrap;
    padding-block: var(--space-1);
  }
}

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

.section {
  padding-block: var(--space-6);
}

.section--alt {
  background: var(--paper-alt);
}

.section--dark {
  background: var(--navy-800);
  color: var(--on-dark);
}

.section--dark a:not(.btn) {
  color: var(--on-dark);
}

.section--tight {
  padding-block: var(--space-5);
}

.section__head {
  max-width: 44rem;
  margin-bottom: var(--space-5);
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--blue-600);
  font-size: var(--text-sm);
  font-weight: 700;
}

.section--dark .eyebrow,
.hero .eyebrow,
.page-hero .eyebrow {
  color: #8fd0f2;
}

.lead {
  font-size: var(--text-lg);
  color: var(--ink-soft);
}

.section--dark .lead,
.hero .lead,
.page-hero .lead {
  color: var(--on-dark-soft);
}

.prose {
  max-width: 68ch;
}

.prose > :last-child {
  margin-bottom: 0;
}

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

.hero,
.page-hero {
  position: relative;
  isolation: isolate;
  color: var(--on-dark);
  background: var(--navy-800);
  overflow: hidden;
}

.hero__media,
.page-hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero__media picture,
.page-hero__media picture,
.hero__media img,
.page-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__media::after,
.page-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgb(6 22 41 / 94%) 0%, rgb(9 32 60 / 85%) 45%, rgb(9 32 60 / 55%) 100%);
}

.hero__content {
  max-width: 40rem;
  padding-block: clamp(4rem, 3rem + 8vw, 9rem);
}

.hero h1 {
  margin-bottom: var(--space-3);
}

.page-hero__content {
  max-width: 46rem;
  padding-block: clamp(3rem, 2.5rem + 4vw, 5.5rem);
}

.page-hero h1 {
  margin-bottom: var(--space-2);
}

.page-hero .lead {
  margin-bottom: 0;
}

.breadcrumb {
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
}

.breadcrumb a {
  color: var(--on-dark-soft);
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.375rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-size: var(--text-base);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn--primary {
  background: var(--blue-600);
  color: var(--on-dark);
}

.btn--primary:hover {
  background: var(--navy-700);
  color: var(--on-dark);
}

.btn--ghost {
  border-color: rgb(255 255 255 / 55%);
  color: var(--on-dark);
}

.btn--ghost:hover {
  background: rgb(255 255 255 / 10%);
  border-color: var(--on-dark);
  color: var(--on-dark);
}

.btn--outline {
  border-color: var(--blue-600);
  color: var(--blue-600);
}

.btn--outline:hover {
  background: var(--blue-600);
  color: var(--on-dark);
}

/* ---------- Rejillas y tarjetas ---------- */

.grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card__media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: var(--space-3);
}

.card__body p {
  color: var(--ink-soft);
}

.card__link {
  margin-top: auto;
  font-weight: 700;
  text-decoration: none;
}

.card__link::after {
  content: " →";
}

.card--link {
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card--link:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgb(9 32 60 / 8%), 0 16px 32px rgb(9 32 60 / 12%);
}

/* El enlace del título cubre toda la tarjeta. */
.card--link h3 a {
  color: inherit;
  text-decoration: none;
}

.card--link h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.feature {
  padding: var(--space-3);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.section--alt .feature {
  border-color: transparent;
  box-shadow: var(--shadow);
}

.feature h3 {
  font-size: 1.125rem;
  margin-bottom: var(--space-1);
}

.feature p {
  margin: 0;
  color: var(--ink-soft);
}

.section--dark .feature {
  background: rgb(255 255 255 / 6%);
  border-color: rgb(255 255 255 / 12%);
}

.section--dark .feature p {
  color: var(--on-dark-soft);
}

/* ---------- Bloque texto + imagen ---------- */

.split {
  display: grid;
  gap: var(--space-5);
  align-items: center;
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: 1fr 1fr;
  }

  .split--reverse > :first-child {
    order: 2;
  }
}

.split__media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Listas de datos ---------- */

.facts {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts li {
  padding-left: 1.75rem;
  position: relative;
}

.facts li::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.55em;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--blue-500);
}

.stat-row {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr));
  margin: 0;
}

.stat-row div {
  padding-left: var(--space-2);
  border-left: 3px solid var(--blue-500);
}

.stat-row dt {
  font-size: var(--text-sm);
  color: var(--ink-soft);
}

.stat-row dd {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
}

.section--dark .stat-row dt {
  color: var(--on-dark-soft);
}

/* ---------- Línea de tiempo ---------- */

.timeline {
  position: relative;
  margin: 0;
  padding: 0 0 0 var(--space-4);
  list-style: none;
  max-width: 48rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: var(--line);
}

.timeline li {
  position: relative;
  padding-bottom: var(--space-4);
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-4) + 0.1875rem);
  top: 0.4rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--blue-500);
}

.timeline time {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--blue-600);
}

.timeline h3 {
  margin-bottom: 0.25rem;
  font-size: 1.125rem;
}

.timeline p {
  margin: 0;
  color: var(--ink-soft);
}

/* ---------- Persona ---------- */

.person {
  display: grid;
  gap: var(--space-3);
  align-items: center;
}

@media (min-width: 40rem) {
  .person {
    grid-template-columns: 11rem 1fr;
  }
}

.person img {
  width: 11rem;
  border-radius: 50%;
}

.person__role {
  margin-bottom: var(--space-1);
  color: var(--blue-600);
  font-weight: 700;
}

/* ---------- Contacto ---------- */

.contact-list {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list h3 {
  margin-bottom: 0.25rem;
  font-size: var(--text-sm);
  color: var(--ink-soft);
  font-weight: 600;
}

.contact-list p,
.contact-list address {
  margin: 0;
  font-size: var(--text-lg);
}

.map {
  width: 100%;
  min-height: 20rem;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.cta-band h2 {
  margin-bottom: var(--space-1);
}

.cta-band p {
  margin: 0;
}

/* ---------- Logos y galería ---------- */

.logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.logo-row img {
  max-height: 4rem;
  width: auto;
  filter: grayscale(1);
  opacity: 0.85;
}

.logo-row a:hover img {
  filter: none;
  opacity: 1;
}

.gallery {
  display: grid;
  gap: var(--space-1);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery a {
  display: block;
  overflow: hidden;
  border-radius: 8px;
}

.gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.gallery a:hover img {
  transform: scale(1.04);
}

.lightbox {
  width: min(92vw, 70rem);
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--navy-900);
}

.lightbox::backdrop {
  background: rgb(6 22 41 / 88%);
}

.lightbox img {
  width: 100%;
  max-height: 86vh;
  object-fit: contain;
}

.lightbox button {
  position: absolute;
  top: var(--space-1);
  right: var(--space-1);
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  background: rgb(0 0 0 / 55%);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 0 0 var(--space-2);
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--navy-700);
  font-size: var(--text-sm);
  font-weight: 600;
}

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

.site-footer {
  padding-top: var(--space-5);
  background: var(--navy-900);
  color: var(--on-dark-soft);
  font-size: var(--text-sm);
}

.site-footer a {
  color: var(--on-dark-soft);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--on-dark);
  text-decoration: underline;
}

.site-footer__grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  padding-bottom: var(--space-4);
}

.site-footer img {
  width: 96px;
  margin-bottom: var(--space-2);
}

.site-footer__lead {
  max-width: 22rem;
}

.site-footer__title {
  margin-bottom: var(--space-2);
  color: var(--on-dark);
  font-size: var(--text-base);
}

.site-footer__links {
  display: grid;
  gap: 0.375rem;
  padding: 0;
  list-style: none;
}

.site-footer__legal {
  padding-block: var(--space-3);
  border-top: 1px solid rgb(255 255 255 / 10%);
}

.site-footer__legal p {
  margin: 0;
}

/* ---------- Pasos numerados ---------- */

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps__n {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: var(--space-2);
  border-radius: 50%;
  background: var(--blue-100);
  color: var(--navy-700);
  font-weight: 700;
}
