:root {
  --bg: #faf5ef;
  --card: rgba(255, 250, 245, 0.86);
  --text-primary: #2b1f1d;
  --text-secondary: #7c6663;
  --gold-gradient: linear-gradient(120deg, #fff2d4 0%, #eac98a 18%, #c28a47 38%, #8a6036 56%, #d4ad6f 78%, #fff0d0 100%);
  --rose: #be7a86;
  --rose-deep: #8f5662;
  --shadow: 0 24px 60px rgba(105, 74, 62, 0.14);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Manrope", sans-serif;
  color: var(--text-primary);
  background:
    radial-gradient(circle at top, rgba(255, 221, 196, 0.18), transparent 34%),
    linear-gradient(180deg, #fdfaf7 0%, var(--bg) 56%, #f8efe7 100%);
}

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

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

.invitation-card {
  position: relative;
  width: min(100%, 560px);
  min-height: 100vh;
  padding: 30px 18px 26px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(194, 144, 113, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 251, 247, 0.3), rgba(255, 247, 241, 0.72)),
    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(12px);
}

.glow {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 208, 183, 0.26), transparent 70%);
  pointer-events: none;
}

.glow-left {
  top: -56px;
  left: -58px;
}

.glow-right {
  right: -70px;
  bottom: 132px;
}

.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.96), rgba(244, 200, 149, 0.2) 68%, transparent 74%);
  opacity: 0.46;
  filter: blur(0.2px) drop-shadow(0 0 14px rgba(235, 190, 139, 0.4));
}

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

.ambient::before {
  width: 1px;
  height: 14px;
}

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

.ambient-1 { top: 12%; left: 14%; }
.ambient-2 { top: 18%; right: 18%; }
.ambient-3 { top: 38%; left: 9%; }
.ambient-4 { top: 42%; right: 12%; }
.ambient-5 { bottom: 16%; left: 18%; }
.ambient-6 { bottom: 14%; right: 24%; }

.hero-copy {
  position: relative;
  z-index: 1;
  text-align: center;
  flex: 0 0 auto;
  margin-bottom: 8px;
  padding-top: 0;
}

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

.subtitle {
  margin: 0 0 2px;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.subtitle-script {
  padding: 5px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.65rem, 8.1vw, 3.7rem);
  font-style: italic;
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #7b7b7b 0%, #141414 20%, #000000 48%, #232323 72%, #8a8a8a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.28)) drop-shadow(0 0 10px rgba(255, 255, 255, 0.12)) drop-shadow(0 10px 18px rgba(28, 22, 18, 0.1));
  animation: none;
}

.subtitle-plain {
  display: inline-block;
  margin: 0 0.04em;
  transform: translateY(-0.34em);
  color: #121212;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.22), 0 0 12px rgba(255, 255, 255, 0.14);
}

.eyebrow {
  margin: 0 auto;
  max-width: 25rem;
  color: rgba(43, 31, 29, 0.9);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1rem, 3.5vw, 1.18rem);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.names {
  position: relative;
  margin: 0 auto;
  max-width: none;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.18em;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(3.05rem, 10.8vw, 4.95rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

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

.names-ampersand {
  position: relative;
  z-index: 1;
  transform: translateY(-0.03em);
  background: var(--gold-gradient);
  background-size: 220% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 0.78em;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 0 14px rgba(188, 148, 87, 0.24));
}

.magic-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  flex: 1 1 auto;
  padding: 18px 0 8px;
}

.interaction-hint,
.calendar-button,
.date-footer {
  position: relative;
  z-index: 2;
}

.interaction-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 4px;
  padding: 9px 14px;
  border: 1px solid rgba(43, 31, 29, 0.18);
  border-radius: 999px;
  background: rgba(255, 251, 246, 0.24);
  box-shadow: 0 10px 24px rgba(56, 36, 28, 0.05);
  backdrop-filter: blur(10px);
  color: rgba(43, 31, 29, 0.82);
  font-size: 0.54rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.heart-scene {
  position: relative;
  width: min(100%, 340px);
  aspect-ratio: 1 / 0.98;
  margin: 0 auto 2px;
}

.heart-halo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82%;
  height: 82%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 212, 200, 0.3), rgba(255, 235, 229, 0.08) 44%, transparent 72%);
  filter: blur(24px);
}

.heart-shell {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.heart-canvas,
.heart-reveal {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.heart-canvas {
  display: block;
}

.heart-canvas-scratch {
  cursor: grab;
  touch-action: none;
}

.heart-canvas-scratch.is-complete {
  cursor: default;
  pointer-events: none;
}

.heart-reveal {
  display: grid;
  place-items: center;
  padding: 0 56px;
  align-content: start;
  padding-top: 30%;
  text-align: center;
  opacity: 0.16;
  transform: scale(0.94);
  filter: drop-shadow(0 10px 16px rgba(53, 42, 34, 0.08));
}

.heart-reveal.is-visible {
  opacity: 1;
  transform: scale(1);
}

.date-value {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  background: linear-gradient(180deg, #8e8e8e 0%, #1a1a1a 18%, #000000 42%, #1f1f1f 70%, #9a9a9a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.3rem, 8.6vw, 3.35rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 18px rgba(255, 255, 255, 0.18), 0 0 3px rgba(255, 255, 255, 0.22), 0 8px 18px rgba(32, 25, 20, 0.1);
}

.date-line {
  display: block;
}

.date-line + .date-line {
  margin-top: -0.04em;
}

.date-value::after {
  content: "";
  position: absolute;
  inset: -14% -6%;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.08) 30%, rgba(255, 255, 255, 0.9) 50%, rgba(255, 255, 255, 0.18) 66%, transparent 100%);
  transform: translateX(-130%);
  pointer-events: none;
}

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

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

.calendar-button {
  margin-top: 18px;
  padding: 11px 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #f6e5b8 0%, #d8b36a 48%, #b9893d 100%);
  color: rgba(255, 255, 255, 0.98);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(143, 111, 45, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.26);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.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, #3a3a3a 0%, #0b0b0b 48%, #000000 100%);
  box-shadow: 0 14px 28px rgba(24, 20, 18, 0.24), 0 0 16px rgba(0, 0, 0, 0.12);
}

.calendar-button:active {
  transform: translateY(0);
  background: linear-gradient(180deg, #2b2b2b 0%, #050505 52%, #000000 100%);
}

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

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

.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(216, 188, 134, 0.36);
}

.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(216, 188, 134, 0.3);
}

.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(216, 188, 134, 0.4));
}

.date-footer {
  margin: 16px 0 0;
  background: linear-gradient(180deg, #7b7b7b 0%, #141414 20%, #000000 48%, #232323 72%, #8a8a8a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.24), 0 0 10px rgba(255, 255, 255, 0.12);
  opacity: 0;
  transform: translateY(12px);
}

@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 8px rgba(229, 215, 182, 0.18));
  }

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

@media (min-width: 700px) {
  .page-shell {
    padding: 20px 14px;
  }

  .invitation-card {
    min-height: auto;
    padding: 52px 42px 54px;
    border-radius: 32px;
  }

  .hero-copy {
    padding-top: 0;
    margin-bottom: 10px;
  }

  .interaction-hint {
    margin: 0 0 4px;
  }

  .date-footer {
    margin-top: 8px;
  }
}

@media (max-width: 430px) {
  .invitation-card {
    padding: 24px 14px 22px;
  }

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

  .subtitle-script {
    font-size: clamp(2.35rem, 10vw, 2.9rem);
  }

  .subtitle-plain {
    font-size: 0.5rem;
    letter-spacing: 0.22em;
  }

  .eyebrow {
    max-width: 19rem;
    font-size: 0.94rem;
  }

  .names {
    font-size: clamp(2.55rem, 11vw, 3.35rem);
    gap: 0.14em;
  }

  .heart-scene {
    width: min(100%, 300px);
    margin-top: -8px;
  }

  .heart-reveal {
    padding: 0 42px;
    padding-top: 30%;
  }

  .date-value {
    font-size: clamp(1.92rem, 9vw, 2.65rem);
    letter-spacing: 0.03em;
  }

  .date-footer {
    margin-top: 18px;
    font-size: 0.54rem;
  }
}

@media (max-width: 360px) {
  .eyebrow {
    max-width: 17.5rem;
    font-size: 0.88rem;
  }

  .heart-scene {
    width: min(100%, 270px);
    margin-top: -6px;
  }

  .heart-reveal {
    padding: 0 34px;
    padding-top: 29%;
  }

  .date-value {
    font-size: 1.72rem;
    letter-spacing: 0.02em;
  }
}

@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;
  }
}
