/* Portada de Democa: diseño en 3D con CSS (perspectiva y transformaciones), sin librerías. */
.home { max-width: 1120px; padding-top: 8px; }
.gold { color: var(--gold); }
.kicker { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 13px; color: var(--muted); letter-spacing: .5px; margin: 0; }
.small { font-size: 14px; }

/* Portada */
.hero { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; min-height: 560px; }
.hero h1 { font-size: clamp(36px, 7vw, 64px); letter-spacing: -1.5px; line-height: 1.02; margin: 16px 0; }
.lead { font-size: 18px; color: var(--muted); max-width: 520px; }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 8px; }
.cta.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }

/* Escenario 3D con dos móviles */
.stage { position: relative; height: 470px; perspective: 1400px; }
.rig { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--tx, 6deg)) rotateY(var(--ty, -18deg)); transition: transform .25s ease-out; }
.phone { position: absolute; left: 50%; top: 50%; width: 200px; aspect-ratio: 9 / 16; margin: calc(200px * -16 / 18) 0 0 -100px; border-radius: 30px; border: 7px solid #1a1a1a; background: #000; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.45), 0 0 0 1px #333; }
.phone img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phone.front { transform: translate3d(40px, 0, 60px); animation: flotar 6s ease-in-out infinite; }
.phone.back { transform: translate3d(-90px, 30px, -120px) rotateY(18deg); opacity: .9; animation: flotar 7s ease-in-out infinite reverse; }
.token { position: absolute; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3b0, var(--gold) 55%, #8a6d12); color: #000; font-weight: 900; box-shadow: 0 10px 30px rgba(201,162,39,.35); transform-style: preserve-3d; }
.token.t1 { right: 6%; top: 12%; transform: translateZ(140px); animation: girar 5s linear infinite; }
.token.t2 { left: 8%; bottom: 10%; width: 48px; height: 48px; transform: translateZ(100px); animation: girar 7s linear infinite reverse; }
@keyframes flotar { 50% { translate: 0 -14px; } }
@keyframes girar { to { rotate: y 360deg; } }

/* Cinta LED de estadio */
.led { position: relative; overflow: hidden; margin: 24px -16px; background: #050505; border-block: 1px solid #222; height: 46px; display: flex; align-items: center; }
.led::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle, transparent 55%, rgba(0,0,0,.55) 56%) 0 0 / 4px 4px; }
.led-track { display: flex; white-space: nowrap; animation: cinta 28s linear infinite; }
.led-track span { padding-right: 48px; font: 700 18px/1 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 1px; color: #e8c547; text-shadow: 0 0 8px rgba(232,197,71,.8); }
@keyframes cinta { to { transform: translateX(-50%); } }

/* Tarjetas que giran en 3D */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.flip { perspective: 1000px; height: 200px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.flip .inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.flip.on .inner { transform: rotateY(180deg); }
@media (hover: hover) { .flip:hover .inner { transform: rotateY(180deg); } }
.face { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 22px; border-radius: 22px; border: 1px solid var(--line); background: var(--card); backface-visibility: hidden; }
.face.back { transform: rotateY(180deg); background: var(--text); color: var(--bg); justify-content: center; font-size: 16px; line-height: 1.5; }
.face strong { font-size: 20px; line-height: 1.2; }
.ico { font-size: 30px; }
.hint { font-size: 13px; color: var(--muted); }
.flip:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 22px; }

/* Cómo funciona: cubo 3D */
.how-wrap { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; }
.cube-scene { width: 200px; height: 200px; margin: 24px auto; perspective: 800px; }
.cube { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; animation: cubo 16s linear infinite; }
.cube .f { position: absolute; inset: 0; display: grid; place-items: center; padding: 18px; text-align: center; font-weight: 800; font-size: 18px; border-radius: 18px; border: 1px solid #333; background: #0b0b0b; color: #fff; }
.cube .f.oro { background: radial-gradient(circle at 35% 30%, #fff3b0, #e8c547 55%, #8a6d12); color: #000; }
.f1 { transform: translateZ(100px); } .f2 { transform: rotateY(90deg) translateZ(100px); } .f3 { transform: rotateY(180deg) translateZ(100px); }
.f4 { transform: rotateY(-90deg) translateZ(100px); } .f5 { transform: rotateX(90deg) translateZ(100px); } .f6 { transform: rotateX(-90deg) translateZ(100px); }
@keyframes cubo { from { transform: rotateX(-18deg) rotateY(0); } to { transform: rotateX(-18deg) rotateY(-360deg); } }
.steps { counter-reset: paso; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: paso; position: relative; padding: 16px 16px 16px 64px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.steps li::before { content: counter(paso); position: absolute; left: 16px; top: 14px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--bg); font-weight: 800; }

/* Galería de pantallas en 3D */
.shots { perspective: 1600px; display: flex; justify-content: center; gap: 4%; padding: 24px 0 8px; overflow: hidden; }
.shots .phone { position: relative; left: auto; top: auto; margin: 0; width: 22%; max-width: 190px; min-width: 120px; border-width: 5px; border-radius: 22px; animation: none; }
.shots .phone:nth-child(1) { transform: rotateY(28deg) translateZ(-40px); }
.shots .phone:nth-child(2) { transform: rotateY(10deg); }
.shots .phone:nth-child(3) { transform: rotateY(-10deg); }
.shots .phone:nth-child(4) { transform: rotateY(-28deg) translateZ(-40px); }

.trust { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; padding: 0; list-style: none; }
.trust li { border: 1px solid var(--line); border-radius: 18px; padding: 16px; background: var(--card); }
.trust b { display: block; margin-bottom: 4px; }

@media (min-width: 900px) {
  .hero { grid-template-columns: 1.05fr 1fr; }
  .stage { height: 560px; }
  .phone { width: 240px; margin: calc(240px * -16 / 18) 0 0 -120px; }
  .how-wrap { grid-template-columns: 280px 1fr; }
  .led { margin-inline: calc(50% - 50vw); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
