/* Trayectoria: recorrido horizontal 2012 → años de oficio → hoy con IA, y franja de cifras */

.tr-journey { display: grid; grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1.4fr) 72px minmax(0, 1fr); align-items: stretch; max-width: 1100px; margin: 0 auto 22px; }

.tr-stage { position: relative; display: flex; flex-direction: column; padding: 28px 26px 26px; overflow: hidden; border: 1px solid #dfe4eb; border-radius: 24px; background: #fff; transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; }
.tr-stage::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 4px; background: linear-gradient(90deg, #51D9D6, #0b6f6c); }
.tr-stage:hover { transform: translateY(-6px); border-color: rgba(81, 217, 214, 0.9); box-shadow: 0 18px 40px -18px rgba(11, 111, 108, 0.45); }

.tr-badge { align-self: flex-start; margin-bottom: 14px; padding: 4px 12px; border-radius: 999px; background: rgba(81, 217, 214, 0.18); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #0b6f6c; }
.tr-year, .tr-stage__big { margin: 0 0 6px; font-size: clamp(2.6rem, 4.6vw, 4rem); line-height: 1; font-weight: 900; letter-spacing: -0.03em; background: linear-gradient(135deg, #0b6f6c, #51D9D6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tr-stage__t { margin: 0 0 10px; font-size: 1.2rem; line-height: 1.25; font-weight: 800; color: #202020; }
.tr-stage__d { margin: 0; font-size: 0.975rem; line-height: 1.5; color: rgba(32, 32, 32, 0.78); }

.tr-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: auto 0 0; padding-top: 14px; }
.tr-chips span { padding: 5px 12px; border: 1px solid #dfe4eb; border-radius: 999px; background: #f2f8f8; font-size: 0.8125rem; font-weight: 600; color: #202020; }

/* "Hoy": tarjeta destacada */
.tr-stage--now { border-color: #0b6f6c; background: linear-gradient(150deg, #0b6f6c, #0a5553); }
.tr-stage--now::before { background: #51D9D6; }
.tr-stage--now::after { content: ""; position: absolute; right: -50px; bottom: -50px; width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(circle, rgba(81, 217, 214, 0.45), transparent 70%); animation: tr-breathe 4s ease-in-out infinite; pointer-events: none; }
.tr-stage--now .tr-badge { background: #51D9D6; color: #14201f; }
.tr-stage--now .tr-stage__big { background: linear-gradient(135deg, #fff, #51D9D6); -webkit-background-clip: text; background-clip: text; }
.tr-stage--now .tr-stage__t { color: #fff; }
.tr-stage--now .tr-chips span { position: relative; z-index: 1; border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.12); color: #fff; }
@keyframes tr-breathe { 0%, 100% { transform: scale(1); opacity: 0.7; } 50% { transform: scale(1.3); opacity: 1; } }

/* Conector con punto que viaja */
.tr-link { position: relative; align-self: center; height: 28px; }
.tr-link__bar { position: absolute; left: 6px; right: 14px; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 3px; background: linear-gradient(90deg, #51D9D6, #0b6f6c); transform-origin: left; }
.tr-link::after { content: ""; position: absolute; right: 6px; top: 50%; width: 11px; height: 11px; margin-top: -5.5px; border-top: 3px solid #0b6f6c; border-right: 3px solid #0b6f6c; transform: rotate(45deg); }
.tr-link__dot { position: absolute; left: 6px; top: 50%; width: 11px; height: 11px; margin-top: -5.5px; border-radius: 50%; background: #fff; border: 3px solid #51D9D6; box-shadow: 0 0 0 4px rgba(81, 217, 214, 0.25); animation: tr-travel 2.6s ease-in-out infinite; }
@keyframes tr-travel { 0% { transform: translateX(0); opacity: 0; } 15%, 85% { opacity: 1; } 100% { transform: translateX(44px); opacity: 0; } }

/* ---------- Somos españoles ---------- */
.tr-spain { display: grid; grid-template-columns: 112px minmax(0, 0.8fr) minmax(0, 2.2fr); align-items: center; gap: 24px; max-width: 1100px; margin: 0 auto 18px; padding: 20px 28px 20px 20px; overflow: hidden; border: 1px solid rgba(81, 217, 214, 0.9); border-radius: 24px; background: linear-gradient(100deg, #f2f8f8, #fff 60%); }
.tr-spain__mapwrap { position: relative; width: 112px; height: 108px; }
.tr-spain__map { position: absolute; left: 0; top: 0; width: 112px; height: 100px; overflow: hidden; }
.tr-spain__canarias { position: absolute; left: 0; bottom: 0; width: 28px; height: 13px; fill: #0b8f8b; opacity: 0.45; }
/* El PNG es negro: se desplaza fuera del recorte y su sombra, ya en turquesa, ocupa su lugar (sin máscaras, válido también con file://) */
.tr-spain__map img { display: block; width: 100%; height: 100%; object-fit: contain; transform: translateX(-140px); filter: drop-shadow(140px 0 0 #0b8f8b); }
.tr-spain__pin { position: absolute; left: 47%; top: 44px; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px #0b6f6c; }
.tr-spain__pin::after { content: ""; position: absolute; inset: -3px; border: 2px solid #0b6f6c; border-radius: 50%; animation: tr-pin 2.2s ease-out infinite; }
@keyframes tr-pin { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(3.4); opacity: 0; } }
.tr-spain__t { margin: 0 0 6px; font-size: 1.25rem; line-height: 1.25; font-weight: 800; color: #202020; }
.tr-spain__d { margin: 0; line-height: 1.45; color: rgba(32, 32, 32, 0.78); }
.tr-spain__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.tr-spain__list li { display: flex; flex-direction: column; gap: 3px; padding-left: 16px; border-left: 3px solid #51D9D6; }
.tr-spain__list strong { font-size: 0.975rem; font-weight: 800; color: #0b6f6c; }
.tr-spain__list span { font-size: 0.875rem; line-height: 1.4; color: rgba(32, 32, 32, 0.78); }

/* ---------- Cifras ---------- */
.tr-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 1100px; margin: 0 auto 18px; padding: 0; list-style: none; overflow: hidden; border: 1px solid #dfe4eb; border-radius: 24px; background: #fff; }
.tr-stat { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 22px 20px; border-left: 1px solid #dfe4eb; transition: background-color 0.3s ease; }
.tr-stat:first-child { border-left: 0; }
.tr-stat:hover { background: #f2f8f8; }
.tr-stat strong { font-size: clamp(2.2rem, 3.4vw, 3rem); line-height: 1; font-weight: 900; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: #0b6f6c; }
.tr-stat > span { font-size: 0.875rem; line-height: 1.35; color: rgba(32, 32, 32, 0.78); }

.tr-proofs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 1100px; margin: 0 auto 30px; padding: 0; list-style: none; }
.tr-proofs li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px 8px 12px; border: 1px solid #dfe4eb; border-radius: 999px; background: #fff; font-size: 0.875rem; font-weight: 600; color: #202020; transition: border-color 0.25s ease, transform 0.25s ease; }
.tr-proofs li::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; background: #51D9D6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314201f' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 11px no-repeat; }
.tr-proofs li:hover { border-color: rgba(81, 217, 214, 0.9); transform: translateY(-2px); }

.tr-tagline { max-width: 40em; margin: 0 auto; text-align: center; font-size: 1.05rem; line-height: 1.55; color: rgba(32, 32, 32, 0.8); }
.tr-tagline b { color: #0b6f6c; }

/* ---------- Animación de entrada ---------- */
.tr-js .tr-stage { opacity: 0; transform: translateY(28px) scale(0.97); }
.tr-js .is-in .tr-stage { animation: tr-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards; animation-delay: calc(0.1s + var(--i) * 0.55s); }
.tr-js .tr-link__bar, .tr-js .tr-link::after { opacity: 0; }
.tr-js .tr-link__bar { transform: scaleX(0); }
.tr-js .is-in .tr-link__bar { opacity: 1; transform: none; transition: transform 0.5s ease-out; }
.tr-js .is-in .tr-link::after { opacity: 1; transition: opacity 0.2s ease; }
.tr-js .tr-link:nth-of-type(1) .tr-link__bar { transition-delay: 0.55s; }
.tr-js .tr-link:nth-of-type(1)::after { transition-delay: 1s; }
.tr-js .tr-link:nth-of-type(2) .tr-link__bar { transition-delay: 1.1s; }
.tr-js .tr-link:nth-of-type(2)::after { transition-delay: 1.55s; }
.tr-js .tr-link__dot { opacity: 0; animation-play-state: paused; }
.tr-js .is-in .tr-link__dot { animation-play-state: running; animation-delay: 1.8s; }
.tr-js .tr-spain, .tr-js .tr-stats, .tr-js .tr-proofs, .tr-js .tr-tagline { opacity: 0; transform: translateY(20px); }
.tr-js .is-in .tr-spain { opacity: 1; transform: none; transition: opacity 0.7s ease 1.7s, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 1.7s; }
.tr-js .is-in .tr-stats { opacity: 1; transform: none; transition: opacity 0.7s ease 2s, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 2s; }
.tr-js .is-in .tr-proofs { opacity: 1; transform: none; transition: opacity 0.7s ease 2.3s, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 2.3s; }
.tr-js .is-in .tr-tagline { opacity: 1; transform: none; transition: opacity 0.7s ease 2.6s, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 2.6s; }
@keyframes tr-in { to { opacity: 1; transform: none; } }

@media (max-width: 1000px) {
  .tr-journey { grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1.3fr) 44px minmax(0, 1fr); }
  .tr-stage { padding: 24px 18px 22px; }
  .tr-link__bar { left: 2px; right: 10px; }
  .tr-link::after { right: 2px; }
  .tr-link__dot { left: 2px; }
  .tr-spain { grid-template-columns: 112px minmax(0, 1fr); }
  .tr-spain__list { grid-column: 1 / -1; }
  @keyframes tr-travel { 0% { transform: translateX(0); opacity: 0; } 15%, 85% { opacity: 1; } 100% { transform: translateX(22px); opacity: 0; } }
  .tr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tr-stat:nth-child(3) { border-left: 0; }
  .tr-stat:nth-child(n+3) { border-top: 1px solid #dfe4eb; }
  .tr-stat:last-child { grid-column: 1 / -1; border-left: 0; }
}
@media (max-width: 760px) {
  .tr-journey { grid-template-columns: minmax(0, 1fr); }
  .tr-link { width: 28px; height: 48px; justify-self: center; }
  .tr-link__bar { left: 50%; right: auto; top: 4px; bottom: 14px; width: 3px; height: auto; margin: 0 0 0 -1.5px; background: linear-gradient(180deg, #51D9D6, #0b6f6c); transform-origin: top; }
  .tr-link::after { left: 50%; right: auto; top: auto; bottom: 4px; margin: 0 0 0 -5.5px; transform: rotate(135deg); }
  .tr-link__dot { left: 50%; top: 4px; margin: 0 0 0 -5.5px; animation-name: tr-travel-y; }
  @keyframes tr-travel-y { 0% { transform: translateY(0); opacity: 0; } 15%, 85% { opacity: 1; } 100% { transform: translateY(26px); opacity: 0; } }
  .tr-js .tr-link__bar { transform: scaleY(0); }
  .tr-js .is-in .tr-link__bar { transform: none; }
  .tr-spain { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 22px 20px; }
  .tr-spain__list { grid-template-columns: minmax(0, 1fr); text-align: left; }
}
@media (max-width: 480px) {
  .tr-stat { padding: 18px 16px; }
  .tr-proofs li { font-size: 0.8125rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tr-stage, .tr-stat, .tr-proofs li { transition: none; }
  .tr-stage:hover { transform: none; }
  .tr-stage--now::after, .tr-link__dot, .tr-spain__pin::after { animation: none; }
  .tr-link__dot { opacity: 0; }
}
