/* =========================================================
   css/demo-gate.css — Portfolio 2026 · v48
   El panel de contraseña de las demos privadas (js/demo-gate.js)
   y la ficha técnica «Stack» de las fichas que lo necesitan.
   ========================================================= */

.gate-dlg {
  width: min(560px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1px solid var(--line);
  border-left: 2px solid var(--c-front);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  color: var(--fg);
  overflow: auto;
}
.gate-dlg::backdrop {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(6px);
}
.gate-dlg[open] { animation: gate-in var(--dur-m) var(--ease); }
@keyframes gate-in { from { opacity: 0; transform: translateY(18px) scale(0.98); } }

.gate-dlg__box { position: relative; padding: clamp(1.6rem, 5vw, 2.6rem); }
.gate-dlg__x {
  position: absolute; top: 0.9rem; right: 0.9rem;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--fg);
  font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.gate-dlg__x:hover { border-color: var(--fg); }
.gate-dlg__eyebrow {
  margin: 0 0 0.8rem;
  font-family: var(--font-mono); font-size: var(--t-mono);
  letter-spacing: var(--tr-wide); text-transform: uppercase;
  color: var(--c-front);
}
.gate-dlg__title {
  margin: 0 0 0.8rem; padding-right: 2.5rem;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem);
  line-height: var(--lh-snug); letter-spacing: var(--tr-tight);
}
.gate-dlg__note { margin: 0 0 1.6rem; color: var(--fg-dim); }
.gate-dlg__label { display: block; margin-bottom: 0.5rem; font-weight: 600; }
.gate-dlg__pw {
  display: flex; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg);
}
.gate-dlg__pw:focus-within { border-color: var(--c-front); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-front) 25%, transparent); }
.gate-dlg__pw input {
  flex: 1; min-width: 0; padding: 0.95rem 1rem;
  border: 0; outline: none; background: transparent; color: var(--fg);
  font: inherit; font-size: 1.1rem; letter-spacing: 0.06em;
}
.gate-dlg__ver {
  padding: 0 1.1rem; border: 0; border-left: 1px solid var(--line);
  background: transparent; color: var(--fg);
  font-family: var(--font-mono); font-size: var(--t-mono); letter-spacing: var(--tr-wide); text-transform: uppercase;
  cursor: pointer;
}
.gate-dlg__ver:hover { background: var(--line-soft); }
.gate-dlg__msg { min-height: 1.6em; margin: 0.7rem 0 0; color: var(--fg-dim); }
.gate-dlg__msg.is-err { color: var(--accent-warm); font-weight: 600; }
.gate-dlg__go { width: 100%; justify-content: center; margin-top: 0.6rem; }
.gate-dlg__go:disabled { opacity: 0.5; cursor: default; }
.gate-dlg__hint {
  margin: 1rem 0 0; color: var(--fg-dim);
  font-family: var(--font-mono); font-size: var(--t-mono); letter-spacing: 0.06em;
}
.gate-dlg :focus-visible { outline: 2px solid var(--c-front); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .gate-dlg[open] { animation: none; } }

/* ---------------------------------------------------------
   Sello «Hecha en …» junto al botón de la demo
   --------------------------------------------------------- */
.made-with {
  display: inline-flex; align-items: center; gap: 0.55rem;
  margin: 0.9rem 0 0; padding: 0.4rem 0.8rem 0.4rem 0.5rem;
  border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--font-mono); font-size: var(--t-mono);
  letter-spacing: var(--tr-wide); text-transform: uppercase;
  color: var(--fg);
}
.made-with svg { width: 20px; height: 20px; flex: none; }

/* ---------------------------------------------------------
   Ficha técnica: la tecnología, para qué y su versión
   --------------------------------------------------------- */
.stack-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));   /* diez piezas: cinco filas sin huecos */
  gap: 1px;
  margin: 0; padding: 0; list-style: none;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--line); overflow: hidden;
}
.stack-list li { display: grid; gap: 0.35rem; align-content: start; padding: 1.2rem 1.3rem; background: var(--bg); }
.stack-list b { font-size: 1.1rem; font-weight: 600; letter-spacing: var(--tr-tight); }
.stack-list span { color: var(--fg-dim); font-size: 0.95rem; line-height: 1.45; }
.stack-list small {
  font-family: var(--font-mono); font-size: var(--t-mono);
  letter-spacing: var(--tr-wide); text-transform: uppercase; color: var(--c-front);
}
.stack-list li.is-main { background: color-mix(in srgb, var(--c-front) 9%, var(--bg)); }
/* En un capítulo con el titular a la izquierda, la lista va en la columna
   del texto, debajo de él (-2 / -1: la derecha en escritorio, la única en móvil). */
.cs-sec--left .stack-list { grid-column: -2 / -1; margin-top: clamp(1.5rem, 3vw, 2.5rem); }
@media (max-width: 640px) { .stack-list { grid-template-columns: minmax(0, 1fr); } }
