/* ============================================================
   GUÍA DE MOVILIDAD — Hoja de estilos
   Estética: institucional, sobria, tipografía editorial
   ============================================================ */

:root {
  /* Paleta institucional: azul profundo + crema + acentos */
  --ink: #0f1923;
  --ink-soft: #2a3744;
  --paper: #f5f1ea;
  --paper-warm: #ebe5d8;
  --paper-deep: #e0d8c4;
  --primary: #0a3d62;
  --primary-dark: #07304d;
  --primary-soft: #1c5a86;
  --accent: #b8341e;
  --accent-soft: #d4523a;
  --gold: #c8a04a;
  --muted: #6b7785;
  --line: #c9c0ac;
  --line-soft: #ddd5c0;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 25, 35, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 25, 35, 0.08);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --radius: 4px;
  --radius-lg: 8px;

  --max: 1180px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Topbar institucional ---------- */
.topbar {
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--gold);
}
.topbar__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 24px;
}
.topbar__dot {
  width: 7px; height: 7px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background-color: rgba(245, 241, 234, 0.95);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--primary);
}
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
}
.brand__title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand__subtitle {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 28px;
  align-items: center;
}
.nav-list a {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.nav-list a:hover {
  color: var(--primary);
  border-bottom-color: var(--gold);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 80px 0 100px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at top left, rgba(10, 61, 98, 0.06), transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(200, 160, 74, 0.08), transparent 60%),
    var(--paper);
}
.hero__pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(15, 25, 35, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 25, 35, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
.hero__inner {
  position: relative;
  max-width: 880px;
  z-index: 2;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 28px;
}
.hero__badge-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 24px;
}
.hero__title--accent {
  font-style: italic;
  color: var(--primary);
  position: relative;
  display: inline-block;
}
.hero__title--accent::after {
  content: "";
  position: absolute;
  bottom: 4px; left: 0; right: 0;
  height: 6px;
  background: var(--gold);
  opacity: 0.4;
  z-index: -1;
}

.hero__lead {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 680px;
  margin-bottom: 36px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: var(--radius);
  transition: transform 0.15s, background 0.2s, color 0.2s;
}
.btn--primary {
  background: var(--primary);
  color: var(--white);
  border: 1px solid var(--primary);
}
.btn--primary:hover {
  background: var(--primary-dark);
  text-decoration: none;
  transform: translateY(-1px);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.hero__stats > div { display: flex; flex-direction: column; }
.hero__stats dt {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.hero__stats dd {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* ---------- Transparency banner ---------- */
.transparency {
  background: var(--ink);
  color: var(--paper);
  padding: 32px 0;
  border-top: 4px solid var(--gold);
}
.transparency__inner {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}
.transparency__icon {
  color: var(--gold);
  flex-shrink: 0;
}
.transparency__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
}
.transparency p { font-size: 15px; line-height: 1.6; }
.transparency strong { color: var(--gold); font-weight: 600; }

/* ---------- Section heads ---------- */
.section-head {
  max-width: 720px;
  margin-bottom: 56px;
}
.section-head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-head__kicker {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent);
}
.section-head__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 16px;
}
.section-head__lead {
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ---------- Sections grid ---------- */
.sections {
  padding: 100px 0;
  background: var(--paper-warm);
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: var(--primary-soft);
  box-shadow: var(--shadow-md);
}
.card__head {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  text-align: left;
}
.card__num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.04em;
}
.card__title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.25;
}
.card__chevron {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 18px;
  font-weight: 400;
  color: var(--ink);
  transition: transform 0.25s, background 0.2s;
  font-family: var(--font-mono);
}
.card[data-open="true"] .card__chevron {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  transform: rotate(45deg);
}
.card[data-open="true"] {
  border-color: var(--primary);
  background: var(--white);
}
.card__body {
  padding: 0 22px 22px 22px;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.65;
  border-top: 1px solid var(--line-soft);
  padding-top: 18px;
  animation: cardOpen 0.3s ease;
}
@keyframes cardOpen {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.card__body p + p { margin-top: 12px; }
.card__body ul {
  margin-top: 10px;
  padding-left: 22px;
}
.card__body li { margin-bottom: 6px; }
.card__body strong { color: var(--ink); font-weight: 600; }

/* ---------- Tools ---------- */
.tools {
  padding: 100px 0;
  background: var(--paper);
}
.tools__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.tool {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.tool__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.tool__desc {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}
.tool__field {
  margin-bottom: 14px;
}
.tool__field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.tool__field input {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
}
.tool__field input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}
.tool__result {
  display: block;
  margin-top: 18px;
  padding: 16px;
  background: var(--paper-warm);
  border-left: 3px solid var(--gold);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--primary);
}

/* Quiz */
.quiz__q {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 14px;
  min-height: 50px;
}
.quiz__opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.quiz__opt {
  padding: 10px 14px;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--ink-soft);
  transition: all 0.15s;
}
.quiz__opt:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.quiz__opt.is-correct {
  background: #e8f0e8;
  border-color: #5a8a5a;
  color: #2d4f2d;
}
.quiz__opt.is-wrong {
  background: #f5e5e2;
  border-color: var(--accent);
  color: var(--accent);
}
.quiz__feedback {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
  min-height: 20px;
}
.quiz__progress {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.quiz__final {
  text-align: center;
  padding: 20px 0;
}
.quiz__score {
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--primary);
  font-weight: 600;
}

/* Comparador */
.compare {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.compare__opt {
  padding: 8px 14px;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--paper);
  transition: all 0.15s;
}
.compare__opt:hover {
  border-color: var(--primary);
}
.compare__opt.is-active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.compare__panel {
  background: var(--paper-warm);
  border-radius: var(--radius);
  padding: 18px;
}
.compare__panel div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}
.compare__panel div:last-child { border-bottom: 0; }
.compare__panel dt {
  font-weight: 600;
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.compare__panel dd { color: var(--ink-soft); }

/* ---------- Glossary ---------- */
.glossary {
  padding: 100px 0;
  background: var(--paper-deep);
}
.glossary__search {
  max-width: 480px;
  margin: 0 auto 40px;
  position: relative;
}
.glossary__search input {
  width: 100%;
  padding: 14px 20px;
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
}
.glossary__search input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.glossary__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.term {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: all 0.2s;
}
.term:hover {
  background: var(--white);
  border-color: var(--primary-soft);
  transform: translateY(-2px);
}
.term__name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.term__def {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.glossary__empty {
  text-align: center;
  font-style: italic;
  color: var(--muted);
  padding: 32px;
}

/* ---------- About ---------- */
.about {
  padding: 100px 0;
  background: var(--ink);
  color: var(--paper);
}
.about__inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
  align-items: start;
}
.about__col .section-head__kicker {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.about__col .section-head__title {
  color: var(--paper);
}
.about__col p {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(245, 241, 234, 0.85);
  margin-bottom: 16px;
}
.about__principles {
  background: var(--primary-dark);
  border-left: 3px solid var(--gold);
  padding: 32px;
  border-radius: var(--radius);
}
.about__principles h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--gold);
}
.about__principles ol {
  padding-left: 22px;
}
.about__principles li {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 10px;
  color: rgba(245, 241, 234, 0.9);
}

/* ---------- Disclaimer ---------- */
.disclaimer {
  padding: 100px 0;
  background: var(--paper);
  border-top: 4px solid var(--gold);
}
.disclaimer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.disclaimer__item {
  background: var(--paper);
  padding: 26px;
  transition: background 0.2s;
}
.disclaimer__item:hover {
  background: var(--white);
}
.disclaimer__item h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}
.disclaimer__item p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.disclaimer__item strong {
  color: var(--ink);
  font-weight: 600;
}
.disclaimer__final {
  margin-top: 40px;
  text-align: center;
  padding: 28px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
}
.disclaimer__final p {
  font-family: var(--font-display);
  font-size: 18px;
  font-style: italic;
  font-weight: 500;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 60px 0 30px;
  border-top: 1px solid var(--primary-dark);
}
.site-footer__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--primary-dark);
}
.site-footer__col h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.site-footer__brand {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--paper);
  margin-bottom: 8px;
}
.site-footer__desc {
  font-size: 13px;
  color: rgba(245, 241, 234, 0.7);
  line-height: 1.5;
}
.site-footer__col ul { list-style: none; }
.site-footer__col li { margin-bottom: 8px; }
.site-footer__col a {
  color: rgba(245, 241, 234, 0.75);
  font-size: 14px;
}
.site-footer__col a:hover { color: var(--gold); }
.site-footer__col p {
  font-size: 13px;
  color: rgba(245, 241, 234, 0.7);
  line-height: 1.5;
  margin-bottom: 6px;
}
.site-footer__domain {
  font-family: var(--font-mono);
  color: var(--gold) !important;
  font-size: 12px !important;
  margin-top: 8px;
}

/* ---------- Back-to-top ---------- */
.back-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.2s;
  z-index: 50;
}
.back-top:hover {
  background: var(--primary-dark);
  text-decoration: none;
  transform: translateY(-2px);
}
.back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .about__inner { grid-template-columns: 1fr; gap: 32px; }
  .nav-toggle { display: flex; }
  .nav-list {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px;
    display: none;
    box-shadow: var(--shadow-md);
  }
  .nav-list.is-open { display: flex; }
  .nav-list li { width: 100%; }
  .nav-list a {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--line-soft);
  }
}
@media (max-width: 560px) {
  .hero { padding: 56px 0 72px; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .sections, .tools, .glossary, .about, .disclaimer { padding: 64px 0; }
  .transparency__inner { flex-direction: column; gap: 12px; }
  .topbar__inner { font-size: 12px; }
  .card__head { padding: 16px; gap: 12px; }
  .card__body { padding: 16px; padding-top: 14px; }
}