/* Boda Marco & Massiel · Estilo sage, floral, script · Responsive */
:root {
  --sage: #e8f0e8;
  --sage-dark: #d4e0d4;
  --white: #fff;
  --text: #3d4a3d;
  --text-muted: #5c6b5c;
  --btn-dark: #4a5568;
  --btn-dark-hover: #2d3748;
  --accent: #6b7c6b;
  --font-script: 'Great Vibes', cursive;
  --font-body: 'Lora', Georgia, serif;
  --font-sans: 'Source Sans 3', sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --radius: 9999px;
  --radius-input: 12px;
  --max-width: 56rem;
  --transition: 0.25s ease;
  --reveal-duration: 0.8s;
  --reveal-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Animaciones suaves al hacer scroll (muy leves) */
.scroll-reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--reveal-duration) var(--reveal-ease), transform var(--reveal-duration) var(--reveal-ease);
}
.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.scroll-reveal-delay-1 { transition-delay: 0.1s; }
.scroll-reveal-delay-2 { transition-delay: 0.2s; }
.scroll-reveal-delay-3 { transition-delay: 0.3s; }
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .scroll-reveal.is-visible { opacity: 1; transform: none; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: transform var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  position: relative;
}

.header-title {
  font-family: var(--font-script);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.header-title:hover { color: var(--accent); text-decoration: none; }

/* Botón hamburguesa: oculto en desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  border-radius: 6px;
  transition: background 0.2s ease;
  position: relative;
  z-index: 101;
}
.nav-toggle:hover { background: rgba(0, 0, 0, 0.05); }
.nav-toggle:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.header.is-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header.is-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.header.is-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-md);
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text);
  padding: var(--space-xs) var(--space-sm);
}
.nav-link:hover { color: var(--accent); text-decoration: none; }

/* Mobile: título a la izquierda + hamburguesa a la derecha */
@media (max-width: 768px) {
  .header-inner { padding: var(--space-xs) var(--space-sm); }
  .header-title { font-size: 1.35rem; }
  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 0;
    padding: calc(56px + var(--space-md)) var(--space-md) var(--space-lg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    overflow-y: auto;
    z-index: 99;
  }
  .header.is-open .nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .nav-link {
    font-size: 1.1rem;
    padding: var(--space-md) var(--space-lg);
    min-height: 48px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
  }
  .nav-link:last-child { border-bottom: none; }
}

/* Hero: igual que referencia — collage horizontal 5 fotos + texto sobre blanco */
.hero-ref {
  position: relative;
  /* padding: calc(60px + var(--space-lg)) 0 var(--space-xl); */
  background: #fff;
  min-height: auto;
}
.hero-ref .torn-paper-bottom { display: none; }

/* Collage en una sola tira horizontal, 4 imágenes sin huecos */
.hero-collage-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: none;
  width: 100%;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  aspect-ratio: 4 / 1.5;
  position: relative;
}

/* Overlay con fecha, lugar y hora sobre el collage */
.hero-collage-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.5rem 1.25rem;
  background: rgba(45, 55, 45, 0.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-overlay-line {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.75rem;
}
.hero-overlay-sep {
  opacity: 0.8;
  user-select: none;
}
.hero-overlay-link {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.hero-overlay-link:hover {
  color: #fff;
  text-decoration: underline;
}
@media (max-width: 768px) {
  /* En móvil: cuadrícula 2x2 para las 4 imágenes y overlay debajo */
  .hero-collage-strip {
    aspect-ratio: none;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 1fr 1fr auto;
    min-height: 72vh;
  }
  .hero-collage-strip .hero-collage-img {
    min-height: 100%;
  }
  .hero-collage-strip .hero-collage-img:nth-child(1) { grid-row: 1; grid-column: 1; }
  .hero-collage-strip .hero-collage-img:nth-child(2) { grid-row: 1; grid-column: 2; }
  .hero-collage-strip .hero-collage-img:nth-child(3) { grid-row: 2; grid-column: 1; }
  .hero-collage-strip .hero-collage-img:nth-child(4) { grid-row: 2; grid-column: 2; }
  .hero-collage-overlay {
    position: static;
    grid-column: 1 / -1;
    grid-row: 3;
    padding: 1rem 1.25rem;
  }
}
@media (max-width: 640px) {
  .hero-collage-strip { min-height: 68vh; }
  .hero-collage-overlay { padding: 0.75rem 1rem 1rem; }
  .hero-overlay-line { font-size: 0.85rem; gap: 0.25rem 0.5rem; }
}
.hero-collage-strip .hero-collage-img {
  aspect-ratio: auto;
  min-height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: hero-collage-fade 1.1s cubic-bezier(0.33, 0, 0.2, 1) forwards;
}
.hero-collage-strip .hero-collage-img:nth-child(1) { animation-delay: 0.15s; }
.hero-collage-strip .hero-collage-img:nth-child(2) { animation-delay: 0.35s; }
.hero-collage-strip .hero-collage-img:nth-child(3) { animation-delay: 0.55s; }
.hero-collage-strip .hero-collage-img:nth-child(4) { animation-delay: 0.75s; }

@keyframes hero-collage-fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-collage-strip .hero-collage-img {
    opacity: 1;
    animation: none;
    transform: none;
  }
}

/* Zona de texto con fondo custom-cta-background.jpg */
.hero-content-wrap {
  width: 100%;
  min-height: 320px;
  background-color: #eaeee8;
  background-image: url("../images/custom-cta-background.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  padding: var(--space-md) var(--space-md) var(--space-xl);
  position: relative;
}
@media (max-width: 768px) {
  .hero-content-wrap { min-height: 280px; }
}

.hero-content-white {
  position: relative;
  z-index: 1;
  max-width: 36rem;
  margin: 0 auto;
  /* padding: 0 var(--space-md); */
  text-align: center;
  background: transparent;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 32rem;
  margin: 0 auto;
  text-align: center;
}

.hero-script {
  font-family: var(--font-script);
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 400;
  color: var(--text);
  margin: 0 0 var(--space-md);
  line-height: 1.2;
}

.hero-intro {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0 0 var(--space-lg);
  line-height: 1.75;
}

/* Botón principal (oval, oscuro) */
.btn {
  display: inline-block;
  padding: 0.7rem 2rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  border-radius: var(--radius);
  letter-spacing: 0.02em;
}

.btn-primary {
  background: var(--btn-dark);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--btn-dark-hover);
  color: var(--white);
  text-decoration: none;
}

/* Torn paper (transición entre secciones) */
.torn-paper {
  position: absolute;
  left: 0;
  right: 0;
  height: 48px;
  pointer-events: none;
  background: var(--sage);
}

.torn-paper-bottom {
  bottom: -24px;
  clip-path: polygon(0 30%, 5% 50%, 10% 35%, 18% 55%, 25% 40%, 32% 60%, 40% 45%, 50% 65%, 60% 45%, 68% 55%, 75% 40%, 82% 50%, 90% 35%, 95% 55%, 100% 40%, 100% 100%, 0 100%);
}

.section-sage .torn-paper-bottom { background: var(--sage); }

/* Sección "after" (imagen grande + script) */
.section-sage {
  position: relative;
  padding: var(--space-2xl) var(--space-md);
  background: var(--sage);
}

.section-after-img-wrap {
  max-width: 42rem;
  margin: 0 auto var(--space-lg);
  border-radius: 12px;
  overflow: visible;
  position: relative;
}

.section-after-img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  transition: transform 0.6s ease, box-shadow 0.5s ease;
  animation: section-after-fade 1s ease-out both;
}

.section-after-img-wrap:hover .section-after-img {
  transform: scale(1.02);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

@keyframes section-after-fade {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Ramo/decoración floral en la parte inferior de la imagen */
.section-after-ramo {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  width: 140px;
  height: 70px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center bottom;
  opacity: 0.85;
  pointer-events: none;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.06));
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.section-after-img-wrap:hover .section-after-ramo {
  transform: translateX(-50%) scale(1);
  opacity: 1;
}

@media (max-width: 640px) {
  .section-after-ramo { width: 100px; height: 50px; bottom: -4px; }
}

.section-after-content {
  max-width: 32rem;
  margin: 0 auto;
  text-align: center;
}

.section-script {
  font-family: var(--font-script);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  color: var(--text);
  margin: 0 0 var(--space-md);
  line-height: 1.2;
}

.section-prose {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.75;
}

/* Invitación: fondo sage + imagen torn paper + hojas (estilo referencia) */
.section-invitation {
  position: relative;
  padding: var(--space-xl) var(--space-md) var(--space-2xl);
  background: var(--sage);
  overflow: hidden;
}

/* Banner CTA: full width con ondas suaves */
.invitation-banner-wrap {
  margin: 0 calc(-1 * var(--space-md)) var(--space-xl);
  width: calc(100% + 2 * var(--space-md));
  max-width: none;
  position: relative;
  overflow: visible;
}
.invitation-banner-img {
  width: 100%;
  height: 550px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
@media (max-width: 768px) {
  .invitation-banner-wrap { margin-left: calc(-1 * var(--space-sm)); margin-right: calc(-1 * var(--space-sm)); width: calc(100% + 2 * var(--space-sm)); }
  .invitation-banner-img { height: 380px; }
}

/* Decoración botánica: rama con hojas y venas (estilo referencia) */
.invitation-leaves {
  position: absolute;
  width: 120px;
  height: 140px;
  opacity: 0.28;
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}
.invitation-leaves-tl { top: var(--space-md); left: 0; background-image: url("../images/deco-branch.svg"); background-position: left top; transform: scaleY(-1); }
.invitation-leaves-tr { top: var(--space-md); right: 0; background-image: url("../images/deco-branch.svg"); background-position: right top; transform: scale(-1); }
.invitation-leaves-bl { bottom: var(--space-xl); left: 0; background-image: url("../images/deco-branch.svg"); background-position: left bottom; }
.invitation-leaves-br { bottom: var(--space-xl); right: 0; background-image: url("../images/deco-branch.svg"); background-position: right bottom; transform: scaleX(-1); }
@media (max-width: 640px) {
  .invitation-leaves { width: 80px; height: 95px; opacity: 0.22; }
}

.invitation-inner {
  position: relative;
  z-index: 1;
  max-width: 28rem;
  margin: 0 auto;
  text-align: center;
}

.invitation-label {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 var(--space-xs);
}

.invitation-names {
  font-family: var(--font-script);
  font-size: clamp(2.5rem, 7vw, 4rem);
  font-weight: 400;
  color: var(--text);
  margin: 0 0 var(--space-md);
  line-height: 1.2;
}

.invitation-details {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0 0 var(--space-lg);
  line-height: 1.6;
}

.invitation-place-link { color: var(--accent); }
.invitation-place-link:hover { text-decoration: underline; }

.invitation-inner .btn-primary { margin-bottom: 0; }
.invitation-inner .btn-map { margin-top: var(--space-md); display: inline-block; }
.invitation-inner { margin-bottom: var(--space-lg); }
.section-invitation .rsvp-block { padding-top: 3rem; }

/* RSVP form (inline) */
.rsvp-block {
  max-width: 28rem;
  margin: 0 auto;
  padding: var(--space-lg);
  background: rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.rsvp-title {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 var(--space-xs);
  text-align: center;
}

.rsvp-deadline {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 var(--space-lg);
}

.form-rsvp {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* Honeypot anti-spam: oculto para usuarios, visible en DOM para bots */
.form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.form-row { display: flex; flex-direction: column; gap: var(--space-xs); }
.form-row-half { width: 100%; }
.form-row-radio {
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
  padding: var(--space-sm) 0;
}

.form-rsvp label {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.form-rsvp input[type="text"],
.form-rsvp input[type="email"],
.form-rsvp textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--sage-dark);
  border-radius: var(--radius-input);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-rsvp input:focus,
.form-rsvp textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(107, 124, 107, 0.15);
}

.form-rsvp textarea { min-height: 88px; resize: vertical; }

.form-radio {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 400;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.5rem 0;
}
.form-radio input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
}

.form-actions { margin-top: var(--space-sm); }
.btn-rsvp-submit {
  width: 100%;
  padding: 0.9rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-input);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-rsvp-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.btn-rsvp-submit:active {
  transform: translateY(0);
}

.required { color: var(--accent); }

.rsvp-message {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-input);
  text-align: center;
  font-family: var(--font-body);
}
.rsvp-success { background: var(--sage); color: var(--text); border: 1px solid var(--sage-dark); }
.rsvp-error { background: #fde8e8; color: #8b3a3a; border: 1px solid #e8b4b4; }
.rsvp-message[hidden] { display: none !important; }

.form-row-double { display: flex; flex-direction: column; gap: var(--space-md); }
@media (min-width: 520px) {
  .form-row-double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }
}

/* Muestras de cariño: bloque dentro de invitación (antes del formulario) */
.muestras-block {
  position: relative;
  padding: var(--space-2xl) 0;
  margin-top: var(--space-lg);
}

.muestras-block .section-script {
  margin-bottom: var(--space-md);
}

.muestras-floral {
  position: absolute;
  bottom: 0;
  width: 120px;
  height: 140px;
  opacity: 0.24;
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}
.muestras-floral-left { left: 0; background-image: url("../images/deco-branch.svg"); background-position: left bottom; }
.muestras-floral-right { right: 0; left: auto; transform: scaleX(-1); background-image: url("../images/deco-branch.svg"); background-position: right bottom; }
@media (max-width: 640px) {
  .muestras-floral { width: 80px; height: 95px; opacity: 0.2; }
}

.muestras-inner {
  max-width: 36rem;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  text-align: center;
}

.section-muestras .section-script {
  margin-bottom: var(--space-md);
}

.muestras-intro {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.75;
  margin: 0 0 var(--space-md);
}

.muestras-cuenta {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}
.muestras-cuenta strong {
  color: var(--text);
  font-weight: 600;
}

/* Footer */
.footer {
  background: var(--white);
  color: var(--text-muted);
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  border-top: 1px solid var(--sage-dark);
}

.footer-copy {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.85rem;
}

/* Scroll suave para anclas */
@media (max-width: 768px) {
  .hero-ref { padding-top: calc(56px + var(--space-lg)); }
}

.form-rsvp[hidden] { display: none !important; }
