:root {
  --bg: #fffffe;
  --text: #061312;
  --text-soft: #061312;
  --muted: #545454;
  --muted-alpha: rgba(6, 19, 18, 0.15);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Open Sans', system-ui, sans-serif;
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration: 0.6s;
  --duration-slow: 0.9s;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Fondo sutil con gradiente muy suave */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 100% 60% at 50% 0%, var(--muted-alpha) 0%, transparent 50%),
    radial-gradient(ellipse 80% 40% at 80% 100%, var(--muted-alpha) 0%, transparent 45%);
  pointer-events: none;
}

.wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.wrap > .header {
  margin-bottom: 0;
}

/* Decoraciones (florales y vestimenta) */
.deco {
  pointer-events: none;
  z-index: 0;
}
.deco img {
  display: block;
  max-width: 100%;
  height: auto;
}
/* Florales: fijas al viewport para encuadrar toda la pantalla y mejor proporción */
.deco--floral {
  position: fixed;
  opacity: 0.6;
  width: min(220px, 38vw);
  max-width: 280px;
}
.deco--floral-tl { top: 0; left: 0; }
.deco--floral-tr { top: 0; right: 0; transform: scaleX(-1); }
.deco--floral-bl { bottom: 0; left: 0; transform: scaleY(-1); }
.deco--floral-br { bottom: 0; right: 0; transform: scale(-1); }
.deco--vestimenta {
  position: relative;
  margin: 0 auto 0.75rem;
  max-width: 72px;
  z-index: 1;
}
.deco--vestimenta img {
  filter: invert(1);
  opacity: 0.7;
}
@media (max-width: 480px) {
  .deco--floral {
    width: min(140px, 42vw);
    opacity: 0.5;
  }
}

/* ----- Animaciones ----- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes lineExpand {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* Reveal al hacer scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration) var(--ease-out), transform var(--duration) var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal .date-block,
.reveal .countdown,
.reveal .verse-ref,
.reveal .verse-text,
.reveal .venue,
.reveal .link-ubicacion,
.reveal .dress-code,
.reveal .te-esperamos,
.reveal .thanks {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.reveal.visible .date-block { transition-delay: 0.1s; }
.reveal.visible .countdown { transition-delay: 0.2s; }
.reveal.visible .verse-ref { transition-delay: 0.05s; }
.reveal.visible .verse-text { transition-delay: 0.15s; }
.reveal.visible .venue { transition-delay: 0.05s; }
.reveal.visible .link-ubicacion { transition-delay: 0.1s; }
.reveal.visible .dress-code { transition-delay: 0.15s; }
.reveal.visible .te-esperamos { transition-delay: 0.2s; }
.reveal.visible .thanks { transition-delay: 0.25s; }

.reveal.visible .date-block,
.reveal.visible .countdown,
.reveal.visible .verse-ref,
.reveal.visible .verse-text,
.reveal.visible .venue,
.reveal.visible .link-ubicacion,
.reveal.visible .dress-code,
.reveal.visible .te-esperamos,
.reveal.visible .thanks {
  opacity: 1;
  transform: translateY(0);
}

/* Hero: entrada escalonada al cargar */
.hero-reveal .kicker {
  animation: fadeUp var(--duration) var(--ease-out) 0.1s both;
}
.hero-reveal .emblema {
  animation: scaleIn var(--duration-slow) var(--ease-out) 0.25s both;
}
.hero-reveal .names {
  animation: fadeUp var(--duration) var(--ease-out) 0.4s both;
}
.hero-reveal .intro {
  animation: fadeUp var(--duration) var(--ease-out) 0.55s both;
}
.hero-reveal .ornamento-top,
.hero-reveal .ornamento-bottom {
  animation: fadeIn 0.8s var(--ease-out) 0.7s both;
}

/* Ornamentos: línea con motivo central */
.ornamento {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1rem 0;
}

.ornamento::before,
.ornamento::after {
  content: '';
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--muted));
  transform-origin: center;
}

.ornamento::after {
  background: linear-gradient(90deg, var(--muted), transparent);
}

.ornamento-top::before,
.ornamento-top::after { animation: lineExpand 0.8s var(--ease-out) 0.5s both; }
.ornamento-bottom::before,
.ornamento-bottom::after { animation: lineExpand 0.8s var(--ease-out) 0.6s both; }

.ornamento::before { transform-origin: right; }
.ornamento::after { transform-origin: left; }

.section-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.25rem 0;
}

.section-ornament::before,
.section-ornament::after {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--muted);
  opacity: 0.6;
}

/* Iconos UI */
.icon {
  display: block;
  width: 1.25em;
  height: 1.25em;
  color: var(--muted);
  transition: color 0.25s;
}
.icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-right: 0.4em;
}
.icon-wrap--small .icon {
  width: 1em;
  height: 1em;
}
.icon-wrap--inline {
  margin-right: 0.35em;
}
.icon-wrap--inline .icon {
  width: 1em;
  height: 1em;
}
.venue:hover .icon,
.link-ubicacion:hover .icon,
.dress-code:hover .icon,
.te-esperamos:hover .icon {
  color: var(--text);
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.section-heading .icon-wrap {
  margin-right: 0;
}
.section-heading .icon {
  width: 1.5em;
  height: 1.5em;
}
.section-title {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Header: ocupa toda la primera pantalla */
.header {
  text-align: center;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem 1.5rem 4rem;
  border-bottom: 1px solid var(--muted);
  position: relative;
  box-sizing: border-box;
}

.kicker {
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 1rem;
}

.emblema {
  margin-bottom: 1rem;
  line-height: 0;
}

.emblema img {
  display: block;
  width: 100%;
  max-width: 120px;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  transition: transform 0.5s var(--ease-out);
}

.emblema:hover img {
  transform: scale(1.03);
}

.names {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 8vw, 3.2rem);
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.names .amp {
  font-style: italic;
  color: var(--text);
  font-weight: 400;
}

.intro {
  font-size: 1rem;
  color: var(--text);
  font-weight: 400;
  max-width: 320px;
  margin: 0 auto;
}

/* Indicador de scroll (bajar / continuar) */
.scroll-indicator {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.25s;
}
.scroll-indicator:hover {
  color: var(--text);
}
.scroll-indicator__arrow {
  display: block;
  width: 28px;
  height: 28px;
  animation: scrollBounce 2s ease-in-out infinite;
}
.scroll-indicator__arrow svg {
  display: block;
  width: 100%;
  height: 100%;
}
.scroll-indicator__text {
  opacity: 0.9;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* Fecha */
.date-section {
  padding: 2rem 0;
  text-align: center;
}

.date-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-family: var(--sans);
}

.date-left, .date-right {
  font-size: 0.95rem;
  color: var(--text);
  text-align: center;
  line-height: 1.4;
}

.date-sep {
  width: 2px;
  height: 2.5rem;
  background: var(--muted);
  border-radius: 1px;
  transition: height 0.3s var(--ease-out);
}

.date-block:hover .date-sep {
  height: 3rem;
}

.date-num {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  text-transform: uppercase;
}

/* Countdown */
.countdown {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.countdown-item {
  text-align: center;
  min-width: 4rem;
  padding: 0.75rem 0.5rem;
  border: 1px solid var(--muted-alpha);
  border-radius: 6px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.countdown-item:hover {
  border-color: var(--muted);
  box-shadow: 0 2px 12px var(--muted-alpha);
}

.countdown-num {
  display: block;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
  transition: transform 0.2s var(--ease-out);
}

.countdown-item.tick .countdown-num {
  transform: scale(1.08);
}

.countdown-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* Versículo */
.verse-section {
  padding: 2rem 0;
  border-top: 1px solid var(--muted);
}

.verse-ref {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25em;
  width: 100%;
}

.verse-text {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-style: normal;
  color: var(--text);
  text-align: justify;
  line-height: 1.6;
}

/* Detalles */
.details-section {
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--muted);
}

.venue {
  font-family: var(--sans);
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25em;
  width: 100%;
}

.link-ubicacion {
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  position: relative;
  text-decoration: none;
  transition: color 0.25s;
}

.link-ubicacion::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--text);
  transform: scaleX(1);
  transform-origin: center;
  transition: transform 0.25s var(--ease-out);
}

.link-ubicacion:hover::after {
  transform: scaleX(0.85);
}

.link-ubicacion:hover {
  color: var(--muted);
}

.dress-code {
  margin-bottom: 1.5rem;
}

.dress-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  margin-bottom: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35em;
  width: 100%;
}

.dress-value {
  font-size: 1rem;
  color: var(--text);
}

.te-esperamos {
  font-family: var(--sans);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35em;
  width: 100%;
}

.thanks {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 400;
}

/* Respetar preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal .date-block,
  .reveal .countdown,
  .reveal .verse-ref,
  .reveal .verse-text,
  .reveal .venue,
  .reveal .link-ubicacion,
  .reveal .dress-code,
  .reveal .te-esperamos,
  .reveal .thanks {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-reveal .kicker,
  .hero-reveal .emblema,
  .hero-reveal .names,
  .hero-reveal .intro,
  .hero-reveal .ornamento-top,
  .hero-reveal .ornamento-bottom {
    animation: none;
  }
  .scroll-indicator__arrow {
    animation: none;
  }
  .emblema img { transition: none; }
  .date-sep { transition: none; }
  .countdown-item { transition: none; }
  .countdown-num { transition: none; }
  .link-ubicacion::after { transition: none; }
}
