/* ============================================================
   MapGestión — prototipo inmersivo · Mobile-First
   Variables + Flexbox/Grid. Sin frameworks.
   ============================================================ */
:root {
  --ink: #020617;          /* fondo base */
  --panel: #0d1526;        /* superficies */
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #818cf8;       /* indigo */
  --accent-2: #c4b5fd;     /* violeta */
  --teal: #89f5e7;         /* acento de marca */
  --radius: 16px;
  --maxw: 1200px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--ink);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.section-title { font-size: clamp(1.6rem, 5vw, 2.75rem); font-weight: 800; letter-spacing: -.02em; text-align: center; }
.section-sub { color: var(--muted); text-align: center; margin: .6rem auto 2.5rem; max-width: 42ch; }

/* ===== Botones (grandes y accesibles; hover en PC, activo en móvil) ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 1.6rem; border-radius: 12px;
  font-weight: 700; font-size: 1rem; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.btn--lg { min-height: 60px; padding: 0 2.2rem; font-size: 1.1rem; }
.btn--primary { background: linear-gradient(100deg, var(--accent), var(--accent-2)); color: #0b1020; box-shadow: 0 10px 30px rgba(129,140,248,.35); }
.btn--ghost { background: rgba(255,255,255,.06); color: #fff; border: 1px solid rgba(255,255,255,.15); }
.btn:active { transform: scale(.97); }               /* estado activo claro (móvil) */
@media (hover: hover) {                                /* hover elegante solo en PC */
  .btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(129,140,248,.5); }
  .btn--ghost:hover { background: rgba(255,255,255,.12); }
}

/* ============================================================
   1 · HERO — 100vh / 100vw
   ============================================================ */
.hero { position: relative; width: 100vw; min-height: 100svh; display: grid; place-items: center; text-align: center; overflow: hidden; }
.hero__bg {
  position: absolute; inset: -10% 0; /* margen extra para el parallax */
  background: url('assets/screenshots/mapa-vivo.png') center/cover no-repeat;
  will-change: transform;
}
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(2,6,23,.55), rgba(2,6,23,.85)); }
.hero__content { position: relative; z-index: 2; width: min(100% - 2.5rem, 760px); }
.hero__eyebrow { text-transform: uppercase; letter-spacing: .25em; font-size: .8rem; color: var(--teal); margin-bottom: 1rem; }
/* Texto Hero: más pequeño de lo habitual, pero grueso y nítido */
.hero__title { font-size: clamp(2rem, 6vw, 3.5rem); font-weight: 900; letter-spacing: -.03em; line-height: 1.05; }
.hero__desc { color: #cbd5e1; margin: 1rem auto 2rem; max-width: 46ch; }
.hero__actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }

.hero__scroll { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.4); border-radius: 14px; z-index: 2; }
.hero__scroll span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; background: #fff; border-radius: 2px; transform: translateX(-50%); animation: scrolldot 1.6s infinite; }
@keyframes scrolldot { 0% { opacity: 0; top: 8px; } 50% { opacity: 1; } 100% { opacity: 0; top: 22px; } }

/* ============================================================
   2 · OPERACIONES
   ============================================================ */
.ops { padding: 6rem 0; }
.route { position: relative; width: 100%; margin: 2rem 0 4rem; }
.route__svg { width: 100%; height: auto; }
.car { position: absolute; top: 0; left: 0; font-size: 2rem; will-change: transform; filter: drop-shadow(0 6px 12px rgba(0,0,0,.5)); }

.cards { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.card {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius); padding: 1.6rem;
}
.card__ico { font-size: 1.8rem; display: block; margin-bottom: .6rem; }
.card h3 { font-size: 1.15rem; margin-bottom: .3rem; }
.card p { color: var(--muted); font-size: .95rem; }

/* ----- Simulador sobre el mapa real ----- */
.map-sim { position: relative; margin: 3rem auto 0; max-width: 960px; border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(255,255,255,.1); box-shadow: 0 30px 70px rgba(0,0,0,.55); }
.map-sim__img { width: 100%; display: block; }
.map-sim__layer { position: absolute; inset: 0; }

/* Chip de unidad que se acomoda en el spot. --c = color de estado. */
.spot {
  position: absolute; transform: translate(-50%, -50%);
  font: 800 10px/1 'Inter', sans-serif; color: #0b1020;   /* label oscuro */
  background: var(--c); padding: 4px 6px; border-radius: 6px; white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0,0,0,.45); will-change: transform, opacity;
}
/* Anillo de pulso, del mismo color de estado */
.spot::before {
  content: ""; position: absolute; inset: -4px; border-radius: 9px;
  border: 2px solid var(--c); opacity: .6; animation: spotpulse 2.4s ease-out infinite;
}
@keyframes spotpulse { 0% { transform: scale(1); opacity: .6; } 70%, 100% { transform: scale(1.8); opacity: 0; } }

.spot--avail  { --c: #34d399; }
.spot--prep   { --c: #fbbf24; }
.spot--patio  { --c: #818cf8; }
.spot--taller { --c: #f87171; }

.map-sim__legend {
  position: absolute; left: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: .5rem .9rem;
  background: rgba(2,6,23,.6); backdrop-filter: blur(6px); padding: .5rem .7rem; border-radius: 10px;
  font-size: .72rem; color: #cbd5e1;
}
.map-sim__legend span { display: inline-flex; align-items: center; gap: .35rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot--avail { background: #34d399; } .dot--prep { background: #fbbf24; }
.dot--patio { background: #818cf8; } .dot--taller { background: #f87171; }

@media (max-width: 600px) { .spot { font-size: 8px; padding: 3px 4px; } .map-sim__legend { font-size: .65rem; } }

/* ============================================================
   3 · UI FLOTANTE
   ============================================================ */
.ui-float { padding: 6rem 0; }
.stage { position: relative; width: min(100% - 2.5rem, var(--maxw)); margin: 2rem auto 0; min-height: 60vh; }
.panel { position: absolute; border-radius: 14px; border: 1px solid rgba(255,255,255,.1); box-shadow: 0 30px 60px rgba(0,0,0,.5); will-change: transform; }
.panel--main { position: relative; width: 100%; z-index: 1; }
.panel--a { width: 46%; top: -6%; right: -2%; z-index: 3; }
.panel--b { width: 40%; bottom: -8%; left: -3%; z-index: 2; }
.glow { position: absolute; border-radius: 50%; filter: blur(90px); z-index: 0; }
.glow--1 { width: 320px; height: 320px; background: rgba(129,140,248,.35); top: -10%; left: 10%; }
.glow--2 { width: 280px; height: 280px; background: rgba(137,245,231,.25); bottom: -10%; right: 8%; }

/* ============================================================
   4 · CTA + Footer
   ============================================================ */
.cta { padding: 7rem 0; text-align: center; }
.cta__inner h2 { font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 900; letter-spacing: -.02em; }
.cta__inner p { color: var(--muted); margin: .8rem 0 2rem; }
.foot { padding: 2.5rem 0; color: var(--muted); text-align: center; font-size: .85rem; border-top: 1px solid rgba(255,255,255,.08); }

/* ===== Estado inicial de las animaciones GSAP (evita flash) =====
   Solo se ocultan si hay JS (clase .js). Sin JS/GSAP, el contenido se ve. */
.js .gsap-fade, .js .gsap-card { opacity: 0; }

/* ============================================================
   Desktop: paneles flotantes más grandes, cards en cuadrícula
   ============================================================ */
@media (min-width: 768px) {
  .cards { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .panel--a { width: 38%; }
  .panel--b { width: 34%; }
}
@media (min-width: 1024px) {
  .cards { grid-template-columns: repeat(4, 1fr); }
  .stage { min-height: 70vh; }
}

/* ============================================================
   3.5 · TRANSFORMACIÓN (Excel -> formato -> mapa)
   Móvil (por defecto): las 3 etapas se apilan y aparecen con fade.
   ============================================================ */
.xform { padding: 6rem 0; }
.xform__head { text-align: center; width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.xform__cap { color: var(--muted); margin-top: .6rem; min-height: 1.5em; }
.xform__stage { position: relative; width: min(100% - 2.5rem, var(--maxw)); margin: 2.5rem auto 0; }
.xpanel { margin-bottom: 2rem; }

/* Excel (aspecto claro para contrastar con el "después" oscuro) */
.xls { width: min(100%, 720px); margin: 0 auto; background: #fff; color: #1f2937; border-radius: 10px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.55); font-size: .82rem; }
.xls__bar { background: #e5e7eb; padding: .55rem .8rem; display: flex; align-items: center; gap: .4rem; color: #6b7280; font-size: .75rem; }
.xls__bar span { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.xls__grid { width: 100%; border-collapse: collapse; }
.xls__grid th, .xls__grid td { border: 1px solid #e5e7eb; padding: .4rem .6rem; text-align: left; }
.xls__grid thead th { background: #f3f4f6; color: #9ca3af; font-weight: 600; }
.xls__grid td:first-child { background: #f3f4f6; color: #9ca3af; text-align: center; width: 2rem; }

/* Formato MapGestión */
.xcards { display: grid; gap: .8rem; width: min(100%, 560px); margin: 0 auto; }
.xcard { display: flex; align-items: center; gap: .8rem; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 1rem 1.2rem; }
.xcard b { font-size: 1.05rem; }
.xcard small { color: var(--muted); margin-left: auto; }
.s { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.s--avail { background: #34d399; } .s--prep { background: #fbbf24; } .s--patio { background: #818cf8; } .s--taller { background: #f87171; }

/* Mapa sandbox */
.xmap { position: relative; width: min(100%, 860px); margin: 0 auto; border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,.1); box-shadow: 0 24px 60px rgba(0,0,0,.55); }
.xmap img { width: 100%; display: block; }
.xmap__try { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); }

/* Desktop: etapas superpuestas y centradas para la timeline pineada */
@media (min-width: 900px) {
  .xform__sticky { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
  .xform__stage { height: 62vh; max-width: 900px; }
  .xpanel { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; }
}

/* ============================================================
   3.6 · Sandbox embebido
   ============================================================ */
.sandbox-live { padding: 6rem 0; text-align: center; }
.sandbox-frame {
  position: relative; max-width: 1100px; margin: 2.5rem auto 0;
  border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 30px 70px rgba(0,0,0,.55);
}
.sandbox-frame::before {
  content: ""; position: absolute; inset: -30px; z-index: -1;
  background: radial-gradient(closest-side, rgba(129,140,248,.25), transparent 70%);
}
.sandbox-frame iframe { display: block; width: 100%; }

/* ===== Accesibilidad: respeta reduce-motion (todo visible, sin animación) ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gsap-fade, .gsap-card { opacity: 1 !important; transform: none !important; }
  .hero__scroll span, .spot::before { animation: none; }
  /* Sin timeline: desapila las etapas para que se lean todas */
  .xpanel { position: relative !important; inset: auto !important; opacity: 1 !important; margin-bottom: 2rem; }
  .xform__sticky { min-height: 0 !important; }
  .xform__stage { height: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   Componentes traídos del og (nav, bento, por qué, pasos, prueba social)
   ============================================================ */
.material-symbols-outlined { font-family: 'Material Symbols Outlined'; vertical-align: middle; }
.grad { background: linear-gradient(100deg, #a5b4fc, #818cf8 40%, #c4b5fd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.js .reveal { opacity: 0; }
.reveal { transition: opacity .7s var(--ease), transform .7s var(--ease); }

/* Navbar flotante */
.nav { position: fixed; top: 16px; left: 0; right: 0; z-index: 50; padding: 0 16px; }
.nav__inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(16px); border-radius: 999px; padding: .5rem .6rem .5rem 1.1rem; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.nav__brand img { height: 26px; width: auto; display: block; }
.nav__links { display: none; gap: .2rem; }
.nav__links a { color: var(--muted); padding: .5rem .8rem; border-radius: 999px; font-size: .9rem; }
.nav__links a:hover { color: #fff; }
.btn--sm { min-height: 40px; padding: 0 1.1rem; font-size: .9rem; }
@media (min-width: 880px) { .nav__links { display: flex; } }

/* Bento de módulos */
.modules { padding: 6rem 0; }
.bento { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 2.5rem; }
.bento__card { position: relative; overflow: hidden; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 1.6rem; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.bento__ico { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 12px; background: rgba(129,140,248,.15); color: #a5b4fc; margin-bottom: .8rem; }
.bento__card h3 { font-size: 1.25rem; }
.bento__card p { color: var(--muted); margin-top: .3rem; }
.bento__img { display: none; }
@media (min-width: 820px) {
  .bento { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 200px; }
  .bento__card--lg { grid-column: span 2; grid-row: span 2; }
  .bento__card--wide { grid-column: span 3; }
  .bento__card--lg .bento__body, .bento__card--wide .bento__body { position: relative; max-width: 62%; z-index: 1; }
  .bento__card--lg .bento__img { display: block; position: absolute; right: 0; bottom: 0; width: 66%; border-top-left-radius: 16px; opacity: .7; }
  .bento__card--wide .bento__img--side { display: block; position: absolute; right: 0; top: 0; height: 100%; width: 46%; object-fit: cover; object-position: left; opacity: .4; -webkit-mask-image: linear-gradient(to right, transparent, #000); mask-image: linear-gradient(to right, transparent, #000); }
}

/* Por qué nos contratan */
.why { padding: 6rem 0; }
.why__grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 2.5rem; }
.why__card { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 1.8rem; }
.why__ico { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 14px; background: rgba(129,140,248,.15); color: #a5b4fc; font-size: 1.6rem; margin-bottom: 1rem; }
.why__card h3 { font-size: 1.4rem; margin-bottom: .5rem; }
.why__card p { color: var(--muted); }
@media (min-width: 820px) { .why__grid { grid-template-columns: repeat(3, 1fr); } }

/* Pasos de implementación */
.steps-sec { padding: 6rem 0; }
.steps { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 2.5rem; }
.step { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 2rem; }
.step__top { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; color: #a5b4fc; }
.step__num { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 50%; background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; font-weight: 800; box-shadow: 0 10px 24px rgba(99,102,241,.35); }
.step h3 { font-size: 1.25rem; margin-bottom: .3rem; }
.step p { color: var(--muted); }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* Prueba social */
.proof { padding: 5rem 0; border-top: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06); }
.proof__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; text-align: center; }
.proof__num { font-size: clamp(2rem, 6vw, 3.6rem); font-weight: 900; }
.proof__stats p { color: var(--muted); font-size: .82rem; margin-top: .3rem; }
.proof__kicker { text-align: center; text-transform: uppercase; letter-spacing: .2em; font-size: .7rem; color: #64748b; margin: 3rem 0 1rem; }
.proof__logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 2.5rem; color: #cbd5e1; font-weight: 800; font-size: 1.1rem; }
.proof__logos span { filter: grayscale(1); opacity: .5; }
.proof__quote { max-width: 640px; margin: 3.5rem auto 0; text-align: center; }
.proof__quote blockquote { font-size: clamp(1.3rem, 3.5vw, 1.8rem); font-weight: 600; color: #fff; line-height: 1.35; }
.proof__quote figcaption { color: #64748b; margin-top: 1rem; font-size: .9rem; }

/* CTA + footer extra */
.cta__actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.foot__inner { display: flex; flex-direction: column; align-items: center; gap: 1rem; justify-content: space-between; }
.foot__logo { height: 26px; width: auto; }
.foot__links { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; justify-content: center; }
.foot__links a { color: var(--muted); font-size: .9rem; }
.foot__links a:hover { color: #fff; }
.foot__copy { text-align: center; color: #475569; font-size: .8rem; margin-top: 1.5rem; }
@media (min-width: 760px) { .foot__inner { flex-direction: row; } }
