/* ============================================================
   Construction Overlay — Lilafken
   Overlay full-screen para páginas no listas para producción.
   Oculta el contenido antiguo sin borrarlo (fallback si falla CSS).
   ============================================================ */

#construction-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  /* Fondo oscuro semitransparente con glassmorphism */
  background:
    radial-gradient(ellipse at top, rgba(201, 160, 64, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at bottom, rgba(11, 29, 19, 0.85) 0%, rgba(6, 16, 10, 0.96) 70%),
    rgba(6, 16, 10, 0.88);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  animation: constructionFadeIn 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
  overflow-y: auto;
  /* Evita scroll del body detrás */
  -webkit-tap-highlight-color: transparent;
}

/* Bloquea scroll del body cuando el overlay está presente */
body:has(#construction-overlay) {
  overflow: hidden;
}

.construction-card {
  position: relative;
  max-width: 560px;
  width: 100%;
  padding: 56px 40px 44px;
  border-radius: 24px;
  background: linear-gradient(160deg,
    rgba(11, 29, 19, 0.85) 0%,
    rgba(6, 16, 10, 0.92) 100%);
  border: 1px solid rgba(201, 160, 64, 0.28);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.55),
    0 2px 0 rgba(201, 160, 64, 0.1) inset,
    0 -2px 40px rgba(201, 160, 64, 0.08) inset;
  text-align: center;
  animation: constructionCardIn 640ms cubic-bezier(0.22, 1, 0.36, 1) 120ms both;
}

/* Borde dorado sutil con gradiente */
.construction-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(135deg,
    rgba(201, 160, 64, 0.5) 0%,
    rgba(201, 160, 64, 0) 35%,
    rgba(201, 160, 64, 0) 65%,
    rgba(232, 192, 96, 0.4) 100%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.construction-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: 0.32em;
  color: #FFF8F0;
  margin: 0 0 24px;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(201, 160, 64, 0.25);
}

.construction-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(201, 160, 64, 0.12);
  border: 1px solid rgba(201, 160, 64, 0.38);
  color: #E8C060;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.construction-chip .chip-icon {
  font-size: 14px;
  line-height: 1;
}

.construction-card h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(28px, 4.2vw, 40px);
  font-weight: 600;
  line-height: 1.15;
  color: #FFF8F0;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.construction-card .construction-subtitle {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: clamp(15px, 1.7vw, 17px);
  line-height: 1.55;
  color: rgba(240, 247, 244, 0.78);
  margin: 0 0 32px;
  max-width: 44ch;
  margin-left: auto;
  margin-right: auto;
}

.construction-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
}

.construction-ctas a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: transform 220ms ease, box-shadow 220ms ease,
              background 220ms ease, border-color 220ms ease;
  min-height: 48px;
  min-width: 180px;
}

.construction-ctas .btn-primary {
  background: linear-gradient(135deg, #C9A040 0%, #A07828 100%);
  color: #0B1D13;
  border: 1px solid rgba(232, 192, 96, 0.6);
  box-shadow:
    0 10px 30px rgba(201, 160, 64, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

.construction-ctas .btn-primary:hover,
.construction-ctas .btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    0 16px 40px rgba(201, 160, 64, 0.42),
    0 1px 0 rgba(255, 255, 255, 0.25) inset;
  outline: none;
}

.construction-ctas .btn-secondary {
  background: rgba(255, 248, 240, 0.04);
  color: #FFF8F0;
  border: 1px solid rgba(240, 247, 244, 0.22);
  backdrop-filter: blur(8px);
}

.construction-ctas .btn-secondary:hover,
.construction-ctas .btn-secondary:focus-visible {
  background: rgba(201, 160, 64, 0.1);
  border-color: rgba(201, 160, 64, 0.55);
  color: #E8C060;
  transform: translateY(-2px);
  outline: none;
}

.construction-ctas a:focus-visible {
  outline: 2px solid #E8C060;
  outline-offset: 3px;
}

.construction-card small {
  display: block;
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 12px;
  color: rgba(240, 247, 244, 0.5);
  letter-spacing: 0.02em;
  line-height: 1.5;
}

/* Animaciones */
@keyframes constructionFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes constructionCardIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Respetar preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  #construction-overlay,
  .construction-card {
    animation: none;
  }
  .construction-ctas a {
    transition: none;
  }
}

/* Mobile */
@media (max-width: 520px) {
  .construction-card {
    padding: 44px 24px 36px;
    border-radius: 20px;
  }
  .construction-ctas {
    flex-direction: column;
    align-items: stretch;
  }
  .construction-ctas a {
    width: 100%;
  }
  .construction-logo {
    letter-spacing: 0.26em;
    margin-bottom: 20px;
  }
}

/* Fallback si backdrop-filter no está soportado */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  #construction-overlay {
    background: rgba(6, 16, 10, 0.98);
  }
}
