/* =================================================================
   TERRITORIES — Pinned horizontal scroll
   Image 50vw right · text + services left
   ================================================================= */

.tr-section {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--cream);
  color: var(--ink);
}

.tr-meta-fixed {
  position: absolute;
  top: 85px;
  left: var(--col-pad);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: none;
}
.tr-meta-k {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--garnet);
}
.tr-meta-k em {
  font-family: var(--ff-display);
  font-style: italic;
  text-transform: none;
  color: var(--terracotta);
  font-size: 15px;
  margin: 0 2px;
}
.tr-meta-title {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: clamp(22px, 2.2vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--garnet);
  white-space: nowrap;
}
.tr-meta-title em { font-style: italic; color: var(--terracotta); }

.tr-track {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: stretch;
  width: max-content;
  height: 100vh;
  will-change: transform;
}

.tr-panel {
  position: relative;
  flex: 0 0 100vw;
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--cream);
}
.tr-panel[data-bg="b"] { background: var(--cream-2); }

/* LEFT: content */
.tr-content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(160px, 18vh, 220px) clamp(40px, 5vw, 80px) clamp(80px, 10vh, 120px) var(--col-pad);
  overflow-y: auto;
  scrollbar-width: none;
}
.tr-content::-webkit-scrollbar { display: none; }
.tr-content-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 540px;
}
.tr-label {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terracotta);
}
.tr-name {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: clamp(52px, 6vw, 100px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin: 0 0 4px;
  color: var(--garnet);
}
.tr-kicker {
  font-family: var(--ff-display);
  font-style: italic;
  font-size: clamp(16px, 1.3vw, 20px);
  color: var(--ink-2);
  margin-bottom: 4px;
}
.tr-kicker em { color: var(--olive); font-style: normal; margin-right: 6px; }
.tr-lead {
  font-family: var(--ff-body);
  font-size: clamp(14px, 1vw, 16px);
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 20px;
  max-width: 46ch;
}
.tr-services {
  list-style: none;
  margin: 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.tr-service {
  position: relative;
  padding: 14px 0 14px;
  border-bottom: 1px solid var(--line);
  cursor: default;
  transition: padding 0.35s ease;
}
.tr-service-head {
  display: grid;
  grid-template-columns: 40px auto 1fr;
  align-items: baseline;
  gap: 14px;
  transition: transform 0.35s ease;
}
.tr-service-num {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--terracotta);
  transition: color 0.3s ease;
}
.tr-service-name {
  font-family: var(--ff-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(18px, 1.5vw, 24px);
  color: var(--garnet);
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}
.tr-service-sub {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  justify-self: end;
  text-align: right;
  transition: color 0.3s ease;
}

/* Descripción oculta por defecto, aparece en hover */
.tr-service-desc-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.tr-service-desc-wrap > span {
  overflow: hidden;
  min-height: 0;
}
.tr-service-desc {
  font-family: var(--ff-body);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0;
  padding: 8px 0 2px 54px;
  max-width: 48ch;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.35s ease 0.05s, transform 0.35s ease 0.05s;
}

.tr-service:hover .tr-service-desc-wrap,
.tr-service:focus-within .tr-service-desc-wrap {
  grid-template-rows: 1fr;
}
.tr-service:hover .tr-service-desc,
.tr-service:focus-within .tr-service-desc {
  opacity: 1;
  transform: translateY(0);
}
.tr-service:hover .tr-service-name {
  color: var(--terracotta);
}
.tr-service:hover .tr-service-num {
  color: var(--garnet);
}
.tr-count {
  position: absolute;
  bottom: 40px;
  left: var(--col-pad);
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: 24px;
  color: var(--garnet);
}
.tr-count-sep { color: var(--terracotta); font-style: italic; }

/* RIGHT: cover image */
.tr-visual {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--cream);
}
.tr-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.98) contrast(1.05);
  transform-origin: center center;
  will-change: transform;
}
.tr-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(42,10,8,0.15) 0%, rgba(42,10,8,0) 40%, rgba(42,10,8,0.55) 100%);
  pointer-events: none;
}
.tr-visual-caption {
  position: absolute;
  left: 40px;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--cream);
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.9;
}
.tr-visual-name {
  font-family: var(--ff-display);
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--cream);
}

/* Hint */
.tr-hint {
  position: absolute;
  bottom: 30px;
  right: var(--col-pad);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cream);
  pointer-events: none;
}
.tr-hint-arrow {
  display: inline-block;
  animation: trArrow 1.6s ease-in-out infinite;
  color: var(--terracotta);
  font-size: 16px;
}
@keyframes trArrow {
  0%, 100% { transform: translateX(0); opacity: 0.6; }
  50%      { transform: translateX(10px); opacity: 1; }
}

/* ========== MOBILE ========== */
@media (max-width: 768px) {
  .tr-section { height: auto; min-height: auto; }
  .tr-meta-fixed {
    position: relative;
    top: auto;
    left: auto;
    padding: 80px var(--col-pad) 30px;
    max-width: 100%;
  }
  .tr-meta-title { white-space: normal; }
  .tr-track {
    position: relative;
    inset: auto;
    flex-direction: column;
    width: 100%;
    height: auto;
    transform: none !important;
  }
  .tr-panel {
    width: 100%;
    height: auto;
    grid-template-columns: 1fr;
    flex: 0 0 auto;
  }
  .tr-visual { order: -1; height: 56vh; }
  .tr-content { padding: 40px 20px 60px; overflow-y: visible; }
  .tr-count { position: static; margin-top: 30px; }
  .tr-hint { display: none; }
}
