/* =====================================================================
   Demo en vivo: la app de verdad (app/?demo) dentro de un portátil y un móvil.
   En el móvil solo se enseña el móvil.
   ===================================================================== */
.demo-sec { padding-top: 40px; }
.demo-head { text-align: center; max-width: 640px; margin: 0 auto; }
.demo-head h2 { font-size: clamp(32px, 4.4vw, 52px); letter-spacing: -.035em; line-height: 1.05; }
.demo-head .lead { margin: 14px auto 0; color: #565A68; }

.demo-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 26px auto 0; }
.demo-tabs button { font: inherit; font-size: 15px; font-weight: 600; padding: 10px 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid #fff; background: rgba(255, 255, 255, .75); color: #3A3D4A; box-shadow: 0 6px 16px -12px rgba(70, 50, 160, .45);
  transition: background .15s ease, color .15s ease, transform .15s ease; }
.demo-tabs button:hover { transform: translateY(-1px); }
.demo-tabs button.on { background: linear-gradient(160deg, #8B7BFF, #5B46F5); color: #fff; border-color: transparent; box-shadow: 0 12px 22px -12px #5B46F5; }
.demo-tabs button:focus-visible { outline: 3px solid #5B46F5; outline-offset: 2px; }

.demo-stage { position: relative; max-width: 1060px; margin: 34px auto 0; padding: 0 0 6% 0; }

/* La pantalla de la app, a escala */
.dv-view { position: relative; overflow: hidden; background: #EEEBFF; }
.dv-view iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; background: #EEEBFF; display: block; }
.dv-view::after { content: ""; position: absolute; inset: 0; pointer-events: none; transition: opacity .4s ease;
  background: linear-gradient(110deg, #EEEBFF 30%, #F7F5FF 50%, #EEEBFF 70%) 0 0 / 200% 100%; animation: dvload 1.2s linear infinite; }
.dv-view.ready::after { opacity: 0; animation: none; }
@keyframes dvload { to { background-position: -200% 0; } }

/* Portátil */
.dv-laptop { width: 81%; margin-left: 2%; }
.dv-laptop-screen { padding: 2.2% 2.2% 2.6%; border-radius: 22px 22px 6px 6px; background: #17181D;
  box-shadow: inset 0 0 0 1.5px #3A3B44, 0 50px 90px -40px rgba(40, 30, 110, .55); }
.dv-laptop-screen .dv-view { aspect-ratio: 1280 / 800; border-radius: 6px; }
.dv-laptop-base { position: relative; height: 18px; margin: 0 -7%; border-radius: 2px 2px 22px 22px;
  background: linear-gradient(180deg, #E9E9EF 0%, #C9CAD3 55%, #9FA0AB 100%); box-shadow: 0 24px 40px -18px rgba(40, 30, 110, .5); }
.dv-laptop-base i { position: absolute; left: 50%; top: 0; translate: -50% 0; width: 14%; height: 7px; border-radius: 0 0 10px 10px; background: #B5B6C0; }

/* Móvil */
.dv-phone { position: absolute; right: 0; bottom: 0; width: 23%; z-index: 2; }
.dv-phone-screen { position: relative; padding: 4.2%; border-radius: 17% / 8%; background: #17181D;
  box-shadow: inset 0 0 0 2px #3A3B44, 0 40px 70px -30px rgba(20, 15, 70, .65); }
.dv-phone-screen .dv-view { aspect-ratio: 390 / 844; border-radius: 13% / 6%; }
.dv-view[data-top] iframe { top: var(--top, 0); }
/* Barra de estado del móvil: la isla y la hora van encima de la app, no tapándola */
.dv-status { position: absolute; top: 0; left: 0; right: 0; height: var(--top, 0); z-index: 2; pointer-events: none;
  display: flex; align-items: center; justify-content: space-between; padding: 2% 9% 0;
  font-size: 10px; font-weight: 700; color: #1E1F24; letter-spacing: -.01em; background: #E4E3FF; }
.dv-status i { width: 32%; height: 58%; margin-top: 1%; border-radius: 999px; background: #0B0B0E; }
.dv-status b { display: flex; gap: 4px; align-items: center; }
.dv-status b::before { content: ""; width: 1.4em; height: .75em; border-radius: 3px; border: 1.5px solid currentColor; box-shadow: inset 1.1em 0 0 -.25em currentColor; }

/* En el móvil: tocar para empezar, para que el dedo no se quede atrapado dentro */
.dv-try { display: none; }
.dv-done { display: none; }

@media (max-width: 919px) {
  .demo-sec { padding-top: 24px; }
  .demo-tabs { gap: 6px; margin-top: 20px; }
  .demo-tabs { flex-wrap: nowrap; }
  .demo-tabs button { font-size: 14px; padding: 8px 13px; }
  .demo-tabs [data-demo-tab="settings"] { display: none; }
  .dv-status { font-size: 12px; }
  .demo-stage { padding: 0; margin-top: 22px; }
  .dv-laptop { display: none; }
  .dv-phone { position: relative; width: min(300px, 78vw); margin: 0 auto; }
  .dv-try { display: grid; place-items: center; position: absolute; inset: 4.2%; z-index: 4; border: 0; padding: 0; cursor: pointer;
    border-radius: 13% / 6%; background: radial-gradient(60% 40% at 50% 50%, rgba(20, 15, 60, .28), rgba(20, 15, 60, 0)); font: inherit; }
  .dv-try span { padding: 12px 20px; border-radius: 999px; background: #fff; color: #3B2FD6; font-weight: 700; font-size: 15px; box-shadow: 0 14px 30px -12px rgba(20, 15, 70, .7); }
  .demo-sec.is-live .dv-try { display: none; }
  .dv-done:not([hidden]) { display: block; margin: 18px auto 0; font: inherit; font-weight: 600; font-size: 15px; padding: 12px 20px; border-radius: 999px;
    border: 1px solid #fff; background: rgba(255, 255, 255, .8); color: #3A3D4A; cursor: pointer; }
}
@media (prefers-reduced-motion: reduce) { .dv-view::after { animation: none; } }
