/* =========================================================
   MOD MALLORCA — Design System CSS
   Tokens, componentes y animaciones que complementan Tailwind.
   ========================================================= */

/* ----- Google Fonts ya cargadas por WP, definimos variables aquí ----- */
:root {
  --mod-black: #050a0f;
  --mod-deep-navy: #0d2030;
  --mod-gold: #c9a84c;
  --mod-gold-light: #e8c96a;
  --mod-white: #f0ede8;
  --mod-red: #cc1f1f;
  --mod-cyan: #00e5ff;
  --mod-palm-blue: #1a3a4a;

  --font-display: "Bebas Neue", "Impact", sans-serif;
  --font-impact: "Anton", "Bebas Neue", "Impact", sans-serif;
  --font-heading: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-label: "Montserrat", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --ease-atmo: cubic-bezier(0.2, 0.7, 0.2, 1);
  --nav-h: 94px;
}

/* ---- Base ---- */
html {
  scroll-behavior: smooth;
}

body {
  background-color: #04141b;
  color: var(--mod-white);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(
      1100px 600px at 85% 5%,
      rgba(201, 168, 76, 0.07),
      transparent 60%
    ),
    radial-gradient(
      900px 720px at 6% 15%,
      rgba(15, 68, 86, 0.30),
      transparent 55%
    ),
    radial-gradient(
      800px 500px at 92% 50%,
      rgba(201, 168, 76, 0.04),
      transparent 65%
    ),
    radial-gradient(
      1000px 600px at 8% 72%,
      rgba(15, 68, 86, 0.18),
      transparent 60%
    ),
    radial-gradient(
      700px 400px at 75% 95%,
      rgba(201, 168, 76, 0.05),
      transparent 65%
    );
  background-attachment: fixed;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.01em;
}

::selection {
  background: var(--mod-gold);
  color: var(--mod-black);
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--mod-cyan);
  outline-offset: 2px;
  border-radius: 2px;
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #07111a;
}
::-webkit-scrollbar-thumb {
  background: #1a3a4a;
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--mod-gold);
}

/* =========================================================
   COMPONENTES REUTILIZABLES
   ========================================================= */

/* Contenedor centrado */
.mod-container {
  width: 100%;
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
@media (min-width: 640px) {
  .mod-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Espaciado vertical de sección */
.mod-section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}
@media (min-width: 640px) {
  .mod-section {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}

/* Tipografía de impacto (Anton) */
.mod-impact {
  font-family: var(--font-impact);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 0.92;
}

/* Display (Bebas Neue) */
.mod-display {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 0.95;
}

/* Eyebrow — etiqueta dorada de sección */
.mod-eyebrow {
  font-family: var(--font-label);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--mod-gold);
}

/* Separador dorado */
.mod-divider {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, transparent, var(--mod-gold), transparent);
  opacity: 0.6;
}

/* Texto con shimmer dorado */
.mod-gold-text {
  background: linear-gradient(
    90deg,
    var(--mod-gold) 0%,
    var(--mod-gold-light) 50%,
    var(--mod-gold) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Botones */
.mod-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.3s;
  font-family: var(--font-label);
  text-decoration: none;
  cursor: pointer;
}
.mod-btn-gold {
  background: var(--mod-gold);
  color: var(--mod-black);
}
.mod-btn-gold:hover {
  background: var(--mod-gold-light);
  box-shadow: 0 0 24px rgba(201, 168, 76, 0.45);
  transform: translateY(-1px);
}
.mod-btn-red {
  background: var(--mod-red);
  color: var(--mod-white);
}
.mod-btn-red:hover {
  box-shadow: 0 0 24px rgba(204, 31, 31, 0.5);
  transform: translateY(-1px);
}
.mod-btn-ghost {
  border: 1px solid rgba(201, 168, 76, 0.5);
  color: var(--mod-white);
  background: transparent;
}
.mod-btn-ghost:hover {
  border-color: var(--mod-gold);
  background: rgba(201, 168, 76, 0.08);
}

/* Tarjeta océano */
.mod-card {
  background: linear-gradient(
    160deg,
    rgba(15, 68, 86, 0.32),
    rgba(4, 20, 27, 0.66)
  );
  border: 1px solid rgba(201, 168, 76, 0.16);
  border-radius: 12px;
  backdrop-filter: blur(4px);
}
.mod-card-hover {
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s,
    border-color 0.35s;
}
.mod-card-hover:hover {
  transform: scale(1.03);
  border-color: rgba(201, 168, 76, 0.55);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 0 24px rgba(201, 168, 76, 0.25);
}

/* Reveal al scroll */
.mod-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.mod-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.mod-reveal-zoom {
  opacity: 0;
  transform: scale(0.93) translateY(26px);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.mod-reveal-zoom.is-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Fade up (hero) */
.animate-fade-up {
  animation: mod-fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes mod-fade-up {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Shimmer dorado */
.animate-gold-shimmer {
  animation: mod-shimmer 3s linear infinite;
}
@keyframes mod-shimmer {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: -200% center;
  }
}

/* Pulse rojo */
.animate-pulse {
  animation: mod-pulse 1.4s ease-in-out infinite;
}
@keyframes mod-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* Bounce scroll indicator */
.animate-scroll-bounce {
  animation: mod-scroll-bounce 1.8s ease-in-out infinite;
}
@keyframes mod-scroll-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

/* =========================================================
   ATMÓSFERA — Vídeo hero + efectos de fondo
   ========================================================= */
.mod-atmo {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.mod-ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.mod-video-cover {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.mod-video-cover video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
}

.mod-video-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(4, 16, 22, 0.82) 0%,
      rgba(4, 16, 22, 0.16) 18%,
      rgba(4, 16, 22, 0.16) 52%,
      rgba(4, 16, 22, 0.3) 66%,
      rgba(4, 16, 22, 0.52) 79%,
      rgba(4, 16, 22, 0.8) 91%,
      #04141b 100%
    ),
    radial-gradient(
      120% 82% at 50% 40%,
      transparent 44%,
      rgba(4, 16, 22, 0.5) 100%
    ),
    linear-gradient(
      90deg,
      #04141b 0%,
      transparent 13%,
      transparent 87%,
      #04141b 100%
    );
}
.mod-video-tint {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: color;
  background: rgba(15, 68, 86, 0.22);
}

/* Caústicas animadas */
.mod-caustic {
  position: absolute;
  filter: blur(60px);
  mix-blend-mode: screen;
  border-radius: 50%;
  will-change: transform;
}
.mod-c1 {
  top: -22%;
  left: -12%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, #1aa6cf, transparent 62%);
  opacity: 0.4;
  animation: mod-drift1 34s var(--ease-atmo) infinite;
}
.mod-c2 {
  bottom: -26%;
  right: -12%;
  width: 52vw;
  height: 52vw;
  background: radial-gradient(circle, #e9c46a, transparent 60%);
  opacity: 0.18;
  animation: mod-drift2 40s var(--ease-atmo) infinite;
}
.mod-c3 {
  top: 46%;
  left: 56%;
  width: 34vw;
  height: 34vw;
  background: radial-gradient(circle, #15cdb6, transparent 60%);
  opacity: 0.2;
  animation: mod-drift1 46s var(--ease-atmo) infinite reverse;
}
@keyframes mod-drift1 {
  0%,
  100% {
    transform: translate(-6%, -4%);
  }
  50% {
    transform: translate(8%, 6%);
  }
}
@keyframes mod-drift2 {
  0%,
  100% {
    transform: translate(5%, 3%);
  }
  50% {
    transform: translate(-7%, -5%);
  }
}

.mod-sun {
  position: absolute;
  top: -14vw;
  right: -8vw;
  width: 46vw;
  height: 46vw;
  border-radius: 50%;
  mix-blend-mode: screen;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 238, 178, 0.5),
    rgba(255, 200, 108, 0.22) 26%,
    rgba(255, 170, 70, 0.07) 48%,
    transparent 70%
  );
  animation: mod-sunpulse 16s var(--ease-atmo) infinite;
}
@keyframes mod-sunpulse {
  0%,
  100% {
    opacity: 0.8;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

/* Ambiente global */
.mod-ambient .mod-sea {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      130% 78% at 50% 122%,
      rgba(15, 68, 86, 0.46),
      rgba(7, 37, 48, 0.18) 44%,
      transparent 72%
    ),
    radial-gradient(
      95% 40% at 50% 118%,
      rgba(201, 168, 76, 0.07),
      transparent 70%
    ),
    radial-gradient(78% 52% at 10% 4%, rgba(15, 68, 86, 0.22), transparent 60%),
    radial-gradient(
      70% 50% at 92% 6%,
      rgba(201, 168, 76, 0.05),
      transparent 62%
    );
}

/* Palmeras decorativas */
.mod-decor-sway {
  animation: mod-decor-sway 18s var(--ease-atmo) infinite;
  transform-origin: bottom center;
}
@keyframes mod-decor-sway {
  0%,
  100% {
    transform: translateY(0) rotate(-0.6deg);
  }
  50% {
    transform: translateY(-8px) rotate(0.6deg);
  }
}

/* Bailarines de fondo */
.mod-dancers {
  -webkit-mask-image: linear-gradient(
    to top,
    #000 20%,
    rgba(0, 0, 0, 0.82) 52%,
    transparent 90%
  );
  mask-image: linear-gradient(
    to top,
    #000 20%,
    rgba(0, 0, 0, 0.82) 52%,
    transparent 90%
  );
  filter: brightness(0.8) contrast(1.06) saturate(0.78)
    drop-shadow(0 10px 28px rgba(0, 0, 0, 0.5));
}

/* =========================================================
   NAVBAR
   ========================================================= */
#site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 1.25rem 0.75rem 0;
  transition: padding 0.45s cubic-bezier(0.32, 0.72, 0, 1);
}
#site-header.scrolled {
  padding-top: 0.5rem;
}

#site-header > nav {
  margin: 0 auto;
  max-width: 1380px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-radius: 1rem;
  border: 1px solid rgba(240, 237, 232, 0.8);
  background: rgba(5, 10, 15, 0.4);
  backdrop-filter: blur(12px);
  height: 4.6rem;
  padding: 0 1.5rem;
  transition: all 0.45s cubic-bezier(0.32, 0.72, 0, 1);
}
#site-header.scrolled > nav {
  height: 3.9rem;
  border-width: 1px;
  border-color: rgba(201, 168, 76, 0.25);
  background: rgba(5, 10, 15, 0.7);
  backdrop-filter: blur(24px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Logo glow */
.mod-logoglow {
  position: relative;
}
.mod-logoglow::before {
  content: "";
  position: absolute;
  left: -16%;
  right: -16%;
  top: -18%;
  height: 130%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    closest-side,
    rgba(255, 224, 150, 0.42),
    rgba(255, 196, 100, 0.14) 55%,
    transparent 74%
  );
  filter: blur(16px);
  animation: mod-logoglow 6s var(--ease-atmo) infinite;
}
@keyframes mod-logoglow {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.06);
  }
}

/* Dropdown "más" */
.mod-dropdown {
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 0.75rem;
  width: 15rem;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid rgba(201, 168, 76, 0.2);
  background: rgba(5, 10, 15, 0.95);
  padding: 0.375rem 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(24px);
}

/* Menú móvil */
#mobile-menu {
  margin: 0.5rem 0.75rem 0;
  border-radius: 1rem;
  border: 1px solid rgba(201, 168, 76, 0.2);
  background: rgba(5, 10, 15, 0.95);
  backdrop-filter: blur(24px);
  display: none;
}
#mobile-menu.open {
  display: block;
}

/* =========================================================
   FOOTER
   ========================================================= */
#site-footer {
  position: relative;
  overflow: hidden;
  padding-top: 8rem;
}
#site-footer .mod-footer-bg {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: radial-gradient(
    120% 90% at 50% 120%,
    #0f4456 0%,
    #072530 34%,
    #04141b 72%,
    transparent 100%
  );
}

/* =========================================================
   ACCESIBILIDAD
   ========================================================= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sr-only:focus {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  clip: auto;
  white-space: normal;
  background: var(--mod-gold);
  color: var(--mod-black);
  border-radius: 4px;
}

/* =========================================================
   LANGUAGE SWITCHER (Polylang — flags circulares)
   ========================================================= */
.mod-lang-switcher,
.mod-lang-switcher ul,
.mod-lang-switcher li {
  border: none !important;
  border-top: none !important;
  border-bottom: none !important;
  border-left: none !important;
  border-right: none !important;
  background: none !important;
  box-shadow: none !important;
  outline: none !important;
  text-decoration: none !important;
}
.mod-lang-switcher::before,
.mod-lang-switcher::after,
.mod-lang-switcher ul::before,
.mod-lang-switcher ul::after,
.mod-lang-switcher li::before,
.mod-lang-switcher li::after {
  display: none !important;
  content: none !important;
  border: none !important;
}
.mod-lang-switcher ul {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.mod-lang-switcher li {
  line-height: 1;
  list-style: none !important;
}
.mod-lang-switcher li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  overflow: hidden;
  transition: border-color 0.2s, opacity 0.2s, box-shadow 0.2s;
  text-decoration: none !important;
  padding: 0;
  opacity: 0.5;
}
.mod-lang-switcher li a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mod-lang-switcher li.current-lang a {
  border-color: #c9a84c;
  box-shadow: 0 0 8px rgba(201, 168, 76, 0.45);
  opacity: 1;
}
.mod-lang-switcher li:not(.current-lang) a:hover {
  opacity: 0.85;
  border-color: rgba(240, 237, 232, 0.3);
}
/* Mobile: flags ligeramente más grandes */
.mod-lang-switcher--mobile li a {
  width: 32px;
  height: 32px;
}

/* =========================================================
   REDUCE MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .mod-reveal,
  .mod-reveal-zoom {
    opacity: 1 !important;
    transform: none !important;
  }
}
