:root {
  --navy: #262A5E;
  --red: #CA362D;
  --bg: #F5F5F5;
  --white: #FFFFFF;
  --ink: #1c1e33;
  --muted: #5b5e7a;
  --line: #e3e3ec;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(38, 42, 94, .10);
  --wrap: 1160px;
  --font: "DM Sans", Arial, system-ui, sans-serif;
  --nav-bg: rgba(245,245,245,.9);
  color-scheme: light;
}


/* ===== Transiciones suaves entre páginas (View Transitions API) ===== */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.15; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

/* ===== Botones ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 24px; border-radius: 999px; font-weight: 700; font-size: 15px;
  cursor: pointer; border: 2px solid transparent; transition: transform .15s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px) scale(1.03); }
.btn:active { transform: translateY(0) scale(.97); }
.btn--primary { background: var(--red); color: var(--white); }
.btn--primary:hover { background: #b32f27; }
.btn--outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: var(--white); }
.btn--wa { background: var(--navy); color: var(--white); font-size: 14px; padding: 10px 20px; }
.btn--wa:hover { background: #1b1e47; }

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: var(--nav-bg); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: transform .35s ease;
}
.nav--hidden { transform: translateY(-100%); }

/* Barra de progreso de lectura */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--red), #e0564d);
  z-index: 90; pointer-events: none; transition: width .1s linear;
}

/* Hamburguesa */
.nav__burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px; margin-left: 8px;
  background: transparent; border: 0; cursor: pointer;
}
.nav__burger span { display: block; height: 3px; border-radius: 3px; background: var(--navy); transition: transform .3s ease, opacity .3s ease; }
.nav--open .nav__burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav--open .nav__burger span:nth-child(2) { opacity: 0; }
.nav--open .nav__burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.nav__logo-mark { font-size: 22px; font-weight: 500; color: var(--navy); letter-spacing: -.5px; }
.nav__logo-mark strong { color: var(--red); font-weight: 700; }
.nav__logo-img { height: 46px; width: auto; display: block; }
.nav__links { display: flex; gap: 22px; margin-left: auto; font-size: 15px; font-weight: 500; }
.nav__links a { color: var(--muted); position: relative; transition: color .2s ease, transform .2s ease; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px;
  background: var(--red); border-radius: 2px; transition: width .25s ease;
}
.nav__links a:hover { color: var(--navy); transform: translateY(-1px) scale(1.06); }
.nav__links a:hover::after { width: 100%; }
.nav__logo-img { transition: transform .2s ease; }
.nav__logo:hover .nav__logo-img { transform: scale(1.05) rotate(-2deg); }
.nav .btn--wa { margin-left: 8px; }
.nav__links .nav__access {
  border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 14px;
  color: var(--navy); font-weight: 700;
}
.nav__links .nav__access:hover { border-color: var(--navy); transform: translateY(-1px); }
.nav__links .nav__access::after { display: none; }

/* ===== Hero ===== */
.hero {
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) clamp(16px, 4vw, 48px);
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center;
}
/* Entrada cinematográfica del hero (escalonada) */
@keyframes hero-in { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.hero__content > * { animation: hero-in .7s cubic-bezier(.22,.8,.3,1) both; }
.hero__content > :nth-child(1) { animation-delay: .05s; }
.hero__content > :nth-child(2) { animation-delay: .15s; }
.hero__content > :nth-child(3) { animation-delay: .3s; }
.hero__content > :nth-child(4) { animation-delay: .45s; }
.hero__visual { animation: hero-in .9s cubic-bezier(.22,.8,.3,1) .2s both; }
@media (prefers-reduced-motion: reduce) { .hero__content > *, .hero__visual { animation: none; } }

.hero__eyebrow { color: var(--red); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; }
.hero__title {
  font-size: clamp(44px, 7vw, 80px); font-weight: 700; color: var(--navy);
  letter-spacing: -1.5px; margin: 14px 0 18px;
}
.hero__lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 30ch; }
.hero__cta { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.hero__visual {
  aspect-ratio: 4/5; border-radius: 22px; box-shadow: var(--shadow);
  background: linear-gradient(150deg, var(--navy), #3a4090 60%, var(--red));
  position: relative; overflow: hidden;
}
.hero__visual img, .franq__visual img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ===== Cinta de paqueterías (marquee) ===== */
.carriers { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: 18px 0; }
.carriers__track { display: flex; width: max-content; animation: carriers-scroll 28s linear infinite; }
.carriers__track:hover { animation-play-state: paused; }
.carriers__group { display: flex; align-items: center; gap: clamp(40px, 6vw, 80px); padding-right: clamp(40px, 6vw, 80px); }
.carriers__group a { display: flex; align-items: center; opacity: .85; transition: opacity .2s ease, transform .2s ease; }
.carriers__group a:hover { opacity: 1; transform: scale(1.06); }
.carriers__group img { height: 52px; width: auto; max-width: 220px; object-fit: contain; }
@keyframes carriers-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .carriers__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; } .carriers__group[aria-hidden="true"] { display: none; } }

/* ===== Envía en 3 pasos ===== */
.steps { display: flex; align-items: stretch; justify-content: center; gap: 18px; max-width: var(--wrap); margin: 0 auto; }
.step {
  flex: 1; max-width: 320px; position: relative; text-align: center;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 38px 26px 30px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--red); }
.step__num {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 16px;
  box-shadow: 0 4px 12px rgba(202,54,45,.35);
}
.step__icon { display: block; font-size: 40px; margin-bottom: 14px; transition: transform .25s ease; }
.step:hover .step__icon { transform: scale(1.25) rotate(-6deg); }
.step h3 { color: var(--navy); font-size: 19px; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 14.5px; }
.step__arrow { align-self: center; color: var(--red); font-size: 28px; font-weight: 700; }
@media (max-width: 820px) {
  .steps { flex-direction: column; align-items: center; }
  .step { max-width: 420px; width: 100%; }
  .step__arrow { transform: rotate(90deg); }
}

/* ===== Embalaje (scroll-driven) ===== */
.packaging { background: var(--navy); }
.packaging__track { height: 320vh; position: relative; }
.packaging__sticky {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  overflow: hidden;
}
.packaging__video {
  width: min(62vh, 86vw); aspect-ratio: 1/1; border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0,0,0,.45); background: #1b1e47;
  will-change: contents;
}

/* Botón ▶ de respaldo (ahorro de batería en iOS bloquea autoplay) */
.video-play-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 72px; height: 72px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(202,54,45,.94); color: #fff; font-size: 24px; padding-left: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
  animation: hero-in .4s ease both;
}
.video-play-btn:active { transform: translate(-50%, -50%) scale(.92); }
.packaging__caption {
  color: var(--white); font-size: clamp(22px, 3.4vw, 36px); font-weight: 700;
  text-align: center; letter-spacing: -.5px; margin: 0;
}
@media (prefers-reduced-motion: reduce) { .packaging__track { height: auto; padding: 64px 0; } .packaging__sticky { position: static; height: auto; } }

/* ===== Secciones ===== */
.section { max-width: var(--wrap); margin: 0 auto; padding: clamp(56px, 8vw, 96px) clamp(16px, 4vw, 48px); }
.section--tint { max-width: none; background: var(--white); }
.section--tint > * { max-width: var(--wrap); margin-left: auto; margin-right: auto; }
.section__head { text-align: center; margin-bottom: 44px; }
.section__head h2 { font-size: clamp(30px, 4vw, 44px); color: var(--navy); letter-spacing: -1px; }
.section__head p { color: var(--muted); font-size: 18px; margin-top: 10px; }

/* ===== Cards servicios ===== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: transform .15s ease, box-shadow .2s ease;
}
.section--tint .card { background: var(--bg); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--navy); }
.card h3 { color: var(--navy); font-size: 20px; margin-bottom: 8px; transition: color .2s ease, font-size .2s ease; }
.card:hover h3 { color: var(--red); font-size: 21px; }
.card p { color: var(--muted); font-size: 15px; }
.badge { display: inline-block; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .5px; margin-right: 6px; }

/* ===== Rastreo ===== */
.tracker { display: flex; gap: 12px; max-width: 620px; margin: 0 auto; flex-wrap: wrap; }
.tracker__input {
  flex: 1 1 280px; padding: 15px 20px; font-size: 16px; font-family: var(--font);
  border: 2px solid var(--line); border-radius: 999px; background: var(--white); color: var(--ink);
}
.tracker__input:focus { outline: none; border-color: var(--navy); }
.tracker__result { max-width: 620px; margin: 28px auto 0; }
.tracker__note { text-align: center; color: var(--muted); font-size: 13px; margin-top: 18px; }

/* ===== ¿Por qué? ===== */
.reasons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.reason { text-align: center; padding: 24px; border-radius: var(--radius); transition: background .2s ease, transform .2s ease; }
.reason:hover { background: var(--white); transform: translateY(-4px); box-shadow: var(--shadow); }
.reason strong { display: block; color: var(--red); font-size: 18px; margin-bottom: 8px; transition: font-size .2s ease, letter-spacing .2s ease; }
.reason:hover strong { font-size: 21px; letter-spacing: .3px; }
.reason span { color: var(--muted); font-size: 15px; }

/* ===== Franquicias ===== */
.section--franq { max-width: none; background: var(--navy); }
.franq { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.franq__text h2 { color: var(--white); font-size: clamp(30px, 4vw, 44px); letter-spacing: -1px; }
.franq__text p { color: rgba(255,255,255,.75); font-size: 18px; margin: 16px 0 28px; max-width: 34ch; }
.franq__visual { aspect-ratio: 16/10; border-radius: 18px; background: linear-gradient(150deg, #3a4090, var(--red)); box-shadow: var(--shadow); }

/* ===== Sucursales ===== */
.branches { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; max-width: 760px; margin: 0 auto; }
.branch { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; text-align: center; }
.branch h3 { color: var(--navy); font-size: 22px; margin-bottom: 8px; }
.branch p { color: var(--muted); margin-bottom: 16px; }
.link { color: var(--red); font-weight: 700; }
.link:hover { text-decoration: underline; }

/* ===== Franquicias: pitch / stats / inversión ===== */
.hero__title--sub { font-size: clamp(38px, 6vw, 64px); }
.hero__visual--franq { background: linear-gradient(150deg, var(--red), #3a4090 55%, var(--navy)); }
.pitch { max-width: 720px; margin: 0 auto; display: grid; gap: 18px; font-size: 17px; color: var(--muted); text-align: center; }
.pitch strong { color: var(--navy); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 760px; margin: 48px auto 0; }
.stat { text-align: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 16px; }
.stat strong { display: block; font-size: clamp(28px, 4vw, 40px); color: var(--red); letter-spacing: -1px; }
.stat span { color: var(--muted); font-size: 14px; }
.invest { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 760px; margin: 0 auto; }
.invest__tier {
  text-align: center; padding: 34px 16px; border-radius: var(--radius);
  background: var(--white); border: 2px solid var(--line);
  cursor: pointer; font-family: var(--font); transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.invest__tier:hover { border-color: var(--navy); transform: translateY(-3px); }
.invest__tier--selected { border-color: var(--red); box-shadow: var(--shadow); }
.invest__tier--selected strong { color: var(--red); }
.invest__tier strong { display: block; font-size: clamp(24px, 3vw, 32px); color: var(--navy); letter-spacing: -1px; }
.invest__tier span { color: var(--muted); font-size: 13px; font-weight: 700; }
.invest__note { text-align: center; color: var(--muted); font-size: 14px; margin-top: 22px; }

/* ===== Formulario ===== */
.form { max-width: 680px; margin: 0 auto; display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form__field { display: grid; gap: 6px; }
.form__field span { font-size: 14px; font-weight: 700; color: var(--navy); }
.form__field input, .form__field select, .form__field textarea {
  padding: 13px 16px; font-size: 15px; font-family: var(--font);
  border: 2px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink);
  width: 100%;
}
.form__field input:focus, .form__field select:focus, .form__field textarea:focus { outline: none; border-color: var(--navy); }
.form__field textarea { resize: vertical; }
.form__consent { display: grid; gap: 10px; font-size: 14px; color: var(--muted); }
.form__consent label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.form__consent input { margin-top: 3px; accent-color: var(--red); }
.form__consent a { color: var(--red); font-weight: 700; }
.form__submit { justify-self: center; min-width: 240px; }
.form__note { text-align: center; color: var(--muted); font-size: 13px; }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } .stats, .invest { grid-template-columns: 1fr; } }

/* ===== Horarios sucursales ===== */
.branch__addr { color: var(--muted); margin-bottom: 12px; display: block; }
.branch__addr--map:hover { color: var(--navy); text-decoration: underline; }
.branch__hours { color: var(--muted); font-size: 14px; line-height: 1.7; margin-bottom: 16px; }
.branch__hours strong { color: var(--navy); }
.branch__actions { display: flex; gap: 20px; justify-content: center; }

/* ===== Páginas interiores: encabezado ===== */
.page-hero { background: var(--navy); padding: clamp(48px, 7vw, 80px) clamp(16px, 4vw, 48px); text-align: center; }
.page-hero h1 { color: var(--white); font-size: clamp(32px, 5vw, 52px); letter-spacing: -1px; }
.page-hero p { color: rgba(255,255,255,.75); font-size: 17px; margin-top: 12px; max-width: 60ch; margin-left: auto; margin-right: auto; }

/* ===== Prosa legal ===== */
.prose { max-width: 760px; margin: 0 auto; color: var(--muted); font-size: 16px; }
.prose h2 { color: var(--navy); font-size: 22px; margin: 36px 0 12px; letter-spacing: -.3px; }
.prose h3 { color: var(--navy); font-size: 18px; margin: 26px 0 10px; }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--navy); }
.prose a { color: var(--red); font-weight: 700; }
.prose .prose__updated { font-size: 14px; color: var(--muted); margin-top: 32px; font-style: italic; }

/* ===== FAQ (acordeón) ===== */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 14px; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 0; overflow: hidden; }
.faq summary { cursor: pointer; padding: 20px 24px; font-weight: 700; color: var(--navy); font-size: 17px; list-style: none; position: relative; padding-right: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); color: var(--red); font-size: 24px; font-weight: 700; transition: transform .2s ease; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 24px 20px; color: var(--muted); margin: 0; }

/* ===== Valores (quiénes somos) ===== */
.values { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 760px; margin: 0 auto; }
.values span { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 10px 22px; font-weight: 700; color: var(--navy); font-size: 15px; }

/* ===== Misión / Visión ===== */
.mv { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 900px; margin: 0 auto; }
.mv article { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.mv h3 { color: var(--red); font-size: 20px; margin-bottom: 12px; }
.mv p { color: var(--muted); font-style: italic; }
@media (max-width: 700px) { .mv { grid-template-columns: 1fr; } }

/* ===== Cashback tiers ===== */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.tier { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; }
.tier--featured { border: 2px solid var(--red); box-shadow: var(--shadow); }
.tier h3 { color: var(--navy); font-size: 22px; }
.tier .tier__pct { color: var(--red); font-size: 40px; font-weight: 700; letter-spacing: -1px; margin: 8px 0 16px; }
.tier ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; color: var(--muted); font-size: 15px; }
.tier li::before { content: "✓ "; color: var(--red); font-weight: 700; }
@media (max-width: 820px) { .tiers { grid-template-columns: 1fr; } }

/* ===== Footer ===== */
.footer { background: var(--ink); color: rgba(255,255,255,.7); padding: 56px clamp(16px, 4vw, 48px) 32px; text-align: center; }
.footer__brand .nav__logo-mark { color: #fff; }
.footer__brand .nav__logo-mark strong { color: var(--red); }
.footer__brand p { margin-top: 6px; font-size: 14px; }
.footer__links, .footer__social { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin: 26px 0; font-size: 14px; }
.footer__links a:hover, .footer__social a:hover { color: #fff; }
.footer__copy { font-size: 13px; color: rgba(255,255,255,.45); }

/* ===== Video YouTube (click to play) ===== */
.yt {
  position: relative; max-width: 760px; margin: 0 auto; aspect-ratio: 16/9;
  border-radius: var(--radius); overflow: hidden; cursor: pointer; box-shadow: var(--shadow);
  background: var(--navy);
}
.yt img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease, opacity .3s ease; }
.yt:hover img { transform: scale(1.04); opacity: .85; }
.yt__play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 74px; height: 74px; border-radius: 50%; background: var(--red); color: #fff;
  display: grid; place-items: center; font-size: 26px; padding-left: 5px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: transform .2s ease;
}
.yt:hover .yt__play { transform: translate(-50%, -50%) scale(1.12); }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ===== Galería social (fotos reales) ===== */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 980px; margin: 0 auto; }
.gallery a { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: 0 4px 14px rgba(38,42,94,.08); position: relative; }
.gallery img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; transition: transform .35s ease; }
.gallery a::after {
  content: "Ver en redes ↗"; position: absolute; inset: auto 0 0; padding: 30px 14px 12px;
  background: linear-gradient(transparent, rgba(28,30,51,.75)); color: #fff; font-size: 13px; font-weight: 700;
  opacity: 0; transition: opacity .25s ease;
}
.gallery a:hover::after { opacity: 1; }
.gallery a:hover img { transform: scale(1.06); }
@media (max-width: 700px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* ===== Timeline de rastreo ===== */
.trk { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.trk--msg { text-align: center; }
.trk--msg strong { color: var(--navy); font-size: 17px; }
.trk--msg span { color: var(--muted); font-size: 14px; }
.trk__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.trk__head strong { color: var(--navy); font-size: 17px; }
.trk__num { font-family: monospace; color: var(--muted); font-size: 13px; }
.trk__line { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-between; position: relative; }
.trk__line::before { content: ""; position: absolute; top: 11px; left: 8%; right: 8%; height: 3px; background: var(--line); border-radius: 3px; }
.trk__line li { position: relative; z-index: 1; text-align: center; flex: 1; }
.trk__line li i { display: block; width: 22px; height: 22px; margin: 0 auto 8px; border-radius: 50%; background: var(--white); border: 3px solid var(--line); transition: all .3s ease; }
.trk__line li.done i { background: var(--navy); border-color: var(--navy); }
.trk__line li.now i { background: var(--red); border-color: var(--red); box-shadow: 0 0 0 6px rgba(202,54,45,.15); animation: trk-pulse 1.6s ease infinite; }
.trk__line li span { font-size: 12px; color: var(--muted); font-weight: 700; }
.trk__line li.done span, .trk__line li.now span { color: var(--navy); }
.trk__line li.now span { color: var(--red); }
@keyframes trk-pulse { 0%,100% { box-shadow: 0 0 0 5px rgba(202,54,45,.15); } 50% { box-shadow: 0 0 0 9px rgba(202,54,45,.07); } }
.trk__alerta { background: #fdf0ef; border: 1px solid #f3c9c5; color: var(--red); border-radius: 10px; padding: 14px 18px; font-size: 14px; font-weight: 600; }
.trk__fecha { color: var(--muted); font-size: 12px; margin-top: 16px; }
.trk__btn { margin-top: 16px; }
@media (max-width: 560px) { .trk__line li span { font-size: 10px; } }

/* ===== Reveal on scroll ===== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal--visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ===== Cursor paquetito en el hero ===== */
.cursor-caja {
  position: fixed; top: 0; left: 0; z-index: 80; font-size: 22px;
  pointer-events: none; opacity: 0; transition: opacity .25s ease;
  will-change: transform; filter: drop-shadow(0 3px 6px rgba(0,0,0,.25));
}
.cursor-caja--on { opacity: 1; }

/* ===== Easter egg: lluvia de cajitas 📦 ===== */
.box-rain { position: fixed; top: -60px; z-index: 999; font-size: 28px; pointer-events: none; animation: box-fall linear forwards; }
@keyframes box-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}

/* ===== WhatsApp flotante ===== */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  background: #25D366; color: #073; font-weight: 700; font-size: 14px;
  padding: 13px 20px; border-radius: 999px; box-shadow: var(--shadow);
}
.wa-float:hover { transform: translateY(-2px); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero__visual { order: -1; aspect-ratio: 16/10; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .reasons { grid-template-columns: repeat(2, 1fr); }
  .franq { grid-template-columns: 1fr; }
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav .btn--wa { margin-left: auto; }
  /* menú desplegable móvil: la nav completa se expande a pantalla llena
     (el backdrop-filter del header rompe position:fixed en hijos, por eso
     el panel se expande DENTRO de la nav en lugar de usar fixed) */
  .nav--open {
    height: 100dvh; align-content: flex-start; flex-wrap: wrap;
    overflow-y: auto; background: var(--bg);
  }
  .nav--open .nav__links {
    display: flex; flex-direction: column; gap: 4px;
    order: 10; width: 100%; margin: 26px 0 0;
  }
  .nav--open .nav__links a {
    font-size: 26px; font-weight: 700; color: var(--navy);
    padding: 16px 4px; border-bottom: 1px solid var(--line);
  }
  .nav--open .nav__links a::after { display: none; }
  .nav--open .nav__links a:hover { transform: none; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .branches { grid-template-columns: 1fr; }
}

/* ===== Modo oscuro (al FINAL para ganar en cascada) ===== */
/* ===== Modo oscuro automático (según el sistema del visitante) ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --navy: #8f96e8;          /* navy claro para textos sobre fondo oscuro */
    --bg: #14152b;
    --white: #1d1f3d;         /* superficie de tarjetas */
    --ink: #e8e9f4;
    --muted: #a7aac6;
    --line: #2e3057;
    --shadow: 0 10px 30px rgba(0, 0, 0, .45);
    --nav-bg: rgba(20,21,43,.9);
    color-scheme: dark;
  }
  /* bloques que en claro son navy sólido conservan su fondo original */
  .packaging, .section--franq, .page-hero { background: #262A5E; }
  .franq__text h2, .page-hero h1, .packaging__caption { color: #fff; }
  /* la cinta de logos se queda clara (logos diseñados para fondo blanco) */
  .carriers { background: #f2f2f5; border-color: #2e3057; }
  .btn--wa { background: #3a4090; color: #fff; }
  .btn--outline { color: var(--ink); border-color: var(--muted); }
  .btn--outline:hover { background: var(--ink); color: #14152b; }
  .btn--primary { color: #fff; }
  .hero__visual, .franq__visual { box-shadow: 0 10px 30px rgba(0,0,0,.5); }
  .footer { background: #0c0d1e; }
  .hero__title, .section__head h2 { color: #cdd1fa; }
}
