/* ==========================================================================
   PALETA DE COLORES Y VARIABLES GLOBALES
   ========================================================================== */
:root {
  --color-linen: #FAF7F2;
  --color-champagne: #EFE9DE;
  --color-parchment: #F9F7F2;
  --color-paper: #FAF8F5;

  --color-terracotta: #A67C52;
  --color-terracotta-hover: #936C45;
  --color-terracotta-dark: #7A5836;

  --color-sage-50: #F4F7F4;
  --color-sage-100: #E4ECE3;
  --color-sage-light: #8FA382;
  --color-sage: #5B7053;
  --color-sage-600: #687E69;
  --color-sage-700: #526653;
  --color-sage-800: #3D4D3E;

  --color-gold-light: #E2CA9C;
  --color-gold: #C5A869;
  --color-gold-warm: #C5A880;
  --color-gold-dark: #9E8043;

  --color-espresso: #362B28;
  --color-stone-text: #38302B;
  --color-stone-muted: #6B6057;

  /* Fuentes */
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-script-alex: "Alex Brush", cursive;
  --font-script-pinyon: "Pinyon Script", cursive;
  --font-sans: "Montserrat", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Reset Global & Control Estricto de Overflow */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100vw;
  margin: 0;
  padding: 0;
  overflow-x: hidden !important;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  color: var(--color-stone-text);
  font-family: var(--font-sans);
  background-color: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}

/* Texturas de Fondo a pantalla completa */
.bg-linen-texture {
  background-color: var(--color-linen);
  background-image:
    radial-gradient(#d3c8b4 0.65px, transparent 0.65px),
    radial-gradient(#ede4d3 0.65px, var(--color-linen) 0.65px);
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
}

.bg-textured-paper {
  background-color: var(--color-paper);
  background-image: radial-gradient(#E8E1D5 0.75px, transparent 0.75px);
  background-size: 20px 20px;
}

.bg-sage-wash {
  background: linear-gradient(180deg, #5C725E 0%, #4D624E 100%);
}

/* Contenedores Responsivos Libres de Overflow */
.web-container {
  width: 100%;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .web-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.web-container-narrow {
  width: 100%;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .web-container-narrow {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Micro-animaciones Continuas (Sin necesidad de hover) */
@keyframes continuousGlow {

  0%,
  100% {
    filter: drop-shadow(0 0 2px rgba(197, 168, 105, 0.35));
  }

  50% {
    filter: drop-shadow(0 0 8px rgba(197, 168, 105, 0.65));
  }
}

@keyframes continuousFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

@keyframes continuousPulse {

  0%,
  100% {
    transform: translateY(0);
    opacity: 0.6;
  }

  50% {
    transform: translateY(5px);
    opacity: 1;
  }
}

@keyframes gentleBreathe {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.04);
  }
}

.animate-continuous-glow {
  animation: continuousGlow 3.5s ease-in-out infinite;
}

.animate-continuous-float {
  animation: continuousFloat 3s ease-in-out infinite;
}

.animate-continuous-pulse {
  animation: continuousPulse 2.4s ease-in-out infinite;
}

.animate-breathe {
  animation: gentleBreathe 4s ease-in-out infinite;
}

/* Transición de Salida Suave */
.portal-closing {
  transform: scale(0.97);
  opacity: 0;
  filter: blur(4px);
  transition: all 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.page-fade-in {
  animation: pageFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ==========================================================================
   BOTÓN FLOTANTE DE MÚSICA (music.gif)
   Sticky / Fixed a la pantalla en borde inferior derecho
   Fondo más transparente, borde redondeado suave y adaptado a PC, Tablet y Móvil
   ========================================================================== */
.music-floating-btn {
  position: fixed !important;
  bottom: 1.5rem !important;
  right: 1.5rem !important;
  z-index: 99999 !important;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  padding: 0;
  margin: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  background: #ffffffb3;
  /* Más transparente según pedido */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.music-floating-btn:hover {
  transform: scale(1.08);
  background: rgba(194, 194, 194, 0.785);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.2);
}

.music-floating-btn:active {
  transform: scale(0.94);
}

.music-floating-btn.is-playing {
  border-color: rgba(197, 168, 128, 0.75);
  background: #ffffffb3;
  box-shadow: 0 0 0 4px rgba(197, 168, 128, 0.25), 0 6px 22px rgba(0, 0, 0, 0.18);
  animation: musicPulse 2.5s infinite;
}

/* El icono GIF se nota con máxima claridad y nitidez */
.music-floating-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.18));
}

@keyframes musicPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(197, 168, 128, 0.4), 0 6px 20px rgba(0, 0, 0, 0.16);
  }

  70% {
    box-shadow: 0 0 0 9px rgba(197, 168, 128, 0), 0 6px 20px rgba(0, 0, 0, 0.16);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(197, 168, 128, 0), 0 6px 20px rgba(0, 0, 0, 0.16);
  }
}

/* Tablet (hasta 768px) */
@media (max-width: 768px) {
  .music-floating-btn {
    bottom: 5.25rem !important;
    right: 1.25rem !important;
    width: 52px;
    height: 52px;
    border-width: 1.2px;
  }

  .music-floating-icon {
    width: 35px;
    height: 35px;
  }
}

/* Móvil (hasta 480px) */
@media (max-width: 480px) {
  .music-floating-btn {
    bottom: 7.1rem !important;
    right: 0.1rem !important;
    width: 48px;
    height: 48px;
    border-width: 1.2px;
    border-color: rgba(255, 255, 255, 0.4);
  }

  .music-floating-icon {
    width: 32px;
    height: 32px;
  }
}