/* ===== Estilos personalizados para la boda de Isai & Luz ===== */
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { overflow-x: hidden; }
::selection { background: rgba(181, 106, 74, 0.28); }
.scroll-progress {
  position: fixed; inset: 0 auto auto 0; z-index: 70;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, #b56a4a, #e8b8a0, #8a9a7b);
  transform: scaleX(0); transform-origin: left; will-change: transform;
}

/* Barra de navegación cuando se hace scroll */
#nav.is-scrolled {
  background-color: rgba(247, 241, 230, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 24px rgba(74, 64, 56, 0.08);
}
#nav { will-change: transform, background-color; }
.mobile-menu {
  display: grid; grid-template-rows: 0fr; opacity: 0; visibility: hidden;
  transition: grid-template-rows .5s cubic-bezier(.16,1,.3,1), opacity .35s ease, visibility .5s;
}
.mobile-menu > ul { min-height: 0; overflow: hidden; }
.mobile-menu.is-open { grid-template-rows: 1fr; opacity: 1; visibility: visible; }
.menu-icon { display: grid; gap: 4px; width: 20px; }
.menu-icon i { display: block; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform .35s ease, opacity .25s ease; }
[aria-expanded="true"] .menu-icon i:first-child { transform: translateY(5.5px) rotate(45deg); }
[aria-expanded="true"] .menu-icon i:nth-child(2) { opacity: 0; }
[aria-expanded="true"] .menu-icon i:last-child { transform: translateY(-5.5px) rotate(-45deg); }
#nav.is-scrolled .font-script {
  color: #9c5638;
}

.nav-link {
  position: relative;
  color: #4a4038;
  transition: color 0.3s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 1px;
  width: 100%;
  background-color: #b56a4a;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.nav-link:hover {
  color: #9c5638;
}
.nav-link:hover::after {
  transform: scaleX(1);
}

/* Sombra de texto para el hero */
.text-shadow-soft {
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
}

.hero-image {
  transform: scale(1.08);
  animation: hero-settle 2.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform;
}
.hero-overlay { animation: overlay-in 1.4s ease both; }
.hero-content { animation: hero-copy-in 1.1s .2s cubic-bezier(0.16, 1, 0.3, 1) both; will-change: transform, opacity; }
@keyframes hero-settle { to { transform: scale(1); } }
@keyframes overlay-in { from { opacity: 0; } }
@keyframes hero-copy-in { from { opacity: 0; transform: translateY(26px); } }

/* ===== Animación de aparición al hacer scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Bounce suave de la flecha del hero ===== */
@keyframes bounce-soft {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
}
.animate-bounce-soft {
  animation: bounce-soft 1.8s ease-in-out infinite;
}

/* ===== Cuenta regresiva ===== */
.count-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  border-radius: 1.25rem;
  background-color: #f7f1e6;
  padding: 1.5rem 1rem;
  box-shadow: 0 10px 30px rgba(74, 64, 56, 0.08);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s ease;
}
.count-box:hover { transform: translateY(-6px); box-shadow: 0 18px 45px rgba(74, 64, 56, 0.14); }
.count-num {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 3rem;
  line-height: 1;
  color: #9c5638;
  font-variant-numeric: tabular-nums;
}
.count-label {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #6f6458;
}

/* ===== Línea de tiempo de la historia ===== */
.timeline-item {
  position: relative;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.6rem;
  top: 0.35rem;
  height: 0.8rem;
  width: 0.8rem;
  border-radius: 9999px;
  background-color: #b56a4a;
  box-shadow: 0 0 0 4px rgba(181, 106, 74, 0.18);
}
.timeline-year {
  font-family: "Dancing Script", cursive;
  font-size: 1.5rem;
  color: #b56a4a;
}
.timeline-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.5rem;
  color: #4a4038;
  margin-top: 0.15rem;
}
.timeline-text {
  margin-top: 0.35rem;
  color: #6f6458;
  line-height: 1.6;
}

/* ===== Tarjetas de detalles ===== */
.detail-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.75rem;
  border: 1px solid rgba(247, 241, 230, 0.25);
  background-color: rgba(247, 241, 230, 0.08);
  padding: 2.5rem 2rem;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s ease, box-shadow 0.4s ease;
}
.detail-card:hover {
  transform: translateY(-8px);
  background-color: rgba(247, 241, 230, 0.16);
  box-shadow: 0 25px 60px rgba(30, 40, 25, .2);
}
.event-icon {
  display: inline-grid; place-items: center; width: 3.25rem; height: 3.25rem;
  border: 1px solid rgba(247,241,230,.3); border-radius: 999px;
  background: rgba(247,241,230,.1);
}
.event-icon svg {
  width: 1.6rem; fill: none; stroke: currentColor; stroke-width: 1.35;
  stroke-linecap: round; stroke-linejoin: round;
}
.event-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.5rem; }
.event-action {
  display: inline-flex; align-items: center; gap: .6rem; padding: .8rem 1.1rem;
  border: 1px solid rgba(247,241,230,.3); border-radius: 999px; background: rgba(247,241,230,.08);
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  transition: transform .3s cubic-bezier(.16,1,.3,1), background-color .3s ease;
}
.event-action:hover { transform: translateY(-3px); background: rgba(247,241,230,.16); }
.event-action svg { width: 1rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.share-status { min-height: 1.4rem; margin-top: .7rem; color: rgba(247,241,230,.75); font-size: .8rem; }

/* ===== Galería ===== */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  box-shadow: 0 10px 30px rgba(74, 64, 56, 0.12);
  isolation: isolate;
}
.gallery-item::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(45, 35, 28, .28), transparent 55%);
  opacity: 0; transition: opacity .5s ease;
}
.gallery-item img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.gallery-item:hover img {
  transform: scale(1.08);
}
.gallery-item:hover::after { opacity: 1; }

/* ===== Formulario RSVP ===== */
.form-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6f6458;
  margin-bottom: 0.4rem;
}
.form-input {
  width: 100%;
  border-radius: 0.9rem;
  border: 1px solid rgba(74, 64, 56, 0.18);
  background-color: #f7f1e6;
  padding: 0.75rem 1rem;
  color: #4a4038;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-input:focus {
  border-color: #b56a4a;
  box-shadow: 0 0 0 3px rgba(181, 106, 74, 0.15);
}
.form-input:hover { border-color: rgba(181, 106, 74, .55); }

.radio-card {
  cursor: pointer;
}
.radio-face {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.9rem;
  border: 1px solid rgba(74, 64, 56, 0.18);
  background-color: #f7f1e6;
  padding: 0.75rem 1rem;
  text-align: center;
  color: #6f6458;
  transition: all 0.3s ease;
}
.radio-card .peer:checked + .radio-face {
  border-color: #b56a4a;
  background-color: #b56a4a;
  color: #f7f1e6;
}
.option-panel {
  max-height: 9rem; opacity: 1; transform: translateY(0); overflow: hidden;
  transition: max-height .45s cubic-bezier(.16,1,.3,1), opacity .3s ease, transform .4s ease;
}
.option-panel.is-collapsed { max-height: 0; opacity: 0; transform: translateY(-8px); }
.guest-stepper {
  display: grid; grid-template-columns: 3rem 1fr 3rem; align-items: center;
  border: 1px solid rgba(74,64,56,.18); border-radius: 1rem; background: #f7f1e6; overflow: hidden;
}
.guest-stepper button {
  min-height: 3.8rem; font-size: 1.5rem; color: #9c5638;
  transition: background-color .25s ease, transform .2s ease;
}
.guest-stepper button:hover { background: rgba(181,106,74,.1); }
.guest-stepper button:active { transform: scale(.9); }
.guest-stepper div { display: flex; align-items: baseline; justify-content: center; gap: .7rem; }
.guest-stepper strong { font-family: "Cormorant Garamond", serif; font-size: 2rem; color: #9c5638; }
.guest-stepper span { color: #6f6458; font-size: .85rem; }
.submit-button {
  position: relative; overflow: hidden; box-shadow: 0 12px 30px rgba(181,106,74,.25);
  transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s ease, background-color .3s ease;
}
.submit-button::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.26), transparent 70%);
  transform: translateX(-120%); transition: transform .7s ease;
}
.submit-button:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(181,106,74,.35); background: #9c5638; }
.submit-button:hover::after { transform: translateX(120%); }
.submit-button.is-loading span { opacity: .5; }
.submit-button.is-loading::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 1.1rem; height: 1.1rem;
  margin: -.55rem; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.thank-icon {
  display: inline-grid; place-items: center; width: 3.5rem; height: 3.5rem;
  border-radius: 999px; background: rgba(181,106,74,.1); color: #9c5638;
}
.thank-icon svg { width: 1.7rem; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }

/* ===== Pétalos que caen ===== */
.petal {
  position: absolute;
  top: -10vh;
  border-radius: 60% 40% 55% 45% / 55% 45% 60% 40%;
  background: linear-gradient(135deg, #e8b8a0, #d98d6f);
  opacity: 0.85;
  animation-name: fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
@keyframes fall {
  0% {
    transform: translateY(-10vh) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.85;
  }
  90% {
    opacity: 0.85;
  }
  100% {
    transform: translateY(110vh) translateX(60px) rotate(360deg);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .petal,
  .animate-bounce-soft,
  .hero-image,
  .hero-overlay,
  .hero-content {
    animation: none;
  }
}
