/* TransparencIA Latam: base reset */
*, *::before, *::after { box-sizing: border-box; }
img, video { max-width: 100%; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }

/* TransparencIA Latam: site token layer and sections (RIEA palette). */

:root {
  --tl-white: #ffffff;
  --tl-tint: #eef2f7;
  --tl-line: #d5dbe5;
  --tl-navy: #0b2545;
  --tl-navy-2: #13315c;
  --tl-red: #b02020;
  --tl-red-on-navy: #f0a3a3;
  --tl-grey: #4b5563;
  --tl-grey-2: #9ca3af;
  --tl-font: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--tl-white);
  color: var(--tl-navy);
}

.tl-page {
  font-family: var(--tl-font);
  color: var(--tl-navy);
  background: var(--tl-white);
  -webkit-font-smoothing: antialiased;
}

.tl-wrap {
  width: min(72rem, 100% - 2.5rem);
  margin-inline: auto;
}

/* ---------- wordmark ---------- */
.tl-wordmark {
  display: inline-flex;
  align-items: baseline;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--tl-navy);
}

.tl-wordmark__ia {
  color: var(--tl-red);
}

.tl-wordmark__latam {
  margin-left: 0.4em;
  font-weight: 400;
  color: var(--tl-grey);
}

/* ---------- header ---------- */
.tl-header {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4rem;
  padding: 0 clamp(1.25rem, 6vw, 6rem);
  background: color-mix(in srgb, var(--tl-white) 86%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--tl-navy) 10%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.tl-header__brand {
  text-decoration: none;
}

.tl-header__nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.4vw, 2rem);
  font-size: 0.92rem;
}

.tl-header__link {
  color: var(--tl-grey);
  text-decoration: none;
  transition: color 160ms ease;
}

.tl-header__link:hover {
  color: var(--tl-navy);
}

.tl-header__contact {
  padding-bottom: 0.2rem;
  color: var(--tl-navy);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--tl-red);
  transition: border-bottom-width 160ms ease, padding-bottom 160ms ease;
}

.tl-header__contact:hover {
  padding-bottom: 0.05rem;
  border-bottom-width: 4px;
}

.tl-header a:focus-visible,
.tl-page a:focus-visible {
  outline: 2px solid var(--tl-red);
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .tl-header__link {
    display: none;
  }
}

/* ---------- journey overrides (composition only, engine untouched) ---------- */
.tl-journey {
  font-family: var(--tl-font);
}

.tl-journey .scroll-scrub__title {
  max-width: 18ch;
  font-size: clamp(1.9rem, 3.2vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.tl-journey .scroll-scrub__chapter:first-child .scroll-scrub__title {
  max-width: 14ch;
  font-size: clamp(2.6rem, 4.6vw, 4.6rem);
  line-height: 0.96;
}

.tl-journey .scroll-scrub__body {
  max-width: 46ch;
  color: var(--tl-grey);
}

.tl-journey .scroll-scrub__tags {
  flex-direction: column;
  align-items: flex-start;
}

.tl-journey .scroll-scrub__tags li {
  padding: 0.5rem 0.75rem;
  border: 0;
  border-left: 3px solid var(--tl-red);
  background: color-mix(in srgb, var(--tl-white) 82%, transparent);
  color: var(--tl-navy);
  font-size: 0.9rem;
  line-height: 1.35;
}

.tl-journey .scroll-scrub__route-button {
  font-family: var(--tl-font);
}

@media (max-width: 860px) {
  .tl-journey .scroll-scrub__chapter:first-child .scroll-scrub__title {
    font-size: clamp(2.2rem, 10.5vw, 3.6rem);
  }

  .tl-journey .scroll-scrub__title {
    font-size: clamp(1.8rem, 7.4vw, 2.8rem);
  }
}

/* The copy column stays narrow so the cube reads clear beside it. */
.tl-journey .scroll-scrub__copy {
  width: min(32rem, 38vw);
}

@media (max-width: 860px) {
  .tl-journey .scroll-scrub__copy {
    width: min(100%, 36rem);
  }
}

/* Mobile sources are square and fade to white: show them whole. */
@media (hover: none) and (pointer: coarse), (max-width: 860px) {
  .tl-journey .scroll-scrub__poster,
  .tl-journey .scroll-scrub__video {
    object-fit: contain;
  }
}

@media (hover: none) and (pointer: coarse) and (min-width: 861px) {
  .tl-journey .scroll-scrub__poster,
  .tl-journey .scroll-scrub__video {
    object-position: 100% 50%;
  }
}

/* ---------- hero CTA ---------- */
.tl-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1.4rem;
  background: var(--tl-navy);
  color: var(--tl-white);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 160ms ease;
}

.tl-hero-cta:hover {
  background: var(--tl-navy-2);
}

.tl-hero-cta:active {
  transform: translateY(1px);
}

.tl-hero-cta__arrow {
  display: inline-block;
  transition: transform 200ms ease;
}

.tl-hero-cta:hover .tl-hero-cta__arrow {
  transform: translateX(6px);
}

/* ---------- shared section type ---------- */
.tl-section {
  padding: clamp(4.5rem, 9vw, 8rem) 0;
}

.tl-h2 {
  max-width: 20ch;
  margin: 0;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--tl-navy);
}

.tl-h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--tl-navy);
}

.tl-p {
  max-width: 52ch;
  margin: 0.75rem 0 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--tl-grey);
}

/* ---------- institutions ---------- */
.tl-inst {
  background: var(--tl-white);
  border-top: 1px solid var(--tl-line);
}

.tl-inst__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 5rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.tl-inst__item {
  padding-top: 2rem;
  border-top: 3px solid var(--tl-navy);
}

.tl-inst__item + .tl-inst__item {
  border-top-color: var(--tl-red);
}

.tl-inst__logo {
  display: flex;
  align-items: center;
  height: 7.5rem;
  margin-bottom: 1.75rem;
}

.tl-inst__logo img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 100%;
}

.tl-outbound {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.25rem;
  color: var(--tl-navy);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--tl-line);
  text-underline-offset: 0.3em;
  transition: text-decoration-color 160ms ease;
}

.tl-outbound:hover {
  text-decoration-color: var(--tl-navy);
}

.tl-outbound__arrow {
  display: inline-block;
  transition: transform 200ms ease;
}

.tl-outbound:hover .tl-outbound__arrow {
  transform: translate(3px, -3px);
}

@media (max-width: 760px) {
  .tl-inst__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- initiative rows ---------- */
.tl-init {
  background: var(--tl-tint);
}

.tl-init__rows {
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  border-bottom: 1px solid var(--tl-line);
}

.tl-init__row {
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) minmax(0, 3fr);
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--tl-line);
}

.tl-init__row dt {
  font-size: 1rem;
  font-weight: 700;
  color: var(--tl-red);
}

.tl-init__row dd {
  max-width: 44ch;
  margin: 0;
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  line-height: 1.4;
  color: var(--tl-navy);
}

@media (max-width: 640px) {
  .tl-init__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
  }
}

/* ---------- contact band ---------- */
.tl-contact {
  padding: clamp(4.5rem, 9vw, 7.5rem) 0;
  background: var(--tl-navy);
  color: var(--tl-white);
}

.tl-contact__inner {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
}

.tl-contact__title {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(1.9rem, 3.6vw, 3.2rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--tl-white);
}

.tl-contact__text {
  max-width: 48ch;
  margin: 1.25rem 0 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--tl-white) 80%, transparent);
}

.tl-contact__links {
  display: grid;
  gap: 0.9rem;
}

.tl-contact__link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--tl-white);
  color: var(--tl-navy);
  text-decoration: none;
  border-left: 4px solid var(--tl-red);
  transition: transform 200ms ease;
}

.tl-contact__link:hover {
  transform: translateY(-3px);
}

.tl-contact__link:active {
  transform: translateY(0);
}

.tl-contact .tl-contact__link:focus-visible {
  outline-color: var(--tl-white);
}

.tl-contact__link-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.tl-contact__link-url {
  font-size: 0.95rem;
  color: var(--tl-grey);
}

@media (max-width: 760px) {
  .tl-contact__inner {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
}

/* ---------- footer ---------- */
.tl-footer {
  padding: 3.5rem 0 4rem;
  background: var(--tl-white);
  border-top: 1px solid var(--tl-line);
}

.tl-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 2.5rem;
}

.tl-footer__brand p {
  max-width: 34ch;
  margin: 0.75rem 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--tl-grey);
}

.tl-footer__sources h2 {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--tl-navy);
}

.tl-footer__sources ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tl-footer__sources li + li {
  margin-top: 0.45rem;
}

.tl-footer__sources a {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--tl-grey);
  text-decoration: underline;
  text-decoration-color: var(--tl-line);
  text-underline-offset: 0.25em;
}

.tl-footer__sources a:hover {
  color: var(--tl-navy);
}

@media (max-width: 760px) {
  .tl-footer__inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .tl-page *,
  .tl-header * {
    transition: none !important;
  }

  .tl-hero-cta:hover .tl-hero-cta__arrow,
  .tl-outbound:hover .tl-outbound__arrow,
  .tl-contact__link:hover {
    transform: none;
  }
}

/* Chapter index sits below the fixed header. */
.tl-journey .scroll-scrub__route { top: 4.5rem; }
.tl-journey .scroll-scrub__route-button { font-size: 0.9rem; }
.tl-journey .scroll-scrub__chapter-pin { padding-top: clamp(8rem, 12vw, 10rem); }
