/* ZM Webs · Línea ZM
   Paleta: concreto de andén, tinta azul noche, rosa mexicano como color de línea.
   Una sola familia (Archivo) jugando con el ancho: expandida para letreros, normal para texto. */

:root {
  --bg: #E9EBEE;
  --panel: #FFFFFF;
  --ink: #16202E;
  --muted: #566173;
  --rule: #CDD2D9;
  --line: #D6246E;      /* Línea ZM */
  --line-ink: #FFFFFF;
  --teal: #0E8A7E;      /* correspondencia: webs */
  --amber: #E9A100;     /* correspondencia: pilotos / tablero */
  --blue: #2D5BD7;      /* correspondencia: productos */
  --board: #16202E;
  --board-ink: #F4B21B;
  --focus: #2D5BD7;
  --radius-s: 6px;
  --radius-m: 14px;
  --radius-pill: 999px;
  --rail-w: 168px;
  --header-h: 64px;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1620;
    --panel: #18222F;
    --ink: #EEF1F5;
    --muted: #A3ADBC;
    --rule: #2A3646;
    --line: #F0418A;
    --teal: #2BB5A6;
    --amber: #F4B21B;
    --blue: #6E92F2;
    --board: #0A0F16;
    --focus: #8FB0FF;
    color-scheme: dark;
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img, svg { display: block; }
h1, h2, h3, p { margin: 0; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: var(--radius-s);
}
.skip:focus { top: 12px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  background: var(--line); color: var(--line-ink);
  border: 2px solid var(--line); border-radius: var(--radius-pill);
  font-weight: 650; font-stretch: 105%; text-decoration: none;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 15px; }
.text-link {
  color: var(--ink); font-weight: 600;
  text-decoration: underline; text-decoration-color: var(--line);
  text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  display: flex; align-items: center; gap: 20px;
  padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-stretch: 115%; }
.brand-dot, .line-bullet {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--line); color: var(--line-ink);
  font-size: 13px; font-weight: 800; font-stretch: 100%; letter-spacing: .02em;
}
.topnav { display: flex; gap: 22px; margin-left: 12px; }
.topnav a { text-decoration: none; color: var(--muted); font-weight: 550; }
.topnav a:hover { color: var(--ink); }
.serie-pill {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 5px 14px 5px 5px; border-radius: var(--radius-pill);
  background: var(--panel); border: 1px solid var(--rule);
  text-decoration: none; font-size: 14px;
}
.pill-day {
  background: var(--ink); color: var(--bg);
  border-radius: var(--radius-pill); padding: 3px 10px;
  font-weight: 700; font-stretch: 110%;
}
.pill-text { color: var(--muted); }
.mini-line { display: none; }

/* ---------- Línea lateral ---------- */
.rail {
  position: fixed; z-index: 30;
  top: calc(var(--header-h) + 32px); bottom: 32px; left: 24px;
  width: var(--rail-w);
}
.rail-line {
  position: absolute; left: 11px; top: 6px; bottom: 6px; width: 8px;
  border-radius: 8px; background: var(--line);
}
.rail-train {
  position: absolute; left: 4px; top: 0; z-index: 2;
  width: 22px; height: 40px; border-radius: 11px;
  background: var(--ink); border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--ink);
  transform: translateY(var(--train-y, 0px));
  transition: transform .25s ease-out;
}
.rail-train::before, .rail-train::after {
  content: ""; position: absolute; left: 50%; width: 6px; height: 6px; margin-left: -3px;
  border-radius: 50%; background: var(--board-ink);
}
.rail-train::before { top: 6px; }
.rail-train::after { bottom: 6px; }
@media (prefers-reduced-motion: reduce) { .rail-train { transition: none; } }
.rail-stops {
  list-style: none; margin: 0; padding: 0;
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: space-between;
}
.rail-stops a {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 600;
}
.stop-dot {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: var(--bg); border: 6px solid var(--line);
  position: relative; z-index: 1;
}
.rail-stops a[aria-current="true"] { color: var(--ink); }
.rail-stops a[aria-current="true"] .stop-name { font-weight: 800; font-stretch: 112%; }
.rail-stops a:hover { color: var(--ink); }

/* ---------- Contenido principal ---------- */
main {
  margin-left: calc(var(--rail-w) + 48px);
  margin-right: 24px;
  max-width: 1080px;
}
.station { padding: 88px 0 72px; border-bottom: 1px solid var(--rule); }

.station-sign { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.sign-icon {
  flex: none; width: 52px; height: 52px; border-radius: 50%;
  background: var(--ink); display: grid; place-items: center;
}
.sign-icon svg { width: 28px; height: 28px; fill: none; stroke: var(--bg); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.sign-icon svg .fill { fill: var(--bg); stroke: none; }
.station-sign h2 {
  font-size: clamp(28px, 3.6vw, 44px); line-height: 1.08;
  font-weight: 800; font-stretch: 118%; letter-spacing: -.01em;
  max-width: 22ch;
}
.section-lead { max-width: 62ch; color: var(--muted); font-size: 19px; }
.sub { margin: 56px 0 18px; font-size: 22px; font-weight: 750; font-stretch: 110%; }
.note { margin-top: 18px; color: var(--muted); font-size: 15px; max-width: 70ch; }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 48px; align-items: center;
  padding-top: 64px; min-height: calc(100svh - var(--header-h));
}
.line-sign { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--muted); }
.hero h1 {
  margin-top: 22px;
  font-size: clamp(44px, 6.2vw, 86px); line-height: .98;
  font-weight: 850; font-stretch: 122%; letter-spacing: -.02em;
  max-width: 13ch;
}
.lead { margin-top: 24px; font-size: 20px; max-width: 46ch; color: var(--muted); }
.plan-link {
  display: inline-block; margin-top: 22px;
  font-weight: 650; text-decoration: underline;
  text-decoration-color: var(--line); text-decoration-thickness: 2px; text-underline-offset: 4px;
}

/* Tablero de salidas */
.board {
  background: var(--board); color: #E9EDF3;
  border-radius: var(--radius-m); padding: 20px 20px 16px;
  box-shadow: 0 30px 60px -30px rgba(22, 32, 46, .55);
}
.board-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 12px; border-bottom: 2px solid rgba(255,255,255,.12);
  color: var(--board-ink); font-weight: 800; font-stretch: 115%; font-size: 18px;
}
.board-clock { font-variant-numeric: tabular-nums; font-stretch: 100%; }
.board table { width: 100%; border-collapse: collapse; margin-top: 4px; font-size: 15px; }
.board th {
  text-align: left; font-weight: 500; color: rgba(233,237,243,.55);
  font-size: 13px; padding: 10px 0 6px;
}
.board td {
  padding: 11px 0; border-top: 1px solid rgba(255,255,255,.08);
  font-variant-numeric: tabular-nums;
}
.board td:nth-child(2), .board th:nth-child(2) { padding-left: 10px; }
.board td:last-child, .board th:last-child { text-align: right; }
.board tr.is-next td { color: var(--board-ink); font-weight: 700; }
.board tr.is-next td:first-child::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px;
  border-radius: 50%; background: var(--board-ink); vertical-align: 1px;
  animation: blink 1.6s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .board tr.is-next td:first-child::before { animation: none; } }
.board-foot { margin-top: 10px; font-size: 13px; color: rgba(233,237,243,.55); }

/* ---------- Serie: recorrido de 13 paradas ---------- */
.track {
  margin-top: 40px;
  display: grid; grid-template-columns: repeat(13, minmax(0, 1fr));
  position: relative;
}
.track::before {
  content: ""; position: absolute; left: calc(100% / 26); right: calc(100% / 26);
  top: 15px; height: 6px; border-radius: 6px; background: var(--rule);
}
.track::after {
  content: ""; position: absolute; left: calc(100% / 26);
  top: 15px; height: 6px; border-radius: 6px; background: var(--line);
  width: var(--progress, 0%);
}
.track-stop { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; }
.track-dot {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg); border: 5px solid var(--rule);
  font-size: 12px; font-weight: 800; color: var(--muted);
}
.track-stop.is-done .track-dot { border-color: var(--line); background: var(--line); color: var(--line-ink); }
.track-stop.is-next .track-dot { border-color: var(--line); color: var(--ink); }
.track-label { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.25; max-width: 9ch; }
.track-stop.is-done .track-label { color: var(--ink); font-weight: 600; }
.track-status { margin-top: 24px; font-weight: 600; }

/* ---------- Proyectos: correspondencias ---------- */
.transfers { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.transfer {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 16px 0 8px;
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--rule); border-radius: var(--radius-pill);
  font: inherit; font-weight: 600; font-size: 15px; cursor: pointer;
}
.transfer .t-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--c); }
.transfer .t-count { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.transfer[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.transfer[aria-selected="true"] .t-count { color: inherit; opacity: .7; }

.transfer-panel {
  margin-top: 18px; padding: 24px;
  background: var(--panel); border-radius: var(--radius-m);
  border-left: 8px solid var(--c, var(--line));
  min-height: 160px;
}
.project-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.project {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--rule);
}
.project:last-child { border-bottom: 0; }
.project-name { font-size: 20px; font-weight: 750; font-stretch: 110%; }
.project-meta { color: var(--muted); font-size: 15px; }
.project-tag {
  justify-self: end; font-size: 13px; font-weight: 650;
  padding: 3px 10px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--c, var(--ink));
}
.project-links { grid-column: 1 / -1; display: flex; gap: 18px; }
.empty { display: grid; gap: 14px; justify-items: start; max-width: 56ch; }
.empty p { color: var(--muted); }

/* ---------- Boleto web mensual ---------- */
.ticket {
  margin-top: 28px;
  display: grid; grid-template-columns: minmax(0, 1fr) 150px;
  background: var(--panel); border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: inset 0 0 0 2px var(--line);
}
.ticket-main { padding: 32px; display: grid; gap: 14px; justify-items: start; }
.ticket-main > p:not(.ticket-kind):not(.ticket-price) { max-width: 52ch; color: var(--muted); }
.ticket-kind { font-weight: 700; color: var(--line); font-stretch: 112%; }
.ticket-price { font-size: 22px; font-weight: 600; }
.ticket-price .amount { font-size: clamp(56px, 7vw, 84px); line-height: 1; font-weight: 850; font-stretch: 120%; letter-spacing: -.02em; }
.ticket-stub {
  position: relative;
  background: var(--line); color: var(--line-ink);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
  font-weight: 800; font-stretch: 115%;
}
.ticket-stub span:first-child { font-size: 28px; }
.ticket-stub::before {
  content: ""; position: absolute; left: -1px; top: 10px; bottom: 10px; width: 2px;
  background-image: radial-gradient(circle, var(--panel) 2px, transparent 2.5px);
  background-size: 2px 12px;
}

.includes { margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.includes h3 { font-size: 20px; font-weight: 750; font-stretch: 110%; margin-bottom: 14px; }
.check, .cross { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check li, .cross li { position: relative; padding-left: 30px; }
.check li::before, .cross li::before {
  content: ""; position: absolute; left: 0; top: 5px; width: 18px; height: 18px; border-radius: 50%;
}
.check li::before { background: var(--teal); box-shadow: inset 0 0 0 5px var(--teal), inset 0 0 0 9px var(--panel); }
.cross li { color: var(--muted); }
.cross li::before { border: 2px solid var(--muted); background: linear-gradient(135deg, transparent 45%, var(--muted) 45% 55%, transparent 55%); }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.steps::before { content: ""; position: absolute; left: 18px; right: 18px; top: 17px; height: 4px; background: var(--line); border-radius: 4px; }
.steps li { counter-increment: step; position: relative; padding: 52px 18px 0 0; color: var(--muted); font-size: 16px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); border: 4px solid var(--line); color: var(--ink); font-weight: 800;
}
.steps strong { display: block; color: var(--ink); margin-bottom: 4px; }

/* Tarifario */
.fares { display: grid; border-top: 2px solid var(--ink); }
.fare {
  display: grid; grid-template-columns: minmax(0, 1fr) 200px 90px; gap: 20px; align-items: center;
  padding: 18px 0; border-bottom: 1px solid var(--rule);
}
.fare-name { font-weight: 750; font-size: 18px; }
.fare-desc { color: var(--muted); font-size: 15px; max-width: 56ch; }
.fare-price { font-weight: 750; font-variant-numeric: tabular-nums; text-align: right; }
.fare-price small { display: block; font-weight: 500; color: var(--muted); font-size: 13px; }
.fare > div:last-child { text-align: right; }

/* Pilotos */
.pilot {
  margin-top: 48px; padding: 28px;
  border-radius: var(--radius-m);
  background: color-mix(in srgb, var(--amber) 16%, var(--panel));
  border-left: 8px solid var(--amber);
  display: grid; gap: 14px; justify-items: start;
}
.pilot h3 { font-size: 22px; font-weight: 800; font-stretch: 112%; }
.pilot p { max-width: 62ch; }
.pilot-prices { list-style: none; margin: 4px 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pilot-prices li { background: var(--panel); border-radius: var(--radius-s); padding: 10px 14px; display: grid; }
.pilot-prices span { font-size: 13px; color: var(--muted); }
.pilot-prices b { font-size: 20px; font-variant-numeric: tabular-nums; }

/* ---------- Preguntas ---------- */
.faq { margin-top: 24px; max-width: 820px; border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
  padding: 20px 0; font-weight: 700; font-size: 19px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--ink);
  background:
    linear-gradient(var(--ink), var(--ink)) center / 10px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 10px no-repeat;
}
.faq details[open] summary::after { background: linear-gradient(var(--ink), var(--ink)) center / 10px 2px no-repeat; }
.faq details p { padding: 0 0 22px; color: var(--muted); max-width: 64ch; }

/* ---------- Contacto ---------- */
.terminal { border-bottom: 0; }
.contact-grid { margin-top: 32px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.contact-main, .contact-mail {
  border-radius: var(--radius-m); padding: 28px;
  display: grid; gap: 6px; align-content: start;
}
.contact-main { background: var(--line); color: var(--line-ink); text-decoration: none; transition: transform .15s ease; }
.contact-main:hover { transform: translateY(-2px); }
.contact-main strong { font-size: clamp(28px, 3.4vw, 40px); font-weight: 850; font-stretch: 115%; font-variant-numeric: tabular-nums; }
.contact-mail { background: var(--panel); }
.contact-mail span, .contact-main span { font-weight: 600; }
.contact-mail span { color: var(--muted); }
.contact-mail strong { font-size: 22px; word-break: break-all; }
.copy {
  justify-self: start; margin-top: 8px;
  min-height: 40px; padding: 0 16px; border-radius: var(--radius-pill);
  background: transparent; color: var(--ink); border: 2px solid var(--ink);
  font: inherit; font-weight: 650; font-size: 15px; cursor: pointer;
}

/* ---------- Footer ---------- */
.footer { margin-left: calc(var(--rail-w) + 48px); margin-right: 24px; max-width: 1080px; padding: 0 0 56px; }
.footer-line { height: 8px; border-radius: 8px; background: var(--line); margin-bottom: 36px; }
.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-cols nav { display: grid; gap: 8px; align-content: start; }
.footer-cols a { color: var(--muted); text-decoration: none; }
.footer-cols a:hover { color: var(--ink); }
.footer-brand { font-weight: 850; font-stretch: 118%; font-size: 22px; margin-bottom: 6px; }
.footer-cols > div p:not(.footer-brand) { color: var(--muted); max-width: 36ch; }
.footer-title { font-weight: 700; margin-bottom: 4px; }
.footer-legal { margin-top: 40px; font-size: 14px; color: var(--muted); }

.dock { display: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .topnav { display: none; }
}

@media (max-width: 900px) {
  :root { --header-h: 60px; }
  body { font-size: 16px; padding-bottom: 76px; }
  .topbar { padding: 0 16px; gap: 12px; }
  .brand-name { display: none; }
  .serie-pill { margin-left: 0; flex: 1; min-width: 0; }
  .pill-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mini-line {
    display: block; position: absolute; left: 0; right: 0; bottom: -1px; height: 4px;
    background: color-mix(in srgb, var(--line) 25%, transparent);
  }
  .mini-train { display: block; height: 100%; width: var(--mini-progress, 0%); background: var(--line); }

  .rail { display: none; }
  main, .footer { margin-left: 16px; margin-right: 16px; }

  .station { padding: 56px 0 48px; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 40px; gap: 36px; }
  .hero h1 { font-size: clamp(40px, 11vw, 60px); }
  .lead { font-size: 18px; }
  .actions .btn { flex: 1 1 100%; }

  .track { grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 22px; }
  .track::before, .track::after { display: none; }

  .ticket { grid-template-columns: 1fr; }
  .ticket-main { padding: 24px; }
  .ticket-stub { flex-direction: row; justify-content: space-between; padding: 14px 24px; }
  .ticket-stub span:first-child { font-size: 20px; }
  .ticket-stub::before { left: 10px; right: 10px; top: -1px; bottom: auto; width: auto; height: 2px; background-size: 12px 2px; }

  .includes { grid-template-columns: 1fr; gap: 32px; }
  .steps { grid-template-columns: 1fr; gap: 22px; }
  .steps::before { left: 17px; right: auto; top: 18px; bottom: 18px; width: 4px; height: auto; }
  .steps li { padding: 4px 0 0 56px; }

  .fare { grid-template-columns: minmax(0, 1fr) auto; }
  .fare > div:first-child { grid-column: 1 / -1; }
  .fare-price { text-align: left; }

  .contact-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-cols > div:first-child { grid-column: 1 / -1; }

  .dock {
    display: flex; position: fixed; z-index: 50; left: 10px; right: 10px; bottom: 10px;
    padding: 6px; gap: 4px;
    background: var(--ink); border-radius: var(--radius-pill);
    box-shadow: 0 12px 30px -10px rgba(0,0,0,.5);
  }
  .dock a {
    flex: 1; display: grid; place-items: center; min-height: 46px;
    color: var(--bg); text-decoration: none; font-size: 13px; font-weight: 650;
    border-radius: var(--radius-pill);
  }
  .dock a[aria-current="true"] { background: color-mix(in srgb, var(--bg) 16%, transparent); }
  .dock .dock-cta { background: var(--line); color: var(--line-ink); flex: 1.3; }
}

@media (max-width: 420px) {
  .btn-small { display: none; }
}
