/* ==========================================================================
   Pasaporte 2026 — Sistema de diseño "Estado Soberano"
   HTML5 + CSS puro. Sin frameworks, sin JavaScript.
   ========================================================================== */

/* --- Tokens de diseño ---------------------------------------------------- */
:root {
  --bg: #ffffff;
  --foreground: #161616;
  --card: #ffffff;
  --primary: #6b1f2b;
  --primary-foreground: #ffffff;
  --secondary: #f2f4f3;
  --secondary-foreground: #161616;
  --muted: #f4f5f4;
  --muted-foreground: #585858;
  --accent: #b8954e;
  --accent-foreground: #ffffff;
  --destructive: #b3261e;
  --border: #e4e4e4;
  --radius: 4px;

  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --container: 1280px;
  --pad-x: 20px;
}

@media (min-width: 1024px) {
  :root { --pad-x: 32px; }
}

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--foreground);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease;
}

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

ul, ol { list-style: none; }

button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* Focus visible accesible */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 1px;
}

/* --- Layout --------------------------------------------------------------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.section { padding-top: 64px; padding-bottom: 64px; }
@media (min-width: 1024px) { .section { padding-top: 96px; padding-bottom: 96px; } }

.bg-secondary { background: var(--secondary); }
.bg-primary { background: var(--primary); color: var(--primary-foreground); }
.text-muted { color: var(--muted-foreground); }
.text-accent { color: var(--accent); }
.text-primary { color: var(--primary); }

/* --- Guilloché rule ------------------------------------------------------- */
.rule-guilloche {
  height: 0.5px;
  background: linear-gradient(90deg, transparent 0%, rgba(184,149,78,.6) 20%, var(--accent) 50%, rgba(184,149,78,.6) 80%, transparent 100%);
  border: 0;
}

/* --- Heading accent ------------------------------------------------------- */
.heading-accent {
  border-left: 3px solid var(--primary);
  padding-left: 0.85rem;
}

/* --- Botones -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: var(--radius);
  transition: filter 0.2s ease, background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: scale(1.02); }
.btn-accent { background: var(--accent); color: var(--primary); }
.btn-accent:hover { filter: brightness(1.1); }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-outline { border: 1px solid rgba(255,255,255,.3); color: var(--primary-foreground); }
.btn-outline:hover { background: rgba(255,255,255,.1); }
.btn-lg { padding: 16px 28px; }

/* --- Header / Nav --------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 28px; height: 28px;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.875rem;
}
.brand-mark span { color: var(--primary-foreground); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-menu a {
  text-decoration: none;
  padding: 8px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  border-radius: 2px;
  transition: color 0.2s ease;
}
.nav-menu a:hover { color: var(--foreground); }
.nav-menu a.active { color: var(--primary); }

/* Mobile menu — pure CSS checkbox hack */
.nav-toggle { display: none; }
.nav-toggle-label {
  display: none;
  padding: 8px;
  color: var(--foreground);
  font-size: 1.5rem;
  line-height: 1;
}
@media (max-width: 1023px) {
  .nav-toggle-label { display: flex; align-items: center; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 12px 20px;
    gap: 4px;
  }
  .nav-menu a { padding: 12px; font-size: 1rem; }
  .nav-toggle:checked ~ .nav-menu { display: flex; }
  .nav-toggle:checked + .nav-toggle-label .icon-close { display: inline; }
  .nav-toggle:checked + .nav-toggle-label .icon-open { display: none; }
  .nav-toggle:not(:checked) + .nav-toggle-label .icon-close { display: none; }
}

/* --- Breadcrumbs --------------------------------------------------------- */
.breadcrumbs {
  padding-top: 40px;
  padding-bottom: 32px;
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}
.breadcrumbs a { text-decoration: none; color: var(--muted-foreground); }
.breadcrumbs a:hover { color: var(--foreground); }
.breadcrumbs li:last-child { color: var(--foreground); }
.breadcrumb-sep { color: var(--muted-foreground); }

/* --- Page header --------------------------------------------------------- */
.page-eyebrow {
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.page-title { font-size: clamp(2.25rem, 5vw, 3rem); line-height: 1.1; margin-bottom: 20px; }
.page-lead { font-size: 1.2rem; color: var(--muted-foreground); max-width: 56ch; line-height: 1.6; }
.page-header { margin-bottom: 48px; }

/* --- Content layout with TOC -------------------------------------------- */
.content-grid {
  display: grid;
  gap: 40px;
}
@media (min-width: 1024px) {
  .content-grid { grid-template-columns: 1fr 220px; }
  .toc-aside { position: sticky; top: 88px; align-self: start; }
}

.toc { }
.toc h2 {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted-foreground); margin-bottom: 14px;
}
.toc ol { display: flex; flex-direction: column; gap: 8px; }
.toc a {
  text-decoration: none; font-size: 0.875rem; color: var(--muted-foreground);
  display: block; padding-left: 12px; border-left: 2px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
}
.toc a:hover { color: var(--foreground); border-left-color: var(--accent); }

/* --- Sections ----------------------------------------------------------- */
section[id] { scroll-margin-top: 88px; }
.section-title { font-size: clamp(1.5rem, 3vw, 1.875rem); margin-bottom: 24px; }
.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.section-num { font-weight: 700; color: var(--accent); font-size: 1.5rem; }
.mb-block { margin-bottom: 64px; }

/* --- Cards / boxes ----------------------------------------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3 { color: var(--primary); margin-bottom: 8px; font-size: 1.0625rem; }
.card p { font-size: 0.9375rem; color: var(--muted-foreground); line-height: 1.6; }

.alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 20px; border-radius: var(--radius); font-size: 0.9375rem;
}
.alert-info { background: var(--secondary); }
.alert-warn { background: rgba(184,149,78,.08); border: 1px solid rgba(184,149,78,.3); }
.alert-danger { background: rgba(179,38,30,.05); border: 1px solid rgba(179,38,30,.3); }
.alert svg { flex-shrink: 0; margin-top: 2px; }

/* --- Grids ------------------------------------------------------------- */
.grid-2 { display: grid; gap: 20px; }
.grid-3 { display: grid; gap: 20px; }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* --- Lists with check marks ------------------------------------------- */
.checklist { display: flex; flex-direction: column; gap: 10px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist li::before {
  content: "✓";
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}
.steps { display: flex; flex-direction: column; gap: 20px; max-width: 56ch; }
.steps > li { }
.steps h3 { font-size: 1.125rem; margin-bottom: 8px; }
.steps p { color: var(--muted-foreground); }

/* --- Tables ------------------------------------------------------------ */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; text-align: left; border-collapse: collapse; }
caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
th, td { padding: 14px 20px; }
thead th { background: var(--secondary); font-weight: 600; font-size: 0.875rem; }
tbody tr { border-top: 1px solid var(--border); }
tbody tr:nth-child(even) { background: rgba(242,244,243,.5); }

/* Data-strip table (costos) */
.data-strip td { padding: 24px; width: 33.33%; vertical-align: middle; }
.data-strip .vig { font-weight: 600; font-size: 1.25rem; }
.data-strip .price { font-weight: 700; font-size: 1.5rem; color: var(--primary); }
.data-strip .disc { color: var(--accent); font-weight: 500; font-size: 1.125rem; }

/* --- FAQ accordion (pure HTML <details>) ------------------------------ */
.faq-section { margin-bottom: 64px; }
.faq-section h2 { font-size: 1.5rem; margin-bottom: 20px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
details.faq {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}
details.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--accent);
  font-weight: 300;
  flex-shrink: 0;
  transition: transform 0.2s;
}
details.faq[open] summary::after { content: "−"; }
details.faq .faq-a {
  padding: 0 20px 18px;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* --- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--primary);
  color: var(--primary-foreground);
}
.hero-inner {
  position: relative;
  display: grid;
  gap: 40px;
  padding-top: 80px;
  padding-bottom: 80px;
}
@media (min-width: 1024px) {
  .hero-inner { grid-template-columns: 7fr 5fr; padding-top: 112px; padding-bottom: 112px; }
}
.hero h1 { font-size: clamp(3rem, 8vw, 6rem); line-height: 0.95; font-weight: 700; }
.hero-lead { margin-top: 28px; font-size: 1.2rem; color: rgba(255,255,255,.85); max-width: 36ch; line-height: 1.6; }
.hero-eyebrow {
  color: var(--accent); font-size: 0.875rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.2em; margin-bottom: 20px;
}
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }

.quick-path-list { display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.quick-path {
  display: flex; align-items: center; gap: 20px;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.05);
  padding: 20px 24px;
  border-radius: var(--radius);
  color: var(--primary-foreground);
  transition: border-color 0.3s, background 0.3s;
}
.quick-path:hover { border-color: var(--accent); background: rgba(255,255,255,.1); }
.quick-path .qp-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: rgba(184,149,78,.15);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.quick-path .qp-title { font-weight: 600; font-size: 1.125rem; }
.quick-path .qp-desc { font-size: 0.875rem; color: rgba(255,255,255,.7); }
.quick-path .qp-arrow { color: var(--accent); margin-left: auto; }

/* --- Ticker (CSS marquee) ---------------------------------------------- */
.ticker-wrap {
  border-top: 1px solid rgba(255,255,255,.15);
  overflow: hidden;
}
.ticker {
  display: flex;
  white-space: nowrap;
  animation: ticker 40s linear infinite;
  padding: 12px 0;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: rgba(255,255,255,.6);
}
.ticker > span { display: inline-flex; }
.ticker-item { display: inline-flex; align-items: center; gap: 12px; margin: 0 32px; }
.ticker-item::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); display: inline-block; }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) { .ticker { animation: none; } }

/* --- Pillars grid ------------------------------------------------------ */
.pillars-grid {
  display: grid;
  gap: 1px;
  background: var(--border);
}
@media (min-width: 640px) { .pillars-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .pillars-grid { grid-template-columns: repeat(3, 1fr); } }
.pillar {
  background: var(--bg);
  padding: 32px;
  text-decoration: none;
  transition: background 0.2s;
}
.pillar:hover { background: var(--secondary); }
.pillar-icon {
  width: 48px; height: 48px;
  background: rgba(107,31,43,.08);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  margin-bottom: 20px;
}
.pillar h3 { font-size: 1.25rem; margin-bottom: 8px; }
.pillar p { font-size: 0.9375rem; color: var(--muted-foreground); line-height: 1.6; }
.pillar .pillar-link { color: var(--accent); font-size: 0.875rem; font-weight: 500; margin-top: 20px; display: inline-flex; align-items: center; gap: 6px; }

/* --- Stats ------------------------------------------------------------- */
.stats-grid { display: grid; gap: 32px; }
@media (min-width: 640px) { .stats-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { border-left: 2px solid var(--accent); padding-left: 20px; }
.stat-num { font-weight: 700; font-size: clamp(1.875rem, 3vw, 2.25rem); color: var(--primary); }
.stat-label { margin-top: 8px; font-size: 0.875rem; color: var(--muted-foreground); line-height: 1.5; }

/* --- Timeline (perdida-robo) ------------------------------------------ */
.timeline { position: relative; max-width: 56ch; }
.timeline::before {
  content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px;
  width: 1px; background: var(--border);
}
.timeline-item { display: flex; gap: 20px; padding-bottom: 32px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: relative; z-index: 1;
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 50%; background: var(--bg);
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.timeline-item h3 { font-size: 1.125rem; }
.timeline-item p { color: var(--muted-foreground); font-size: 0.9375rem; margin-top: 4px; }

/* --- Countries list (pasaporte electronico) --------------------------- */
.country-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.country-tab {
  padding: 8px 16px; font-size: 0.875rem; font-weight: 500;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); text-decoration: none; color: var(--foreground);
}
.country-tab.active, .country-tab:hover { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.country-list { display: grid; gap: 10px 32px; }
@media (min-width: 640px) { .country-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .country-list { grid-template-columns: repeat(3, 1fr); } }
.country-list li { display: flex; align-items: center; gap: 10px; }
.country-list li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

/* --- CTA banner -------------------------------------------------------- */
.cta-banner {
  display: flex; flex-direction: column; gap: 16px;
  background: var(--primary); color: var(--primary-foreground);
  padding: 32px; border-radius: var(--radius);
}
.cta-banner .cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 640px) { .cta-banner { flex-direction: row; align-items: center; justify-content: space-between; } }

/* --- Footer ------------------------------------------------------------ */
.site-footer {
  background: var(--primary); color: var(--primary-foreground);
  margin-top: 96px;
}
.footer-grid {
  display: grid; gap: 48px; padding: 56px 0;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 5fr 3fr 4fr; } }
.footer-brand { text-decoration: none; display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-brand .brand-mark { background: var(--accent); color: var(--primary); }
.footer-brand .brand-mark span { color: var(--primary); }
.footer-desc { font-size: 0.875rem; color: rgba(255,255,255,.8); line-height: 1.6; max-width: 42ch; }
.footer h2 { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 16px; }
.footer ul { display: flex; flex-direction: column; gap: 10px; }
.footer a { text-decoration: none; font-size: 0.875rem; color: rgba(255,255,255,.85); }
.footer a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding: 24px 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  font-size: 0.75rem; color: rgba(255,255,255,.6);
}

/* --- Utility ----------------------------------------------------------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.lead { font-size: 1.2rem; color: var(--muted-foreground); max-width: 56ch; line-height: 1.6; }
.muted { color: var(--muted-foreground); }
.fine { font-size: 0.75rem; color: var(--muted-foreground); margin-top: 12px; }
.split-12 { display: grid; gap: 40px; }
@media (min-width: 1024px) { .split-12 { grid-template-columns: 7fr 5fr; } }
.split-12-rev { display: grid; gap: 40px; }
@media (min-width: 1024px) { .split-12-rev { grid-template-columns: 5fr 7fr; } }

/* --- Comparador (primera vez vs renovación) --------------------------- */
.comparador-toggle { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.comparador-label {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 10px 16px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 0.875rem; font-weight: 600; margin-bottom: 20px; user-select: none;
  transition: background 0.2s, border-color 0.2s;
}
.comparador-label::before {
  content: ""; width: 16px; height: 16px; flex-shrink: 0;
  border: 1px solid var(--accent); border-radius: 3px; display: inline-block;
  transition: background 0.2s;
}
.comparador-label:hover { border-color: var(--accent); }
#solo-diferencias:checked + .comparador-label { background: var(--secondary); border-color: var(--primary); }
#solo-diferencias:checked + .comparador-label::before { background: var(--primary); border-color: var(--primary); box-shadow: inset 0 0 0 3px var(--bg); }

.comparador { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.comparador table { width: 100%; border-collapse: collapse; min-width: 640px; }
.comparador caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.comparador thead th {
  background: var(--secondary); font-weight: 600; font-size: 0.875rem; text-align: left;
  padding: 16px 20px; position: sticky; top: 0; z-index: 1;
}
.comparador thead th.col-pv { border-bottom: 3px solid var(--accent); }
.comparador thead th.col-rn { border-bottom: 3px solid var(--primary); }
.comparador tbody tr { border-top: 1px solid var(--border); }
.comparador tbody tr.diff { border-left: 3px solid var(--primary); background: rgba(107,31,43,.025); }
.comparador tbody th { text-align: left; padding: 14px 20px; font-weight: 600; font-size: 0.9375rem; background: rgba(242,244,243,.5); white-space: nowrap; }
.comparador tbody td { padding: 14px 20px; font-size: 0.9375rem; vertical-align: top; line-height: 1.5; }
.comparador .yes { color: var(--primary); font-weight: 600; }
.comparador .no { color: var(--muted-foreground); }
.comparador .maybe { color: var(--accent); font-weight: 600; }
.comparador .tag { display: inline-block; font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 8px; border-radius: 2px; margin-left: 8px; vertical-align: middle; }
.comparador .tag-diff { background: var(--primary); color: var(--primary-foreground); }
#solo-diferencias:checked ~ .comparador tr.same { display: none; }
.comparador-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; font-size: 0.8125rem; color: var(--muted-foreground); }
.comparador-legend span { display: inline-flex; align-items: center; gap: 6px; }
.comparador-legend .sw { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }