/* =========================================================
   XV AÑOS DE EBOLETH
   01 — PORTADA / BIENVENIDA
========================================================= */

/* =========================================================
   VARIABLES
========================================================= */

:root {
  --verde-profundo: #102c35;

  --verde-esmeralda: #315f4f;

  --turquesa: #168a8a;

  --morado: #55406b;

  --rosa: #d887a4;

  --dorado: #d5b45c;

  --dorado-claro: #f5dda0;

  --crema: #f8f4e8;
}

/* =========================================================
   RESET
========================================================= */

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  padding: 0;

  background: var(--verde-profundo);

  color: var(--crema);

  font-family: "Cormorant Garamond", serif;
}

/* =========================================================
   PORTADA
========================================================= */

.portada {
  position: relative;

  width: 100%;

  min-height: 100svh;

  overflow: hidden;

  isolation: isolate;

  background: #071c24;
}

/* =========================================================
   IMAGEN DE FONDO
========================================================= */

.portada-fondo {
  position: absolute;

  inset: 0;

  z-index: 1;

  background-image: url("../img/portada-eboleth.png");

  background-size: cover;

  background-position: center center;

  background-repeat: no-repeat;

  transform: scale(1.01);

  animation: zoomFondo 25s ease-in-out infinite alternate;
}

/* =========================================================
   OVERLAY
========================================================= */

.portada-overlay {
  position: absolute;

  inset: 0;

  z-index: 2;

  pointer-events: none;

  background:
    radial-gradient(
      circle at 50% 42%,
      rgba(255, 231, 167, 0.08),
      transparent 32%
    ),
    linear-gradient(180deg, rgba(4, 17, 25, 0.08), rgba(4, 17, 25, 0.18));
}

/* =========================================================
   CONTENIDO
========================================================= */

.portada-contenido {
  position: relative;

  z-index: 8;

  min-height: 100svh;

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  padding: 70px 20px 120px;
}

/* =========================================================
   TÍTULO PEQUEÑO
========================================================= */

.titulo-pequeno {
  opacity: 0;

  letter-spacing: 0.25em;

  font-size: clamp(0.85rem, 2vw, 1.35rem);

  font-weight: 600;

  color: var(--dorado-claro);

  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);

  animation: aparecerArriba 1.2s 0.5s forwards;
}

/* =========================================================
   NOMBRE
========================================================= */

.nombre {
  position: relative;

  margin: 10px 0 0;

  opacity: 0;

  font-family: "Great Vibes", cursive;

  font-size: clamp(5rem, 14vw, 11rem);

  line-height: 0.9;

  font-weight: 400;

  color: var(--dorado-claro);

  text-shadow:
    0 2px 0 rgba(255, 255, 255, 0.25),
    0 5px 20px rgba(0, 0, 0, 0.45),
    0 0 30px rgba(213, 180, 92, 0.22);

  animation: aparecerNombre 1.8s 1s forwards;
}

/* =========================================================
   BRILLO DEL NOMBRE
========================================================= */

.nombre::after {
  content: "";

  position: absolute;

  inset: 0;

  pointer-events: none;

  background: linear-gradient(
    110deg,
    transparent 30%,
    rgba(255, 255, 255, 0.75) 48%,
    transparent 62%
  );

  background-size: 250% 100%;

  background-position: 200% 0;

  -webkit-background-clip: text;

  background-clip: text;

  color: transparent;

  animation: brilloNombre 5s 3s ease-in-out infinite;
}

/* =========================================================
   ORNAMENTOS
========================================================= */

.ornamento {
  display: flex;

  align-items: center;

  justify-content: center;

  gap: 12px;

  opacity: 0;
}

.ornamento span {
  width: clamp(45px, 10vw, 100px);

  height: 1px;

  background: linear-gradient(90deg, transparent, var(--dorado), transparent);
}

.ornamento-superior {
  margin-bottom: 5px;

  animation: aparecer 1s 0.2s forwards;
}

.ornamento-nombre {
  margin-top: 8px;

  animation: aparecer 1s 1.9s forwards;
}

.loto,
.flor {
  color: var(--dorado-claro);

  font-size: 1.4rem;

  text-shadow: 0 0 15px rgba(213, 180, 92, 0.6);
}

/* =========================================================
   FECHA
========================================================= */

.fecha {
  display: flex;

  align-items: center;

  gap: 14px;

  margin-top: 18px;

  opacity: 0;

  color: var(--dorado-claro);

  font-size: clamp(1.2rem, 3vw, 1.8rem);

  letter-spacing: 0.18em;

  font-weight: 600;

  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);

  animation: aparecerArriba 1.2s 2.1s forwards;
}

.fecha i {
  font-style: normal;

  color: var(--rosa);
}

/* =========================================================
   FRASE
========================================================= */

.frase {
  margin: 16px 0 25px;

  opacity: 0;

  color: var(--crema);

  font-size: clamp(1.05rem, 2.6vw, 1.4rem);

  font-style: italic;

  line-height: 1.3;

  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);

  animation: aparecerArriba 1.2s 2.5s forwards;
}

/* =========================================================
   BOTÓN ABRIR INVITACIÓN
========================================================= */

.btn-abrir {
  position: relative;

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 14px;

  width: min(90vw, 390px);

  min-height: 62px;

  padding: 12px 28px;

  border: 1px solid var(--dorado);

  border-radius: 100px;

  background: linear-gradient(
    135deg,
    rgba(13, 63, 61, 0.92),
    rgba(16, 44, 53, 0.94)
  );

  color: var(--dorado-claro);

  font-family: "Cormorant Garamond", serif;

  font-size: 1rem;

  font-weight: 700;

  letter-spacing: 0.16em;

  cursor: pointer;

  overflow: hidden;

  opacity: 0;

  box-shadow:
    0 5px 25px rgba(0, 0, 0, 0.35),
    0 0 0 rgba(213, 180, 92, 0);

  animation:
    aparecerBoton 1.3s 3s forwards,
    pulsoBoton 3.5s 4.3s ease-in-out infinite;

  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}

.btn-abrir:hover {
  transform: translateY(-3px);

  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.45),
    0 0 30px rgba(213, 180, 92, 0.45);
}

.btn-abrir::before {
  content: "";

  position: absolute;

  inset: 0;

  background: linear-gradient(
    110deg,
    transparent 20%,
    rgba(255, 255, 255, 0.18) 45%,
    transparent 70%
  );

  transform: translateX(-120%);

  animation: barridoBoton 5s 5s ease-in-out infinite;
}

.btn-icono {
  font-size: 1.2rem;
}

.btn-flecha {
  font-size: 1.6rem;

  line-height: 1;
}

/* =========================================================
   BOTÓN MÚSICA
========================================================= */

.btn-musica {
  position: absolute;

  z-index: 20;

  top: 25px;

  right: 25px;

  width: 48px;

  height: 48px;

  border: 1px solid rgba(248, 244, 232, 0.8);

  border-radius: 50%;

  background: rgba(16, 44, 53, 0.55);

  color: var(--crema);

  backdrop-filter: blur(6px);

  cursor: pointer;

  font-size: 23px;

  transition: 0.3s ease;
}

.btn-musica:hover {
  transform: scale(1.08);

  background: rgba(16, 44, 53, 0.85);
}

.btn-musica.activa {
  animation: pulsoMusica 1.8s ease-in-out infinite;
}

/* =========================================================
   LUCIÉRNAGAS
========================================================= */

.fireflies {
  position: absolute;

  inset: 0;

  z-index: 6;

  pointer-events: none;

  overflow: hidden;
}

.firefly {
  position: absolute;

  width: 5px;

  height: 5px;

  border-radius: 50%;

  background: #ffe9a8;

  box-shadow:
    0 0 8px 2px rgba(255, 225, 140, 0.9),
    0 0 22px 6px rgba(255, 195, 82, 0.25);

  opacity: 0.1;

  animation: volarLuz var(--duracion) ease-in-out infinite;

  animation-delay: var(--delay);
}

/* =========================================================
   DESTELLOS
========================================================= */

.sparkles {
  position: absolute;

  inset: 0;

  z-index: 7;

  pointer-events: none;
}

.sparkles span {
  position: absolute;

  width: 4px;

  height: 4px;

  border-radius: 50%;

  background: #fff4c7;

  box-shadow: 0 0 12px 4px rgba(255, 231, 167, 0.6);

  animation: destello 3s ease-in-out infinite;
}

.sparkles span:nth-child(1) {
  left: 15%;
  top: 30%;
  animation-delay: 0.3s;
}

.sparkles span:nth-child(2) {
  left: 25%;
  top: 18%;
  animation-delay: 1.2s;
}

.sparkles span:nth-child(3) {
  left: 38%;
  top: 31%;
  animation-delay: 2s;
}

.sparkles span:nth-child(4) {
  left: 63%;
  top: 22%;
  animation-delay: 0.8s;
}

.sparkles span:nth-child(5) {
  left: 73%;
  top: 40%;
  animation-delay: 1.7s;
}

.sparkles span:nth-child(6) {
  left: 84%;
  top: 60%;
  animation-delay: 0.4s;
}

.sparkles span:nth-child(7) {
  left: 21%;
  top: 70%;
  animation-delay: 2.2s;
}

.sparkles span:nth-child(8) {
  left: 78%;
  top: 74%;
  animation-delay: 1.1s;
}

/* =========================================================
   SCROLL INDICATOR
========================================================= */

.scroll-indicator {
  position: absolute;

  z-index: 10;

  bottom: 18px;

  left: 50%;

  transform: translateX(-50%);

  width: 42px;

  height: 42px;

  display: flex;

  align-items: center;

  justify-content: center;

  border: 1px solid rgba(248, 244, 232, 0.65);

  border-radius: 50%;

  opacity: 0;

  animation:
    aparecer 1s 4s forwards,
    flotar 2.5s 5s ease-in-out infinite;
}

.scroll-indicator span {
  width: 9px;

  height: 9px;

  border-right: 1px solid var(--crema);

  border-bottom: 1px solid var(--crema);

  transform: rotate(45deg) translate(-2px, -2px);
}

/* =========================================================
   CONTENIDO TEMPORAL
========================================================= */

.contenido {
  min-height: 60vh;

  padding: 120px 20px;

  display: flex;

  align-items: center;

  justify-content: center;

  background:
    radial-gradient(circle at top, rgba(22, 138, 138, 0.2), transparent 45%),
    var(--verde-profundo);
}

.contenido-overline {
  margin-bottom: 10px;

  color: var(--dorado);

  letter-spacing: 0.15em;
}

.contenido h2 {
  margin: 0 0 15px;

  font-family: "Great Vibes", cursive;

  font-size: clamp(3rem, 9vw, 6rem);
}

.contenido p {
  max-width: 600px;

  margin: auto;

  color: rgba(248, 244, 232, 0.75);

  font-size: 1.2rem;
}

/* =========================================================
   ANIMACIONES
========================================================= */

@keyframes zoomFondo {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.045);
  }
}

@keyframes aparecer {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes aparecerArriba {
  from {
    opacity: 0;

    transform: translateY(25px);
  }

  to {
    opacity: 1;

    transform: translateY(0);
  }
}

@keyframes aparecerNombre {
  0% {
    opacity: 0;

    transform: scale(0.85) translateY(20px);

    filter: blur(8px);
  }

  70% {
    opacity: 1;

    filter: blur(0);
  }

  100% {
    opacity: 1;

    transform: scale(1) translateY(0);
  }
}

@keyframes brilloNombre {
  0% {
    background-position: 200% 0;
  }

  30% {
    background-position: -50% 0;
  }

  100% {
    background-position: -50% 0;
  }
}

@keyframes aparecerBoton {
  from {
    opacity: 0;

    transform: translateY(25px) scale(0.95);
  }

  to {
    opacity: 1;

    transform: translateY(0) scale(1);
  }
}

@keyframes pulsoBoton {
  0%,
  100% {
    box-shadow:
      0 5px 25px rgba(0, 0, 0, 0.35),
      0 0 0 rgba(213, 180, 92, 0);
  }

  50% {
    box-shadow:
      0 5px 25px rgba(0, 0, 0, 0.35),
      0 0 28px rgba(213, 180, 92, 0.38);
  }
}

@keyframes barridoBoton {
  0% {
    transform: translateX(-120%);
  }

  25% {
    transform: translateX(120%);
  }

  100% {
    transform: translateX(120%);
  }
}

@keyframes volarLuz {
  0% {
    opacity: 0.08;

    transform: translate3d(0, 0, 0) scale(0.7);
  }

  30% {
    opacity: 0.9;
  }

  50% {
    transform: translate3d(15px, -25px, 0) scale(1.3);
  }

  75% {
    opacity: 0.25;
  }

  100% {
    opacity: 0.08;

    transform: translate3d(-10px, 10px, 0) scale(0.7);
  }
}

@keyframes destello {
  0%,
  100% {
    opacity: 0.15;

    transform: scale(0.6);
  }

  50% {
    opacity: 1;

    transform: scale(1.8);
  }
}

@keyframes flotar {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

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

@keyframes pulsoMusica {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(213, 180, 92, 0);
  }

  50% {
    box-shadow: 0 0 18px rgba(213, 180, 92, 0.6);
  }
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 768px) {
  .portada-fondo {
    background-position: center center;
  }

  .portada-contenido {
    padding: 70px 18px 100px;
  }

  .nombre {
    font-size: clamp(5rem, 23vw, 7.5rem);
  }

  .titulo-pequeno {
    font-size: 0.85rem;

    letter-spacing: 0.18em;
  }

  .fecha {
    gap: 10px;

    font-size: 1.2rem;
  }

  .frase {
    font-size: 1rem;
  }

  .btn-abrir {
    width: min(88vw, 350px);

    min-height: 58px;

    font-size: 0.85rem;

    gap: 9px;
  }

  .btn-musica {
    top: 18px;

    right: 18px;

    width: 44px;

    height: 44px;
  }

  .scroll-indicator {
    width: 36px;

    height: 36px;

    bottom: 14px;
  }
}

/* =========================================================
   PANTALLAS MUY PEQUEÑAS
========================================================= */

@media (max-width: 380px) {
  .portada-contenido {
    padding-top: 60px;
  }

  .nombre {
    font-size: 4.7rem;
  }

  .ornamento-nombre {
    margin-top: 4px;
  }

  .fecha {
    margin-top: 12px;
  }

  .frase {
    margin-top: 10px;

    margin-bottom: 18px;
  }
}

/* =========================================================
   REDUCIR MOVIMIENTO
========================================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .portada-fondo,
  .firefly,
  .sparkles span,
  .nombre::after,
  .btn-abrir,
  .btn-abrir::before,
  .scroll-indicator,
  .btn-musica {
    animation: none !important;
  }

  .titulo-pequeno,
  .nombre,
  .ornamento,
  .fecha,
  .frase,
  .btn-abrir,
  .scroll-indicator {
    opacity: 1;
  }
}
