/* Login y animación de entrada (de la presentación anterior, con el look blanco) y acceso a la demo. Se carga último. */

/* ── Login ────────────────────────────────────────────────────────────────────── */
body.gated { overflow: hidden; }
.dm-gate { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; overflow: hidden; background: #fffdf9; }
.dm-gate[hidden] { display: none; }
.dm-gate-orb { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; }
.dm-gate-orb.a { width: 46vw; height: 46vw; right: -8vw; top: -14vw; background: rgb(255 216 107 / .5); }
.dm-gate-orb.b { width: 42vw; height: 42vw; left: -8vw; bottom: -16vw; background: rgb(84 222 165 / .32); }
.dm-gate.in .dm-gate-orb.a { animation: g-driftA 16s ease-in-out infinite alternate; }
.dm-gate.in .dm-gate-orb.b { animation: g-driftB 19s ease-in-out infinite alternate; }
@keyframes g-driftA { to { transform: translate(-5vw, 4vw) scale(1.1); } }
@keyframes g-driftB { to { transform: translate(4vw, -3vw) scale(1.08); } }
.dm-gate-card { position: relative; z-index: 1; width: min(560px, 100%); text-align: center; }
.dm-gate-logos { display: flex; align-items: center; justify-content: center; gap: 22px; margin-bottom: 40px; }
.dm-gate-logos img { display: block; width: auto; object-fit: contain; }
.g-logo-nv { height: 30px; }
.g-logo-cli { max-height: 64px; max-width: 220px; }
.dm-gate-x { color: var(--faint); font-size: 22px; font-weight: 300; }
.dm-gate .eyebrow { font-size: 15px; font-weight: 500; color: var(--accent); }
.dm-gate h1 { margin: 14px 0 12px; font-size: clamp(34px, 4.6vw, 54px); font-weight: 500; line-height: 1.06; letter-spacing: -0.03em; text-wrap: balance; }
.dm-gate h1 b { font-weight: 500; color: var(--accent); }
.dm-gate .sub { margin-bottom: 30px; font-size: 18px; color: var(--muted); }
.dm-gate-form { display: flex; gap: 10px; max-width: 440px; margin: 0 auto; }
.dm-gate-form input { flex: 1; min-width: 0; height: 56px; padding: 0 20px; border: 1px solid var(--border-strong); border-radius: 16px; outline: none; background: #fff; color: var(--text); font: 500 17px/1 var(--font); box-shadow: var(--sombra); transition: border-color .2s, box-shadow .2s; }
.dm-gate-form input:focus { border-color: var(--good); box-shadow: 0 0 0 5px var(--menta); }
.dm-gate-form input::placeholder { color: var(--faint); font-weight: 400; }
.dm-gate-form button { height: 56px; padding: 0 28px; border: 0; border-radius: 16px; background: var(--accent); color: #fff; font: 500 17px/1 var(--font); cursor: pointer; box-shadow: 0 16px 32px -14px rgb(10 125 87 / .55); transition: background .2s, transform .15s; }
.dm-gate-form button:hover { background: var(--accent-hover); }
.dm-gate-form button:active { transform: scale(.97); }
.dm-gate-err { min-height: 22px; margin-top: 14px; font-size: 15px; color: var(--durazno-tinta); }
.dm-gate.err .dm-gate-form input { border-color: var(--hot); animation: g-shake .4s; }
@keyframes g-shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.dm-gate-card > * { opacity: 0; transform: translateY(26px); filter: blur(8px); }
.dm-gate.in .dm-gate-card > * { animation: g-rise .8s cubic-bezier(.16, 1, .3, 1) both; }
.dm-gate.in .eyebrow { animation-delay: .1s; }
.dm-gate.in h1 { animation-delay: .18s; }
.dm-gate.in .sub { animation-delay: .28s; }
.dm-gate.in .dm-gate-form { animation-delay: .38s; }
.dm-gate.in .dm-gate-err { animation-delay: .46s; }
@keyframes g-rise { to { opacity: 1; transform: translateY(0); filter: blur(0); } }
.dm-gate.out { animation: g-out .55s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes g-out { to { opacity: 0; transform: scale(1.04); filter: blur(6px); } }
@media (prefers-reduced-motion: reduce) {
  .dm-gate-card > *, .dm-gate.in .dm-gate-card > * { opacity: 1; transform: none; filter: none; animation: none; }
  .dm-gate.in .dm-gate-orb.a, .dm-gate.in .dm-gate-orb.b { animation: none; }
  .dm-gate.out { animation: none; opacity: 0; }
}
@media (max-width: 560px) { .dm-gate-form { flex-direction: column; } .dm-gate-form button { width: 100%; } }

/* ── Intro post-gate · choque de logos (cliente × Supernovo) ──────────────────── */
.dm-intro { position: fixed; inset: 0; z-index: 101; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer;
  --dmi-rgb: 10 125 87; --dmi-bg: radial-gradient(46% 52% at 84% 10%, rgb(255 216 107 / .4), transparent 72%), radial-gradient(44% 50% at 12% 92%, rgb(84 222 165 / .26), transparent 72%), #fffdf9; --dmi-tag: #1d1c17;
  background: var(--dmi-bg); }
.dm-intro[hidden] { display: none; }
.dm-intro.debajo { z-index: 99; } /* tapa la presentación mientras el login se desvanece */
.dm-intro-mesh { position: absolute; inset: 0; background: radial-gradient(50% 40% at 50% 48%, rgb(var(--dmi-rgb) / .10), transparent 60%); opacity: 0; }
.dm-intro.play .dm-intro-mesh { animation: dmi-fade .8s .3s forwards; }
.dm-intro-flash { position: absolute; left: 50%; top: 50%; width: 560px; height: 560px; transform: translate(-50%, -50%) scale(.3); border-radius: 50%;
  background: radial-gradient(circle, rgb(var(--dmi-rgb) / .42), rgb(var(--dmi-rgb) / .06) 45%, transparent 66%); filter: blur(6px); opacity: 0; }
.dm-intro.play .dm-intro-flash { animation: dmi-flash .8s .86s both; }
.dm-intro-lock { position: relative; z-index: 2; display: flex; align-items: center; gap: 44px; }
.dm-intro.play .dm-intro-lock { animation: dmi-shake .45s .9s both; }
.dm-intro-seam { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scaleY(0); width: 2px; height: 122px;
  background: linear-gradient(180deg, transparent, rgb(var(--dmi-rgb) / .95), transparent); box-shadow: 0 0 26px 3px rgb(var(--dmi-rgb) / .6); }
.dm-intro.play .dm-intro-seam { animation: dmi-seam .5s .88s both; }
.dm-intro-cli { height: 160px; max-width: 380px; width: auto; object-fit: contain; filter: drop-shadow(0 8px 30px rgb(0 0 0 / .18)); transform: translateX(-118vw); }
.dm-intro.plate-light .dm-intro-cli { background: #fff; padding: 14px 18px; border-radius: 14px; }
.dm-intro.plate-dark .dm-intro-cli { background: #14140f; padding: 14px 18px; border-radius: 14px; }
.dm-intro.play .dm-intro-cli { animation: dmi-left .95s cubic-bezier(.2, .85, .25, 1) both; }
.dm-intro-nv { height: 52px; width: auto; object-fit: contain; filter: drop-shadow(0 8px 30px rgb(0 0 0 / .18)); transform: translateX(118vw); }
.dm-intro.play .dm-intro-nv { animation: dmi-right .95s cubic-bezier(.2, .85, .25, 1) both; }
.dm-intro-x { color: rgb(var(--dmi-rgb)); font-size: 2.4rem; font-weight: 300; line-height: 1; z-index: 3; opacity: 0; transform: scale(.4); }
.dm-intro.play .dm-intro-x { animation: dmi-pop .45s .9s both; }
.dm-intro-tag { position: absolute; top: calc(50% + 136px); left: 0; right: 0; text-align: center; color: var(--dmi-tag); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; opacity: 0; padding: 0 20px; }
.dm-intro.play .dm-intro-tag { animation: dmi-fadeup .6s 1.35s both; }
.dm-intro-skip { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: #8a8a92; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; opacity: 0; }
.dm-intro.play .dm-intro-skip { animation: dmi-fadeup .5s 1.7s both; }
.dm-intro.play { animation: dmi-exit 1s 2.7s forwards; }

/* Sin logo del cliente: Supernovo centrado con pop (sin choque) */
.dm-intro.solo .dm-intro-seam, .dm-intro.solo .dm-intro-x, .dm-intro.solo .dm-intro-cli { display: none; }
.dm-intro.solo .dm-intro-lock { gap: 0; }
.dm-intro.solo.play .dm-intro-nv { transform: none; animation: dmi-pop .6s .4s both; }

@keyframes dmi-left { 0% { transform: translateX(-118vw) scale(1.06); } 70% { transform: translateX(10px); } 100% { transform: translateX(0) scale(1); } }
@keyframes dmi-right { 0% { transform: translateX(118vw) scale(1.06); } 70% { transform: translateX(-10px); } 100% { transform: translateX(0) scale(1); } }
@keyframes dmi-flash { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); } 30% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); } }
@keyframes dmi-seam { 0% { transform: translate(-50%, -50%) scaleY(0); opacity: 0; } 45% { opacity: 1; } 100% { transform: translate(-50%, -50%) scaleY(1); opacity: 0; } }
@keyframes dmi-pop { 0% { opacity: 0; transform: scale(.4); } 60% { opacity: 1; transform: scale(1.25); } 100% { opacity: 1; transform: scale(1); } }
@keyframes dmi-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translate(-7px, 2px); } 40% { transform: translate(6px, -2px); } 60% { transform: translate(-4px, 1px); } 80% { transform: translate(3px, 0); } }
@keyframes dmi-fadeup { 0% { opacity: 0; transform: translateY(10px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes dmi-fade { to { opacity: 1; } }
@keyframes dmi-exit { to { opacity: 0; transform: translateY(-40px); visibility: hidden; } }

@media (prefers-reduced-motion: reduce) { .dm-intro { display: none !important; } }

/* ── «Vamos a verlo funcionando»: título a la izquierda, acceso a la demo a la derecha ── */
.dm-bridge-grid:has(.dm-acceso:not([hidden])) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); align-items: center; gap: clamp(40px, 5vw, 88px); }
.dm-bridge-grid:has(.dm-acceso:not([hidden])) h1 { font-size: clamp(44px, 5vw, 84px); }
.dm-acceso { padding: 26px 26px 22px; border: 1px solid var(--border); border-radius: 24px; background: var(--panel); box-shadow: var(--sombra-alta); }
.dm-acceso[hidden] { display: none; }
.dm-ac-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.dm-ac-head b { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
.dm-ac-open { font-size: 16px; font-weight: 500; color: var(--accent); text-decoration: none; white-space: nowrap; }
.dm-ac-open:hover { text-decoration: underline; }
.dm-ac-grid { display: grid; gap: 8px; }
.dm-ac-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 12px 11px 16px; border-radius: 14px; background: var(--bg-soft); }
.dm-ac-k { font-size: 13px; color: var(--muted); }
.dm-ac-v { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dm-ac-v code { overflow: hidden; font: 500 15px/1.3 var(--mono); color: var(--text); text-overflow: ellipsis; white-space: nowrap; background: none; padding: 0; }
.dm-ac-v small { font-size: 13px; color: var(--muted); }
.dm-ac-copy { height: 32px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--panel); color: var(--text); font: 500 14px/1 var(--font); cursor: pointer; white-space: nowrap; transition: border-color .15s, color .15s; }
.dm-ac-copy:hover { border-color: var(--good); }
.dm-ac-copy.ok { border-color: var(--good); color: var(--accent); }
@media (max-height: 820px) {
  .dm-acceso { padding: 18px 20px 16px; }
  .dm-ac-head { margin-bottom: 10px; }
  .dm-ac-grid { gap: 6px; }
  .dm-ac-row { padding: 7px 10px 7px 14px; }
  .dm-ac-v code { font-size: 14px; }
  .dm-ac-v small { font-size: 12px; }
}
@media (max-width: 1000px) {
  .dm-bridge-grid:has(.dm-acceso:not([hidden])) { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 560px) { .dm-ac-row { grid-template-columns: minmax(0, 1fr) auto; } .dm-ac-k { grid-column: 1 / -1; } }

/* ── Reservar ahora ───────────────────────────────────────────────────────────── */
button.btn { border: 0; cursor: pointer; }
.btn[disabled] { opacity: .7; cursor: progress; }
.cx-reservar-err { margin-top: 12px; font-size: 15px; color: var(--durazno-tinta); }
.cx-reservar-err[hidden] { display: none; }

.dm-gate-form[hidden], .dm-gate-form input[hidden] { display: none; }
/* Portada: código de la empresa + clave, y el botón abajo */
.dm-gate.portada .g-logo-cli, .dm-gate.portada .dm-gate-x { display: none; }
.dm-gate-form.dos { flex-wrap: wrap; max-width: 520px; }
.dm-gate-form.dos input { flex: 1 1 200px; }
.dm-gate-form.dos button { flex: 1 1 100%; }
