/* ============================================================
   Upper Express · envíos Bogotá → Ecuador
   Estilo: Exaggerated Minimalism (tipografía grande, alto contraste)
   Marca:  #141d30 navy · #CDF5A3 lima · #F0FFE8 menta
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500;600;700;800;900&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

:root {
  /* Marca */
  --navy: #141d30;
  --navy-700: #1d2942;
  --navy-600: #2a3855;
  --lime: #cdf5a3;
  --lime-strong: #b6e884;
  --mint: #f0ffe8;

  /* Semánticos */
  --bg: #f0ffe8;
  --surface: #ffffff;
  --ink: #141d30;
  --ink-soft: #4a5568;
  --ink-mute: #7a8699;
  --border: #e2ecd6;
  --border-strong: #d0ddbf;
  --accent: var(--lime);
  --accent-ink: #16351a; /* texto legible sobre lima (contraste AA) */
  --danger: #c0392b;
  --danger-bg: #fdecea;
  --success: #2f7d3a;
  --ring: #6f9c46;

  /* Escala */
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(20, 29, 48, .06), 0 1px 3px rgba(20, 29, 48, .05);
  --shadow-md: 0 8px 24px rgba(20, 29, 48, .10);
  --shadow-lg: 0 24px 60px rgba(20, 29, 48, .18);
  --maxw: 1200px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Lexend', sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  color: var(--ink);
  margin: 0 0 .4em;
}

p { margin: 0 0 1rem; color: var(--ink-soft); }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* --- Utilidades --- */
.eyebrow {
  display: inline-block;
  font-family: 'Lexend', sans-serif;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ring);
}
.eyebrow.on-dark { color: var(--lime); }

.lime-underline { color: var(--navy); background: linear-gradient(transparent 62%, var(--lime) 62%); padding: 0 .05em; }

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-tight { padding: clamp(48px, 6vw, 80px) 0; }

/* --- Botones --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: 'Lexend', sans-serif; font-weight: 600; font-size: 1rem;
  padding: 14px 26px; border-radius: var(--radius-pill);
  border: 2px solid transparent; cursor: pointer;
  transition: transform .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
  min-height: 48px; text-align: center;
}
.btn:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.btn-primary { background: var(--lime); color: var(--accent-ink); }
.btn-primary:hover { background: var(--lime-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-dark { background: var(--navy); color: var(--mint); }
.btn-dark:hover { background: var(--navy-700); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--navy); transform: translateY(-2px); }
.btn-ghost.on-dark { color: var(--mint); border-color: rgba(240, 255, 232, .35); }
.btn-ghost.on-dark:hover { border-color: var(--lime); color: var(--lime); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* --- Header / Nav --- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(240, 255, 232, .82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: .6rem; font-family: 'Lexend', sans-serif; font-weight: 800; font-size: 1.4rem; letter-spacing: -.04em; color: var(--navy); }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(205,245,163,.4); }
.brand-logo { height: 34px; width: auto; display: block; }
/* Header: fondo claro → el wordmark lima necesita respaldo navy para contraste,
   sobre un chip navy. */
.site-header .brand-logo { height: 42px; background: var(--navy); padding: 9px 18px; border-radius: 13px; }
/* Footer y panel: fondo navy → el wordmark lima va directo */
.site-footer .brand-logo { height: 34px; }
.brand small { font-weight: 500; font-family: 'Source Sans 3'; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-mute); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-family: 'Lexend', sans-serif; font-weight: 500; font-size: .95rem;
  padding: 9px 14px; border-radius: var(--radius-pill); color: var(--ink);
  transition: background .15s var(--ease), color .15s var(--ease);
}
.nav-links a:hover { background: rgba(20,29,48,.06); }
.nav-links a.active { background: var(--navy); color: var(--mint); }
.nav-cta { margin-left: 8px; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--navy); }

/* --- Hero --- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 8vw, 110px) 0 clamp(48px, 7vw, 96px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.9rem, 7vw, 6rem); font-weight: 900; letter-spacing: -.05em; }
.hero p.lead { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--ink-soft); max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-stats { display: flex; gap: 36px; margin-top: 48px; flex-wrap: wrap; }
.hero-stats .stat b { font-family: 'Lexend', sans-serif; font-size: 2.1rem; font-weight: 800; color: var(--navy); display: block; letter-spacing: -.03em; }
.hero-stats .stat span { font-size: .9rem; color: var(--ink-mute); }

/* Tarjeta de tracking flotante en el hero */
.track-card {
  background: var(--navy); color: var(--mint); border-radius: var(--radius-lg);
  padding: 30px; box-shadow: var(--shadow-lg); position: relative;
}
.track-card h3 { color: var(--mint); font-size: 1.35rem; }
.track-card p { color: rgba(240,255,232,.7); font-size: .95rem; }
.blob { position: absolute; border-radius: 50%; filter: blur(8px); opacity: .5; pointer-events: none; }

/* --- Formulario de tracking --- */
.track-form { display: flex; gap: 10px; margin-top: 18px; }
.track-form input {
  flex: 1; min-width: 0; padding: 14px 16px; border-radius: var(--radius-pill);
  border: 2px solid transparent; background: rgba(240,255,232,.1); color: var(--mint);
  font-family: 'Lexend', sans-serif; font-size: 1rem; letter-spacing: .04em; text-transform: uppercase;
}
.track-form input::placeholder { color: rgba(240,255,232,.45); letter-spacing: 0; text-transform: none; }
.track-form input:focus { outline: none; border-color: var(--lime); background: rgba(240,255,232,.16); }
.track-form.light input { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.track-form.light input:focus { border-color: var(--ring); }

/* Resultado de tracking */
.track-result { margin-top: 22px; }
.track-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 20px; font-size: .95rem; }
.track-meta .k { color: var(--ink-mute); }
.track-meta .v { font-weight: 700; font-family: 'Lexend', sans-serif; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px; border-radius: var(--radius-pill); font-family: 'Lexend'; font-weight: 600; font-size: .82rem; }
.badge-lime { background: var(--lime); color: var(--accent-ink); }
.badge-navy { background: var(--navy); color: var(--mint); }
.badge-soft { background: var(--mint); color: var(--navy); border: 1px solid var(--border-strong); }
.badge-amber { background: #fbe6c4; color: #7a4a12; }

/* Línea de tiempo del envío */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 26px 40px; }
.timeline li::before {
  content: ''; position: absolute; left: 11px; top: 22px; bottom: -4px; width: 2px; background: var(--border-strong);
}
.timeline li:last-child::before { display: none; }
.timeline .node {
  position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--border-strong); display: grid; place-items: center;
}
.timeline li.done .node { background: var(--lime); border-color: var(--lime-strong); }
.timeline li.done .node svg { width: 13px; height: 13px; color: var(--accent-ink); }
.timeline li.current .node { background: var(--navy); border-color: var(--navy); box-shadow: 0 0 0 5px rgba(205,245,163,.5); }
.timeline li.current .node .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }
.timeline .t-label { font-family: 'Lexend'; font-weight: 700; line-height: 1.45; color: var(--ink); }
.timeline li.current .t-label { color: var(--navy); }
.timeline .t-desc { font-size: .92rem; color: var(--ink-soft); margin-top: 1px; }
.timeline .t-date { font-size: .82rem; color: var(--ink-mute); margin-top: 2px; font-variant-numeric: tabular-nums; }

/* Timeline sobre la tarjeta oscura (home): texto e hilo legibles en navy. */
.track-card .timeline li::before { background: rgba(240, 255, 232, .18); }
.track-card .timeline .node { background: var(--navy-600); border-color: rgba(240, 255, 232, .3); }
.track-card .timeline li.done .node { background: var(--lime); border-color: var(--lime-strong); }
.track-card .timeline li.current .node { background: var(--navy); border-color: var(--lime); }
.track-card .timeline .t-label { color: var(--mint); }
.track-card .timeline li.current .t-label { color: var(--lime); }
.track-card .timeline .t-desc { color: rgba(240, 255, 232, .72); }
.track-card .timeline .t-date { color: rgba(240, 255, 232, .5); }
.track-card .track-meta .k { color: rgba(240, 255, 232, .6); }
.track-card .track-meta .v { color: var(--mint); }
.track-note { margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: var(--mint); border: 1px solid var(--border); font-size: .88rem; color: var(--ink-soft); }
.track-note a { color: var(--navy); font-weight: 600; }

/* --- Secciones oscuras --- */
.dark { background: var(--navy); color: var(--mint); }
.dark h1, .dark h2, .dark h3 { color: var(--mint); }
.dark p { color: rgba(240,255,232,.72); }
.dark .lime-underline { color: var(--mint); background: linear-gradient(transparent 62%, rgba(205,245,163,.35) 62%); }

/* --- Grid de features --- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 48px; }
.feature {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 30px; transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.feature .ico { width: 52px; height: 52px; border-radius: 14px; background: var(--lime); display: grid; place-items: center; margin-bottom: 18px; }
.feature .ico svg { width: 26px; height: 26px; color: var(--accent-ink); }
.feature h3 { font-size: 1.2rem; }
.feature p { font-size: .96rem; margin: 0; }

/* --- Franja de logos / cobertura --- */
.cover-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.chip {
  padding: 8px 16px; border-radius: var(--radius-pill); background: rgba(240,255,232,.08);
  border: 1px solid rgba(240,255,232,.16); font-family: 'Lexend'; font-weight: 500; font-size: .92rem; color: var(--mint);
}

/* --- Pasos --- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 48px; counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step .num { font-family: 'Lexend'; font-weight: 900; font-size: 2.6rem; color: var(--lime-strong); line-height: 1; letter-spacing: -.04em; }
.dark .step .num { color: var(--lime); }
.step h3 { font-size: 1.12rem; margin-top: 10px; }
.step p { font-size: .94rem; }

/* --- CTA final --- */
.cta-band { background: var(--lime); border-radius: var(--radius-lg); padding: clamp(40px, 6vw, 72px); text-align: center; }
.cta-band h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); color: var(--accent-ink); }
.cta-band p { color: #2c4a1f; max-width: 52ch; margin-inline: auto; }

/* --- Formularios (PQRS) --- */
.form-wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow-sm); }
.field { margin-bottom: 20px; }
.field label { display: block; font-family: 'Lexend'; font-weight: 600; font-size: .92rem; margin-bottom: 7px; color: var(--ink); }
.field label .req { color: var(--danger); }
.field .hint { font-size: .82rem; color: var(--ink-mute); margin-top: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border-radius: var(--radius); border: 2px solid var(--border-strong);
  background: var(--surface); color: var(--ink); font-family: 'Source Sans 3'; font-size: 1rem; transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field textarea { resize: vertical; min-height: 130px; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 4px rgba(111,156,70,.15); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); }
.field .error { color: var(--danger); font-size: .84rem; margin-top: 6px; display: none; }
.field .error.show { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Panel informativo del PQRS */
.info-list { list-style: none; padding: 0; margin: 24px 0 0; }
.info-list li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.info-list li:last-child { border-bottom: 0; }
.info-list .ico { flex: none; width: 40px; height: 40px; border-radius: 11px; background: var(--mint); display: grid; place-items: center; }
.dark .info-list .ico { background: rgba(205,245,163,.16); }
.info-list .ico svg { width: 20px; height: 20px; color: var(--ring); }
.dark .info-list .ico svg { color: var(--lime); }
.info-list h4 { font-family: 'Lexend'; font-size: 1rem; margin: 0 0 2px; }
.info-list p { font-size: .9rem; margin: 0; }

/* Estados de resultado (alertas) */
.alert { border-radius: var(--radius); padding: 18px 20px; margin-bottom: 20px; display: none; }
.alert.show { display: block; }
.alert-error { background: var(--danger-bg); border: 1px solid #f5c6c0; color: #8a2318; }
.result-card { background: var(--mint); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 32px; text-align: center; display: none; }
.result-card.show { display: block; animation: pop .35s var(--ease); }
.result-card .rad-num { font-family: 'Lexend'; font-weight: 900; font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--navy); letter-spacing: -.03em; margin: 8px 0; }
.result-card .check { width: 64px; height: 64px; border-radius: 50%; background: var(--lime); display: grid; place-items: center; margin: 0 auto 8px; }
.result-card .check svg { width: 32px; height: 32px; color: var(--accent-ink); }
.result-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 16px 0; }

@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* --- Tarifas --- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 48px; }
.price-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; display: flex; flex-direction: column; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.price-card.featured { background: var(--navy); color: var(--mint); border-color: var(--navy); position: relative; }
.price-card.featured h3, .price-card.featured .price { color: var(--mint); }
.price-card.featured p, .price-card.featured .price-list li { color: rgba(240,255,232,.8); }
.price-card .tag-top { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--lime); color: var(--accent-ink); font-family: 'Lexend'; font-weight: 700; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; padding: 6px 16px; border-radius: var(--radius-pill); }
.price-card h3 { font-size: 1.3rem; }
.price-card .price { font-family: 'Lexend'; font-weight: 900; font-size: 2.6rem; color: var(--navy); letter-spacing: -.04em; margin: 8px 0 2px; }
.price-card .price small { font-size: .95rem; font-weight: 500; color: var(--ink-mute); letter-spacing: 0; }
.price-list { list-style: none; padding: 0; margin: 20px 0 26px; flex: 1; }
.price-list li { display: flex; gap: 10px; padding: 8px 0; font-size: .96rem; color: var(--ink-soft); }
.price-list li svg { flex: none; width: 20px; height: 20px; color: var(--ring); margin-top: 2px; }
.price-card.featured .price-list li svg { color: var(--lime); }

/* Tabla de tarifas por zona */
.rate-table-wrap { margin-top: 32px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); }
table.rates { width: 100%; border-collapse: collapse; min-width: 560px; background: var(--surface); }
table.rates th, table.rates td { padding: 15px 20px; text-align: left; }
table.rates thead th { background: var(--navy); color: var(--mint); font-family: 'Lexend'; font-weight: 600; font-size: .9rem; }
table.rates tbody tr { border-top: 1px solid var(--border); }
table.rates tbody tr:nth-child(even) { background: #fafdf5; }
table.rates td:not(:first-child), table.rates th:not(:first-child) { font-variant-numeric: tabular-nums; text-align: right; }
table.rates td:first-child { font-weight: 600; font-family: 'Lexend'; }

/* Condiciones (acordeón) */
.accordion { margin-top: 32px; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.accordion details { border-bottom: 1px solid var(--border); }
.accordion details:last-child { border-bottom: 0; }
.accordion summary {
  list-style: none; cursor: pointer; padding: 20px 24px; font-family: 'Lexend'; font-weight: 600; font-size: 1.05rem;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--ink);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary .chev { flex: none; transition: transform .2s var(--ease); color: var(--ring); }
.accordion details[open] summary .chev { transform: rotate(180deg); }
.accordion .body { padding: 0 24px 22px; color: var(--ink-soft); font-size: .98rem; }
.accordion .body p:last-child { margin-bottom: 0; }

/* Page header genérico */
.page-head { padding: clamp(48px, 7vw, 88px) 0 clamp(28px, 4vw, 48px); }
.page-head h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 900; letter-spacing: -.05em; }
.page-head p { font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 56ch; }

/* --- Footer --- */
.site-footer { background: var(--navy); color: rgba(240,255,232,.7); padding: 64px 0 32px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.site-footer .brand { color: var(--mint); }
.site-footer h4 { font-family: 'Lexend'; color: var(--mint); font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: rgba(240,255,232,.7); transition: color .15s var(--ease); font-size: .96rem; }
.site-footer a:hover { color: var(--lime); }
.footer-bottom { border-top: 1px solid rgba(240,255,232,.12); margin-top: 48px; padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .86rem; color: rgba(240,255,232,.5); }

.page { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }

.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(22,53,26,.3); border-top-color: var(--accent-ink); border-radius: 50%; animation: spin .7s linear infinite; }
.btn-dark .spinner { border-color: rgba(240,255,232,.3); border-top-color: var(--mint); }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Responsive --- */
@media (max-width: 940px) {
  .hero-grid, .form-wrap { grid-template-columns: 1fr; gap: 40px; }
  .feature-grid, .price-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    position: absolute; top: 72px; left: 0; right: 0; background: var(--mint);
    padding: 12px 20px 20px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md);
  }
  .nav-links.open a { padding: 12px 14px; }
  .nav-cta { margin: 4px 0 0; }
  .feature-grid, .price-grid, .steps, .footer-grid, .form-row { grid-template-columns: 1fr; }
  .track-form { flex-direction: column; }
  .track-form .btn { width: 100%; }
  .hero-stats { gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
