/* dux landing — patrón Brentia con identidad terracota/cálida de dux (L1b).
   Fuente de verdad: CSS en PRODUCCIÓN + favicon oficial (DEFINICION.md §3).
   Primario #C2410C · profundos #7C2D12/#9A3412 · cremas #FBF7F1/#FFF7ED/#EDE4D8/#DCCFBE
   Ámbar #F59E0B/#FBBF24/#FCD34D · oscuro #121B2E · neutros #57534E/#292524
   Verde #22C55E · teal #1C5450/#0F766E · blanco #FFFFFF · PROHIBIDO morado. */

:root {
  --primary: #C2410C;
  --primary-dark: #9A3412;
  --primary-deep: #7C2D12;
  --cream: #FBF7F1;
  --cream-2: #FFF7ED;
  --sand: #EDE4D8;
  --sand-2: #DCCFBE;
  --amber: #F59E0B;
  --amber-light: #FBBF24;
  --amber-pale: #FCD34D;
  --success: #22C55E;
  --teal: #1C5450;
  --teal-2: #0F766E;
  --ink: #121B2E;          /* texto/titulares sobre claro */
  --muted: #57534E;
  --dark: #292524;
  --bg: #FBF7F1;
  --white: #FFFFFF;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(124, 45, 18, .10);
  font-size: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- Topbar (crema cálido, isotipo ψ terracota) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 247, 241, .95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(124, 45, 18, .14);
}
.topbar-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 1.25rem; text-decoration: none; letter-spacing: .02em; }
.brand-mark { width: 30px; height: 30px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: .95rem; transition: color .15s; }
.nav a:hover { color: var(--primary-dark); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; text-decoration: none;
  transition: transform .12s, box-shadow .12s, background .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(124, 45, 18, .22); }
.btn-sm { padding: 9px 18px; font-size: .9rem; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-wa { background: var(--success); color: var(--ink); }
.btn-wa:hover { background: #16A34A; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid rgba(18, 27, 46, .38); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-dark); }

/* ---------- Hero (crema cálido con brillos terracota/ámbar) ---------- */
.hero {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(194, 65, 12, .10), transparent 60%),
    radial-gradient(800px 420px at -10% 110%, rgba(245, 158, 11, .12), transparent 55%),
    linear-gradient(160deg, #FFF7ED 0%, #FBF7F1 55%, #EDE4D8 100%);
  color: var(--ink);
  padding: 84px 0 72px;
}
.eyebrow {
  color: var(--primary-dark); font-weight: 700; text-transform: uppercase;
  letter-spacing: .14em; font-size: .8rem; margin-bottom: 14px;
}
.hero-split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.hero-visual { position: relative; }
.hero-visual img {
  border-radius: var(--radius); border: 1px solid rgba(194, 65, 12, .35);
  box-shadow: 0 24px 60px rgba(124, 45, 18, .22), 0 4px 14px rgba(124, 45, 18, .14);
  width: 100%; position: relative; z-index: 1;
}
/* placeholder del hero mientras llegan las capturas (tarea L2) */
.hero-visual .visual-ph { display: none; }
.hero-visual.is-placeholder img { display: none; }
.hero-visual.is-placeholder .visual-ph {
  display: flex; flex-direction: column; gap: 14px;
  aspect-ratio: 16 / 10; padding: 26px;
  border-radius: var(--radius); border: 1px solid rgba(194, 65, 12, .35);
  background: linear-gradient(160deg, #121B2E, #7C2D12);
  box-shadow: 0 24px 60px rgba(124, 45, 18, .22), 0 4px 14px rgba(124, 45, 18, .14);
}
.ph-bar { height: 14px; width: 42%; border-radius: 7px; background: rgba(245, 158, 11, .75); }
.ph-row { height: 10px; border-radius: 5px; background: rgba(255, 255, 255, .18); }
.ph-row.w80 { width: 80%; } .ph-row.w72 { width: 72%; } .ph-row.w65 { width: 65%; } .ph-row.w55 { width: 55%; }
.hero h1 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); line-height: 1.15; max-width: 820px; font-weight: 800; color: var(--ink); }
.hero .accent { color: var(--primary); }
.hero .lead { margin-top: 20px; font-size: 1.15rem; color: var(--muted); max-width: 680px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 34px; }
.hero-points { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 26px; margin-top: 34px; padding: 0; }
.hero-points li { color: var(--muted); font-size: .95rem; padding-left: 22px; position: relative; }
.hero-points li::before { content: "✓"; position: absolute; left: 0; color: var(--amber); font-weight: 700; }
.hero-note { margin-top: 18px; font-size: .9rem; color: var(--muted); }
.hero-note strong { color: var(--primary-dark); }

/* ---------- Secciones ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--sand); }
.section h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); color: var(--ink); max-width: 760px; line-height: 1.2; }
.section-lead { margin-top: 14px; color: var(--muted); max-width: 640px; font-size: 1.05rem; }

.grid { display: grid; gap: 22px; margin-top: 42px; }
.features { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--white); border-radius: var(--radius); padding: 28px 26px;
  box-shadow: var(--shadow); border: 1px solid rgba(124, 45, 18, .07);
}
.card-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #FFF7ED, #EDE4D8);
  border: 1px solid rgba(194, 65, 12, .28);
  margin-bottom: 14px; color: var(--primary);
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { color: var(--ink); font-size: 1.08rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .95rem; }

/* ---------- Pasos ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; margin-top: 46px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 800; font-size: 1.1rem;
  margin-bottom: 14px;
}
.steps h3 { color: var(--ink); font-size: 1.02rem; margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: .9rem; }

/* ---------- reveal + hero anim ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s cubic-bezier(.2,.7,.2,1), transform .65s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hero-visual img, .hero-visual.is-placeholder .visual-ph { animation: floaty 7s ease-in-out infinite; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.hero h1, .hero .lead, .hero-ctas, .hero-points, .hero-note, .hero .eyebrow { animation: rise .8s cubic-bezier(.2,.7,.2,1) backwards; }
.hero .eyebrow { animation-delay: .05s; }
.hero h1 { animation-delay: .15s; }
.hero .lead { animation-delay: .28s; }
.hero-ctas { animation-delay: .4s; }
.hero-points { animation-delay: .52s; }
.hero-note { animation-delay: .62s; }
.hero-visual { animation: rise .9s cubic-bezier(.2,.7,.2,1) .35s backwards; }
@media (prefers-reduced-motion: reduce) { .hero-visual img, .hero-visual .visual-ph { animation: none; } .hero *{animation:none!important} }

/* ---------- lightbox (fade + zoom de entrada, deslizamiento direccional dentro) ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: flex;
  background: rgba(18, 27, 46, .92);
  backdrop-filter: blur(6px);
  align-items: center; justify-content: center; flex-direction: column; gap: 14px;
  padding: 4vh 4vw;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .3s ease, visibility 0s linear .3s;
}
.lightbox.open {
  opacity: 1; visibility: visible; pointer-events: auto;
  transition: opacity .3s ease;
}
.lightbox img {
  max-width: min(1500px, 92vw); max-height: 82vh; width: auto; height: auto;
  border-radius: 10px; border: 1px solid rgba(245, 158, 11, .45);
  box-shadow: 0 30px 90px rgba(0,0,0,.6);
  transform: scale(.78) translateY(26px); opacity: 0;
  transition: transform .45s cubic-bezier(.2,.7,.2,1), opacity .45s cubic-bezier(.2,.7,.2,1);
}
.lightbox.open img { transform: none; opacity: 1; }
.lightbox .lb-cap { opacity: 0; transform: translateY(12px); transition: opacity .45s ease .08s, transform .45s cubic-bezier(.2,.7,.2,1) .08s; }
.lightbox.open .lb-cap { opacity: 1; transform: none; }
.lightbox .lb-cap { color: rgba(255,255,255,.85); font-size: .95rem; font-weight: 600; text-align: center; max-width: 70vw; }
.lightbox .lb-x {
  position: absolute; top: 18px; right: 22px;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.1); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: .15s;
}
.lightbox .lb-x:hover { background: var(--amber); color: var(--ink); }
.lightbox .lb-x svg { width: 20px; height: 20px; }
.lightbox .lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.12); color: #fff; display: flex; align-items: center; justify-content: center; transition: .15s;
}
.lightbox .lb-nav:hover { background: var(--amber); color: var(--ink); }
.lightbox .lb-prev { left: 18px; }
.lightbox .lb-next { right: 18px; }
.lightbox .lb-nav svg { width: 22px; height: 22px; }

/* ---------- Capturas: carrusel con transición dirigida ---------- */
.carousel { position: relative; margin-top: 46px; }
.stage {
  position: relative; width: 100%; max-width: 920px; margin: 0 auto;
  aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden;
  background: #121B2E;
  border: 1px solid rgba(194, 65, 12, .45);
  box-shadow: 0 0 0 2px rgba(194, 65, 12, .22), 0 26px 70px rgba(124, 45, 18, .28);
  cursor: zoom-in;
  transition: box-shadow .4s ease;
}
.stage:hover { box-shadow: 0 0 0 2px rgba(194, 65, 12, .45), 0 30px 80px rgba(124, 45, 18, .38); }
.frame { position: absolute; inset: 0; opacity: 0; z-index: 1; margin: 0; }
.frame img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
/* placeholder de slide mientras llegan las capturas (tarea L2) */
.frame.is-placeholder img { display: none; }
.frame.is-placeholder::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 300px at 70% 20%, rgba(194, 65, 12, .30), transparent 60%),
    radial-gradient(500px 260px at 15% 90%, rgba(245, 158, 11, .14), transparent 55%),
    linear-gradient(160deg, #121B2E, #7C2D12);
}
.frame.is-placeholder::after {
  content: "Captura de demostración próximamente";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.55); font-weight: 600; font-size: 1.05rem;
  letter-spacing: .04em; text-align: center; padding: 0 40px;
}
.frame .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 34px 22px 16px; color: #fff; font-size: .92rem; font-weight: 600;
  background: linear-gradient(to top, rgba(18, 27, 46, .9), transparent);
  pointer-events: none; z-index: 2;
}
.frame.is-active { opacity: 1; z-index: 3; }
.stage .frame { transition: transform .65s cubic-bezier(.2,.7,.2,1), opacity .65s cubic-bezier(.2,.7,.2,1), filter .65s; }
.carousel-nav {
  position: absolute; top: calc(50% - 26px); transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(18, 27, 46, .72); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .12s; z-index: 8;
}
.carousel-nav:hover { background: var(--primary); color: #fff; }
.carousel-nav:active { transform: translateY(-50%) scale(.92); }
.carousel-nav svg { width: 22px; height: 22px; }
.carousel-nav.prev { left: -6px; }
.carousel-nav.next { right: -6px; }
.carousel-cap {
  text-align: center; margin-top: 20px; min-height: 1.7em;
  color: var(--ink); font-weight: 600; font-size: .98rem;
}
.carousel-cap.swap { animation: cap-swap .5s cubic-bezier(.2,.7,.2,1); }
@keyframes cap-swap { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.carousel-dots { display: flex; gap: 9px; justify-content: center; margin-top: 18px; }
.carousel-dots button {
  width: 8px; height: 8px; border-radius: 50%; border: none; padding: 0;
  background: rgba(18, 27, 46, .22); cursor: pointer; transition: .25s;
}
.carousel-dots button:hover { background: var(--primary); }
.carousel-dots button.on { background: var(--primary); transform: scale(1.4); }

/* ---------- Precio ---------- */
.plans { grid-template-columns: minmax(0, 420px); justify-content: center; }
.plan { text-align: center; padding: 40px 30px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.plan h3 { font-size: 1.25rem; }
.plan-price { font-size: 3rem; font-weight: 800; color: var(--ink); line-height: 1.1; }
.plan-price span { font-size: 1rem; font-weight: 600; color: var(--muted); }
.plan-desc { color: var(--muted); font-size: .95rem; margin-bottom: 10px; }
.plan-featured { border: 2px solid var(--primary); position: relative; }
.plan-tag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; font-size: .72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em; padding: 5px 14px; border-radius: 999px;
}
.plans-alt { margin-top: 30px; text-align: center; color: var(--muted); }
.plans-alt a { color: var(--primary-dark); font-weight: 700; }

/* ---------- CTA final ---------- */
.cta-final {
  background: linear-gradient(160deg, #121B2E 0%, #7C2D12 100%);
  color: #fff; text-align: center; padding: 80px 0;
}
.cta-final h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.cta-final p { margin-top: 12px; color: rgba(255,255,255,.85); }
.cta-final .hero-ctas { justify-content: center; }
.cta-final .btn-ghost { color: #fff; border-color: rgba(255,255,255,.45); }
.cta-final .btn-ghost:hover { border-color: var(--amber-light); color: var(--amber-light); }

/* ---------- Footer ---------- */
.footer { background: #121B2E; color: rgba(255,255,255,.75); padding: 52px 0 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 36px; }
.footer strong { color: #fff; font-size: 1.1rem; }
.footer a { color: var(--amber-light); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-contact p { margin-bottom: 6px; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.08); padding-top: 18px; padding-bottom: 22px; font-size: .82rem; color: rgba(255,255,255,.55); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
  .hero-split { grid-template-columns: 1fr; gap: 36px; }
  .hero-visual { order: -1; }
}
@media (max-width: 600px) {
  .features, .plans, .steps { grid-template-columns: 1fr; }
  .hero { padding: 68px 0 60px; }
  .section { padding: 60px 0; }
  .topbar-inner { justify-content: space-between; }
  .carousel-nav.prev { left: 8px; }
  .carousel-nav.next { right: 8px; }
}
