/* =========================================================
   Réplica — "Mis 40 Romi"
   Colores extraídos directamente de la captura original
   ========================================================= */

:root {
  --color-bg: #fdf6eb;      /* crema, sampleado de la captura */
  --color-wine: #661813;     /* vino, sampleado de la captura */
  --color-ink: #241a17;
  --color-white: #ffffff;

  --font-display: "Cormorant Garamond", "Georgia", serif;
  --font-body: "Jost", "Inter", sans-serif;

  --player-size: 56px;
  --player-bg: #111111;
  --player-icon: #ffffff;
  --player-offset: 24px;
  --player-transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.container-width {
  max-width: 480px;
  margin: 0 auto;
}

/* ============== PANTALLA DE BIENVENIDA (index.html) ============== */
.welcome {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.welcome__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transform-origin: center center;
  animation: ken-burns 18s ease-in-out infinite alternate;
}

@keyframes ken-burns {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.15) translate(-1.5%, -1.5%); }
}

@media (prefers-reduced-motion: reduce) {
  .welcome__bg { animation: none; }
}

.welcome__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(36, 26, 23, 0.35) 0%, rgba(36, 26, 23, 0.65) 100%);
}

.welcome__content {
  position: relative;
  z-index: 2;
  max-width: 340px;
  animation: welcome-fade-up 800ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes welcome-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.welcome__text {
  margin: 0 0 28px;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.5;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.btn--welcome {
  background: var(--color-wine);
  color: #fff;
  border-color: var(--color-wine);
  padding: 13px 40px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.btn--welcome:hover {
  background: var(--color-wine-deep, #4a141d);
}

@media (prefers-reduced-motion: reduce) {
  .welcome__content { animation: none; }

}

/* ============== HERO ============== */
.hero {
  max-width: 480px;
  margin: 0 auto;
  padding: 32px 24px 40px;
  text-align: center;
}

.hero__photo {
  width: 240px;
  margin: 0 auto 24px;
  border-radius: 2px;
  overflow: hidden;
}

.hero__title {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 28px;
  letter-spacing: 0.02em;
}

.countdown__label {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-wine);
}

.countdown {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 30px;
  color: var(--color-ink);
  letter-spacing: 0.02em;
}

.countdown__sep {
  color: var(--color-ink);
  opacity: 0.5;
  margin: 0 4px;
}

.countdown__accent {
  color: var(--color-wine);
}

.countdown__units {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-top: 4px;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a7a72;
}

/* ============== FRASE ============== */
.quote {
  background: var(--color-wine);
  color: var(--color-bg);
  padding: 40px 32px;
  text-align: center;
  max-width: none;
}

.quote__line {
  display: block;
  width: 90%;
  max-width: 380px;
  margin: 0 auto 22px;
  height: 1px;
  background: rgba(253, 246, 235, 0.55);
}

.quote__text {
  margin: 0 0 22px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.9;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

/* ============== BLOQUES (cuándo / dónde / etc) ============== */
.block {
  padding: 56px 24px;
  text-align: center;
}

.block--light {
  background: var(--color-white);
}

.block--cream {
  background: var(--color-bg);
}

.block--wine {
  background: var(--color-wine);
  color: var(--color-bg);
}

.block__icon {
  width: 34px;
  height: 34px;
  margin: 0 auto 14px;
  color: currentColor;
  opacity: 0.9;
  animation: icon-float 3.2s ease-in-out infinite;
}

@keyframes icon-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@media (prefers-reduced-motion: reduce) {
  .block__icon { animation: none; }
}

.block__title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
}

.block--wine .block__title,
.block--wine .block__text {
  color: var(--color-bg);
}

.block__text {
  margin: 0 0 20px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6a5a52;
}

/* ============== BOTÓN ============== */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border: 1px solid currentColor;
  border-radius: 2px;
  color: inherit;
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background var(--player-transition), color var(--player-transition);
}

.block--light .btn,
.block--cream .btn {
  color: var(--color-wine);
  border-color: var(--color-wine);
}

.block--light .btn:hover,
.block--cream .btn:hover {
  background: var(--color-wine);
  color: var(--color-bg);
}

.block--wine .btn:hover {
  background: var(--color-bg);
  color: var(--color-wine);
}

/* ============== FOTOS ============== */
.duo {
  display: flex;
  max-width: 320px;
  margin: 0 auto 32px;
  gap: 0;
}

/* ============== MAPA EMBEBIDO ============== */
.map-embed {
  margin-top: 20px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  border-radius: 6px;
  animation: map-open 400ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes map-open {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.map-embed iframe {
  width: 100%;
  height: 240px;
  border: 0;
  display: block;
}

.map-embed__link {
  display: block;
  padding: 10px;
  text-align: center;
  background: rgba(102, 24, 19, 0.06);
  color: var(--color-wine);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.map-embed__link:hover {
  background: rgba(102, 24, 19, 0.12);
}

@media (prefers-reduced-motion: reduce) {
  .map-embed { animation: none; }
}

/* ============== FORMULARIO / TRIVIA EMBEBIDOS ============== */
.embed-wrap {
  margin-top: 20px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  border-radius: 6px;
  animation: map-open 400ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.embed-wrap iframe {
  width: 100%;
  height: 480px;
  border: 0;
  display: block;
  background: #fff;
}

.embed-wrap__link {
  display: block;
  padding: 10px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.block--light .embed-wrap__link,
.block--cream .embed-wrap__link {
  background: rgba(102, 24, 19, 0.06);
  color: var(--color-wine);
}

.block--light .embed-wrap__link:hover,
.block--cream .embed-wrap__link:hover {
  background: rgba(102, 24, 19, 0.12);
}

@media (prefers-reduced-motion: reduce) {
  .embed-wrap { animation: none; }
}

.duo img {
  width: 50%;
  height: 200px;
  object-fit: cover;
}

.single-photo {
  max-width: 420px;
  margin: 28px auto 0;
}

.single-photo img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.final-photo img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

/* ============== CARRUSEL ============== */
.carousel {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
}

.carousel__track {
  display: flex;
  overflow: hidden;
  border-radius: 4px;
  scroll-snap-type: x mandatory;
  touch-action: pan-y;
}

.carousel__slide {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 4 / 3;
  scroll-snap-align: start;
}

.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none;
}

.carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(253, 246, 235, 0.9);
  color: var(--color-wine);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: background 200ms ease, transform 200ms ease;
}

.carousel__arrow:hover {
  background: var(--color-white);
}

.carousel__arrow:active {
  transform: translateY(-50%) scale(0.92);
}

.carousel__arrow--prev { left: 8px; }
.carousel__arrow--next { right: 8px; }

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
}

.carousel__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(102, 24, 19, 0.28);
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease;
}

.carousel__dot.is-active {
  background: var(--color-wine);
  transform: scale(1.3);
}

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

/* ============== CIERRE ============== */
.block--closing .block__title {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-wine);
}

.heart {
  width: 26px;
  height: 26px;
  color: var(--color-wine);
  margin-top: 8px;
  animation: heart-beat 1.8s ease-in-out infinite;
}

@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
  .heart { animation: none; }
}

/* ============== FOOTER ============== */
.footer {
  background: var(--color-wine);
  color: var(--color-bg);
  text-align: center;
  padding: 14px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* =========================================================
   Reproductor de música flotante
   ========================================================= */
.music-player, .music-player * { box-sizing: border-box; }

.music-player {
  position: fixed;
  right: var(--player-offset);
  bottom: var(--player-offset);
  z-index: 2147483647;
  width: var(--player-size);
  height: var(--player-size);
  border-radius: 50%;
  background-color: var(--player-bg);
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), 0 8px 24px rgba(0, 0, 0, 0.18);
  transition: transform var(--player-transition), box-shadow var(--player-transition), opacity var(--player-transition);
  opacity: 0;
  transform: scale(0.9);
  animation: player-appear 600ms cubic-bezier(0.16, 1, 0.3, 1) 200ms forwards;
  will-change: transform;
}

@keyframes player-appear { to { opacity: 1; transform: scale(1); } }

.music-player:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), 0 12px 28px rgba(0, 0, 0, 0.22);
}
.music-player:active { transform: scale(0.95); }

.music-player:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 0 0 5px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.18);
}

.music-player__icon {
  width: 20px;
  height: 20px;
  color: var(--player-icon);
  position: absolute;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity var(--player-transition), transform var(--player-transition);
}

.music-player__icon--play { opacity: 1; transform: translateX(1px) scale(1); }
.music-player__icon--pause { opacity: 0; }

.music-player.is-playing .music-player__icon--play { opacity: 0; transform: translateX(1px) scale(0.85); }
.music-player.is-playing .music-player__icon--pause { opacity: 1; transform: scale(1); }

.music-player__ripple {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  opacity: 0;
  pointer-events: none;
}

.music-player.is-playing .music-player__ripple { animation: player-ripple 2.4s ease-out infinite; }

@keyframes player-ripple {
  0% { opacity: 0.35; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.6); }
}

@media (prefers-reduced-motion: reduce) {
  .music-player { animation: none; opacity: 1; transform: none; }
  .music-player, .music-player__icon { transition-duration: 1ms; }
}

@media (max-width: 380px) {
  :root { --player-offset: 16px; --player-size: 52px; }
  .music-player__icon { width: 18px; height: 18px; }
}

@supports (bottom: env(safe-area-inset-bottom)) {
  .music-player {
    right: calc(var(--player-offset) + env(safe-area-inset-right));
    bottom: calc(var(--player-offset) + env(safe-area-inset-bottom));
  }
}
