/* Estilos de la portada pública (home.php). */

.section { padding: 84px 20px; }
.band { background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.02em; margin-bottom: 12px; }
.section-head p { margin: 0; font-size: 17px; color: var(--muted); }
.kicker { display: block; margin-bottom: 10px; color: var(--cyan); font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Aparición al hacer scroll. Solo se oculta si el script cargó (clase .js en <html>). */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 76px 0 64px; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 420px at 82% 18%, rgba(157, 78, 221, 0.3), transparent 70%),
    radial-gradient(520px 420px at 8% 92%, rgba(0, 217, 255, 0.16), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.35;
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse at 70% 40%, #000 10%, transparent 70%);
  pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 99px; background: rgba(17, 28, 51, 0.7); color: var(--text); font-size: 13px; font-weight: 600; }
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(61, 220, 151, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); } }
.hero h1 { font-size: clamp(38px, 5.6vw, 64px); line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 20px; }
.squiggle { position: relative; white-space: nowrap; }
.squiggle svg { position: absolute; left: 0; bottom: -0.18em; width: 100%; height: 0.32em; overflow: visible; }
.squiggle path { fill: none; stroke: var(--cyan); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 320; stroke-dashoffset: 320; animation: draw 1.1s 0.5s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.lead { max-width: 540px; font-size: 18px; color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 18px; }
.ticks { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.ticks li::before { content: "✓ "; color: var(--ok); font-weight: 700; }

.btn.shine { position: relative; overflow: hidden; }
.btn.shine::after { content: ""; position: absolute; top: 0; left: -80%; width: 50%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent); transform: skewX(-20deg); transition: left 0.6s; }
.btn.shine:hover::after { left: 130%; }
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(4px); }

.hero-art { position: relative; display: grid; justify-items: center; gap: 18px; perspective: 900px; }
.qr-stage { position: relative; padding: 18px; border-radius: 28px; background: #fff; box-shadow: 0 40px 90px rgba(0, 217, 255, 0.22), 0 0 0 1px var(--line); transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.2s ease-out; overflow: hidden; }
.qr-stage canvas { display: block; width: min(280px, 68vw); height: auto; transition: opacity 0.25s; }
.qr-stage::after { content: ""; position: absolute; left: 0; right: 0; top: -20%; height: 18%; background: linear-gradient(180deg, transparent, rgba(0, 217, 255, 0.35)); border-bottom: 2px solid var(--cyan); animation: scan 3.2s ease-in-out infinite; pointer-events: none; }
@keyframes scan { 0%, 15% { top: -20%; } 60%, 100% { top: 104%; } }
.chip { position: absolute; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; font-weight: 600; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4); animation: bob 5s ease-in-out infinite; }
.chip svg { width: 16px; height: 16px; }
.chip.c1 { top: -18px; left: 0; color: var(--ok); }
.chip.c2 { bottom: 34px; right: -2%; color: var(--cyan); animation-delay: -2.5s; }
@keyframes bob { 50% { transform: translateY(-10px); } }
.swatches { display: flex; align-items: center; gap: 10px; }
.swatches span { color: var(--muted); font-size: 13px; }
.swatches button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--bg); outline: 1px solid var(--line); cursor: pointer; transition: transform 0.15s, outline-color 0.15s; }
.swatches button:hover { transform: scale(1.18); }
.swatches button.on { outline: 2px solid var(--cyan); }

/* ---------- Cinta de usos ---------- */
.marquee { overflow: hidden; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg2); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee div { display: flex; gap: 44px; width: max-content; animation: slide 36s linear infinite; }
.marquee:hover div { animation-play-state: paused; }
.marquee span { color: var(--muted); font-weight: 600; white-space: nowrap; }
.marquee span::before { content: "◆"; margin-right: 44px; color: var(--purple); font-size: 10px; vertical-align: middle; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Casos con fotos ---------- */
.cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.case { position: relative; margin: 0; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), rotate 0.35s, translate 0.35s, box-shadow 0.35s; }
/* La inclinación y los hover usan rotate/translate sueltos para no chocar con el transform de .reveal. */
.case:nth-child(1) { rotate: -1.2deg; }
.case:nth-child(3) { rotate: 1.2deg; }
.case:hover { rotate: 0deg; translate: 0 -6px; box-shadow: 0 26px 60px rgba(0, 0, 0, 0.45); }
.case img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.6s; }
.case:hover img { transform: scale(1.06); }
.case figcaption { padding: 18px 20px 20px; }
.case h3 { margin: 0 0 6px; font-size: 18px; }
.case p { margin: 0; color: var(--muted); }
.sticker { position: absolute; top: 14px; left: 14px; padding: 5px 12px; border-radius: 99px; background: rgba(9, 17, 33, 0.82); backdrop-filter: blur(6px); color: var(--text); font-size: 12px; font-weight: 700; }

/* ---------- Beneficios ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; }
.spot { position: relative; margin: 0; overflow: hidden; transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), translate 0.25s, border-color 0.25s; }
.spot::before { content: ""; position: absolute; inset: 0; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(0, 217, 255, 0.14), transparent 70%); opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.spot:hover { translate: 0 -4px; border-color: rgba(0, 217, 255, 0.5); }
.spot:hover::before { opacity: 1; }
.spot p { margin: 0; }
.ico { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 14px; border-radius: 13px; background: linear-gradient(135deg, rgba(0, 217, 255, 0.18), rgba(157, 78, 221, 0.22)); border: 1px solid var(--line); color: var(--cyan); transition: transform 0.3s; }
.spot:hover .ico { transform: rotate(-8deg) scale(1.08); }
.ico svg, .chip svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico svg { width: 22px; height: 22px; }

/* ---------- Historia: cambiar el destino ---------- */
.split { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.photo { position: relative; }
.photo img { display: block; width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: 24px; border: 1px solid var(--line); }
.photo::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border-radius: 24px; background: var(--grad); opacity: 0.35; z-index: -1; }
.split h2 { font-size: clamp(28px, 3.4vw, 38px); letter-spacing: -0.02em; }
.split p { color: var(--muted); font-size: 17px; }
.route { margin-top: 26px; padding: 18px 20px; border-radius: 16px; border: 1px dashed var(--line); background: var(--panel); font-size: 14px; }
.route small { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.route code { font-size: 14px; }
.route .down { display: block; margin: 8px 0; color: var(--purple); }
.dest { display: inline-block; padding: 4px 12px; border-radius: 8px; background: rgba(0, 217, 255, 0.12); color: var(--text); font-weight: 600; transition: opacity 0.3s, transform 0.3s; }
.dest.out { opacity: 0; transform: translateY(8px); }

/* ---------- Plantillas ---------- */
.showcase { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 22px; align-items: start; }
.showcase figure { margin: 0; text-align: center; }
.showcase canvas { width: 100%; height: auto; padding: 12px; border-radius: 18px; background: #fff; transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.3s; }
.showcase figure:hover canvas { transform: translateY(-6px) rotate(-2deg); box-shadow: 0 22px 44px rgba(0, 0, 0, 0.45); }
.showcase figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; }

/* ---------- Pasos ---------- */
.steps { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; text-align: center; }
.steps::before { content: ""; position: absolute; top: 24px; left: 16%; right: 16%; border-top: 2px dashed var(--line); }
.steps > div { position: relative; }
.steps .step { width: 48px; height: 48px; margin: 0 0 6px; font-size: 20px; box-shadow: 0 0 0 8px var(--bg); }
.steps p { margin: 0; }

/* ---------- Precios ---------- */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-bottom: 22px; align-items: stretch; }
.price { position: relative; display: flex; flex-direction: column; margin: 0; transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), translate 0.25s, border-color 0.25s; }
.price:hover { translate: 0 -6px; border-color: rgba(0, 217, 255, 0.5); }
.price .per { margin: 2px 0 0; color: var(--ok); font-size: 13px; font-weight: 600; }
.price ul { flex: 1; margin: 16px 0 22px; padding: 0; list-style: none; }
.price li { padding: 6px 0; color: var(--muted); }
.price li::before { content: "✓  "; color: var(--ok); font-weight: 700; }
.price.featured { border-color: var(--cyan); background: var(--panel2); box-shadow: 0 24px 70px rgba(0, 217, 255, 0.14); }
.tag { position: absolute; top: -12px; left: 20px; padding: 3px 12px; border-radius: 99px; background: var(--grad); color: #06101f; font-size: 12px; font-weight: 700; }
.note { max-width: 720px; margin: 0 auto; text-align: center; color: var(--muted); }

/* ---------- Atención humana ---------- */
.human { display: grid; grid-template-columns: 1.2fr auto; gap: 28px; align-items: center; padding: 36px; border-color: rgba(37, 211, 102, 0.45); background: linear-gradient(120deg, rgba(37, 211, 102, 0.09), rgba(0, 217, 255, 0.05)); }
.human h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 8px; }
.human p { margin: 0; color: var(--muted); font-size: 17px; }
.bubble { max-width: 300px; padding: 14px 16px; border-radius: 16px 16px 16px 4px; background: #1f2c34; color: #e9edef; font-size: 14px; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35); }
.bubble + .bubble { margin: 10px 0 0 40px; border-radius: 16px 16px 4px 16px; background: #005c4b; }
.bubble small { display: block; margin-top: 4px; color: rgba(233, 237, 239, 0.6); font-size: 11px; text-align: right; }

/* ---------- Preguntas y cierre ---------- */
.narrow-sec { max-width: 780px; }
details.card { padding: 0; margin-bottom: 12px; transition: border-color 0.2s; }
details.card[open] { border-color: rgba(0, 217, 255, 0.5); }
details summary { display: flex; justify-content: space-between; gap: 12px; padding: 18px 22px; font-weight: 600; cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--cyan); font-size: 22px; line-height: 1; transition: transform 0.25s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 0; padding: 0 22px 20px; color: var(--muted); }
.final { padding: 56px 24px; text-align: center; border-color: var(--purple); background: linear-gradient(120deg, rgba(0, 217, 255, 0.1), rgba(157, 78, 221, 0.16)); }
.final h2 { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -0.02em; }
.final p { margin: 0 0 24px; color: var(--muted); font-size: 17px; }
.credit { text-align: center; color: var(--muted); font-size: 12px; opacity: 0.7; }
.credit a { color: inherit; }

.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 20; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--wa); color: #fff; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4); animation: pulse 2.6s infinite; transition: transform 0.2s; }
.wa-float:hover { transform: scale(1.1); }
.wa-float svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes pulse { 0% { box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.55); } 70% { box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 0 16px rgba(37, 211, 102, 0); } 100% { box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 0 0 rgba(37, 211, 102, 0); } }

@media (max-width: 860px) {
  .hero { padding: 44px 0 48px; }
  .hero-grid, .split, .human { grid-template-columns: minmax(0, 1fr); }
  .cases, .steps { grid-template-columns: minmax(0, 1fr); }
  .steps::before { display: none; }
  .case:nth-child(n) { rotate: 0deg; }
  .section { padding: 56px 16px; }
  .chip.c1 { left: 0; }
  .chip.c2 { right: 0; }
  .photo::before { inset: 12px -8px -12px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .chip, .marquee div, .qr-stage::after, .eyebrow i, .wa-float, .squiggle path { animation: none; }
  .squiggle path { stroke-dashoffset: 0; }
}
