/* ============================================
   A & C — Wedding Invitation
   Elegant cream / olive / gold palette
   ============================================ */

:root {
  /* Palette */
  --cream:        #f5efe6;
  --cream-soft:   #ede4d4;
  --cream-dark:   #e2d6c0;
  --olive:        #3d4a2f;
  --olive-soft:   #5a6b46;
  --olive-mute:   #8a9079;
  --gold:         #b08d4a;
  --gold-soft:    #c9a767;
  --ink:          #2a2520;
  --ink-soft:     #5b5448;
  --ink-mute:     #8a8175;
  --white:        #ffffff;
  --shadow:       0 8px 30px rgba(45, 35, 20, 0.08);
  --shadow-lg:    0 20px 60px rgba(45, 35, 20, 0.12);

  /* Type */
  --serif:  "Cormorant Garamond", "Times New Roman", serif;
  --sans:   "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --script: "Great Vibes", cursive;

  /* Layout */
  --max-w: 1200px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --section-py: clamp(4rem, 10vw, 7rem);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; margin: 0; list-style: none; }

/* Base */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--olive);
  color: var(--cream);
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--olive-mute); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--olive); }

/* ============================================
   MUSIC TOGGLE
   ============================================ */
/* Botón flotante para confirmar asistencia.
   Se mantiene oculto mientras se ve el inicio (que ya tiene su propio
   botón) y aparece al bajar. */
.rsvp-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.5rem;
  border-radius: 40px;
  background: var(--olive);
  color: var(--cream);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s, background 0.3s;
}
.rsvp-fab.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.rsvp-fab:hover {
  background: var(--olive-soft);
  transform: translateY(-2px);
}
.rsvp-fab svg {
  width: 17px;
  height: 17px;
  fill: rgba(201, 167, 103, 0.35);
  stroke: var(--gold-soft);
  flex-shrink: 0;
}

@media (max-width: 520px) {
  .rsvp-fab {
    bottom: 1rem;
    right: 1rem;
    padding: 0.85rem 1.2rem;
    font-size: 0.62rem;
    letter-spacing: 0.14em;
  }
}

/* ============================================
   NAV
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--gutter);
  background: rgba(245, 239, 230, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, padding 0.3s;
}
.nav.scrolled {
  background: rgba(245, 239, 230, 0.96);
  border-bottom-color: rgba(61, 74, 47, 0.12);
  padding: 0.6rem var(--gutter);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--olive);
}
.logo-monogram {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}
.logo-divider {
  display: inline-block;
  margin: 0 0.2em;
  opacity: 0.6;
  font-weight: 300;
}
.logo-branch {
  width: 36px;
  height: 18px;
  color: var(--olive);
  margin-top: 0.4rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
}
.nav-links a {
  position: relative;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0.4rem 0;
  transition: color 0.3s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--olive);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--olive);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-heart {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--olive);
  border: 1px solid rgba(61, 74, 47, 0.25);
  transition: all 0.3s;
}
.nav-heart:hover {
  background: var(--olive);
  color: var(--cream);
}
.nav-heart svg { width: 18px; height: 18px; }

.nav-burger {
  display: none;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--olive);
  transition: 0.3s;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--ink-soft);
  text-align: center;
}

/* Fondo animado interactivo (canvas) */
.hero-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: var(--cream);
  touch-action: pan-y;
}

/* Velo que suaviza los bordes y funde el hero con la sección siguiente */
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(115% 75% at 50% 45%,
      rgba(245, 239, 230, 0) 35%,
      rgba(245, 239, 230, 0.45) 78%,
      rgba(245, 239, 230, 0.75) 100%),
    linear-gradient(to bottom,
      rgba(245, 239, 230, 0.7) 0%,
      rgba(245, 239, 230, 0) 18%,
      rgba(245, 239, 230, 0) 72%,
      var(--cream) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: var(--gutter);
  max-width: 700px;
  animation: fadeUp 1.4s ease 0.3s both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.15em;
  margin: 0 0 1.2rem;
  color: var(--olive-soft);
  opacity: 0.95;
}

.hero-names {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 400;
  line-height: 1.05;
  margin: 0;
  letter-spacing: 0.01em;
  color: var(--olive);
  text-shadow: 0 2px 34px rgba(245, 239, 230, 0.85);
}
.hero-name { display: inline-block; }
.hero-amp {
  display: inline-block;
  font-family: var(--script);
  font-size: 0.85em;
  margin: 0 0.3em;
  color: var(--gold-soft);
  font-weight: 400;
  transform: translateY(-0.1em);
}

.hero-date {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  font-weight: 400;
  letter-spacing: 0.4em;
  margin: 1.5rem 0 0.4rem;
  color: var(--ink-soft);
  opacity: 0.95;
}

.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.2rem 0 1.5rem;
}
.hero-divider .line {
  width: 60px;
  height: 1px;
  background: linear-gradient(to right, rgba(176, 141, 74, 0), rgba(176, 141, 74, 0.75));
}
.hero-divider .line:last-child {
  background: linear-gradient(to left, rgba(176, 141, 74, 0), rgba(176, 141, 74, 0.75));
}
.hero-divider svg {
  width: 18px;
  height: 18px;
  color: var(--gold);
  fill: var(--gold);
  stroke: var(--gold);
}

.hero-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.15rem);
  margin: 0 0 2rem;
  color: var(--ink-soft);
  opacity: 0.95;
  font-weight: 300;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 2.2rem;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(61, 74, 47, 0.35);
  border-radius: 4px;
  color: var(--olive);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: all 0.4s ease;
}
.hero-cta:hover {
  background: var(--olive);
  color: var(--cream);
  border-color: var(--olive);
  transform: translateY(-2px);
}
.hero-cta svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s;
}
.hero-cta:hover svg { transform: translateX(3px); }

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  color: var(--ink-mute);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: rgba(138, 144, 121, 0.5);
  position: relative;
  overflow: hidden;
}
.hero-scroll-line::after {
  content: '';
  position: absolute;
  top: -40px; left: 0;
  width: 100%;
  height: 40px;
  background: var(--gold);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0%   { top: -40px; }
  100% { top: 40px; }
}

/* ============================================
   COUNTDOWN
   ============================================ */
.countdown {
  background: var(--olive);
  color: var(--cream);
  padding: 3rem var(--gutter);
  text-align: center;
}
.countdown-eyebrow {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.1em;
  margin: 0 0 1.5rem;
  opacity: 0.85;
}
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}
.countdown-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}
.countdown-cell span {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 300;
  line-height: 1;
}
.countdown-cell em {
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.7;
}

/* ============================================
   SECTION HEAD
   ============================================ */
.section-head {
  text-align: center;
  margin-bottom: 3.5rem;
  padding: 0 var(--gutter);
}
.section-ornament {
  display: block;
  width: 100px;
  height: 30px;
  margin: 0 auto 1rem;
  color: var(--olive);
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--olive);
  margin: 0 0 0.8rem;
}
.section-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 500px;
  margin: 0 auto;
}

/* ============================================
   MOMENTO / GALLERY
   ============================================ */
.momento {
  /* La galería va después de Regalos: 30px arriba (los otros 30 los pone
     Regalos abajo, = 60px de separación) y el aire normal antes del pie. */
  padding: 30px var(--gutter) var(--section-py);
  background: var(--cream);
  position: relative;
}

/* Galería justificada: filas que llenan el ancho exacto, sin recortar las fotos.
   Dentro de cada fila los anchos se reparten en proporción a --r (ancho/alto),
   así que todas las fotos de una fila terminan con la misma altura y ninguna
   se recorta. Sin huecos ni espacios en blanco. */
.gallery {
  --gal-gap: 1rem;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--gal-gap);
}
.gallery-row {
  display: flex;
  gap: var(--gal-gap);
}
.gallery-item {
  --r: 1;
  flex: var(--r) 1 0;
  min-width: 0;
  aspect-ratio: var(--r);
  margin: 0;
  overflow: hidden;
  border-radius: 4px;
  position: relative;
  cursor: zoom-in;
  background: var(--cream-soft);
}
.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}
.gallery-item:hover img {
  transform: scale(1.05);
}
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(45, 35, 20, 0);
  transition: background 0.3s;
}
.gallery-item:hover::after {
  background: rgba(45, 35, 20, 0.15);
}


/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 14, 0.94);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  color: var(--white);
  font-size: 2rem;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  transition: background 0.3s;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
}
.lightbox-close { top: 1.5rem; right: 1.5rem; }
.lightbox-prev  { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 1.5rem; top: 50%; transform: translateY(-50%); }

/* ============================================
   DETALLES
   ============================================ */
.detalles {
  padding: 30px var(--gutter) var(--section-py);
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-soft) 100%);
}
.detalles-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.detalle-card {
  background: var(--white);
  padding: 2.5rem 1.8rem;
  border-radius: 8px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.4s, box-shadow 0.4s;
  border: 1px solid rgba(61, 74, 47, 0.06);
}
.detalle-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.detalle-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.2rem;
  display: grid;
  place-items: center;
  background: var(--cream);
  border-radius: 50%;
  color: var(--olive);
}
.detalle-icon svg { width: 28px; height: 28px; }
.detalle-card h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--olive);
  margin: 0 0 0.6rem;
}
.detalle-card p {
  margin: 0.3rem 0;
  font-size: 0.95rem;
  color: var(--ink);
}
.detalle-card .muted {
  color: var(--ink-mute);
  font-size: 0.88rem;
  font-style: italic;
}
.detalle-link {
  display: inline-block;
  margin-top: 0.8rem;
  color: var(--olive);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--olive);
  padding-bottom: 2px;
  transition: gap 0.3s;
}

/* ============================================
   REGALOS
   ============================================ */
.regalos {
  position: relative;
  /* Abajo solo 30px para no dejar un hueco enorme antes de la galería */
  padding: 4.5rem var(--gutter) 30px;
  background: var(--cream);
  overflow: hidden;
}
/* Mismo fondo animado del inicio, un poco más tenue */
.regalos-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: var(--cream);
  touch-action: pan-y;
}
.regalos-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(100% 70% at 50% 50%,
      rgba(245, 239, 230, 0.15) 0%,
      rgba(245, 239, 230, 0.55) 70%,
      rgba(245, 239, 230, 0.8) 100%),
    linear-gradient(180deg, var(--cream) 0%, rgba(245, 239, 230, 0) 14%,
      rgba(245, 239, 230, 0) 86%, var(--cream) 100%);
}
.regalos-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.regalos-branch {
  display: block;
  width: 80px;
  height: 30px;
  margin: 0 auto 1.5rem;
  color: var(--olive);
}
.regalos-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--olive);
  line-height: 1.3;
  margin: 0;
}
.regalos-title em {
  display: block;
  font-family: var(--script);
  font-size: 1.6em;
  font-style: normal;
  text-transform: none;
  letter-spacing: 0;
  color: var(--olive-soft);
  margin-top: 0.6rem;
  line-height: 1;
}
.regalos-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
}
.regalos-divider .line {
  width: 80px;
  height: 1px;
  background: var(--olive-mute);
}
.regalos-divider svg {
  width: 18px;
  height: 18px;
  fill: var(--olive);
  stroke: var(--olive);
}
.regalos-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin: 0 0 2.2rem;
  line-height: 1.7;
}

.regalos-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1.1rem 2.8rem;
  background: var(--olive);
  color: var(--cream);
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  transition: all 0.4s ease;
  box-shadow: 0 4px 20px rgba(61, 74, 47, 0.3);
}
.regalos-btn:hover {
  background: var(--ink);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(61, 74, 47, 0.4);
}
.regalos-btn svg {
  width: 16px;
  height: 16px;
  fill: var(--cream);
  stroke: var(--cream);
  transition: transform 0.3s;
}
.regalos-btn:hover svg { transform: scale(1.2); }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 3rem var(--gutter);
  text-align: center;
  background: var(--olive);
  color: var(--cream);
}
.footer-script {
  font-family: var(--script);
  font-size: 3.5rem;
  margin: 0 0 0.4rem;
  color: var(--gold-soft);
  line-height: 1;
}
.footer-line {
  font-family: var(--serif);
  font-size: 0.9rem;
  letter-spacing: 0.4em;
  margin: 0 0 0.8rem;
  opacity: 0.85;
}
.footer-tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.85rem;
  opacity: 0.7;
  margin: 0;
}

/* ============================================
   MODAL
   ============================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal.open { display: flex; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 14, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  position: relative;
  background: var(--cream);
  border-radius: 12px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
  animation: modalUp 0.5s cubic-bezier(.2,.8,.3,1);
}
@keyframes modalUp {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  color: var(--ink-soft);
  border-radius: 50%;
  transition: all 0.3s;
  z-index: 5;
}
.modal-close:hover {
  background: var(--cream-soft);
  color: var(--olive);
  transform: rotate(90deg);
}

.modal-step {
  display: none;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.modal-step.active { display: block; }
.modal-step.no-padding { padding: 0; }

.modal-eyebrow {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--olive);
  margin: 0 0 0.6rem;
  text-align: center;
}
.modal-step h3 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--olive);
  text-align: center;
  margin: 0 0 0.8rem;
}
.modal-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-align: center;
  max-width: 500px;
  margin: 0 auto 1.8rem;
  line-height: 1.6;
}

.step-back {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--olive);
  margin-bottom: 1rem;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  transition: background 0.3s;
}
.step-back:hover { background: var(--cream-soft); }

/* ============================================
   FORMS
   ============================================ */
#rsvpForm {
  max-width: 600px;
  margin: 0 auto;
}
.form-row {
  margin-bottom: 1.1rem;
}
.form-row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-row label {
  display: block;
}
.form-row label span {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid rgba(61, 74, 47, 0.15);
  border-radius: 4px;
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
}
.form-row textarea {
  resize: vertical;
  font-family: var(--sans);
  font-size: 0.95rem;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--olive);
  box-shadow: 0 0 0 3px rgba(61, 74, 47, 0.1);
}
.form-row input.invalid,
.form-row select.invalid {
  border-color: #b34a3e;
  background: #fdf3f0;
}
.form-error {
  display: none;
  background: #fdf3f0;
  border: 1px solid #e5b8b0;
  color: #8a3a30;
  padding: 0.7rem 1rem;
  border-radius: 4px;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}
.form-error.show { display: block; }

.form-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 1rem 2rem;
  background: var(--olive);
  color: var(--cream);
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: all 0.3s;
  margin-top: 0.5rem;
}
.form-submit:hover {
  background: var(--ink);
  transform: translateY(-2px);
}
.form-submit svg { width: 16px; height: 16px; }

.modal-back-btn {
  display: block;
  margin: 1.5rem auto 0;
  padding: 0.6rem 1.2rem;
  color: var(--olive);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 4px;
  transition: background 0.3s;
}
.modal-back-btn:hover { background: var(--cream-soft); }

/* ============================================
   GIFT GRID
   ============================================ */
.gift-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}
.gift-card {
  background: var(--white);
  border-radius: 8px;
  padding: 1.8rem 1.5rem;
  text-align: center;
  border: 1px solid rgba(61, 74, 47, 0.08);
  display: flex;
  flex-direction: column;
}
.gift-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 0.8rem;
  display: grid;
  place-items: center;
  background: var(--cream);
  border-radius: 50%;
  color: var(--olive);
}
.gift-icon svg { width: 24px; height: 24px; }
.gift-card h4 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--olive);
  margin: 0 0 1.2rem;
  position: relative;
}
.gift-card h4::after {
  content: '';
  display: block;
  width: 30px;
  height: 1px;
  background: var(--olive-mute);
  margin: 0.5rem auto 0;
}
.gift-qr {
  background: var(--white);
  border: 1px solid rgba(61, 74, 47, 0.12);
  border-radius: 6px;
  padding: 0.8rem;
  margin: 0 auto 1rem;
  width: 180px;
  height: 180px;
  display: grid;
  place-items: center;
}
.gift-qr img { max-width: 100%; max-height: 100%; border-radius: 2px; }
.gift-help {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.5;
}
.gift-foot {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0.5rem 0 0;
}

.gift-option {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  padding: 0.9rem 1rem;
  background: var(--cream);
  border: 1px solid rgba(61, 74, 47, 0.1);
  border-radius: 4px;
  margin-bottom: 0.7rem;
  text-align: left;
  color: var(--ink);
  font-size: 0.95rem;
  font-family: var(--serif);
  transition: all 0.3s;
}
.gift-option:hover {
  background: var(--cream-soft);
  border-color: var(--olive);
  transform: translateX(4px);
}
.gift-option svg { width: 22px; height: 22px; color: var(--olive); flex-shrink: 0; }
.gift-option span:first-of-type { flex: 1; }
.gift-arrow {
  color: var(--olive);
  font-size: 1.4rem;
  line-height: 1;
}

/* ============================================
   BANK INFO
   ============================================ */
.bank-info {
  max-width: 500px;
  margin: 0 auto 1.5rem;
  background: var(--white);
  border-radius: 8px;
  border: 1px solid rgba(61, 74, 47, 0.1);
  overflow: hidden;
}
.bank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.3rem;
  border-bottom: 1px solid rgba(61, 74, 47, 0.06);
  gap: 1rem;
  flex-wrap: wrap;
}
.bank-row:last-child { border-bottom: none; }
.bank-row span {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.bank-row strong {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
  text-align: right;
}
.copyable {
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  background: var(--cream);
  transition: all 0.3s;
  display: inline-block;
}
.copyable:hover {
  background: var(--olive);
  color: var(--cream);
}
.copyable.copied {
  background: var(--olive);
  color: var(--cream);
}
.copy-hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-mute);
  font-style: italic;
  margin: 0 0 1rem;
}

/* ============================================
   THANKS
   ============================================ */
.thanks-art {
  display: grid;
  place-items: center;
  margin: 0 auto 1.5rem;
  width: 100px;
  height: 100px;
  color: var(--olive);
}
.thanks-art svg { width: 100%; height: 100%; }

/* ============================================
   TOAST
   ============================================ */
.toast {
  position: fixed;
  bottom: 6rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--cream);
  padding: 0.7rem 1.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: var(--shadow-lg);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .gallery { --gal-gap: 0.6rem; }
}

/* En pantallas angostas cada fila se parte en dos: las dos fotos verticales
   comparten una línea y la horizontal ocupa el ancho completo. Las filas
   siguen llenando el ancho exacto, así que no aparecen espacios en blanco. */
@media (max-width: 620px) {
  .gallery-row { flex-wrap: wrap; }
  .gallery-row .gallery-item:nth-child(1),
  .gallery-row .gallery-item:nth-child(3) { order: 1; }
  .gallery-row .gallery-item:nth-child(2) {
    order: 2;
    flex-basis: 100%;
  }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--cream);
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid rgba(61, 74, 47, 0.1);
    align-items: flex-start;
  }
  .nav-burger { display: flex; }
  .nav-heart { display: none; }

  .gift-grid { grid-template-columns: 1fr; }
  .form-row.two { grid-template-columns: 1fr; }
  .hero-names { font-size: clamp(2.5rem, 12vw, 4rem); }
  .countdown-grid { gap: 0.5rem; }
  .countdown-cell span { font-size: 2rem; }
  .bank-row { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
  .bank-row strong { text-align: left; }
}

@media (max-width: 480px) {
  .gallery { --gal-gap: 0.5rem; }
  .modal-card { max-height: 95vh; }
  .modal-step { padding: 1.2rem; }
}

/* Campo trampa anti-bots: fuera de la vista y del recorrido de teclado */
.form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Botón de envío mientras se procesa */
.form-submit:disabled {
  opacity: 0.65;
  cursor: progress;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .hero-canvas { animation: none; }
}
