:root {
  --bg: #faf8f3;
  --card: rgba(255, 252, 246, 0.88);
  --text-primary: #36322e;
  --text-secondary: #7c746c;
  --gold: #c7a46a;
  --champagne: #d7be8a;
  --corinto: #6f2430;
  --corinto-deep: #541822;
  --gold-gradient: linear-gradient(135deg, #f2e3bc 0%, #d8bc86 18%, #bc9457 38%, #9e7842 56%, #8f6a37 72%, #d5b67f 100%);
  --gold-shimmer-gradient: linear-gradient(110deg, rgba(255, 255, 255, 0) 0%, rgba(247, 236, 210, 0.16) 34%, rgba(255, 255, 255, 0.46) 50%, rgba(216, 188, 134, 0.18) 66%, rgba(255, 255, 255, 0) 100%);
  --shadow: 0 24px 60px rgba(92, 76, 45, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top, rgba(215, 190, 138, 0.22), transparent 35%),
    linear-gradient(180deg, #fdfbf7 0%, var(--bg) 58%, #f7f2ea 100%);
  background-position: top center, center;
  background-repeat: no-repeat, no-repeat;
  background-size: auto, cover;
  color: var(--text-primary);
}

button,
input,
textarea,
select {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 0;
}

.invitation-card {
  position: relative;
  width: min(100%, 560px);
  padding: 36px 22px 42px;
  border: 1px solid rgba(199, 164, 106, 0.18);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(253, 251, 247, 0.42), rgba(250, 248, 243, 0.78)),
    url("images/fondo.png"),
    var(--card);
  background-position: center, center, center;
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-size: cover, cover, auto;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  overflow: hidden;
  min-height: 100vh;
}

.music-bubble {
  position: fixed;
  right: 18px;
  bottom: 96px;
  z-index: 8;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(28, 24, 21, 0.08);
  border-radius: 50%;
  background: rgba(255, 250, 242, 0.34);
  box-shadow: 0 8px 16px rgba(37, 29, 19, 0.04);
  backdrop-filter: blur(12px);
  color: rgba(28, 24, 21, 0.66);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(18px, 0, 0) scale(0.92);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.music-bubble.is-visible {
  pointer-events: auto;
}

.music-bubble:hover,
.music-bubble:focus-visible {
  box-shadow: 0 12px 24px rgba(37, 29, 19, 0.07);
}

.music-bubble:focus-visible {
  outline: 2px solid rgba(199, 164, 106, 0.22);
  outline-offset: 4px;
}

.music-icon {
  position: absolute;
  font-size: 0.7rem;
  color: rgba(24, 20, 18, 0.9);
  text-shadow: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.music-icon-play {
  opacity: 0;
  transform: scale(0.85);
}

.music-bubble.is-paused .music-icon-play {
  opacity: 1;
  transform: scale(1);
}

.music-bubble.is-paused .music-icon-pause {
  opacity: 0;
  transform: scale(0.85);
}

.glow {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(215, 190, 138, 0.24), transparent 68%);
  pointer-events: none;
}

.glow-left {
  top: -50px;
  left: -50px;
}

.glow-right {
  right: -65px;
  bottom: 120px;
}

.ambient-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ambient {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(215, 190, 138, 0.15) 68%, transparent 74%);
  opacity: 0.55;
  filter: blur(0.2px) drop-shadow(0 0 14px rgba(215, 190, 138, 0.5));
}

.ambient.big {
  width: 12px;
  height: 12px;
  opacity: 0.38;
}

.ambient::before,
.ambient::after {
  content: "";
  position: absolute;
  inset: 50%;
  width: 1px;
  height: 16px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.9), transparent);
  transform: translate(-50%, -50%);
}

.ambient::after {
  width: 16px;
  height: 1px;
}

.ambient-1 { top: 12%; left: 14%; }
.ambient-2 { top: 20%; right: 16%; }
.ambient-3 { top: 40%; left: 8%; }
.ambient-4 { top: 46%; right: 10%; }
.ambient-5 { bottom: 20%; left: 18%; }
.ambient-6 { bottom: 16%; right: 22%; }
.ambient-3.big { top: 34%; left: 12%; }
.ambient-5.big { bottom: 26%; left: 24%; }

.hero-copy {
  position: relative;
  text-align: center;
  z-index: 1;
}

.eyebrow,
.subtitle,
.interaction-hint,
.date-footer {
  letter-spacing: 0.08em;
}

.eyebrow {
  margin: 0;
  color: rgba(33, 29, 26, 0.88);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.names {
  position: relative;
  margin: 18px auto 12px;
  max-width: 12ch;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.95rem, 10.6vw, 4.9rem);
  line-height: 0.86;
  letter-spacing: -0.04em;
}

.names-line {
  position: relative;
  display: block;
  padding: 5px;
  z-index: 2;
  background: var(--gold-gradient);
  background-size: 180% 180%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gold-drift 7s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 11px rgba(188, 148, 87, 0.24));
}

.names-line-bottom {
  margin-top: -0.02em;
  padding-bottom: 7px;
}

.names-ampersand {
  position: absolute;
  right: 0.18em;
  top: 50%;
  z-index: 1;
  transform: translateY(-48%);
  font-style: italic;
  font-weight: 600;
  font-size: 2.3em;
  line-height: 1;
  color: rgba(28, 24, 21, 0.14);
  pointer-events: none;
}

.subtitle {
  margin: 0 0 14px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 1rem;
  text-transform: none;
}

.subtitle-script {
  font-family: "Cormorant Garamond", serif;
  padding: 5px;
  font-size: clamp(2.8rem, 8.8vw, 4rem);
  font-style: italic;
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: #8f7753;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 28px rgba(188, 148, 87, 0.24);
  background-size: 180% 180%;
  animation: gold-drift 7s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 12px rgba(188, 148, 87, 0.24));
}

.subtitle-plain {
  display: inline-block;
  transform: translateY(-0.34em);
  margin: 0 0.04em;
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(28, 24, 21, 0.7);
}

.hero-copy .eyebrow {
  margin-top: 0;
}

.magic-stage {
  position: relative;
  z-index: 1;
  padding-top: 16px;
  text-align: center;
}

.magic-stage > .date-reveal,
.magic-stage > .interaction-hint,
.magic-stage > .calendar-button,
.magic-stage > .date-footer {
  position: relative;
  z-index: 1;
}

.interaction-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0 14px;
  padding: 11px 18px;
  border: 1px solid rgba(28, 24, 21, 0.28);
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.18);
  box-shadow: 0 10px 24px rgba(37, 29, 19, 0.06);
  backdrop-filter: blur(10px);
  color: rgba(28, 24, 21, 0.84);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.interaction-hint.is-hidden {
  display: none;
}

.magic-scene {
  position: relative;
  width: min(100%, 360px);
  margin: 0 auto;
  aspect-ratio: 1 / 1.04;
  display: flex;
  align-items: center;
  justify-content: center;
}

.magic-halo {
  position: absolute;
  left: 50%;
  top: 34%;
  width: 76%;
  height: 34%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(215, 190, 138, 0.16), rgba(255, 255, 255, 0.08) 40%, transparent 72%);
  filter: blur(16px);
}

.magic-halo::before,
.magic-halo::after {
  content: "";
  position: absolute;
  inset: 22% 28%;
  border-radius: 50%;
  border: 1px solid rgba(215, 190, 138, 0.18);
  opacity: 0.7;
}

.magic-halo::after {
  inset: 12% 18%;
  opacity: 0.42;
}

.hat-button {
  position: absolute;
  left: 50%;
  bottom: 60px;
  width: 66%;
  transform: translateX(-50%);
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  z-index: 3;
  transition: filter 180ms ease, transform 180ms ease;
  touch-action: manipulation;
}

.hat-button:hover,
.hat-button:focus-visible {
  filter: drop-shadow(0 8px 18px rgba(199, 164, 106, 0.26));
}

.hat-button:focus-visible {
  outline: 2px solid rgba(199, 164, 106, 0.45);
  outline-offset: 8px;
  border-radius: 28px;
}

.hat-button:active {
  transform: translateX(-50%) scale(0.98);
}

.hat-aura {
  position: absolute;
  inset: 24% 16% 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(215, 190, 138, 0.32), transparent 70%);
  opacity: 0.65;
  filter: blur(14px);
}

.hat-image,
.wand-image {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.wand-wrapper {
  position: absolute;
  left: 50%;
  top: 8%;
  width: 48%;
  transform: translateX(-50%) scaleX(-1) rotate(-18deg);
  transform-origin: 68% 72%;
  z-index: 5;
}

.wand-image {
  transform-origin: 68% 72%;
  filter: drop-shadow(0 10px 18px rgba(108, 88, 55, 0.1));
}

.wand-spark {
  position: absolute;
  top: 74%;
  left: 6%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 251, 240, 0.98) 0%, rgba(215, 190, 138, 0.92) 38%, transparent 72%),
    conic-gradient(from 0deg, transparent 0deg 40deg, rgba(255, 255, 255, 0.9) 40deg 60deg, transparent 60deg 120deg, rgba(255, 255, 255, 0.75) 120deg 140deg, transparent 140deg 220deg, rgba(255, 255, 255, 0.8) 220deg 240deg, transparent 240deg 320deg, rgba(255, 255, 255, 0.7) 320deg 340deg, transparent 340deg 360deg);
  opacity: 0;
  transform: scale(0.2);
  filter: blur(0.2px) drop-shadow(0 0 12px rgba(215, 190, 138, 0.9));
}

.particles-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 2;
}

.smoke-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 0;
  opacity: 0.56;
}

.particle {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  transform: translate(-50%, -50%);
}

.particle-dot {
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 253, 245, 0.95), var(--color));
  box-shadow: 0 0 18px rgba(215, 190, 138, 0.4);
}

.particle-star {
  width: var(--size);
  height: var(--size);
  background: var(--color);
  clip-path: polygon(50% 0%, 61% 35%, 100% 50%, 61% 65%, 50% 100%, 39% 65%, 0% 50%, 39% 35%);
  box-shadow: 0 0 14px rgba(215, 190, 138, 0.35);
}

.particle-glint {
  width: calc(var(--size) * 1.55);
  height: calc(var(--size) * 1.55);
  background:
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.92), transparent),
    linear-gradient(90deg, transparent, var(--color), transparent);
  filter: drop-shadow(0 0 12px rgba(215, 190, 138, 0.45));
}

.particle-haze {
  width: calc(var(--size) * 2.8);
  height: calc(var(--size) * 2.8);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.36), rgba(215, 190, 138, 0.22) 44%, transparent 72%);
  filter: blur(4px);
}

.smoke-puff {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--size);
  height: calc(var(--size) * 0.72);
  border-radius: 50%;
  opacity: 0;
  background:
    radial-gradient(circle at 35% 40%, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.32) 40%, rgba(238, 231, 220, 0.14) 62%, transparent 78%),
    radial-gradient(circle at 60% 60%, rgba(255, 255, 255, 0.3), transparent 68%);
  filter: blur(7px);
  transform: translate(-50%, -50%);
}

.date-reveal {
  margin: 0 auto -2px;
  min-height: 0;
  opacity: 0;
  transform: translateY(20px) scale(0.92);
  pointer-events: none;
  overflow: hidden;
}

.date-reveal::before {
  content: "";
  position: absolute;
  inset: -18px -14px;
  border-radius: 28px;
  background: radial-gradient(circle at center, rgba(255, 249, 235, 0.88) 0%, rgba(240, 223, 190, 0.34) 34%, rgba(255, 255, 255, 0.08) 54%, transparent 76%);
  opacity: 0;
  transform: scale(0.88);
  filter: blur(10px);
  pointer-events: none;
}

.date-reveal.is-visible {
  pointer-events: auto;
}

.date-label {
  display: none;
}

.date-value {
  position: relative;
  display: inline-block;
  margin: 0 0 4px;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: clamp(1.32rem, 4.9vw, 1.88rem);
  line-height: 0.96;
  color: rgba(24, 20, 18, 0.94);
  letter-spacing: 0.1em;
  text-indent: 0.1em;
  text-shadow: 0 0 8px rgba(255, 248, 232, 0.12);
  text-transform: uppercase;
  filter: none;
  animation: none;
}

.date-value::after {
  content: "";
  position: absolute;
  inset: -20% -10%;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 244, 214, 0.1) 38%, rgba(255, 255, 255, 0.72) 50%, rgba(236, 214, 162, 0.18) 62%, transparent 100%);
  transform: translateX(-130%);
  pointer-events: none;
}

.date-value.shimmering::after {
  animation: date-shimmer 1200ms ease-out forwards;
}

.date-footer {
  margin: 8px 0 0;
  color: rgba(28, 24, 21, 0.82);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.calendar-button {
  margin-top: 12px;
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  background: rgba(24, 20, 18, 0.92);
  color: rgba(255, 250, 242, 0.92);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(24, 20, 18, 0.12);
  backdrop-filter: blur(10px);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.calendar-button.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.calendar-button:hover,
.calendar-button:focus-visible {
  transform: translateY(-1px);
  background: linear-gradient(180deg, var(--corinto) 0%, var(--corinto-deep) 100%);
  box-shadow: 0 14px 28px rgba(111, 36, 48, 0.22), 0 0 16px rgba(111, 36, 48, 0.1);
}

.calendar-button:active {
  transform: translateY(0);
  background: linear-gradient(180deg, #833040 0%, var(--corinto) 100%);
  box-shadow: 0 10px 18px rgba(111, 36, 48, 0.2);
}

.calendar-button:focus-visible {
  outline: 2px solid rgba(199, 164, 106, 0.3);
  outline-offset: 4px;
}

@keyframes date-shimmer {
  from {
    transform: translateX(-130%);
    opacity: 0;
  }

  18% {
    opacity: 1;
  }

  to {
    transform: translateX(130%);
    opacity: 0;
  }
}

@keyframes gold-drift {
  from {
    background-position: 0% 50%;
    filter: drop-shadow(0 0 0 rgba(215, 190, 138, 0));
  }

  50% {
    filter: drop-shadow(0 0 5px rgba(229, 215, 182, 0.12));
  }

  to {
    background-position: 100% 50%;
    filter: drop-shadow(0 0 8px rgba(229, 215, 182, 0.14));
  }
}

@media (min-width: 700px) {
  .invitation-card {
    padding: 52px 42px 54px;
    border-radius: 32px;
    min-height: auto;
  }

  .page-shell {
    padding: 20px 14px;
  }

  .magic-stage {
    padding-top: 30px;
  }

  .interaction-hint {
    margin-bottom: 22px;
  }

  .date-reveal {
    min-height: 0;
  }
}

@media (max-width: 699px) {
  .music-bubble {
    right: 12px;
    bottom: 84px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
