/* =========================================================================
   Armazón común de las demos.
   Cada demo trae su propia identidad en un <style> dentro del archivo: ese es
   el sentido del ejercicio, enseñar que no todas se parecen. Aquí solo vive lo
   que comparten: el aviso de que son ficticias y el cierre comercial.
   Las variables --demo-* las define cada página para que la barra y el cierre
   se tiñan con su paleta.
   ========================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  min-height: 100svh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img,
svg {
  display: block;
  max-width: 100%;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--demo-acento, #ff4b26);
  outline-offset: 3px;
}

/* ---------- Aviso de demo ------------------------------------------------ */
.aviso-demo {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  padding: 0.6rem 1.25rem;
  background: #0c0c0e;
  color: #f4f1ea;
  font-family: 'Satoshi', system-ui, sans-serif;
  font-size: 0.8125rem;
  text-align: center;
}
.aviso-demo strong {
  font-weight: 700;
}
.aviso-demo__marca {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  white-space: nowrap;
}
.aviso-demo__marca svg {
  width: 0.85em;
  color: #ff4b26;
}
.aviso-demo a {
  color: #f4f1ea;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(244, 241, 234, 0.4);
  white-space: nowrap;
}
.aviso-demo a:hover {
  text-decoration-color: #ff4b26;
}
.aviso-demo__idiomas {
  display: inline-flex;
  gap: 0.15rem;
  padding: 0.15rem;
  border: 1px solid rgba(244, 241, 234, 0.2);
  border-radius: 999px;
}
.aviso-demo__idiomas a {
  padding: 0.15em 0.6em;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: #8e8a83;
}
.aviso-demo__idiomas a:hover {
  color: #f4f1ea;
}
.aviso-demo__idiomas a[aria-current='true'] {
  background: #f4f1ea;
  color: #0c0c0e;
}

/* ---------- Cierre comercial --------------------------------------------- */
.cierre-demo {
  background: #0c0c0e;
  color: #f4f1ea;
  font-family: 'Satoshi', system-ui, sans-serif;
  padding: clamp(3.5rem, 9vw, 6.5rem) clamp(1.25rem, 5vw, 4rem);
  text-align: center;
}
.cierre-demo__marca {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8e8a83;
  margin-bottom: 1.5rem;
}
.cierre-demo__marca svg {
  width: 0.9em;
  color: #ff4b26;
}
.cierre-demo h2 {
  font-family: 'Clash Display', 'Satoshi', system-ui, sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
  max-width: 18ch;
  margin-inline: auto;
}
.cierre-demo p {
  max-width: 52ch;
  margin: 1.5rem auto 0;
  color: #a5a099;
  text-wrap: pretty;
}
.cierre-demo__acciones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
}
.cierre-demo__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 1em 1.9em;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f4f1ea;
  color: #0c0c0e;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.35s, color 0.35s;
}
.cierre-demo__btn:hover {
  background: #ff4b26;
  color: #fff;
}
.cierre-demo__btn--fantasma {
  background: none;
  color: #f4f1ea;
  border-color: rgba(244, 241, 234, 0.25);
}
.cierre-demo__btn--fantasma:hover {
  background: none;
  color: #f4f1ea;
  border-color: #ff4b26;
}

/* ---------- Visor de mapa ------------------------------------------------
   Lo usan la inmobiliaria y el restaurante, así que vive aquí y no en la hoja
   de cada una. El mapa es una imagen propia (tools/descargar-mapa.js) dentro de
   una caja que la recorta; assets/js/mapa.js la mueve y la escala.
   Lo que cambia de una demo a otra son las chinchetas, no el armazón. */
.mapa-caja {
  position: relative;
  /* Explícito: con `aspect-ratio` y una altura mínima, un ancho `auto` se
     calcula a partir de la altura y el mapa se sale de la pantalla en el móvil.
     Aquí manda el ancho y la proporción decide la altura. */
  width: 100%;
  overflow: hidden;
  background: #e8e4dc;
  /* Sin esto el dedo arrastra la página en vez del mapa. */
  touch-action: none;
  cursor: grab;
}
.mapa-caja[data-arrastrando] {
  cursor: grabbing;
}
.mapa__lienzo {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}
.mapa__lienzo img {
  width: auto;
  height: auto;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
}
.mapa__capa {
  position: absolute;
  inset: 0;
}
.mapa__mandos {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  display: grid;
  gap: 1px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.5);
}
.mapa__mandos button {
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  background: var(--demo-papel, #fff);
  color: var(--demo-tinta, #111);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.mapa__mandos button:hover {
  background: var(--demo-acento, #333);
  color: #fff;
}
/* Cuando ya no se puede acercar o alejar más, el botón lo dice. */
.mapa-caja[data-tope='cerca'] [data-zoom='+'],
.mapa-caja[data-tope='lejos'] [data-zoom='−'] {
  opacity: 0.35;
  cursor: default;
}
.mapa__creditos {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 0.25rem 0.6rem;
  border-radius: 8px 0 0 0;
  background: rgba(255, 255, 255, 0.86);
  font-size: 0.62rem;
  color: var(--demo-apagado, #666);
}

/* ---------- Utilidades compartidas --------------------------------------- */
.solo-lectores {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---- Aviso de captación --------------------------------------------------
   Lo monta assets/js/cta-demo.js pasados unos segundos. Va con la paleta de
   Nice & Visual y no con la de la demo, a propósito: es el estudio quien
   habla, no la marca ficticia. Las familias tipográficas son las mismas que
   usa el cierre comercial y caen en la del sistema, porque las demos no
   descargan fuentes. */
.cta-demo {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 70;
  width: min(calc(100vw - 2rem), 23rem);
  padding: 1.4rem 1.5rem 1.5rem;
  border-top: 3px solid #ff4b26;
  border-radius: 4px 4px 14px 14px;
  background: #0c0c0e;
  color: #f4f1ea;
  font-family: 'Satoshi', system-ui, sans-serif;
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(244, 241, 234, 0.16);
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.4s, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.cta-demo[data-visible] {
  opacity: 1;
  transform: none;
}
/* En el móvil la barra fija de Palanca vive pegada al borde de abajo: el aviso
   se levanta lo justo para no montarse encima de ella. */
@media (max-width: 899px) {
  .cta-demo {
    bottom: 5rem;
  }
}
.cta-demo__cerrar {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 1.9rem;
  height: 1.9rem;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #8e8a83;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.cta-demo__cerrar:hover {
  background: rgba(244, 241, 234, 0.1);
  color: #f4f1ea;
}
.cta-demo__marca {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8e8a83;
}
.cta-demo__marca svg {
  width: 0.85em;
  color: #ff4b26;
}
.cta-demo__titulo {
  margin-top: 0.85rem;
  font-family: 'Clash Display', 'Satoshi', system-ui, sans-serif;
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.cta-demo__texto {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #a5a099;
  text-wrap: pretty;
}
.cta-demo__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-top: 1.2rem;
  padding: 0.85em 1.5em;
  border-radius: 999px;
  background: #f4f1ea;
  color: #0c0c0e;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s;
}
.cta-demo__btn svg {
  width: 0.85em;
  flex: none;
}
.cta-demo__btn:hover {
  background: #ff4b26;
  color: #fff;
}
