/* =========================
   RESET + BASE
========================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Fondos */
  --bg-claro: #faf8f2;
  --bg-verde: #dfe7c6;

  /* Texto */
  --texto-principal: #5a5a4a;
  --texto-acento: #6b7354;

  /* Detalles */
  --blanco-transparente: rgba(255,255,255,0.6);
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--bg-claro);
  color: var(--texto-principal);
}

.bg-claro {
  background-color: var(--bg-claro);
}

.bg-verde {
  background-color: var(--bg-verde);
}

/* =========================
   SOBRE
========================= */

.sobre {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;

  /* para que el giro 3D tenga profundidad */
  perspective: 1200px;
}

.sobre-contenido {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  position: relative;
  cursor: pointer;
  overflow: hidden;

  /* Color base del sobre */
  background: #8f956f;

  /* Volumen */
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;

}

.sobre-contenido:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 55px rgba(0,0,0,0.22);
}

/* Contenido por encima de todo */
.sobre-inner {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  padding: 2rem;

  /* desvanecer contenido (nombre, sello, fecha) mientras se abre */
  transition: opacity 0.4s ease;
}

/* Fondo con un ligero degradado para material */
.sobre-fondo {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #9aa07a, #7f865f);
  z-index: 1;
}

/* Laterales (triángulos) */
.sobre-lado {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.95;
}

.sobre-lado-izq {
  background: rgba(255,255,255,0.08);
  clip-path: polygon(0 0, 55% 50%, 0 100%);
}

.sobre-lado-der {
  background: rgba(0,0,0,0.10);
  clip-path: polygon(100% 0, 45% 50%, 100% 100%);
}

/* Solapa superior (la “línea” del sobre) */
.sobre-solapa {
  position: absolute;
  inset: 0;
  z-index: 3;

  /* triángulo que cae hacia el centro */
  background: rgba(255,255,255,0.12);
  clip-path: polygon(0 0, 100% 0, 50% 58%);

  /* sombra para marcar el pliegue */
  box-shadow: inset 0 -10px 20px rgba(0,0,0,0.12);

  /* estado inicial */
  transform-origin: 50% 0%;
  transform: rotateX(0deg);
  /* transition: transform 0.6s ease; */
  transition: none;
}

/* cuando el sobre se está abriendo */
.sobre.abriendo .sobre-solapa {
  /* transform: rotateX(-120deg); */
  animation: abrirSolapa 1.5s ease forwards;
}

@keyframes abrirSolapa {
  0% {
    transform: rotateX(0deg) translateY(0);
  }
  60% {
    transform: rotateX(-120deg) translateY(0);
  }
  100% {
    transform: rotateX(-150deg) translateY(-8%);
  }
}

.sobre.abriendo .sobre-inner {
  opacity: 0;
}

/* Línea sutil donde se cierra el sobre */
.sobre-solapa::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 56%;
  height: 2px;
  background: rgba(0,0,0,0.12);
  filter: blur(0.2px);
}

/* Texto */
.sobre-nombre {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  margin-bottom: 0.4rem;
  opacity: 0.95;
}

.sobre-inner h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.1rem;
  letter-spacing: 0.15em;
  margin-bottom: 2.2rem;
}

.sobre-fecha {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  opacity: 0.9;
}

/* CROSSFADE-SOBRE*/

/* El contenedor de la invitación (hero + resto secciones) */
#invitacion {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Estado visible tras abrir el sobre */
#invitacion.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mientras se abre el sobre, suavemente se “apaga” un poco */
.sobre.abriendo .sobre-contenido {
  transform: translateY(4px);
  opacity: 0.6;
}

/* Ranura/ventana por donde asoma la carta */
.sobre-carta {
  position: absolute;
  left: 12%;
  right: 12%;

  /* Esta es la clave: la "ventana" solo muestra una franja */
  top: 18%;
  height: 26%;

  z-index: 2;
  overflow: hidden;
  pointer-events: none;

  /* opcional: suaviza el corte */
  border-radius: 10px;
}

/* La carta real (más grande que la ventana) */
.sobre-carta-inner {
  width: 100%;
  height: 200%;                 /* más alta que la ventana */
  border-radius: 12px;
  background: #faf8f2;
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);

  /* Estado inicial: prácticamente escondida */
  transform: translateY(50%);
  opacity: 0;

  transition: transform 0.55s ease, opacity 0.35s ease;
}

/* Al abrir: asoma solo la parte de arriba */
.sobre.abriendo .sobre-carta-inner {
  transform: translateY(15%);
  opacity: 1;
  transition-delay: 0.25s, 0.25s;
}


/* Sello */
.sello {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #f7df9c, #b08b3c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  margin-bottom: 2rem;

  box-shadow:
    0 10px 18px rgba(0,0,0,0.25),
    inset 0 2px 6px rgba(255,255,255,0.35);

}


/* Fecha */
.sobre-fecha {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Hover elegante */
.sobre-contenido:hover {
  transform: translateY(-4px);
  transition: transform 0.3s ease;
}

.oculto {
  display: none;
}

/* =========================
   SECCIÓN 1 — HERO
========================= */

.hero {
  position: relative;
  min-height: 100vh;
  background-color: var(--bg-claro);

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  padding: 3rem 1.5rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;

  background-color: var(--bg-claro); /* 👈 importante */
  background-image: url('../img/hero-anillos.png');
  background-repeat: no-repeat;
  background-position: center 20%;
  background-size: 100%;
  background-blend-mode: multiply;

  opacity: 0.35; /* 👈 aquí está la magia */
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  transform: translate(-50px, -50px); /* 👈 (X,Y) sube el bloque para que se meta sobre el anillo */
  color: var(--texto-acento);
}

.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--texto-acento);
  margin-bottom: 1rem;
}

.hero h1 span {
  font-weight: 400;
  font-size: 0.8em;
}

.fecha {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}

.nota {
  position: relative;
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
  color: var(--texto-principal);
}

.nota::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background-color: var(--texto-acento);
  margin: 0.4rem auto 0;
  opacity: 0.6;
}

/* =========================
   SECCIÓN 2 — HISTORIA
========================= */

.historia {
  background-color: #dfe7c6;
  padding: 4rem 1.5rem;
}

.historia-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.historia h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  letter-spacing: 0.12em;
  text-align: center;
  margin-bottom: 1.5rem;
  color: #6b7354;
}

.historia-texto {
  font-size: 0.95rem;
  margin-bottom: 2rem;
  text-align: center;
}

.historia-imagen img {
  width: 100%;
  border-radius: 6px;
  display: block;
}

/* =========================
   SECCIÓN 3 — NUESTRA BODA
========================= */

.boda {
  padding: 4rem 1.5rem;
}

.boda-wrap {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
}

.boda-info h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  letter-spacing: 0.12em;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--texto-acento);
}

.boda-grid {
  display: grid;
  gap: 1.4rem;
}

.boda-bloque h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  font-weight: 500;
  color: var(--texto-acento);
  margin-bottom: 0.4rem;
}

.boda-bloque p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  color: var(--texto-principal);
}

.boda-botones {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.btn {
  display: inline-block;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  color: #fff;
  background: var(--texto-acento);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.btn-outline {
  background: transparent;
  color: var(--texto-acento);
  border: 1px solid rgba(107,115,84,0.55);
}

.boda-img {
  height: 100%;
}

.boda-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;      /* 👈 clave */
  display: block;
  border-radius: 10px;

  /* 👇 sombra suave */
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.14);
}

/* Desktop */
@media (min-width: 900px) {
  .boda-wrap {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: stretch;
    gap: 3rem;
  }

  .boda-info h2 {
    text-align: left;
  }

  .boda-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.8rem 2.2rem;
  }

  .boda-alojamiento {
    grid-column: 1 / -1;
  }
}

/* =========================
   SECCIÓN 4 — FAQS
========================= */

.faqs {
  padding: 4rem 1.5rem;
  background-color: #dfe7c6;
}

.faqs-wrap {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 2.5rem;
}

.faqs-texto h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  letter-spacing: 0.12em;
  margin-bottom: 1.2rem;
  color: var(--texto-acento);
}

.faqs-intro {
  font-size: 0.95rem;
  margin-bottom: 1.8rem;
}

/* Lista de FAQs */
.faqs-lista {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.faqs-lista details {
  background: rgba(255,255,255,0.65);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  cursor: pointer;
}

.faqs-lista summary {
  list-style: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--texto-acento);
  position: relative;
  padding-right: 1.5rem;
}

/* Quitar triángulo por defecto */
.faqs-lista summary::-webkit-details-marker {
  display: none;
}

/* Icono + / - */
.faqs-lista summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  font-size: 1.1rem;
  line-height: 1;
}

.faqs-lista details[open] summary::after {
  content: "−";
}

.faqs-lista details p {
  margin-top: 0.6rem;
  font-size: 0.9rem;
}

/* Imágenes laterales */
.faqs-imagenes {
  display: grid;
  gap: 1rem;
}

.faqs-img {
  background-color: #dfe7c6;
  max-width: 220px;   /* ajusta aquí */
  margin: 0 auto;
}

.faqs-img img {
  display: block;
  width: 100%;
  height: auto;
  background-color: transparent;

  /* -webkit-mask-image: radial-gradient(
    ellipse at center,
    rgba(0,0,0,1) 65%,
    rgba(0,0,0,0) 100%
  );
  mask-image: radial-gradient(
    ellipse at center,
    rgba(0,0,0,1) 65%,
    rgba(0,0,0,0) 100%
  ); */
}

/* Desktop */
@media (min-width: 900px) {
  .faqs-wrap {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
  }

  .faqs-imagenes {
    gap: 1.4rem;
  }

  .faqs-img-1 {
    filter:
    drop-shadow(0 6px 14px rgba(0,0,0,0.12))
    saturate(0.95);
    transform: translateX(10px);
  }

  .faqs-img-2 {
    mix-blend-mode: multiply;
    opacity: 0.9;
    transform: translate(10px,-10px);
  }
}

/* =========================
   SECCIÓN 5 — IMAGEN EMOCIONAL
========================= */

.imagen-emocional {
  padding: 6rem 1.5rem;
}

.imagen-emocional-wrap {
  max-width: 720px;       /* controla tamaño en desktop */
  margin: 0 auto;         
}

.imagen-emocional-wrap img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;    /* suave, elegante */
}

@media (min-width: 900px) {
  .imagen-emocional-wrap {
    max-width: 600px;
  }
}

/* =========================
   SECCIÓN 6 — FORMULARIO
========================= */

.confirmacion {
  padding: 4rem 1.5rem 5rem;
}

.confirmacion-wrap {
  max-width: 900px;
  margin: 0 auto;
  background: rgba(255,255,255,0.7);
  border-radius: 16px;
  padding: 2.5rem 1.8rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.confirmacion h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  letter-spacing: 0.12em;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--texto-acento);
}

.confirmacion-intro {
  text-align: center;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

#rsvpForm {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.campo {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.campo label,
.campo-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--texto-acento);
}

.campo input[type="text"],
.campo textarea {
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.1);
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
}

.campo textarea {
  border-radius: 12px;
  resize: vertical;
  min-height: 110px;
}

/* Radios */
.opcion,
.opcion-inline {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.opcion {
  margin-top: 0.15rem;
}

.opcion-inline {
  display: inline-flex;
  margin-right: 1.5rem;
}

/* Botón enviar */
.btn-enviar {
  margin-top: 0.8rem;
  width: 100%;
  text-align: center;
  border: none;
  cursor: pointer;
}

.confirmacion-nota {
  margin-top: 1.4rem;
  font-size: 0.85rem;
  text-align: center;
  opacity: 0.8;
}

.confirmacion-mensaje {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  text-align: center;
}

.confirmacion-mensaje.ok {
  color: #4b6b3c; /* verde suave */
}

.confirmacion-mensaje.error {
  color: #8a2c2c; /* rojito suave */
}



/* Desktop */
@media (min-width: 768px) {
  .confirmacion-wrap {
    padding: 3rem 3.2rem;
  }

  .btn-enviar {
    width: auto;
    align-self: center;
    padding-inline: 2.5rem;
  }
}

/* Ocultar/mostrar campo según selección */
.campo-oculto {
  display: none;
}

.campo-visible {
  display: flex; /* porque .campo ya está pensado en columna */
}

/* Mensaje de error bonito y claro */
.error-texto {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: #8a2c2c;
}


/* Desktop: mejorar maquetación del formulario */
@media (min-width: 768px) {
  .confirmacion {
    padding: 6rem 0 6rem;          /* más aire arriba y abajo */
  }

  .confirmacion-wrap {
    max-width: 720px;              /* carta más estrecha */
    padding: 3rem 3rem 3.2rem;     /* más padding interno */
  }

  .confirmacion-intro {
    max-width: 560px;              /* texto de intro más recogido */
    margin: 0 auto 2.4rem;         /* centrado dentro de la tarjeta */
  }

  /* El formulario no se pega a los bordes de la tarjeta */
  #rsvpForm {
    max-width: 560px;
    margin: 0 auto;
    gap: 1.6rem;
  }

  .campo {
    gap: 0.5rem;
  }

  .campo label,
  .campo-label {
    font-size: 0.95rem;
  }

  .campo input[type="text"],
  .campo textarea {
    font-size: 1rem;
  }

  .opcion-inline {
    margin-right: 2rem;
  }

  .btn-enviar {
    margin-top: 1.2rem;
    width: auto;
    align-self: center;
    padding-inline: 3rem;
  }
}

/* =========================
   DESKTOP (a partir de 768px)
========================= */

@media (min-width: 768px) {

  .hero h1 {
    font-size: 3.6rem;
  }

  .historia-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
  }

  .historia h2 {
    grid-column: 1 / -1;
  }

  .historia-texto {
    text-align: left;
    font-size: 1rem;
  }
}
