/* Routafy · sitio informativo. Sin fuentes ni scripts de terceros. */
:root {
  --green: #143f2c;
  --green-2: #1f6b47;
  --mint: #5cc994;
  --orange: #ff7a01;
  --orange-soft: #ffa24c;
  --bg: #f6f8f6;
  --surface: #ffffff;
  --ink: #0f1b15;
  --muted: #5b6b62;
  --line: #dde6e0;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(20, 63, 44, 0.10);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0b;
    --surface: #141416;
    --ink: #f2f4f3;
    --muted: #a2a8a5;
    --line: #2a2a2e;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

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

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

@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(--ink);
  font: 400 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }
a { color: var(--green-2); }
@media (prefers-color-scheme: dark) { a { color: var(--mint); } }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.center { text-align: center; }
.muted { color: var(--muted); }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--green); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 100;
}
.skip:focus { left: 12px; }

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

/* ---- Botones ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 22px; border-radius: 999px; border: 2px solid transparent;
  background: var(--orange); color: #fff; font-weight: 700; text-decoration: none; cursor: pointer;
  font-size: 15px; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(255, 122, 1, .30); }
.btn-large { min-height: 52px; padding: 12px 28px; font-size: 16px; }
.btn-small { min-height: 38px; padding: 6px 16px; font-size: 14px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { box-shadow: none; border-color: var(--muted); }
.link-button {
  background: none; border: 0; padding: 0; color: inherit; font: inherit;
  text-decoration: underline; cursor: pointer; text-align: left;
}

/* ---- Cabecera ---- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { border-radius: 10px; }
.wordmark { font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.wordmark span { color: var(--orange); }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:not(.btn):hover { color: var(--orange); }
.nav .btn { color: #fff; }
.menu-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.menu-toggle span { display: block; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px; display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 12px; border-bottom: 0; }
}

/* ---- Hero ---- */
.hero { padding: 64px 0 56px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--orange); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; margin: 0 0 8px; }
.hero h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 18px; }
.hero h1 span { color: var(--green-2); }
@media (prefers-color-scheme: dark) { .hero h1 span { color: var(--mint); } }
.lead { font-size: 18px; color: var(--muted); max-width: 38ch; margin: 0 0 26px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 26px 0 0; color: var(--muted); font-weight: 600; font-size: 14px; }
.trust li::before { content: "✓ "; color: var(--mint); font-weight: 800; }

.hero-art { display: flex; justify-content: center; }
.phone {
  width: min(300px, 80vw); aspect-ratio: 9 / 18.5; border-radius: 42px; padding: 12px;
  background: #0b0b0c; box-shadow: 0 30px 60px rgba(20, 63, 44, .30);
}
.phone-screen {
  position: relative; height: 100%; border-radius: 32px; overflow: hidden;
  background: linear-gradient(160deg, #e9efe9, #dfe8e2);
}
@media (prefers-color-scheme: dark) { .phone-screen { background: linear-gradient(160deg, #1a1c1b, #121413); } }
.map-lines {
  position: absolute; inset: 0; opacity: .55;
  background:
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(120, 130, 125, .35) 46px 49px),
    repeating-linear-gradient(0deg, transparent 0 58px, rgba(120, 130, 125, .35) 58px 61px);
  transform: rotate(-8deg) scale(1.3);
}
.pin {
  position: absolute; padding: 6px 12px; border-radius: 999px; color: #fff;
  font-size: 12px; font-weight: 700; box-shadow: 0 6px 14px rgba(0, 0, 0, .2);
}
.pin-pickup { top: 22%; left: 14%; background: var(--green-2); }
.pin-drop { top: 52%; right: 12%; background: #d92d20; }
.moto { position: absolute; top: 33%; left: 30%; width: 110px; animation: drive 4s ease-in-out infinite alternate; }
@keyframes drive { to { transform: translate(40px, 34px); } }
.phone-card {
  position: absolute; left: 12px; right: 12px; bottom: 14px; padding: 14px 16px;
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted);
}
.phone-card strong { color: var(--ink); font-size: 15px; }

/* ---- Secciones ---- */
.section { padding: 76px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-dark { background: linear-gradient(150deg, var(--green), var(--green-2)); color: #f2f7f4; }
.section-dark .section-sub, .section-dark .checks li { color: #d6e6dc; }
.section-dark h3 { margin-top: 26px; }
.section-title { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.02em; margin: 0 0 10px; line-height: 1.15; }
.section-sub { color: var(--muted); font-size: 17px; margin: 0 0 34px; max-width: 60ch; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.step-n {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--orange); color: #fff; font-weight: 800; margin-bottom: 12px;
}
.steps h3, .card h3 { margin: 0 0 6px; font-size: 19px; }
.steps p, .card p { margin: 0; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; margin-bottom: 14px; }
.icon-green { background: rgba(31, 157, 85, .14); }
.icon-blue { background: rgba(47, 111, 237, .14); }
.icon-orange { background: rgba(255, 122, 1, .14); }
.icon-gray { background: rgba(120, 130, 125, .16); }

.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 12px; }
.checks li { padding-left: 32px; position: relative; color: var(--muted); }
.checks li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; background: var(--mint); color: #062012; font-weight: 800; font-size: 13px;
}
.checks strong { color: inherit; }
.section:not(.section-dark) .checks strong { color: var(--ink); }
.plain { margin: 0 0 26px; padding-left: 20px; }
.badge-panel { text-align: center; padding: 40px; border-radius: 28px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.shield {
  width: 110px; height: 110px; margin: 0 auto 16px; border-radius: 32px; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--green), var(--green-2)); color: #fff; font-size: 54px; font-weight: 800;
}
.badge-panel p { margin: 0; font-size: 18px; color: var(--muted); }
.badge-panel strong { color: var(--ink); font-size: 24px; }
.driver-art { display: grid; place-items: center; }
.driver-art img { filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .35)); width: min(320px, 70vw); }

details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; padding: 0 20px; }
summary { cursor: pointer; font-weight: 700; padding: 18px 0; list-style: none; position: relative; padding-right: 28px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0; top: 14px; font-size: 22px; color: var(--orange); }
details[open] summary::after { content: "–"; }
details p { margin: 0 0 18px; color: var(--muted); }

.download { text-align: center; }
.download .section-sub { margin-inline: auto; }
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-bottom: 18px; }
.store {
  display: inline-flex; flex-direction: column; align-items: flex-start; min-width: 190px;
  padding: 10px 22px; border-radius: 14px; background: #0b0b0c; color: #fff; font-weight: 800; font-size: 19px; opacity: .85;
}
.store small { font-weight: 500; font-size: 11px; opacity: .8; }

/* ---- Paginas legales ---- */
.legal { width: min(820px, 100% - 32px); margin: 40px auto 80px; }
.legal h1 { font-size: clamp(28px, 4.5vw, 40px); letter-spacing: -0.02em; line-height: 1.15; }
.legal h2 { margin-top: 36px; font-size: 22px; }
.legal h3 { margin-top: 24px; font-size: 18px; }
.legal p, .legal li { color: var(--ink); }
.legal .note { background: var(--surface); border-left: 4px solid var(--orange); padding: 12px 16px; border-radius: 8px; color: var(--muted); }
.legal mark { background: rgba(255, 162, 76, .25); color: inherit; padding: 0 4px; border-radius: 4px; }
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface); }
code { font-size: .9em; background: var(--surface); padding: 1px 6px; border-radius: 6px; }

/* ---- Pie ---- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 48px 0 calc(28px + env(safe-area-inset-bottom)); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-grid h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; }
.footer-grid nav, .footer-grid > div { display: flex; flex-direction: column; gap: 8px; }
.footer-grid a { color: var(--ink); text-decoration: none; }
.footer-grid a:hover, .footer-grid .link-button:hover { color: var(--orange); }
.copyright { color: var(--muted); font-size: 13px; margin-top: 28px; }

/* ---- Aviso de cookies ---- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  display: flex; justify-content: center; pointer-events: none;
}
.cookie-banner[hidden] { display: none; }
.cookie-card {
  pointer-events: auto; width: min(760px, 100%);
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: 20px; box-shadow: 0 18px 50px rgba(0, 0, 0, .25); padding: 20px 22px;
}
.cookie-card h2 { margin: 0 0 6px; font-size: 18px; }
.cookie-card p { margin: 0 0 14px; color: var(--muted); font-size: 14.5px; }
.cookie-options { display: grid; gap: 10px; margin-bottom: 14px; }
.cookie-options[hidden] { display: none; }
.switch { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.switch input { width: 20px; height: 20px; accent-color: var(--green-2); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.cookie-actions [hidden] { display: none; }

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .hero { padding-top: 36px; }
  .hero-grid, .split { grid-template-columns: 1fr; gap: 36px; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
}
@media (max-width: 520px) {
  .cards { grid-template-columns: 1fr; }
  .cta-row .btn { flex: 1 1 100%; }
  .cookie-actions .btn { flex: 1 1 calc(50% - 10px); }
}

/* ---- Banda de avisos ---- */
.announcement { background: var(--orange); color: #fff; padding-top: env(safe-area-inset-top); }
.announcement[hidden] { display: none; }
.announcement-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; font-size: 14.5px; }
.announcement-row p { margin: 0; }
.announcement-link { color: #fff; font-weight: 800; white-space: nowrap; }
.footer-grid h2.mt { margin-top: 14px; }

/* ---- Publicaciones ---- */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 22px; }
.post-card {
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.section:not(.section-alt) .post-card { background: var(--surface); }
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.post-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--line); }
.post-body { padding: 16px 18px 18px; }
.post-body h3 { margin: 8px 0 6px; font-size: 18px; line-height: 1.3; }
.post-body p { margin: 0 0 6px; }
.post-meta { color: var(--muted); font-size: 13px; }
.kind { display: inline-block; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.k-oferta { background: rgba(255, 122, 1, .15); color: #b45300; }
.k-noticia { background: rgba(47, 111, 237, .14); color: #1d4fb8; }
.k-aviso { background: rgba(217, 45, 32, .13); color: #a8241a; }
.k-cambio { background: rgba(31, 157, 85, .15); color: #157043; }
@media (prefers-color-scheme: dark) {
  .k-oferta { color: #ffb066; } .k-noticia { color: #8fb3ff; } .k-aviso { color: #ff8f86; } .k-cambio { color: #6fd59f; }
}
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.detail h1 { font-size: clamp(28px, 4.5vw, 40px); line-height: 1.15; margin: 10px 0 6px; }
.detail-img { width: 100%; border-radius: var(--radius); margin: 14px 0; }
.rich { margin: 12px 0 22px; }
.rich p { margin: 0 0 12px; }

/* ---- Formularios / PQRS ---- */
.pqrs-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 36px; align-items: start; }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { font-weight: 700; font-size: 14.5px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 16px;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 122, 1, .18); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--green-2); flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-result:empty { display: none; }
.form-result { padding: 14px 16px; border-radius: 12px; font-size: 15px; }
.form-result.ok { background: rgba(31, 157, 85, .12); border: 1px solid rgba(31, 157, 85, .35); }
.form-result.error { background: rgba(217, 45, 32, .10); border: 1px solid rgba(217, 45, 32, .35); }
.form-result p { margin: 0 0 6px; }
.radicado { font-size: 15px; font-weight: 800; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.side-card h2 { margin: 0 0 12px; font-size: 19px; }
button[disabled] { opacity: .6; cursor: progress; }

@media (max-width: 960px) { .posts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .pqrs-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .posts { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .announcement-row { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* ---------- Seguimiento del envio ---------- */
.track-status { padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin-bottom: 16px; font-size: 17px; }
.track-status strong { font-size: 19px; }
.track-status.s-go { border-color: var(--orange-soft); }
.track-status.s-done { border-color: var(--mint); }
.track-status.s-off, .track-status.error { border-color: #e0574a; }
.track-map { position: relative; height: 340px; border-radius: var(--radius); overflow: hidden; background: #e5ece7; border: 1px solid var(--line); margin-bottom: 16px; }
.track-tiles img { position: absolute; width: 256px; height: 256px; user-select: none; -webkit-user-drag: none; }
.track-attrib { position: absolute; right: 6px; bottom: 4px; margin: 0; font-size: 11px; background: rgba(255,255,255,.85); color: #333; padding: 1px 6px; border-radius: 6px; }
.track-attrib a { color: #333; }
.track-pin { position: absolute; transform: translate(-50%, -100%); padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,.25); transition: left .8s linear, top .8s linear; }
.track-pin.pin-a { background: var(--green-2); }
.track-pin.pin-b { background: var(--orange); }
.track-pin.pin-moto { width: 38px; height: 38px; padding: 0; transform: translate(-50%, -50%); border-radius: 50%; background: var(--green) url("/assets/img/splash-motorcycle.svg") center / 30px no-repeat; border: 3px solid #fff; }
.track-details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 16px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.track-details dt { color: var(--muted); font-weight: 600; }
.track-details dd { margin: 0; overflow-wrap: anywhere; }
.small { font-size: 13px; }
@media (max-width: 520px) { .track-map { height: 280px; } .track-details { grid-template-columns: 1fr; } .track-details dd { margin-bottom: 6px; } }
