/* ============================================================
   XV Años · Dara Yaretzi — Invitación Ultra Premium
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400;1,600&family=Montserrat:wght@300;400;500;600&display=swap');

/* ── Animated custom property ─────────────────────────────── */
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --gold: #d4af37;
  --gold-dark: #a8892a;
  --gold-light: #f0d070;
  --wine: #1a3a6e;
  --rose: #2952c8;
  --rose-light: #7eb8f0;
  --blush: #dceeff;
  --dark: #070c18;
  --dark-mid: #0d1728;
  --dark-rose: #111e38;
  --cream: #f0f4fd;
  --cream-rose: #eef3fd;
  --shadow: rgba(7, 12, 24, .35);
  --angle: 0deg;
}

/* ── Reset ─────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--dark);
  color: #fff;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
}

/* ── Custom Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--dark);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-dark), var(--rose));
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* ── Scroll Progress Bar ──────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--rose), var(--gold), var(--gold-light));
  z-index: 9999;
  transition: width .1s linear;
  box-shadow: 0 0 10px var(--gold), 0 0 20px rgba(212, 175, 55, .3);
}

/* ── Noise Texture Overlay ────────────────────────────────── */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ── Utilities ─────────────────────────────────────────────── */
.tc {
  text-align: center;
}

/* ── Animated Gradient Border Mixin ───────────────────────── */
@keyframes rotateBorder {
  from {
    --angle: 0deg;
  }

  to {
    --angle: 360deg;
  }
}

.glow-border {
  position: relative;
  border-radius: 20px;
  overflow: visible;
}

.glow-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(from var(--angle), var(--gold), var(--rose), var(--gold-light), var(--gold));
  animation: rotateBorder 4s linear infinite;
  z-index: -1;
  opacity: .6;
}

.glow-border::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(from var(--angle), var(--gold), var(--rose), var(--gold-light), var(--gold));
  animation: rotateBorder 4s linear infinite;
  z-index: -1;
  filter: blur(12px);
  opacity: .25;
}

/* ── Gold Shimmer Text ────────────────────────────────────── */
.shimmer-text {
  color: var(--gold);
}

/* ────────────────────────────────────────────────────────────
   PANTALLA SOBRE (Envelope)
   ──────────────────────────────────────────────────────────── */
#env-screen {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 80% 70% at 50% 40%, #091428 0%, #070c18 70%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  cursor: pointer;
  transition: opacity .9s ease;
  overflow: hidden;
}

#env-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Spotlight animado */
#env-screen::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, .08) 0%, transparent 70%);
  animation: spotlightDrift 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes spotlightDrift {

  0%,
  100% {
    transform: translate(-30%, -20%);
  }

  33% {
    transform: translate(30%, -10%);
  }

  66% {
    transform: translate(0%, 25%);
  }
}

/* Partículas de fondo */
.env-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.env-p {
  position: absolute;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0;
  animation: floatP linear infinite;
}

@keyframes floatP {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }

  10% {
    opacity: .6;
  }

  90% {
    opacity: .3;
  }

  100% {
    transform: translateY(-100vh) scale(.3);
    opacity: 0;
  }
}

/* Contenedor del sobre */
.env-wrap {
  position: relative;
  width: 340px;
  filter: drop-shadow(0 0 40px rgba(212, 175, 55, .25)) drop-shadow(0 20px 60px rgba(0, 0, 0, .6));
  transition: filter .3s, transform .4s ease;
  transform-style: preserve-3d;
}

.env-wrap:hover {
  filter: drop-shadow(0 0 60px rgba(212, 175, 55, .45)) drop-shadow(0 20px 60px rgba(0, 0, 0, .6));
}

/* Cuerpo del sobre */
.env-body {
  width: 340px;
  height: 226px;
  background: linear-gradient(150deg, #0d1a30 0%, #08111e 100%);
  border-radius: 3px 3px 10px 10px;
  border: 1.5px solid rgba(212, 175, 55, .45);
  position: relative;
  overflow: hidden;
  perspective: 800px;
}

.env-fold-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0;
  border-left: 170px solid rgba(212, 175, 55, .07);
  border-right: 170px solid rgba(212, 175, 55, .07);
  border-bottom: 113px solid rgba(212, 175, 55, .12);
}

.env-fold-left {
  position: absolute;
  top: 0;
  left: 0;
  border-top: 113px solid rgba(255, 255, 255, .025);
  border-right: 170px solid transparent;
  border-bottom: 113px solid rgba(255, 255, 255, .025);
}

.env-fold-right {
  position: absolute;
  top: 0;
  right: 0;
  border-top: 113px solid rgba(255, 255, 255, .02);
  border-left: 170px solid transparent;
  border-bottom: 113px solid rgba(255, 255, 255, .02);
}

/* Tarjeta interior */
.env-card {
  position: absolute;
  bottom: 6px;
  left: 10px;
  right: 10px;
  height: 192px;
  background: linear-gradient(135deg, var(--cream-rose) 0%, var(--cream) 100%);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 5rem;
  gap: .5rem;
  z-index: 2;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, .35);
  transition: transform .85s cubic-bezier(.34, 1.4, .64, 1) .25s;
  overflow: hidden;
}

.env-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4af37' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.env-card-name {
  font-family: 'Great Vibes', cursive;
  font-size: 2.1rem;
  color: var(--wine);
  line-height: 1;
}

.env-card-line {
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.env-card-date {
  font-family: 'Cormorant Garamond', serif;
  font-size: .85rem;
  letter-spacing: .25em;
  color: var(--gold-dark);
  text-transform: uppercase;
}

.env-card-xv {
  font-family: 'Great Vibes', cursive;
  font-size: 1.2rem;
  color: var(--rose);
  opacity: .7;
}

/* Solapa del sobre */
.env-flap {
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  z-index: 10;
  transform-origin: 50% 0%;
  transition: transform .85s cubic-bezier(.4, 0, .2, 1);
}

.env-flap-tri {
  width: 342px;
  height: 0;
  border-left: 171px solid transparent;
  border-right: 171px solid transparent;
  border-top: 134px solid #0b1628;
  position: relative;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .4));
}

.env-flap-tri::before {
  content: '';
  position: absolute;
  top: -135px;
  left: -172px;
  width: 0;
  height: 0;
  border-left: 172px solid transparent;
  border-right: 172px solid transparent;
  border-top: 135px solid rgba(212, 175, 55, .4);
  pointer-events: none;
}

/* Sello de lacre */
.env-seal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  background: radial-gradient(circle at 38% 32%, #1a4db7, #0d2a6e);
  border-radius: 50%;
  border: 2px solid rgba(212, 175, 55, .8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Great Vibes', cursive;
  font-size: 1.6rem;
  color: var(--gold);
  z-index: 15;
  box-shadow:
    0 0 0 4px rgba(212, 175, 55, .15),
    0 0 25px rgba(41, 82, 200, .45),
    0 4px 16px rgba(0, 0, 0, .5);
  transition: transform .35s cubic-bezier(.4, 0, .2, 1), opacity .35s;
  animation: sealPulse 2.5s ease-in-out infinite;
}

@keyframes sealPulse {

  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(212, 175, 55, .15), 0 0 25px rgba(41, 82, 200, .45), 0 4px 16px rgba(0, 0, 0, .5);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(212, 175, 55, .25), 0 0 40px rgba(41, 82, 200, .6), 0 4px 16px rgba(0, 0, 0, .5), 0 0 0 16px rgba(212, 175, 55, .08);
  }
}

/* Estado abierto */
.env-wrap.open .env-flap {
  transform: rotateX(-185deg);
}

.env-wrap.open .env-card {
  transform: translateY(-195px);
}

.env-wrap.open .env-seal {
  transform: translate(-50%, -50%) scale(0) rotate(45deg);
  opacity: 0;
}

/* Shimmer en sobre */
.env-body::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(212, 175, 55, .08) 50%, transparent 65%);
  background-size: 200% 100%;
  animation: shimmer 3s ease infinite;
}

@keyframes shimmer {
  0% {
    background-position: -100% 0;
  }

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

/* Para (nombre del invitado) */
.env-para {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(1.5rem, 5vw, 2rem);
  color: #fff;
  letter-spacing: .04em;
  margin-bottom: .3rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .4);
}

/* Hint text */
.env-hint {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1rem;
  color: rgba(212, 175, 55, .6);
  letter-spacing: .1em;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: .6
  }

  50% {
    opacity: 1
  }
}

/* ────────────────────────────────────────────────────────────
   CONTENIDO PRINCIPAL
   ──────────────────────────────────────────────────────────── */
#main-content {
  display: none;
}

#main-content.visible {
  display: block;
}

/* ────────────────────────────────────────────────────────────
   PÉTALOS FLOTANTES
   ──────────────────────────────────────────────────────────── */
#petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -30px;
  pointer-events: none;
  animation: fallPetal linear infinite;
  user-select: none;
}

/* Pétalos CSS (no emoji) */
.petal-shape {
  position: absolute;
  top: -30px;
  pointer-events: none;
  width: 12px;
  height: 16px;
  background: radial-gradient(ellipse at 30% 20%, var(--rose-light), rgba(41, 82, 200, .5));
  border-radius: 80% 0 55% 50% / 55% 0 80% 50%;
  box-shadow: inset 0 -2px 4px rgba(26, 58, 110, .3);
  opacity: 0;
  animation: fallPetal3D linear infinite;
  filter: blur(.3px);
}

@keyframes fallPetal {
  0% {
    transform: translateY(-20px) rotate(0deg) translateX(0);
    opacity: .7;
  }

  50% {
    transform: translateY(50vh) rotate(180deg) translateX(30px);
    opacity: .5;
  }

  100% {
    transform: translateY(110vh) rotate(360deg) translateX(-20px);
    opacity: 0;
  }
}

@keyframes fallPetal3D {
  0% {
    transform: translateY(-20px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) translateX(0);
    opacity: .55;
  }

  25% {
    transform: translateY(25vh) rotateX(90deg) rotateY(45deg) rotateZ(90deg) translateX(25px);
    opacity: .5;
  }

  50% {
    transform: translateY(50vh) rotateX(180deg) rotateY(90deg) rotateZ(180deg) translateX(-15px);
    opacity: .4;
  }

  75% {
    transform: translateY(80vh) rotateX(270deg) rotateY(135deg) rotateZ(270deg) translateX(20px);
    opacity: .25;
  }

  100% {
    transform: translateY(110vh) rotateX(360deg) rotateY(180deg) rotateZ(360deg) translateX(-10px);
    opacity: 0;
  }
}

/* ────────────────────────────────────────────────────────────
   HERO
   ──────────────────────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.2rem;
  background: linear-gradient(160deg, #070c18 0%, #0d1728 40%, #111e38 100%);
  overflow: hidden;
}

/* Foto de fondo */
#hero-photo-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

#hero-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  animation: heroZoom 25s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.08);
  }
}

#hero-photo-overlay {
  position: absolute;
  inset: 0;
}

#hero-photo-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      transparent 0%, transparent 40%,
      rgba(7, 12, 24, .6) 75%, rgba(7, 12, 24, .95) 100%);
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 45% at 20% 25%, rgba(41, 82, 200, .18) 0%, transparent 65%),
    radial-gradient(ellipse 45% 40% at 80% 70%, rgba(212, 175, 55, .12) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* Light leak effect */
.hero-light-leak {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  mix-blend-mode: screen;
}

.hero-light-leak::before,
.hero-light-leak::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .12;
}

.hero-light-leak::before {
  background: var(--gold);
  top: -10%;
  right: -5%;
  animation: lightLeak1 12s ease-in-out infinite;
}

.hero-light-leak::after {
  background: var(--rose);
  bottom: 10%;
  left: -5%;
  animation: lightLeak2 15s ease-in-out infinite;
}

@keyframes lightLeak1 {

  0%,
  100% {
    transform: translate(0, 0);
    opacity: .12;
  }

  50% {
    transform: translate(-80px, 60px);
    opacity: .2;
  }
}

@keyframes lightLeak2 {

  0%,
  100% {
    transform: translate(0, 0);
    opacity: .08;
  }

  50% {
    transform: translate(60px, -40px);
    opacity: .15;
  }
}

/* Canvas estrellas */
#hero-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .7;
  z-index: 0 !important;
}

/* Crown SVG */
.hero-crown {
  position: relative;
  z-index: 1;
  width: 60px;
  height: auto;
  margin-bottom: .5rem;
  opacity: .7;
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, .4));
  animation: crownFloat 4s ease-in-out infinite;
}

@keyframes crownFloat {

  0%,
  100% {
    transform: translateY(0);
  }

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

.hero-xv {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(6rem, 22vw, 14rem);
  color: var(--gold);
  line-height: 1;
  text-shadow: 0 0 60px rgba(212, 175, 55, .35), 0 4px 30px rgba(0, 0, 0, .4);
  position: relative;
  z-index: 1;
}

.hero-xv-mis,
.hero-xv-anos {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(.6rem, 2vw, 1rem);
  font-weight: 700;
  letter-spacing: .55em;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 0 12px rgba(0, 0, 0, .9), 0 2px 8px rgba(0, 0, 0, .8), 0 0 30px rgba(0, 0, 0, .6);
}

.hero-xv-mis {
  margin-bottom: .3em;
}

.hero-xv-anos {
  margin-top: -.4em;
}

.hero-nombre {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.8rem, 10vw, 6rem);
  color: #fff;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .4);
  line-height: 1.1;
  position: relative;
  z-index: 1;
}

/* Caracteres animados del nombre */
.hero-nombre .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px) rotateX(-40deg);
  animation: charReveal .6s cubic-bezier(.23, 1, .32, 1) forwards;
}

.hero-apellidos {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1.1rem, 3vw, 1.8rem);
  color: rgba(255, 255, 255, .65);
  letter-spacing: .08em;
  margin-top: -.3rem;
  position: relative;
  z-index: 1;
}

.hero-apellidos .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  animation: charRevealSoft .5s ease forwards;
}

@keyframes charReveal {
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

@keyframes charRevealSoft {
  to {
    opacity: .65;
    transform: translateY(0);
  }
}

.hero-fecha {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(.9rem, 2.2vw, 1.2rem);
  color: var(--rose-light);
  letter-spacing: .08em;
  margin: 1.2rem 0 2rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.hero-fecha::before,
.hero-fecha::after {
  content: '';
  width: 50px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rose-light));
}

.hero-fecha::after {
  transform: scaleX(-1);
}

/* Countdown */
.countdown {
  display: flex;
  gap: clamp(.5rem, 2.5vw, 1.5rem);
  justify-content: center;
  position: relative;
  z-index: 1;
  margin-bottom: 2rem;
}

.cd-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(212, 175, 55, .25);
  border-radius: 14px;
  padding: .8rem 1.2rem;
  min-width: 68px;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition: border-color .3s, box-shadow .3s;
}

/* Borde brillante superior */
.cd-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
  opacity: .6;
}

.cd-box.pulse-flash {
  border-color: var(--gold);
  box-shadow: 0 0 15px rgba(212, 175, 55, .2);
}

.cd-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
  min-width: 2ch;
  text-align: center;
  position: relative;
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), opacity .3s;
}

.cd-num.flip-out {
  transform: translateY(-10px) scale(.8);
  opacity: 0;
}

.cd-num.flip-in {
  transform: translateY(10px) scale(.8);
  opacity: 0;
}

.cd-label {
  font-size: .58rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .45);
  margin-top: .3rem;
}

/* Scroll indicator */
.scroll-arrow {
  position: absolute;
  bottom: 1.8rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  color: rgba(255, 255, 255, .3);
  font-size: .65rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  animation: bounce2 2.2s ease-in-out infinite;
  z-index: 1;
}

@keyframes bounce2 {

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

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

/* ────────────────────────────────────────────────────────────
   SECTION WAVE DIVIDERS
   ──────────────────────────────────────────────────────────── */
.section-divider {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  pointer-events: none;
  z-index: 2;
}

.section-divider svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 40px;
}

.section-divider--top {
  top: -1px;
  bottom: auto;
  transform: rotate(180deg);
}

/* ────────────────────────────────────────────────────────────
   ORNAMENTO SEPARADOR
   ──────────────────────────────────────────────────────────── */
.ornament {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: 1.5rem auto;
  max-width: 280px;
}

.ornament::before,
.ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.ornament::after {
  transform: scaleX(-1);
}

/* ────────────────────────────────────────────────────────────
   SECCIONES — BASE
   ──────────────────────────────────────────────────────────── */
section {
  padding: clamp(3.5rem, 9vw, 7rem) 1.2rem;
  position: relative;
  overflow: hidden;
}

.sec-tag {
  font-size: .68rem;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: .6rem;
}

.sec-title {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.1;
  margin-bottom: .5rem;
}

/* Caracteres animados en títulos de sección */
.sec-title .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(25px);
  transition: opacity .4s ease, transform .4s ease;
}

.sec-title.chars-visible .char {
  opacity: 1;
  transform: translateY(0);
}

.sec-sub {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, .8);
  max-width: 440px;
  margin: 0 auto 2.5rem;
}

/* Animated mesh background for dark sections */
.mesh-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 30%, rgba(41, 82, 200, .1) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 70%, rgba(212, 175, 55, .08) 0%, transparent 60%);
  animation: meshFloat 20s ease-in-out infinite;
  pointer-events: none;
}

@keyframes meshFloat {

  0%,
  100% {
    background-position: 0% 50%, 100% 50%;
    opacity: 1;
  }

  50% {
    background-position: 100% 30%, 0% 80%;
    opacity: .7;
  }
}

/* ────────────────────────────────────────────────────────────
   MENSAJE
   ──────────────────────────────────────────────────────────── */
#mensaje {
  background: linear-gradient(135deg, var(--cream-rose) 0%, var(--cream) 100%);
  text-align: center;
}

#mensaje .sec-title {
  color: var(--wine);
}

#mensaje .sec-tag {
  color: var(--rose);
}

.mensaje-card {
  max-width: 620px;
  margin: 0 auto;
  background: #fff;
  border-radius: 20px;
  padding: 2.8rem 2.2rem;
  box-shadow: 0 12px 50px rgba(26, 58, 110, .12), 0 0 0 1px rgba(212, 175, 55, .1);
  border-top: 3px solid var(--gold);
  position: relative;
  overflow: hidden;
}

/* Corner decorations */
.mensaje-card .corner-decor {
  position: absolute;
  width: 50px;
  height: 50px;
  opacity: .2;
}

.mensaje-card .corner-decor--tl {
  top: 12px;
  left: 12px;
}

.mensaje-card .corner-decor--tr {
  top: 12px;
  right: 12px;
  transform: scaleX(-1);
}

.mensaje-card .corner-decor--bl {
  bottom: 12px;
  left: 12px;
  transform: scaleY(-1);
}

.mensaje-card .corner-decor--br {
  bottom: 12px;
  right: 12px;
  transform: scale(-1);
}

/* SVG flourish animado al entrar */
.mensaje-card .flourish-border {
  position: absolute;
  inset: 8px;
  pointer-events: none;
}

.mensaje-card .flourish-border rect {
  fill: none;
  stroke: var(--gold);
  stroke-width: .5;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  transition: stroke-dashoffset 2.5s ease;
  opacity: .3;
  rx: 12;
}

.mensaje-card.in-view .flourish-border rect {
  stroke-dashoffset: 0;
}

.mensaje-comillas {
  font-family: 'Cormorant Garamond', serif;
  font-size: 6rem;
  line-height: .5;
  color: var(--blush);
  position: absolute;
  top: 1.8rem;
  left: 1.8rem;
}

.mensaje-texto {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  color: var(--dark-rose);
  line-height: 1.9;
  white-space: pre-line;
  position: relative;
}

.mensaje-firma {
  margin-top: 1.6rem;
  font-family: 'Great Vibes', cursive;
  font-size: 2.2rem;
  color: var(--gold-dark);
}

/* ────────────────────────────────────────────────────────────
   ITINERARIO (Cuándo y dónde)
   ──────────────────────────────────────────────────────────── */
#evento {
  background: linear-gradient(160deg, #0d1728 0%, #111e38 100%);
  text-align: center;
}

#evento .sec-title {
  color: #fff;
}

#evento .sec-sub {
  color: rgba(255, 255, 255, .8);
}

/* Timeline vertical */
.timeline {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
  transform: translateX(-50%);
}

/* Línea animada que se dibuja */
.timeline::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: 0%;
  background: var(--gold-light);
  transform: translateX(-50%);
  transition: height 1.5s ease;
  box-shadow: 0 0 8px rgba(212, 175, 55, .4);
}

.timeline.line-animated::after {
  height: 100%;
}

.tl-item {
  display: grid;
  grid-template-columns: 1fr 56px 1fr;
  gap: 0;
  margin-bottom: 1.5rem;
  align-items: start;
}

.tl-card {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(212, 175, 55, .2);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: left;
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), box-shadow .4s, border-color .4s;
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}

/* Shimmer interno */
.tl-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(212, 175, 55, .04) 50%, transparent 60%);
  background-size: 200% 100%;
  animation: shimmer 4s ease infinite;
}

.tl-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(212, 175, 55, .12);
  border-color: rgba(212, 175, 55, .4);
}

.tl-item:nth-child(odd) .tl-card {
  grid-column: 1;
  text-align: right;
}

.tl-item:nth-child(even) .tl-card {
  grid-column: 3;
  text-align: left;
}

.tl-dot {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 1.5rem;
}

.tl-dot-inner {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--wine), var(--rose));
  border-radius: 50%;
  border: 3px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 0 20px rgba(212, 175, 55, .25), 0 0 40px rgba(212, 175, 55, .1);
  position: relative;
  z-index: 1;
  animation: dotGlow 3s ease-in-out infinite;
}

@keyframes dotGlow {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(212, 175, 55, .25);
  }

  50% {
    box-shadow: 0 0 30px rgba(212, 175, 55, .4), 0 0 60px rgba(212, 175, 55, .15);
  }
}

.tl-card .tipo {
  font-size: .65rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .4rem;
}

.tl-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: .3rem;
}

.tl-card .hora {
  font-family: 'Great Vibes', cursive;
  font-size: 1.8rem;
  color: var(--gold);
  margin-bottom: .3rem;
}

.tl-card .dir {
  font-size: .78rem;
  color: rgba(255, 255, 255, .5);
  line-height: 1.4;
  margin-bottom: .8rem;
}

.btn-mapa {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(212, 175, 55, .1);
  border: 1px solid rgba(212, 175, 55, .3);
  color: var(--gold);
  border-radius: 50px;
  padding: .4rem 1rem;
  font-size: .75rem;
  font-weight: 500;
  transition: all .3s;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-mapa:hover {
  background: var(--gold);
  color: var(--dark);
}

/* Ripple effect */
.btn-mapa::after,
.btn-cal::after,
.btn-submit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), rgba(255, 255, 255, .3) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .5s;
}

.btn-mapa:active::after,
.btn-cal:active::after,
.btn-submit:active::after {
  opacity: 1;
  transition: opacity 0s;
}

/* Dress code chip */
.dresscode-wrap {
  margin-top: 2.5rem;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(212, 175, 55, .2);
  border-radius: 50px;
  padding: .75rem 1.8rem;
  font-size: .82rem;
  color: rgba(255, 255, 255, .65);
  backdrop-filter: blur(8px);
}

.dresscode-wrap strong {
  color: var(--gold);
}

/* Botones calendario */
.cal-btns {
  display: flex;
  gap: .8rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.btn-cal {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border: 1px solid rgba(212, 175, 55, .35);
  background: transparent;
  color: rgba(212, 175, 55, .8);
  border-radius: 50px;
  padding: .5rem 1.2rem;
  font-size: .78rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all .3s;
  position: relative;
  overflow: hidden;
}

.btn-cal:hover {
  background: var(--gold);
  color: var(--dark);
  border-color: var(--gold);
}

/* ────────────────────────────────────────────────────────────
   GALERÍA
   ──────────────────────────────────────────────────────────── */
#galeria {
  background: linear-gradient(180deg, var(--dark) 0%, #070d1a 65%, var(--dark) 100%);
  text-align: center;
  position: relative;
}

#galeria::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 12% 25%, rgba(212, 175, 55, .06) 0%, transparent 52%),
    radial-gradient(ellipse at 88% 68%, rgba(26, 58, 110, .07) 0%, transparent 52%);
}

#galeria .sec-title {
  color: #fff;
}

#galeria .sec-sub {
  color: rgba(255, 255, 255, .8);
}

/* ─ Badge contador ─ */
.gallery-counter {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(212, 175, 55, .1);
  border: 1px solid rgba(212, 175, 55, .25);
  color: var(--gold);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .3rem .9rem;
  border-radius: 20px;
  margin: .6rem auto 0;
}

/* ─ Filter tabs ─ */
.gallery-tabs {
  display: flex;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin: 1.4rem auto .5rem;
}

.gallery-tab {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(212, 175, 55, .2);
  color: rgba(255, 255, 255, .5);
  font-size: .73rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .4rem 1.2rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all .3s;
  font-family: 'Montserrat', sans-serif;
}

.gallery-tab:hover {
  background: rgba(212, 175, 55, .1);
  color: var(--gold);
  border-color: rgba(212, 175, 55, .4);
}

.gallery-tab.active {
  background: linear-gradient(135deg, var(--wine), var(--rose));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(41, 82, 200, .3);
}

/* ─ Foto principal ─ */
.gallery-principal {
  max-width: 360px;
  margin: 1.6rem auto;
}

.gallery-principal-frame {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  cursor: zoom-in;
  border: 2px solid rgba(212, 175, 55, .5);
  box-shadow:
    0 0 0 1px rgba(212, 175, 55, .1),
    0 20px 50px rgba(0, 0, 0, .55),
    0 0 40px rgba(212, 175, 55, .13);
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), box-shadow .4s;
}

.gallery-principal-frame:hover {
  transform: scale(1.025);
  box-shadow:
    0 0 0 2px rgba(212, 175, 55, .55),
    0 28px 65px rgba(0, 0, 0, .6),
    0 0 60px rgba(212, 175, 55, .22);
}

.gallery-principal-frame img {
  width: 100%;
  display: block;
  transition: transform .6s cubic-bezier(.25, .46, .45, .94);
}

.gallery-principal-frame:hover img {
  transform: scale(1.05);
}

.gallery-principal-badge {
  position: absolute;
  top: .75rem;
  left: .75rem;
  background: linear-gradient(135deg, rgba(168, 137, 42, .92), rgba(212, 175, 55, .92));
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .28rem .75rem;
  border-radius: 20px;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}

/* ─ Timeline label ─ */
.gallery-timeline-label {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1rem;
  color: rgba(212, 175, 55, .5);
  letter-spacing: .06em;
  margin: .4rem auto 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
}

.gallery-timeline-label::before,
.gallery-timeline-label::after {
  content: '';
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, .35));
}

.gallery-timeline-label::after {
  background: linear-gradient(90deg, rgba(212, 175, 55, .35), transparent);
}

/* ─ Masonry layout ─ */
.gallery-masonry {
  columns: 4 160px;
  column-gap: .65rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 .5rem;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: .65rem;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: zoom-in;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(212, 175, 55, .1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1),
    box-shadow .4s, border-color .3s;
  will-change: transform;
}

/* Polaroid tilt sutil */
.gallery-item:nth-child(5n+1) {
  transform: rotate(-.55deg);
}

.gallery-item:nth-child(5n+2) {
  transform: rotate(.45deg);
}

.gallery-item:nth-child(5n+3) {
  transform: rotate(-.4deg);
}

.gallery-item:nth-child(5n+4) {
  transform: rotate(.6deg);
}

.gallery-item:nth-child(5n) {
  transform: rotate(-.35deg);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .6s cubic-bezier(.25, .46, .45, .94);
}

.gallery-item:hover {
  transform: scale(1.04) rotate(0deg) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5), 0 0 28px rgba(212, 175, 55, .18);
  z-index: 10;
  border-color: rgba(212, 175, 55, .4);
}

.gallery-item:hover img {
  transform: scale(1.07);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 58, 110, .5), rgba(212, 175, 55, .3));
  opacity: 0;
  transition: opacity .4s;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}

.gallery-overlay i {
  font-size: 2rem;
  color: #f0d070;
  text-shadow: 0 0 20px rgba(212, 175, 55, .9);
}

.gallery-principal-frame .gallery-overlay i {
  font-size: 2.4rem;
}

.gallery-item:hover .gallery-overlay,
.gallery-principal-frame:hover .gallery-overlay {
  opacity: 1;
}

/* Items ocultos al filtrar */
.gallery-item.gal-hidden {
  display: none;
}

/* Skeleton shimmer */
.gallery-item.loading {
  background: linear-gradient(110deg,
      rgba(255, 255, 255, .04) 25%,
      rgba(255, 255, 255, .08) 37%,
      rgba(255, 255, 255, .04) 63%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s linear infinite;
}

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

/* ────────────────────────────────────────────────────────────
   FAMILIA
   ──────────────────────────────────────────────────────────── */
#familia {
  background: linear-gradient(135deg, var(--cream) 0%, var(--cream-rose) 100%);
  text-align: center;
}

#familia .sec-title {
  color: var(--wine);
}

#familia .sec-tag {
  color: var(--rose);
}

#familia .sec-sub {
  color: var(--wine);
  opacity: .75;
}

.familia-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  max-width: 860px;
  margin: 0 auto;
}

.familia-card {
  background: #fff;
  border-radius: 14px;
  padding: 1.5rem 1.2rem;
  box-shadow: 0 4px 20px rgba(26, 58, 110, .08);
  border-left: 3px solid var(--rose-light);
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), box-shadow .4s;
  position: relative;
  overflow: hidden;
}

.familia-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle at top right, rgba(212, 175, 55, .08), transparent 70%);
}

.familia-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(26, 58, 110, .15);
}

.familia-card .rol {
  font-size: .62rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: .5rem;
}

.familia-card .nombres {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: var(--dark-rose);
  line-height: 1.6;
  white-space: pre-line;
}

/* ────────────────────────────────────────────────────────────
   REGALO
   ──────────────────────────────────────────────────────────── */
#regalo {
  background: linear-gradient(135deg, #0d1728 0%, #111e38 100%);
  text-align: center;
}

#regalo .sec-title {
  color: #fff;
}

#regalo .sec-sub {
  color: rgba(255, 255, 255, .8);
}

.regalo-card {
  max-width: 500px;
  margin: 0 auto;
  background: rgba(7, 12, 24, .82);
  border: 2px dashed rgba(212, 175, 55, .3);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
  transition: border-color .4s, box-shadow .4s;
}

.regalo-card:hover {
  border-color: rgba(212, 175, 55, .5);
  box-shadow: 0 0 30px rgba(212, 175, 55, .1);
}

.regalo-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  animation: giftBounce 3s ease-in-out infinite;
}

@keyframes giftBounce {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08) rotate(-3deg);
  }
}

.regalo-texto {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, .9);
  line-height: 1.8;
}

.regalo-opciones {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.2rem;
}

.regalo-opcion {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  background: rgba(212, 175, 55, .1);
  border: 1px solid rgba(212, 175, 55, .3);
  border-radius: 12px;
  padding: .9rem 1.2rem;
  font-family: 'Montserrat', sans-serif;
  font-size: .9rem;
  color: rgba(255, 255, 255, .9);
}

.regalo-opcion-icon {
  font-size: 1.5rem;
}

.liverpool-num {
  display: inline-block;
  background: rgba(212, 175, 55, .18);
  color: #f0d070;
  padding: .15em .55em;
  border-radius: 6px;
  border: 1px solid rgba(212, 175, 55, .35);
  letter-spacing: .12em;
  font-size: 1.1em;
  text-shadow: 0 0 8px rgba(240, 208, 112, .5);
}

/* ────────────────────────────────────────────────────────────
   RSVP
   ──────────────────────────────────────────────────────────── */
#rsvp {
  background: linear-gradient(160deg, #111e38 0%, #070c18 100%);
  text-align: center;
}

#rsvp .sec-title {
  color: #fff;
}

#rsvp .sec-sub {
  color: rgba(255, 255, 255, .8);
}

.rsvp-card {
  max-width: 500px;
  margin: 0 auto;
  background: rgba(255, 255, 255, .05);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(212, 175, 55, .2);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
}

/* Borde brillante superior */
.rsvp-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .5;
}

.form-group {
  text-align: left;
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: .7rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
  margin-bottom: .45rem;
}

.form-ctrl {
  width: 100%;
  background: rgba(255, 255, 255, .06);
  border: 1.5px solid rgba(212, 175, 55, .2);
  border-radius: 10px;
  padding: .75rem 1rem;
  color: #e0c8f0;
  -webkit-text-fill-color: #e0c8f0;
  font-size: .92rem;
  font-family: 'Montserrat', sans-serif;
  outline: none;
  transition: border-color .3s, box-shadow .3s;
}

.form-ctrl::placeholder {
  color: rgba(255, 255, 255, .2);
}

.form-ctrl:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, .1);
}

.form-ctrl option {
  background: #200a18;
}

.form-ctrl:-webkit-autofill,
.form-ctrl:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #200a18 inset;
  -webkit-text-fill-color: #e0c8f0;
}

.radio-group {
  display: flex;
  gap: .8rem;
}

.radio-lbl {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  background: rgba(255, 255, 255, .05);
  border: 1.5px solid rgba(212, 175, 55, .15);
  border-radius: 10px;
  padding: .65rem;
  cursor: pointer;
  font-size: .88rem;
  transition: all .3s;
}

.radio-lbl input {
  display: none;
}

.radio-lbl.sel-si {
  background: rgba(212, 175, 55, .15);
  border-color: var(--gold);
  color: var(--gold-light);
}

.radio-lbl.sel-no {
  background: rgba(41, 82, 200, .12);
  border-color: var(--rose);
  color: var(--rose-light);
}

.btn-submit {
  width: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light), var(--gold));
  background-size: 200% 100%;
  color: #081428;
  border: none;
  border-radius: 50px;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .04em;
  transition: opacity .3s, transform .2s, box-shadow .3s;
  margin-top: .5rem;
  position: relative;
  overflow: hidden;
  animation: btnShimmer 3s ease infinite;
}

@keyframes btnShimmer {
  0% {
    background-position: 0% 50%;
  }

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

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

.btn-submit:hover {
  opacity: .95;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, .3);
}

.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-top: 1.5rem;
  background: #25D366;
  color: #fff;
  border-radius: 50px;
  padding: .85rem 2rem;
  font-weight: 600;
  font-size: .95rem;
  transition: all .3s;
  box-shadow: 0 4px 15px rgba(37, 211, 102, .25);
}

.btn-wa:hover {
  opacity: .9;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, .35);
}

/* ────────────────────────────────────────────────────────────
   CONFETTI CANVAS
   ──────────────────────────────────────────────────────────── */
#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9500;
}

/* ────────────────────────────────────────────────────────────
   FOOTER
   ──────────────────────────────────────────────────────────── */
footer {
  background: #08010f;
  text-align: center;
  padding: 3rem 1rem 2rem;
  color: rgba(255, 255, 255, .3);
  font-size: .8rem;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dark), transparent);
  opacity: .3;
}

footer .footer-name {
  font-family: 'Great Vibes', cursive;
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: .5rem;
  text-shadow: 0 0 20px rgba(212, 175, 55, .2);
}

.footer-heart {
  display: inline-block;
  animation: heartbeat 1.5s ease-in-out infinite;
  color: var(--rose);
}

@keyframes heartbeat {

  0%,
  100% {
    transform: scale(1);
  }

  14% {
    transform: scale(1.15);
  }

  28% {
    transform: scale(1);
  }

  42% {
    transform: scale(1.1);
  }

  56% {
    transform: scale(1);
  }
}

/* ────────────────────────────────────────────────────────────
   PLAYER DE MÚSICA (fijo)
   ──────────────────────────────────────────────────────────── */
.music-bar {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: .6rem;
  background: rgba(12, 2, 16, .85);
  border: 1px solid rgba(212, 175, 55, .3);
  border-radius: 50px;
  padding: .45rem .9rem .45rem .5rem;
  backdrop-filter: blur(14px);
  transform: translateY(80px);
  transition: transform .5s cubic-bezier(.34, 1.4, .64, 1);
}

.music-bar.show {
  transform: translateY(0);
}

.music-btn {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border: none;
  border-radius: 50%;
  color: var(--dark);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s, box-shadow .2s;
}

.music-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(212, 175, 55, .3);
}

.music-info {
  display: flex;
  flex-direction: column;
}

.music-name {
  font-size: .7rem;
  color: rgba(255, 255, 255, .6);
}

.music-bars {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 18px;
}

.music-bars span {
  width: 3px;
  border-radius: 2px;
  background: var(--gold);
  animation: mbar .9s ease-in-out infinite;
  transform-origin: bottom;
}

.music-bars span:nth-child(2) {
  animation-delay: .15s;
}

.music-bars span:nth-child(3) {
  animation-delay: .3s;
}

.music-bars span:nth-child(4) {
  animation-delay: .45s;
}

.music-bars.paused span {
  animation-play-state: paused;
}

@keyframes mbar {

  0%,
  100% {
    height: 3px;
  }

  50% {
    height: 16px;
  }
}

/* ────────────────────────────────────────────────────────────
   LIGHTBOX
   ──────────────────────────────────────────────────────────── */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8, 1, 15, .96);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

#lightbox.on {
  display: flex;
}

#lb-img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 8px;
  box-shadow: 0 0 60px rgba(212, 175, 55, .15), 0 20px 60px rgba(0, 0, 0, .5);
  transition: transform .3s;
}

.lb-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, .6);
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
  transition: color .2s, transform .2s;
}

.lb-close:hover {
  color: #fff;
  transform: rotate(90deg);
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .1);
  color: #fff;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all .3s;
  backdrop-filter: blur(8px);
}

.lb-nav:hover {
  background: rgba(255, 255, 255, .2);
  border-color: var(--gold);
}

.lb-prev {
  left: 1rem;
}

.lb-next {
  right: 1rem;
}

.lb-counter {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, .55);
  color: rgba(255, 255, 255, .75);
  font-family: 'Montserrat', sans-serif;
  font-size: .73rem;
  letter-spacing: .06em;
  padding: .3rem .85rem;
  border-radius: 20px;
  pointer-events: none;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .1);
  min-width: 70px;
  text-align: center;
}

/* ────────────────────────────────────────────────────────────
   TOAST
   ──────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(12, 2, 16, .9);
  color: #fff;
  padding: .9rem 2rem;
  border-radius: 50px;
  font-size: .88rem;
  z-index: 9000;
  transition: transform .45s cubic-bezier(.34, 1.4, .64, 1);
  border: 1px solid rgba(212, 175, 55, .3);
  max-width: 90vw;
  text-align: center;
  backdrop-filter: blur(12px);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  border-color: var(--gold);
}

.toast.error {
  border-color: var(--rose);
}

/* ────────────────────────────────────────────────────────────
   FADE-IN (scroll reveal)
   ──────────────────────────────────────────────────────────── */
.reveal,
.reveal-left,
.reveal-right,
.reveal-pop {
  opacity: 1;
  transform: none;
}

/* ────────────────────────────────────────────────────────────
   REDUCED MOTION
   ──────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .petal,
  .petal-shape,
  .env-p {
    display: none;
  }

  #hero-canvas {
    display: none;
  }

  .scroll-progress {
    display: none;
  }
}

/* ────────────────────────────────────────────────────────────
   HERO — DESKTOP (foto retrato → centrar cara)
   ──────────────────────────────────────────────────────────── */
@media (min-width: 900px) {
  #hero-photo-wrap img {
    object-fit: contain;
    object-position: center 10%;
  }
}

/* ────────────────────────────────────────────────────────────
   RESPONSIVE
   ──────────────────────────────────────────────────────────── */
@media (max-width: 700px) {

  /* Hero mobile */
  #hero {
    padding: 2rem 1.2rem;
    justify-content: center;
  }

  .hero-crown {
    width: 54px;
    margin-bottom: .5rem;
  }

  .hero-xv {
    font-size: 32vw;
    line-height: .9;
  }

  .hero-xv-mis,
  .hero-xv-anos {
    font-size: .8rem;
    letter-spacing: .5em;
  }

  .hero-xv-mis {
    margin-bottom: 1.8em;
  }

  .hero-xv-anos {
    margin-top: 1.4em;
  }

  .hero-nombre {
    font-size: 13vw;
    line-height: 1.05;
    margin-top: 1.2rem;
  }

  .hero-apellidos {
    font-size: 5vw;
    margin-top: .8rem;
  }

  .hero-fecha {
    font-size: 4.2vw;
    margin: 1.2rem 0 1.8rem;
  }

  .hero-fecha::before,
  .hero-fecha::after {
    width: 30px;
  }

  .countdown {
    gap: .5rem;
    margin-bottom: 1.5rem;
  }

  .cd-box {
    padding: .65rem .7rem;
    min-width: 66px;
  }

  .cd-num {
    font-size: 1.9rem;
  }

  .cd-label {
    font-size: .6rem;
  }

  /* Timeline: lineal */
  .timeline::before,
  .timeline::after {
    left: 20px;
  }

  .tl-item {
    grid-template-columns: 40px 1fr;
  }

  .tl-item:nth-child(odd) .tl-card {
    grid-column: 2;
    text-align: left;
  }

  .tl-item:nth-child(even) .tl-card {
    grid-column: 2;
  }

  .tl-dot {
    grid-column: 1;
    padding-top: 1.5rem;
  }

  .tl-dot-inner {
    width: 34px;
    height: 34px;
    font-size: .9rem;
  }

  /* Gallery */
  .gallery-masonry {
    columns: 2 120px;
  }

  .gallery-principal {
    max-width: 280px;
  }

  /* Familia */
  .familia-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Envelope */
  .env-wrap {
    width: 280px;
  }

  .env-body {
    width: 280px;
    height: 186px;
  }

  .env-fold-bottom {
    border-left-width: 140px;
    border-right-width: 140px;
    border-bottom-width: 93px;
  }

  .env-fold-left {
    border-top-width: 93px;
    border-right-width: 140px;
    border-bottom-width: 93px;
  }

  .env-fold-right {
    border-top-width: 93px;
    border-left-width: 140px;
    border-bottom-width: 93px;
  }

  .env-card {
    height: 158px;
  }

  .env-card-name {
    font-size: 1.7rem;
  }

  .env-flap-tri {
    width: 282px;
    border-left-width: 141px;
    border-right-width: 141px;
    border-top-width: 110px;
  }

  .env-flap-tri::before {
    top: -111px;
    left: -142px;
    border-left-width: 142px;
    border-right-width: 142px;
    border-top-width: 112px;
  }

  .env-seal {
    width: 55px;
    height: 55px;
    font-size: 1.3rem;
  }

  .env-wrap.open .env-card {
    transform: translateY(-162px);
  }

  /* Music bar */
  .music-name {
    display: none;
  }

  .rsvp-card {
    padding: 1.5rem 1rem;
  }

  .mensaje-card {
    padding: 2rem 1.2rem;
  }

  /* Reveal left/right fallback to simple reveal on mobile */
  .reveal-left,
  .reveal-right {
    transform: translateY(28px);
  }

  .reveal-left.in,
  .reveal-right.in {
    transform: translateY(0);
  }
}

@media (max-width: 400px) {
  .familia-grid {
    grid-template-columns: 1fr;
  }

  .gallery-masonry {
    column-gap: .4rem;
  }

  .gallery-item {
    margin-bottom: .4rem;
  }

  .cd-box {
    min-width: 58px;
    padding: .6rem .8rem;
  }
}

/* ────────────────────────────────────────────────────────────
   BANNER DE PASE PERSONAL
   ──────────────────────────────────────────────────────────── */
.pase-banner {
  background: linear-gradient(135deg, #0d1728 0%, #111e38 100%);
  border-top: 2px solid rgba(212, 175, 55, .35);
  border-bottom: 2px solid rgba(212, 175, 55, .35);
  padding: 2rem 1.2rem;
  text-align: center;
}

.pase-banner-inner {
  max-width: 480px;
  margin: 0 auto;
}

.pase-banner-tag {
  font-size: .65rem;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: .8rem;
}

.pase-banner-nombre {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  color: #fff;
  line-height: 1.3;
  margin-bottom: .8rem;
}

.pase-banner-nombre strong {
  color: var(--gold);
  font-style: normal;
}

.pase-banner-pases {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(212, 175, 55, .1);
  border: 1px solid rgba(212, 175, 55, .3);
  border-radius: 50px;
  padding: .45rem 1.2rem;
  font-size: .82rem;
  color: var(--gold);
  letter-spacing: .05em;
}

.pase-confirmado {
  margin-top: .8rem;
  font-size: .82rem;
  color: #81c784;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}

.pase-rechazado {
  margin-top: .8rem;
  font-size: .82rem;
  color: #ef9a9a;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}