/* ═══════════════════════════════════════════════════════
   VARIABLES Y RESET
═══════════════════════════════════════════════════════ */
:root {
  --cream:  #FAF7F2;
  --gold:   #C9A96E;
  --sand:   #D4B896;
  --dark:   #3D3530;
  --muted:  #8C7B6B;
  --white:  #FFFDF9;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Jost', system-ui, sans-serif;

  --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Textura de papel — ruido SVG codificado */
  --paper-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--dark);
  background-color: var(--cream);
  background-image: var(--paper-texture);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ═══════════════════════════════════════════════════════
   UTILIDADES
═══════════════════════════════════════════════════════ */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

.container--narrow {
  max-width: 700px;
}

/* ── Separador decorativo ── */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 2rem auto;
  width: 100%;
  max-width: 360px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold));
}

.divider::after {
  background: linear-gradient(to left, transparent, var(--gold));
}

.divider::before {
  /* rombo SVG inline en el centro via pseudo + clip-path no es posible; usamos el ::after del padre como rombo */
}

/* Truco: el separador incluye un rombo SVG vía outline en el centro usando outline de un cuadrado rotado */
.divider {
  position: relative;
}

.divider::before,
.divider::after {
  /* redefinición limpia */
  content: '';
  height: 1px;
  flex: 1;
}

.divider::before {
  background: linear-gradient(to right, transparent, var(--gold));
}

.divider::after {
  background: linear-gradient(to left, transparent, var(--gold));
}

/* Diamante central usando un span generado en CSS */
/* Lo aplicamos via el pseudo elemento de un elemento wrapper */
/* Como el divider es un div vacío, le añadimos un pseudo-elemento central */
.divider {
  --diamond-size: 8px;
}

.divider::before {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold));
}

/* Re-usamos un wrapper hack: el div.divider tiene un inner elemento decorativo */
/* Solución limpia: el diamond va como border-box rotado */
.divider {
  gap: 0;
}

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

.divider::after {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
  margin: 0 14px;
  /* sobrescribimos el after original */
  height: 10px;
  background: none;
}

/* Necesitamos un tercer elemento, así que usamos un div interno con clase */
/* Añadimos la línea derecha via JS o via un hermano — lo resolvemos con outline trick */
/* Solución final: usamos box-shadow en el ::after para simular las dos líneas + diamante */
.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin: 2rem auto;
  max-width: 360px;
}

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

.divider::after {
  content: '';
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--gold);
  transform: rotate(45deg);
  background: var(--cream);
  flex-shrink: 0;
}

/* Añadimos la línea derecha usando box-shadow extendida */
/* Mejor: usamos un pseudo-wrapper */
.divider-right-line {
  display: none; /* Se genera vía CSS grid, tercera columna del ::after usando sibling trick */
}

/* Reemplazamos el diseño del divider con un approach más limpio */
.divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem auto;
  max-width: 320px;
}

.divider::before,
.divider::after {
  content: '';
  position: absolute;
  top: 50%;
  height: 1px;
  width: calc(50% - 12px);
}

.divider::before {
  left: 0;
  background: linear-gradient(90deg, transparent, var(--gold));
  transform: translateY(-50%);
}

.divider::after {
  right: 0;
  background: linear-gradient(270deg, transparent, var(--gold));
  transform: translateY(-50%);
}

/* El diamante lo hacemos con box-shadow del propio div */
.divider {
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--gold);
  transform: rotate(45deg);
  background: var(--cream);
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────
   NOTA: la solución más robusta es un elemento inline en el HTML.
   Usamos la clase .divider como contenedor y el diamond via :empty selector.
   Reemplazamos toda la implementación:
───────────────────────────────────────────────────── */
.divider {
  /* reset de todo lo anterior */
  all: unset;
  display: block;
  position: relative;
  height: 16px;
  margin: 2.5rem auto;
  max-width: 320px;
  width: 80%;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 40%, var(--gold) 60%, transparent 100%);
  transform: translateY(-50%);
}

.divider::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--gold);
  background: var(--cream);
  transform: translate(-50%, -50%) rotate(45deg);
}

/* ── Títulos de sección ── */
.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--dark);
  text-align: center;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.section-title--italic {
  font-style: italic;
  font-weight: 300;
}

.section-title--large {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

/* ── Botones ── */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 14px 40px;
  border: 1.5px solid var(--gold);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  background: transparent;
  color: var(--dark);
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: translateX(-101%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

.btn:hover::before,
.btn:focus-visible::before {
  transform: translateX(0);
}

.btn__text,
.btn__loading {
  position: relative;
  z-index: 1;
  transition: color var(--transition);
}

.btn:hover .btn__text,
.btn:hover .btn__loading {
  color: var(--white);
}

.btn--primary {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
  width: 100%;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  padding: 18px 40px;
  box-shadow: 0 4px 24px rgba(201, 169, 110, 0.18);
}

.btn--primary::before {
  background: var(--dark);
}

.btn--primary:hover {
  box-shadow: 0 6px 32px rgba(201, 169, 110, 0.3);
}

.btn--outline {
  margin-top: 1.5rem;
  font-size: 0.8rem;
}

/* ═══════════════════════════════════════════════════════
   SCROLL REVEAL
═══════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ═══════════════════════════════════════════════════════
   RAMAS DECORATIVAS
═══════════════════════════════════════════════════════ */
.deco-branch {
  position: absolute;
  pointer-events: none;
  opacity: 0.45;
}

.deco-branch--section-right {
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 100px;
  opacity: 0.3;
}

.deco-branch--rsvp-left {
  left: -60px;
  top: 10%;
  width: 80px;
  opacity: 0.25;
}

/* ═══════════════════════════════════════════════════════
   SECCIÓN 1 · HERO
═══════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(80px, 12vw, 140px) 24px clamp(80px, 10vw, 120px);
  background-color: var(--cream);
  background-image: var(--paper-texture);
  overflow: hidden;
}

/* Iniciales decorativas */
.hero__monogram {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(8rem, 22vw, 20rem);
  color: var(--sand);
  opacity: 0.12;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  line-height: 1;
  letter-spacing: -0.02em;
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

/* Eyebrow */
.hero__eyebrow {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(0.7rem, 1.5vw, 0.85rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);

  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s ease 0.2s forwards;
}

/* Nombres */
.hero__names {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1em;
  line-height: 1;
}

.hero__name {
  display: block;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3.2rem, 9vw, 7.5rem);
  color: var(--dark);
  letter-spacing: -0.01em;

  opacity: 0;
  transform: translateY(24px);
}

.hero__name--first {
  animation: fadeUp 1s ease 0.55s forwards;
}

.hero__ampersand {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 4rem);
  color: var(--gold);
  line-height: 1.3;

  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 1s ease 0.75s forwards;
}

.hero__name--last {
  animation: fadeUp 1s ease 0.95s forwards;
}

/* Fecha */
.hero__date {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.4rem;

  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s ease 1.2s forwards;
}

/* Lugar */
.hero__place {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  color: var(--muted);

  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s ease 1.4s forwards;
}

/* Saludo personalizado */
.hero__greeting {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--gold);
  margin-top: 0.5rem;

  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s ease 1.6s forwards;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;

  opacity: 0;
  animation: fadeUp 1s ease 2s forwards;
}

.scroll-indicator__dot {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: bounce 1.8s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════
   KEYFRAMES
═══════════════════════════════════════════════════════ */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%       { transform: translateY(8px); opacity: 0.5; }
}

@keyframes flipScale {
  0%   { transform: scaleY(1); }
  50%  { transform: scaleY(0.6); }
  100% { transform: scaleY(1); }
}

.flip {
  animation: flipScale 0.35s ease;
}

/* ═══════════════════════════════════════════════════════
   SECCIÓN 2 · CUENTA ATRÁS
═══════════════════════════════════════════════════════ */
.countdown {
  background-color: var(--white);
  padding: clamp(60px, 8vw, 100px) 24px;
  text-align: center;
}

.countdown__grid {
  display: flex;
  justify-content: center;
  gap: clamp(24px, 6vw, 64px);
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.countdown__block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  min-width: 70px;
}

.countdown__number {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3rem, 8vw, 5.5rem);
  color: var(--gold);
  line-height: 1;
  display: block;
}

.countdown__label {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════
   SECCIÓN 3 · NUESTRA HISTORIA
═══════════════════════════════════════════════════════ */
.historia {
  position: relative;
  padding: clamp(60px, 8vw, 100px) 24px;
  background-color: var(--cream);
  overflow: hidden;
}

.historia__grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin-top: 3rem;
}

/* Imagen placeholder */
.historia__image {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, var(--sand) 0%, #e8d5b9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(201, 169, 110, 0.15);
}

.historia__image::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(201, 169, 110, 0.4);
  pointer-events: none;
}

.historia__image-label {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.deco-branch--image {
  position: absolute;
  bottom: 12px;
  right: 8px;
  width: 55px;
  opacity: 0.5;
  pointer-events: none;
}

/* Texto */
.historia__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.3rem;
}

.historia__text p {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  line-height: 1.9;
  color: var(--dark);
}

/* ═══════════════════════════════════════════════════════
   SECCIONES DE EVENTOS (Ceremonia, Cóctel, Banquete, Dresscode)
═══════════════════════════════════════════════════════ */
.ceremonia,
.banquete {
  background-color: var(--cream);
  padding: clamp(60px, 8vw, 100px) 24px;
}

.coctel,
.dresscode {
  background-color: var(--white);
  padding: clamp(60px, 8vw, 100px) 24px;
}

.event-card {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.event-card__icon {
  margin-bottom: 1rem;
  opacity: 0.85;
}

.event-card__time {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--gold);
  margin-top: 0.8rem;
  letter-spacing: 0.03em;
}

.event-card__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--dark);
  margin-top: 0.4rem;
}

.event-card__address {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 0.3rem;
}

.event-card__description {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  line-height: 1.85;
  color: var(--muted);
  margin-top: 0.8rem;
  max-width: 520px;
}

.event-card__map {
  width: 100%;
  margin-top: 2rem;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(61, 53, 48, 0.1);
  border: 1px solid rgba(201, 169, 110, 0.2);
}

.event-card__map iframe {
  width: 100%;
  height: 300px;
}

/* ═══════════════════════════════════════════════════════
   SECCIÓN 8 · GALERÍA
═══════════════════════════════════════════════════════ */
.galeria {
  background-color: var(--cream);
  padding: clamp(60px, 8vw, 100px) 24px;
}

.gallery__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 200px;
  gap: 12px;
  margin-top: 3rem;
}

.gallery__item {
  background: linear-gradient(135deg, var(--sand) 0%, #e8d5b9 60%, #d4b896 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(201, 169, 110, 0.12);
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery__item:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 32px rgba(201, 169, 110, 0.22);
}

.gallery__item span {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.gallery__item--square { /* 1:1 — usa el row-height por defecto */ }

.gallery__item--vertical {
  grid-row: span 2;
}

.gallery__item--horizontal {
  grid-column: span 2;
}

/* ═══════════════════════════════════════════════════════
   SECCIÓN 9 · RSVP
═══════════════════════════════════════════════════════ */
.rsvp {
  position: relative;
  background-color: var(--white);
  padding: clamp(60px, 8vw, 110px) 24px;
  text-align: center;
  overflow: hidden;
}

.rsvp__subtitle {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(0.85rem, 1.8vw, 0.95rem);
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 1rem;
  margin-bottom: 3rem;
}

/* ── Formulario ── */
.rsvp-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group--conditional {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.form-group--conditional.hidden {
  opacity: 0;
  pointer-events: none;
  height: 0;
  overflow: hidden;
  margin: 0;
  gap: 0;
}

.form-label {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dark);
}

.form-optional {
  color: var(--muted);
  font-weight: 300;
  text-transform: none;
  letter-spacing: 0;
}

.form-input {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  color: var(--dark);
  background: var(--cream);
  border: 1px solid rgba(201, 169, 110, 0.4);
  padding: 14px 18px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}

.form-input::placeholder {
  color: var(--sand);
}

.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.12);
}

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

.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23C9A96E' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

/* Radio buttons estilizados */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 0.2rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.95rem;
  color: var(--dark);
  user-select: none;
}

.radio-label input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-custom {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--sand);
  border-radius: 50%;
  transition: border-color var(--transition), box-shadow var(--transition);
  position: relative;
}

.radio-custom::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.radio-label input[type="radio"]:checked ~ .radio-custom {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

.radio-label input[type="radio"]:checked ~ .radio-custom::after {
  transform: translate(-50%, -50%) scale(1);
}

.radio-text {
  line-height: 1.4;
}

/* Error */
.form-error {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.88rem;
  color: #b85c5c;
  padding: 12px 16px;
  border: 1px solid rgba(184, 92, 92, 0.3);
  background: rgba(184, 92, 92, 0.05);
}

/* Éxito */
.rsvp-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  padding: 3rem 0;
  animation: fadeUp 0.8s ease forwards;
}

.rsvp-success__icon {
  font-size: 2.5rem;
  color: var(--gold);
  animation: bounce 2s ease-in-out infinite;
}

.rsvp-success__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--dark);
}

.rsvp-success__text {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted);
  text-align: center;
}

.rsvp-success__text em {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15em;
  color: var(--dark);
}

/* ═══════════════════════════════════════════════════════
   SECCIÓN 10 · FOOTER
═══════════════════════════════════════════════════════ */
.footer {
  background-color: var(--dark);
  padding: clamp(40px, 6vw, 64px) 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.footer__names {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--cream);
  letter-spacing: 0.04em;
}

.footer__love {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — TABLET 768px
═══════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  .historia__grid {
    flex-direction: row;
    align-items: center;
    gap: 4rem;
  }

  .historia__image {
    flex-shrink: 0;
    width: 280px;
    margin: 0;
  }

  .historia__text {
    flex: 1;
  }

  .radio-group {
    flex-direction: row;
    gap: 2rem;
  }

  .gallery__grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 220px;
  }

  .event-card__map iframe {
    height: 360px;
  }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — DESKTOP 1200px
═══════════════════════════════════════════════════════ */
@media (min-width: 1200px) {
  .historia__image {
    width: 340px;
  }

  .gallery__grid {
    grid-auto-rows: 260px;
    gap: 16px;
  }

  .countdown__grid {
    gap: 80px;
  }
}

/* ═══════════════════════════════════════════════════════
   SOBRE DE INVITACIÓN
═══════════════════════════════════════════════════════ */

body.envelope-stage {
  overflow: hidden;
}

/* Wrapper invisible — solo necesario para el stacking context */
.envelope-screen {
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
}

/* ─────────────────────────────────────────────────
   CUERPO — rectángulo que ocupa toda la pantalla.
   Está debajo de la solapa (z-index menor).
   Sale hacia abajo al abrirse.
───────────────────────────────────────────────── */
.env-body {
  position: fixed;
  inset: 0;
  background: linear-gradient(170deg, #fdf9f2 0%, #f0e4cc 100%);
  z-index: 9991;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  transition: transform 0.9s cubic-bezier(0.76, 0, 0.24, 1);
}

/* Liner diagonal decorativo en las esquinas */
.env-body__liner {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(201,169,110,0.13) 0%, transparent 28%),
    linear-gradient(225deg, rgba(201,169,110,0.13) 0%, transparent 28%),
    linear-gradient(315deg, rgba(201,169,110,0.13) 0%, transparent 28%),
    linear-gradient(45deg,  rgba(201,169,110,0.13) 0%, transparent 28%);
}

/* Sale hacia abajo */
.env-body.open {
  transform: translateY(100%);
}

/* ─────────────────────────────────────────────────
   SOLAPA — triángulo puro (clip-path).
   Sin caja rectangular visible: solo el triángulo.
   Está ENCIMA del cuerpo (z-index mayor).
   Sale hacia arriba al abrirse.

   clip-path: polygon(0 0, 100% 0, 50% 100%)
     → esquina izq arriba, esquina der arriba, punta central abajo
     → triángulo que apunta hacia ABAJO ↓ (solapa clásica de sobre)

   La punta del triángulo toca la mitad de la pantalla → ahí va el sello.
───────────────────────────────────────────────── */
.env-flap {
  position: fixed;
  top: 0; left: 0; right: 0;
  /* La punta del triángulo llega hasta el 50% de la pantalla */
  height: 50vh;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: linear-gradient(165deg, #e8d5b2 0%, #c9a96e 100%);
  z-index: 9992; /* encima del cuerpo */
  pointer-events: auto;
  transition: transform 0.9s cubic-bezier(0.76, 0, 0.24, 1);
}

/* Sale hacia arriba */
.env-flap.open {
  transform: translateY(-100%);
}

/* ─────────────────────────────────────────────────
   MONOGRAMA watermark en el cuerpo
───────────────────────────────────────────────── */
.env-monogram {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(4rem, 12vw, 8rem);
  color: var(--gold);
  opacity: 0.08;
  white-space: nowrap;
  letter-spacing: 0.1em;
  pointer-events: none;
  user-select: none;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

/* ─────────────────────────────────────────────────
   NOMBRE DEL INVITADO
───────────────────────────────────────────────── */
.env-guest {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--muted);
  letter-spacing: 0.05em;
  text-align: center;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.8s forwards;
}

/* ─────────────────────────────────────────────────
   SELLO DE LACRE
   Fijado exactamente donde la punta del triángulo
   toca el cuerpo: top 50vh, centro horizontal.
───────────────────────────────────────────────── */
.env-seal {
  position: fixed;
  top: 50vh;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9993; /* encima de todo */
  width: 84px; height: 84px;
  border-radius: 50%;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  transition: transform 0.2s ease, filter 0.2s ease, opacity 0.25s ease;
}

.env-seal:hover,
.env-seal:focus-visible {
  transform: translate(-50%, -50%) scale(1.09);
  filter: brightness(1.12);
  outline: none;
}

.env-seal:active {
  transform: translate(-50%, -50%) scale(0.92);
}

.env-seal__svg {
  width: 84px; height: 84px;
  filter:
    drop-shadow(0 4px 18px rgba(0,0,0,0.38))
    drop-shadow(0 2px 5px rgba(139,37,0,0.55));
}

.env-seal__hint {
  position: absolute;
  bottom: -26px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  animation: sealPulse 2.4s ease-in-out 1.5s infinite;
}

@keyframes sealPulse {
  0%, 100% { opacity: 0.45; }
  50%       { opacity: 0.95; }
}

/* ── Responsive mobile ── */
@media (max-width: 480px) {
  .env-seal        { width: 70px; height: 70px; }
  .env-seal__svg   { width: 70px; height: 70px; }
}

/* ═══════════════════════════════════════════════════════
   ACCESIBILIDAD — PREFER REDUCED MOTION
═══════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero__eyebrow,
  .hero__name,
  .hero__ampersand,
  .hero__date,
  .hero__place,
  .hero__greeting,
  .scroll-indicator {
    opacity: 1;
    transform: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .env-guest,
  .env-seal__hint {
    opacity: 1;
    animation: none;
  }

  .env-flap.open { transform: translateY(-100%); transition: none; }
  .env-body.open { transform: translateY(100%);  transition: none; }
}
