/* ============ Estación Juramento — Línea D ============ */
:root {
  --bg: #0b1116;
  --bg-soft: #101a22;
  --panel: #141f29;
  --panel-2: #182633;
  --line: #24384a;
  --text: #e9f1f5;
  --muted: #94a9b8;
  --green: #00a951;
  --green-bright: #33d17a;
  --green-soft: rgba(0, 169, 81, 0.14);
  --gold: #e8b13c;
  --red: #e05252;
  --radius: 16px;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  font-size: 16.5px;
}

img { max-width: 100%; display: block; }

a { color: var(--green-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 22px; }

/* ---------- Barra de progreso ---------- */
#progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--green), var(--green-bright));
  z-index: 1000;
}

/* ---------- Navegación ---------- */
.nav {
  position: sticky; top: 0; z-index: 900;
  background: rgba(11, 17, 22, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; gap: 14px;
  max-width: var(--max); margin: 0 auto; padding: 10px 22px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; letter-spacing: 0.2px; white-space: nowrap;
  color: var(--text);
}
.nav-logo:hover { text-decoration: none; }
.badge-d {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--green); color: #04160c;
  font-weight: 900; font-size: 1.05rem;
}
.nav-links {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  color: var(--muted); font-size: 0.86rem; font-weight: 600;
  padding: 7px 11px; border-radius: 999px; white-space: nowrap;
}
.nav-links a:hover { color: var(--text); text-decoration: none; background: var(--panel); }
.nav-links a.active { color: #04160c; background: var(--green-bright); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: #0a0f13;
}
.hero-bg {
  position: absolute; inset: 0;
  background: url("assets/hero-vestibulo.jpg") center 38% / cover no-repeat;
  opacity: 0.38;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,15,19,0.55) 0%, rgba(10,15,19,0.25) 45%, var(--bg) 100%);
}
.hero-inner {
  position: relative; z-index: 1;
  padding: 84px 0 46px;
  text-align: center;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--green-bright);
  border: 1px solid rgba(51, 209, 122, 0.4);
  background: rgba(4, 22, 12, 0.55);
  padding: 8px 16px; border-radius: 999px;
}
.hero h1 {
  margin: 22px 0 10px;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.05; font-weight: 850; letter-spacing: -1.5px;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}
.hero h1 .thin { display: block; font-size: 0.42em; font-weight: 600; letter-spacing: 0.5px; color: var(--muted); margin-bottom: 8px; }
.hero-sub {
  max-width: 720px; margin: 0 auto;
  color: #c6d4de; font-size: 1.06rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.7);
}
.hero-stats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px;
  margin: 40px auto 0; max-width: 980px;
}
.stat {
  background: rgba(16, 26, 34, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 22px; min-width: 128px;
  text-align: center;
}
.stat b {
  display: block; font-size: 1.7rem; font-weight: 800;
  color: var(--green-bright); letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}
.stat span { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }

/* Línea de metro decorativa */
.metro-line { position: relative; z-index: 1; padding: 26px 0 40px; }
.metro-track { display: flex; align-items: center; }
.metro-rail { flex: 1; height: 6px; background: var(--green); border-radius: 3px; }
.metro-stop { position: relative; width: 16px; height: 16px; border-radius: 50%; background: #0b1116; border: 3px solid var(--muted); flex: none; }
.metro-stop.major { width: 22px; height: 22px; border-color: var(--green-bright); background: var(--green-bright); box-shadow: 0 0 0 6px rgba(51,209,122,0.18); }
.metro-label {
  position: absolute; top: 26px; left: 50%; transform: translateX(-50%);
  font-size: 0.72rem; color: var(--muted); white-space: nowrap;
}
.metro-label b { color: var(--green-bright); font-size: 0.78rem; }

/* ---------- Secciones ---------- */
section { padding: 64px 0; }
section + section { border-top: 1px solid rgba(36, 56, 74, 0.55); }
.kicker {
  color: var(--green-bright); font-size: 0.8rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 2.5px; margin: 0 0 10px;
}
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 820; letter-spacing: -0.6px; margin: 0 0 14px; line-height: 1.15; }
h3 { font-size: 1.15rem; font-weight: 750; margin: 26px 0 10px; }
.lead { color: #c6d4de; max-width: 800px; font-size: 1.03rem; }
p { color: #c3d0da; }
strong { color: var(--text); }

/* ---------- Tarjetas ---------- */
.grid { display: grid; gap: 18px; margin-top: 30px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-3px); border-color: rgba(51, 209, 122, 0.45); }
.card .icon { font-size: 1.7rem; margin-bottom: 10px; }
.card h4 { margin: 0 0 8px; font-size: 1.02rem; font-weight: 750; }
.card p { margin: 0; font-size: 0.92rem; color: var(--muted); }

.fact-strip {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px;
}
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 15px;
  font-size: 0.85rem; color: #c9d6df;
}
.chip b { color: var(--green-bright); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chips .chip { font-weight: 700; color: var(--text); }

/* ---------- Timeline ---------- */
.timeline-wrap { overflow-x: auto; padding: 30px 4px 10px; scrollbar-width: thin; }
.timeline {
  display: flex; gap: 0; position: relative; min-width: 860px;
  padding-bottom: 40px;
}
.timeline::before {
  content: ""; position: absolute; left: 0; right: 0; top: 7px;
  height: 4px; background: var(--line); border-radius: 2px;
}
.tl-item { flex: 1; position: relative; padding: 30px 16px 0 16px; }
.tl-item::before {
  content: ""; position: absolute; top: 0; left: 16px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg); border: 4px solid var(--muted);
}
.tl-item.year { flex: 0 0 40px; }
.tl-item.hit::before { border-color: var(--green-bright); background: var(--green-bright); box-shadow: 0 0 0 6px var(--green-soft); }
.tl-year { font-weight: 850; font-size: 1.15rem; color: var(--text); }
.tl-item.hit .tl-year { color: var(--green-bright); }
.tl-text { font-size: 0.86rem; color: var(--muted); margin-top: 4px; }

/* ---------- Plano SVG ---------- */
.plan-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; margin-top: 28px; align-items: start; }
@media (max-width: 860px) { .plan-layout { grid-template-columns: 1fr; } }
.plan-box {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px;
}
.plan-box svg { width: 100%; height: auto; display: block; }
.plan-info {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
  position: sticky; top: 76px;
}
.plan-info h4 { margin: 0 0 8px; color: var(--green-bright); font-size: 1rem; }
.plan-info p { font-size: 0.92rem; margin: 0; }
.plan-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; font-size: 0.8rem; color: var(--muted); }
.plan-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.svg-boca { cursor: pointer; }
.svg-boca:focus { outline: 2px solid var(--green-bright); outline-offset: 2px; }
.svg-boca rect, .svg-boca circle { transition: fill 0.15s ease; }
.svg-boca:hover rect, .svg-boca:focus rect { fill: #1f3a2c; }
.svg-boca.selected rect { fill: #245c3e; stroke: var(--green-bright); }

/* ---------- Barras ---------- */
.bar-row { display: grid; grid-template-columns: 130px 1fr 64px; gap: 12px; align-items: center; margin: 12px 0; font-size: 0.88rem; }
.bar-row .bar-label { color: var(--muted); text-align: right; }
.bar-track { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; height: 26px; overflow: hidden; }
.bar-fill {
  height: 100%; width: 0; border-radius: 7px 0 0 7px;
  background: linear-gradient(90deg, var(--green), var(--green-bright));
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.bar-fill.hot { background: linear-gradient(90deg, #d98e2b, var(--gold)); }
.bar-fill.bad { background: linear-gradient(90deg, #a04040, var(--red)); }
.bar-val { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

.chart-note { font-size: 0.82rem; color: var(--muted); margin-top: 14px; }

/* ---------- Aviso / disclaimers ---------- */
.notice {
  border-left: 4px solid var(--gold);
  background: rgba(232, 177, 60, 0.08);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px; margin-top: 24px;
  font-size: 0.92rem; color: #d8cdb4;
}
.notice.green { border-color: var(--green-bright); background: var(--green-soft); color: #bfe6cf; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 26px 0 0; }
.tab-btn {
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 9px 18px; font-weight: 700; font-size: 0.88rem;
  cursor: pointer; transition: all 0.15s ease; font-family: inherit;
}
.tab-btn:hover { color: var(--text); border-color: var(--green); }
.tab-btn[aria-selected="true"] { background: var(--green); border-color: var(--green); color: #04160c; }
.tab-panel { display: none; margin-top: 20px; }
.tab-panel.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.flow-step {
  background: var(--panel-2); border: 1px solid var(--line);
  padding: 9px 14px; border-radius: 10px; font-size: 0.86rem; font-weight: 600;
}
.flow-arrow { color: var(--green-bright); font-weight: 900; }

/* ---------- Galería ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 28px; }
.gal-item {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); cursor: zoom-in; padding: 0; background: none;
  display: block; width: 100%;
}
.gal-item img { width: 100%; height: 210px; object-fit: cover; transition: transform 0.35s ease; }
.gal-item:hover img { transform: scale(1.05); }
.gal-cap {
  position: absolute; inset: auto 0 0 0;
  background: linear-gradient(180deg, transparent, rgba(5, 10, 8, 0.92));
  color: #fff; font-size: 0.82rem; padding: 26px 14px 12px; text-align: left;
}
.gal-cap b { color: var(--green-bright); }

dialog.lightbox {
  border: none; border-radius: var(--radius); padding: 0;
  background: var(--panel); max-width: min(920px, 94vw);
  color: var(--text);
}
dialog.lightbox::backdrop { background: rgba(4, 8, 11, 0.86); backdrop-filter: blur(4px); }
.lightbox img { width: 100%; max-height: 74vh; object-fit: contain; background: #0a0f13; }
.lightbox figcaption { padding: 14px 20px; font-size: 0.9rem; color: var(--muted); }
.lightbox .close-x {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: rgba(5,10,14,0.75); color: #fff; border: 1px solid var(--line);
  width: 38px; height: 38px; border-radius: 50%; font-size: 1.1rem; cursor: pointer;
}
.lightbox .close-x:hover { background: var(--red); }

/* ---------- Tablas ---------- */
.table-scroll { overflow-x: auto; margin-top: 24px; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 0.9rem; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: var(--panel-2); color: var(--text); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; }
tr:last-child td { border-bottom: none; }
td { color: #c3d0da; }
.col-hl { background: var(--green-soft); color: var(--text) !important; font-weight: 700; }
th.col-hl { color: var(--green-bright) !important; }
tbody tr:hover td:not(.col-hl) { background: rgba(36, 56, 74, 0.25); }

/* ---------- Puntuación con puntos ---------- */
.score-row { display: grid; grid-template-columns: minmax(180px, 260px) 1fr auto; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(36,56,74,0.5); }
.score-row:last-child { border-bottom: none; }
.score-name { font-size: 0.92rem; font-weight: 600; }
.score-dots { display: flex; gap: 6px; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line); }
.dot.on { background: var(--green-bright); border-color: var(--green-bright); }
.dot.on.mid { background: var(--gold); border-color: var(--gold); }
.dot.on.low { background: var(--red); border-color: var(--red); }
.score-label { font-size: 0.8rem; color: var(--muted); min-width: 90px; text-align: right; }
@media (max-width: 640px) {
  .score-row { grid-template-columns: 1fr; gap: 6px; }
  .score-label { text-align: left; }
}

/* ---------- Comparación proyección ---------- */
.proj { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; margin-top: 30px; }
@media (max-width: 720px) { .proj { grid-template-columns: 1fr; } }
.proj-card { text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 20px; }
.proj-card.big { border-color: var(--gold); background: rgba(232,177,60,0.06); }
.proj-card .num { font-size: 2.6rem; font-weight: 850; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.proj-card.big .num { color: var(--gold); }
.proj-card:not(.big) .num { color: var(--green-bright); }
.proj-card small { color: var(--muted); display: block; margin-top: 6px; font-size: 0.84rem; }
.proj-mid { text-align: center; color: var(--muted); font-size: 0.9rem; }
.proj-mid .pct { display: block; font-size: 2rem; font-weight: 850; color: var(--text); }
.proj-reviews { grid-template-columns: auto 1fr; gap: 26px; align-items: center; }
@media (max-width: 720px) { .proj-reviews { grid-template-columns: 1fr; } }

/* ---------- Quote ---------- */
blockquote.quote {
  margin: 30px 0 0; padding: 26px 30px;
  background: var(--panel); border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1.12rem; font-style: italic; color: #d5e0e8;
}
blockquote.quote footer { margin-top: 10px; font-size: 0.84rem; font-style: normal; color: var(--muted); }

/* ---------- Detalles / fuentes ---------- */
details.src { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0; margin-top: 24px; }
details.src summary { cursor: pointer; padding: 18px 22px; font-weight: 750; list-style: none; }
details.src summary::before { content: "▸ "; color: var(--green-bright); }
details.src[open] summary::before { content: "▾ "; }
details.src .src-body { padding: 0 22px 20px; }
.src-list { margin: 0; padding: 0 0 0 18px; font-size: 0.86rem; color: var(--muted); }
.src-list li { margin: 7px 0; }

/* ---------- Footer ---------- */
footer.site {
  border-top: 1px solid var(--line);
  padding: 40px 0 60px; text-align: center;
  color: var(--muted); font-size: 0.85rem;
}
footer.site .badge-d { width: 36px; height: 36px; font-size: 1.2rem; margin-bottom: 14px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
