:root {
  --bg-main: #eef4ff;
  --bg-soft: #f9efff;
  --surface: rgba(255, 255, 255, 0.78);
  --text-main: #1f1638;
  --text-muted: #564d74;
  --border: rgba(106, 97, 153, 0.22);
  --shadow: 0 22px 54px rgba(46, 31, 80, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Sora", sans-serif;
  color: var(--text-main);
  background: radial-gradient(circle at 12% 18%, rgba(255, 159, 190, 0.34), transparent 32%),
    radial-gradient(circle at 85% 15%, rgba(126, 153, 255, 0.35), transparent 34%),
    radial-gradient(circle at 90% 90%, rgba(255, 220, 160, 0.34), transparent 30%),
    linear-gradient(160deg, var(--bg-main) 0%, var(--bg-soft) 100%);
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

.splash-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 20% 20%, rgba(255, 172, 211, 0.42), transparent 38%),
    radial-gradient(circle at 78% 18%, rgba(132, 156, 255, 0.4), transparent 34%),
    linear-gradient(145deg, #fdf5ff, #f0eaff 58%, #e6ebff);
  z-index: 40;
  opacity: 1;
  transition: opacity 560ms ease, visibility 560ms ease;
}

.splash-copy {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
}

.splash-screen p {
  margin: 0;
  font-family: "Modak", system-ui;
  font-size: clamp(2.2rem, 9vw, 5.4rem);
  letter-spacing: 0.05em;
  color: #ff4a90;
  text-shadow: 0 10px 20px rgba(171, 45, 107, 0.2);
  animation: splashPulse 1200ms ease-in-out infinite;
}

.splash-copy span {
  font-family: "Sora", sans-serif;
  font-size: clamp(0.8rem, 2.2vw, 1.05rem);
  letter-spacing: 0.08em;
  color: #6d4f8f;
  text-transform: uppercase;
}

.splash-screen.hide {
  opacity: 0;
  visibility: hidden;
}

@keyframes splashPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
}

.background-glow {
  position: fixed;
  top: -18vw;
  left: -12vw;
  width: 56vw;
  height: 56vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 108, 161, 0.35), transparent 66%);
  filter: blur(4px);
  animation: drift 11s ease-in-out infinite alternate;
  z-index: -2;
}

.jacaranda-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -3;
  overflow: hidden;
}

.jacaranda-trunk {
  position: absolute;
  left: 8%;
  bottom: -40px;
  width: 80px;
  height: 320px;
  border-radius: 40px;
  background: linear-gradient(180deg, #7f5b4b, #5d3f36 70%, #4a3029 100%);
  filter: drop-shadow(0 18px 16px rgba(34, 20, 28, 0.3));
}

.jacaranda-trunk::before,
.jacaranda-trunk::after {
  content: "";
  position: absolute;
  background: linear-gradient(180deg, #845e4d, #593c32);
  border-radius: 40px;
}

.jacaranda-trunk::before {
  width: 44px;
  height: 170px;
  left: -22px;
  top: -100px;
  transform: rotate(-26deg);
}

.jacaranda-trunk::after {
  width: 42px;
  height: 160px;
  right: -20px;
  top: -95px;
  transform: rotate(24deg);
}

.jacaranda-canopy {
  position: absolute;
  left: -8%;
  bottom: 190px;
  width: 520px;
  height: 340px;
  border-radius: 56% 44% 52% 48% / 58% 58% 42% 42%;
  background: radial-gradient(circle at 28% 40%, rgba(228, 163, 255, 0.85), rgba(175, 119, 214, 0.72) 60%, rgba(138, 88, 182, 0.58) 100%);
  filter: blur(0.5px);
  opacity: 0.75;
}

.jacaranda-canopy::before,
.jacaranda-canopy::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(231, 170, 255, 0.85), rgba(157, 99, 199, 0.6));
}

.jacaranda-canopy::before {
  width: 220px;
  height: 180px;
  left: 250px;
  top: 80px;
}

.jacaranda-canopy::after {
  width: 190px;
  height: 150px;
  left: 140px;
  top: -50px;
}

.petals-layer {
  position: absolute;
  inset: 0;
}

.petal {
  position: absolute;
  top: -10%;
  width: 14px;
  height: 10px;
  border-radius: 80% 20% 65% 35%;
  background: linear-gradient(145deg, #f8d6ff, #b783df);
  box-shadow: 0 1px 3px rgba(96, 60, 124, 0.22);
  opacity: 0.85;
  animation: petalFall linear forwards;
}

@keyframes petalFall {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 0;
  }
  15% {
    opacity: 0.9;
  }
  100% {
    transform: translate3d(var(--fall-x), 110vh, 0) rotate(var(--spin));
    opacity: 0.1;
  }
}

.scene-3d {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  perspective: 1200px;
}

.float-3d {
  position: absolute;
  transform-style: preserve-3d;
  will-change: transform;
  animation: bob 7s ease-in-out infinite;
}

.food-3d {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 24px;
  font-size: 2.6rem;
  line-height: 1;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(236, 229, 255, 0.65));
  border: 1px solid rgba(134, 125, 187, 0.3);
  box-shadow: 0 16px 30px rgba(43, 27, 73, 0.2);
  transform: rotateX(58deg) rotateY(-18deg);
}

.food-3d::before {
  content: "🇨🇴";
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 1rem;
  line-height: 1;
  filter: drop-shadow(0 4px 6px rgba(16, 12, 35, 0.28));
}

.food-3d::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 17px;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.taco-a {
  top: 120px;
  right: 14%;
}

.elote-a {
  top: 64%;
  left: 8%;
  animation-delay: -2.2s;
}

.pasta-a {
  top: 42%;
  right: 7%;
}

.dog-a {
  top: 22%;
  left: 12%;
  animation-delay: -1.4s;
}

.dog-b {
  top: 78%;
  right: 18%;
  animation-delay: -3s;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(4vw, 6vh, 0);
  }
}

@keyframes bob {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -14px;
  }
}

.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1.25rem 1.8rem;
  text-align: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.64);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
}

.balloon-title {
  display: grid;
  justify-items: center;
  gap: 0.2rem;
  margin: 0.2rem 0 0.5rem;
}

.balloon-title span {
  font-family: "Modak", system-ui;
  letter-spacing: 0.03em;
  line-height: 0.9;
  font-weight: 400;
  color: #ff5a8f;
  background: linear-gradient(180deg, #ffc6da 0%, #ff7ead 35%, #ff4b88 70%, #e73373 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4), 0 14px 26px rgba(185, 43, 104, 0.28);
  animation: balloonFloat 3.6s ease-in-out infinite;
}

.balloon-title span:first-child {
  font-size: clamp(4rem, 18vw, 11rem);
}

.balloon-title span:last-child {
  font-size: clamp(3.2rem, 13vw, 8rem);
  animation-delay: -1.5s;
}

@keyframes balloonFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.subtitle {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 56ch;
  margin: 0 auto;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
  display: grid;
  gap: 1rem;
}

section {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
}

section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.5), transparent 60%);
  pointer-events: none;
}

h2 {
  margin: 0 0 0.9rem;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  letter-spacing: -0.01em;
}

.counter-section {
  text-align: center;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.86), rgba(239, 233, 255, 0.8));
}

.counter-label {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.counter-value {
  margin: 0.35rem 0 0;
  font-size: clamp(1.8rem, 6vw, 3rem);
  font-weight: 700;
  color: #2c1b57;
}

.counter-value span {
  font-size: clamp(2.6rem, 8vw, 4.1rem);
}

.counter-grid {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}

.counter-box {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(132, 118, 190, 0.26);
  border-radius: 12px;
  padding: 0.55rem 0.35rem;
}

.counter-box span {
  display: block;
  font-size: clamp(1.2rem, 3.5vw, 2rem);
  font-weight: 700;
  color: #2b1a57;
}

.counter-box small {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.66rem;
}

.carousel-section {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
}

.carousel-section::before {
  display: none;
}

.carousel-copy {
  margin: 0;
  color: var(--text-muted);
}

.ring-stage {
  position: relative;
  margin-top: 1.2rem;
  min-height: 480px;
  display: grid;
  justify-items: center;
  align-items: center;
  perspective: 1250px;
}

.ring-carousel {
  position: relative;
  width: min(660px, 96vw);
  height: 350px;
  transform-style: preserve-3d;
  will-change: transform;
  cursor: grab;
}

.ring-carousel:active {
  cursor: grabbing;
}

.carousel-item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(240px, 46vw);
  height: 320px;
  margin: 0;
  transform-style: preserve-3d;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 18px 30px rgba(36, 22, 68, 0.22);
  transition: transform 280ms ease, filter 280ms ease;
}

.carousel-item img,
.carousel-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-item video {
  background: #000;
}

.envelope-section {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
}

.envelope-section::before {
  display: none;
}

.photo-envelope {
  position: relative;
  width: min(360px, 92vw);
  height: 180px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.photo-envelope-shadow {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 4px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 30, 71, 0.3), transparent 70%);
}

.photo-envelope-letter {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 56px;
  height: 95px;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff9f0, #f4eadf);
  border: 1px solid rgba(160, 135, 107, 0.35);
  box-shadow: inset 0 -18px 18px rgba(183, 154, 122, 0.12), 0 10px 16px rgba(46, 28, 61, 0.15);
  transition: transform 450ms ease;
}

.photo-envelope-letter::before,
.photo-envelope-letter::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  height: 1px;
  background: rgba(162, 132, 105, 0.35);
}

.photo-envelope-letter::before {
  top: 24px;
}

.photo-envelope-letter::after {
  top: 38px;
}

.photo-envelope-body {
  position: absolute;
  inset: auto 0 0 0;
  height: 145px;
  border-radius: 0 0 14px 14px;
  background: linear-gradient(165deg, #f8e6cf, #e9cfaf 55%, #ddc19a);
  border: 1px solid rgba(154, 121, 84, 0.45);
  box-shadow: inset 0 10px 18px rgba(255, 255, 255, 0.22), 0 12px 22px rgba(64, 33, 84, 0.22);
}

.photo-envelope-flap {
  position: absolute;
  top: 36px;
  left: 0;
  width: 100%;
  height: 95px;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  background: linear-gradient(180deg, #f1dbbc, #dcb78f);
  border: 1px solid rgba(154, 121, 84, 0.45);
  transition: transform 420ms ease;
  z-index: 2;
}

.photo-envelope-heart {
  position: absolute;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  color: #a24f6b;
  font-size: 1.3rem;
  z-index: 3;
}

.photo-envelope-seal {
  position: absolute;
  top: 86px;
  left: 50%;
  width: 34px;
  height: 34px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #f593af, #d64f7d 64%, #bf3e67);
  box-shadow: 0 4px 10px rgba(151, 40, 84, 0.35);
  z-index: 4;
}

.photo-reveal {
  width: fit-content;
  max-width: 96vw;
  opacity: 0;
  overflow: hidden;
  transition: max-height 520ms ease, opacity 420ms ease;
  border-radius: 16px;
  margin: 0 auto;
}

.photo-reveal img {
  width: 420px;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 16px 28px rgba(35, 20, 61, 0.26);
}

.photo-reveal.is-open {
  opacity: 1;
}

.photo-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 0.7rem;
  padding-bottom: 0.25rem;
}

.action-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.56rem 1rem;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  transition: transform 160ms ease, filter 160ms ease;
}

.action-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.accept-btn {
  background: linear-gradient(145deg, #39b174, #26925c);
}

.decline-btn {
  background: linear-gradient(145deg, #ff6e97, #ec4f7d);
}

.photo-envelope.is-open .photo-envelope-flap {
  transform: rotateX(170deg);
}

.response-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(18, 10, 33, 0.62);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
  z-index: 20;
}

.response-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.response-dialog {
  width: min(520px, 96vw);
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(115, 96, 174, 0.24);
  padding: 0.85rem;
  box-shadow: 0 16px 36px rgba(30, 17, 54, 0.35);
}

.response-dialog img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.response-dialog p {
  margin: 0.7rem 0 0;
  color: #4a4166;
  text-align: center;
}

.calendar-link {
  display: none;
  margin: 0.75rem auto 0.2rem;
  width: fit-content;
  border-radius: 999px;
  padding: 0.52rem 0.9rem;
  background: linear-gradient(145deg, #4b73ff, #3658ca);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.calendar-link.show {
  display: inline-block;
}

.photo-envelope.is-open .photo-envelope-letter {
  transform: translateY(-28px);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  animation: revealUp 700ms ease forwards;
}

.reveal:nth-child(1) {
  animation-delay: 120ms;
}

.reveal:nth-child(2) {
  animation-delay: 240ms;
}

.reveal:nth-child(3) {
  animation-delay: 360ms;
}

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .hero {
    padding-top: 4.3rem;
  }

  .balloon-title span:first-child {
    font-size: clamp(4rem, 28vw, 7rem);
  }

  .balloon-title span:last-child {
    font-size: clamp(2.8rem, 20vw, 5.4rem);
  }

  .ring-stage {
    min-height: 420px;
  }

  .counter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .counter-box {
    padding: 0.5rem 0.3rem;
  }

  .counter-box small {
    font-size: 0.6rem;
  }

  .photo-envelope {
    height: 165px;
  }

  .photo-envelope-body {
    height: 132px;
  }

  .jacaranda-trunk {
    left: -4%;
    transform: scale(0.78);
    transform-origin: bottom left;
  }

  .jacaranda-canopy {
    left: -34%;
    width: 440px;
    height: 300px;
    opacity: 0.62;
  }

  .ring-carousel {
    width: 96vw;
    height: 300px;
  }

  .carousel-item {
    width: min(200px, 56vw);
    height: 260px;
  }

  .food-3d {
    opacity: 0.48;
  }

  section {
    padding: 1.2rem;
  }
}

@media (max-width: 560px) {
  .hero {
    padding: 3.2rem 0.8rem 1.2rem;
  }

  main {
    padding: 0 0.8rem 2.8rem;
  }

  .subtitle {
    font-size: 0.95rem;
  }

  .counter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .counter-box span {
    font-size: 1.35rem;
  }

  .ring-stage {
    min-height: 350px;
    margin-top: 0.7rem;
  }

  .ring-carousel {
    width: 94vw;
    height: 250px;
  }

  .carousel-item {
    width: min(160px, 52vw);
    height: 220px;
  }

  .photo-reveal {
    max-width: 94vw;
  }

  .photo-actions {
    flex-wrap: wrap;
  }

  .action-btn {
    width: 100%;
  }

  .response-dialog {
    width: min(94vw, 520px);
    padding: 0.7rem;
  }

  .response-dialog p {
    font-size: 0.92rem;
  }

  .calendar-link {
    font-size: 0.9rem;
  }

  .splash-copy span {
    font-size: 0.72rem;
  }

  .jacaranda-canopy {
    left: -45%;
    width: 370px;
    height: 260px;
    opacity: 0.52;
  }

  .food-3d {
    width: 74px;
    height: 74px;
    font-size: 2rem;
    border-radius: 18px;
    opacity: 0.38;
  }
}
