/* ============================================
   COLORES — cambia estos valores para personalizar
   la paleta de toda la web
   ============================================ */
:root {
  --color-bg: #f4f1e8;       /* fondo crema */
  --color-band: #e6e0d0;     /* franjas secundarias */
  --color-ink: #182624;      /* texto oscuro / botones */
  --color-ink-text: #f4f1e8; /* texto sobre fondo oscuro */
  --color-teal: #2e4a45;     /* texto de cuerpo */
  --color-teal-light: #5f8a82; /* etiquetas / kickers */
  --color-sage: #a3bdb8;     /* degradado / bordes claros */
  --color-border: #d8d0be;   /* líneas divisorias */
  --color-input-border: #cfc6b0; /* bordes de formulario */

  /* Margen lateral: crece con la pantalla, sin saltos bruscos */
  --gutter: clamp(20px, 4vw, 40px);
  --section-y: clamp(48px, 7vw, 70px);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: 'Jost', sans-serif;
  -webkit-text-size-adjust: 100%;
}

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

img { max-width: 100%; }

::selection { background: var(--color-teal-light); color: var(--color-bg); }

input, select, textarea {
  font-family: 'Cormorant Garamond', serif;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--color-teal-light);
}

.page {
  min-height: 100vh;
  min-height: 100dvh; /* evita el salto por la barra del navegador móvil */
  display: flex;
  flex-direction: column;
}

/* ============================================
   NAV
   ============================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(20px, 3.5vw, 48px);
  /* Fondo opaco a propósito: con transparencia + blur el navegador
     dibujaba un rectángulo fantasma duplicado sobre la página. */
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.nav-brand {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(19px, 2vw, 22px);
  color: var(--color-ink);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  padding: 9px clamp(12px, 1.3vw, 18px);
  border-radius: 20px;
  font-size: clamp(12px, 1.05vw, 13px);
  letter-spacing: .05em;
  text-transform: uppercase;
  background: transparent;
  color: var(--color-teal);
  white-space: nowrap;
}

.nav-link.active {
  background: var(--color-ink);
  color: var(--color-ink-text);
}

/* Etiquetas cortas: solo se usan en móvil (ver media query) */
.nav-short { display: none; }

/* ============================================
   BOTONES
   ============================================ */
.btn {
  display: inline-block;
  cursor: pointer;
  padding: 15px clamp(24px, 3.5vw, 40px);
  font-family: 'Jost', sans-serif;
  font-size: clamp(12px, 1.1vw, 13px);
  letter-spacing: .15em;
  text-transform: uppercase;
  border-radius: 2px;
  border: none;
  max-width: 100%;
}

.btn-dark {
  background: var(--color-ink);
  color: var(--color-ink-text);
}

.btn-outline {
  background: transparent;
  color: var(--color-ink-text);
  border: 1px solid var(--color-sage);
}

/* ============================================
   HOME
   ============================================ */
.hero {
  padding: clamp(64px, 9vw, 110px) var(--gutter) clamp(56px, 7.5vw, 90px);
  text-align: center;
  background: linear-gradient(180deg, var(--color-sage), var(--color-bg));
}

.hero-kicker {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(13px, 1.4vw, 14px);
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--color-ink);
  margin-top: 24px;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(44px, 7.5vw, 76px);
  line-height: 1.05;
  color: var(--color-ink);
}

.hero-amp {
  font-size: clamp(22px, 3.4vw, 34px);
  font-style: italic;
  color: var(--color-teal);
}

.hero-sub {
  margin-top: 28px;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(17px, 2vw, 20px);
  letter-spacing: .08em;
  color: var(--color-teal);
}

.hero .btn { margin-top: 38px; }

.section-narrow {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--section-y) var(--gutter);
  text-align: center;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(24px, 3vw, 28px);
  color: var(--color-ink);
  margin-bottom: 18px;
}

.section-body {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(17px, 2vw, 19px);
  line-height: 1.8;
  color: var(--color-teal);
}

.section-body + .section-body {
  margin-top: 18px;
}

/* Read more (Nuestra historia) */
.story-more-wrap {
  position: relative;
  max-height: 70px;
  overflow: hidden;
  margin-top: 18px;
  transition: max-height .4s ease;
}

.story-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60px;
  background: linear-gradient(180deg, rgba(244, 241, 232, 0), var(--color-bg));
  transition: opacity .3s ease;
}

/* Foto que aparece al desplegar "Seguir leyendo" */
.story-photo-wide {
  border-radius: 4px;
  overflow: hidden;
}

.story-photo-wide img {
  display: block;
  width: 100%;
  height: auto;
}

.story-toggle {
  display: inline-block;
  margin-top: 18px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--color-teal-light);
  cursor: pointer;
  padding: 0 0 2px;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-teal-light);
}

/* ============================================
   COLLAGE DE FOTOS + FRASE
   ============================================ */
.story-photos-section {
  padding: 0 var(--gutter) clamp(56px, 8vw, 80px);
  text-align: center;
}

/* Las dos verticales flanquean a la horizontal, centrada, así cada
   foto se ve en su orientación natural.
   `aspect-ratio` hace que TODO el collage escale en proporción: el
   recorte de cada foto es idéntico en cualquier tamaño de pantalla. */
.story-collage {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 1.55fr 1.05fr;
  aspect-ratio: 900 / 360;
  gap: clamp(8px, 1.4vw, 14px);
}

.collage-a { grid-column: 1; }  /* vertical: porche */
.collage-d { grid-column: 3; }  /* vertical: Roma */

/* La horizontal no estira a lo alto: se queda en su proporción,
   centrada entre las dos verticales. */
.collage-c {
  grid-column: 2;
  align-self: center;
  aspect-ratio: 3 / 2;
}

.collage-item {
  overflow: hidden;
  border-radius: 4px;
  background: var(--color-band);
  min-width: 0;   /* imprescindible para que el grid no desborde */
  min-height: 0;
}

.collage-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.2, .6, .2, 1);
}

/* Encuadre por foto: mantiene a la pareja dentro del recorte */
.collage-a img { object-position: center center; }
.collage-c img { object-position: center 46%; }
.collage-d img { object-position: center center; }

.collage-item:hover img { transform: scale(1.045); }

@media (prefers-reduced-motion: reduce) {
  .collage-item img { transition: none; }
  .collage-item:hover img { transform: none; }
}

/* ============================================
   FRANJA DE HORARIOS
   ============================================ */
.band {
  padding: var(--section-y) var(--gutter);
  background: var(--color-band);
}

.quick-grid {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 28px);
  text-align: center;
}

.quick-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 560px;
}

.quick-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(19px, 2.2vw, 22px);
  color: var(--color-ink);
  margin-bottom: 8px;
}

.quick-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(16px, 1.8vw, 17px);
  color: var(--color-teal);
}

.cta-band {
  padding: clamp(56px, 8vw, 80px) var(--gutter);
  text-align: center;
  background: var(--color-ink);
}

.cta-headline {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(21px, 2.8vw, 26px);
  color: var(--color-ink-text);
  margin-bottom: 20px;
}

/* ============================================
   DETALLES Y LOGÍSTICA
   ============================================ */
.details-page {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--section-y) var(--gutter) clamp(72px, 10vw, 100px);
}

.page-header {
  text-align: center;
  margin-bottom: clamp(36px, 5.5vw, 56px);
}

.page-kicker {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(13px, 1.4vw, 14px);
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--color-teal-light);
  margin-bottom: 12px;
}

.page-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(30px, 4.5vw, 40px);
  color: var(--color-ink);
  line-height: 1.15;
}

.details-list {
  display: flex;
  flex-direction: column;
}

.details-row {
  display: flex;
  gap: clamp(16px, 2.8vw, 28px);
  padding: 26px 0;
  border-top: 1px solid var(--color-border);
}

.details-row:last-child {
  border-bottom: 1px solid var(--color-border);
}

.details-label {
  width: clamp(110px, 16vw, 150px);
  flex: none;
  font-family: 'Playfair Display', serif;
  font-size: clamp(18px, 2vw, 19px);
  color: var(--color-ink);
}

.details-desc {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(16px, 1.8vw, 17px);
  line-height: 1.7;
  color: var(--color-teal);
}

.details-cta {
  margin-top: 50px;
  text-align: center;
}

/* ============================================
   CONFIRMAR ASISTENCIA (RSVP)
   ============================================ */
/* Cabecera con foto que se difumina hacia el fondo de la página */
.rsvp-hero {
  position: relative;
  height: clamp(220px, 30vw, 400px);
  overflow: hidden;
}

.rsvp-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.rsvp-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(244, 241, 232, .30) 0%,
    rgba(244, 241, 232, 0) 20%,
    rgba(244, 241, 232, 0) 54%,
    rgba(244, 241, 232, .55) 74%,
    rgba(244, 241, 232, .90) 89%,
    var(--color-bg) 100%
  );
}

.rsvp-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px var(--gutter) clamp(80px, 11vw, 110px);
}

.rsvp-sub {
  margin-top: 14px;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(16px, 1.8vw, 17px);
  color: var(--color-teal);
}

.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.field-label {
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-teal-light);
  margin-bottom: 8px;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--color-input-border);
  border-radius: 4px;
  font-size: 16px; /* 16px evita que iOS haga zoom al enfocar */
  background: #fff;
}

.rsvp-form textarea { resize: vertical; }

.toggle-group {
  display: flex;
  gap: 10px;
}

.toggle-option {
  cursor: pointer;
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 13px 10px;
  border-radius: 4px;
  font-family: 'Jost', sans-serif;
  font-size: clamp(13px, 1.5vw, 14px);
  letter-spacing: .05em;
  background: #fff;
  color: var(--color-teal);
  border: 1px solid var(--color-input-border);
}

.toggle-option.selected {
  background: var(--color-ink);
  color: var(--color-ink-text);
  border-color: var(--color-ink);
}

.rsvp-submit {
  cursor: pointer;
  margin-top: 8px;
  text-align: center;
  padding: 16px;
  background: var(--color-ink);
  color: var(--color-ink-text);
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  letter-spacing: .15em;
  text-transform: uppercase;
  border-radius: 4px;
  border: none;
  width: 100%;
}

.rsvp-submit:disabled {
  opacity: .6;
  cursor: default;
}

.form-error {
  padding: 12px 14px;
  border: 1px solid #b4553f;
  border-radius: 4px;
  background: rgba(180, 85, 63, .07);
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  color: #8e3f2d;
}

.rsvp-confirmation {
  display: none;
  text-align: center;
  padding: clamp(40px, 6vw, 56px) clamp(20px, 3vw, 30px);
  background: var(--color-band);
  border-radius: 6px;
}

.rsvp-confirmation.visible { display: block; }
.rsvp-form.hidden { display: none; }

.confirmation-title {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(22px, 2.8vw, 26px);
  color: var(--color-ink);
  margin-bottom: 12px;
}

.confirmation-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(16px, 1.8vw, 17px);
  color: var(--color-teal);
}

/* ============================================
   CONTACTO
   ============================================ */
.contact-page {
  max-width: 520px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 80px) var(--gutter) clamp(80px, 12vw, 120px);
  text-align: center;
}

.contact-intro {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(17px, 1.9vw, 18px);
  line-height: 1.8;
  color: var(--color-teal);
  margin-bottom: 44px;
}

.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-card {
  padding: 22px;
  background: var(--color-band);
  border-radius: 6px;
}

.contact-name {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  color: var(--color-ink);
  margin-bottom: 4px;
}

.contact-info {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(16px, 1.8vw, 17px);
  color: var(--color-teal);
  overflow-wrap: break-word;
}

/* ============================================
   PIE
   ============================================ */
.footer {
  margin-top: auto;
  padding: 34px var(--gutter);
  text-align: center;
  background: var(--color-band);
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  color: var(--color-teal-light);
}

/* ============================================
   RESPONSIVE
   Casi todo escala solo con clamp(); aquí solo van
   los cambios de ESTRUCTURA.
   ============================================ */

/* Tablet y portátiles pequeños: el menú horizontal ya no cabe
   (las etiquetas en español son largas), así que se apila. */
@media (max-width: 820px) {
  .nav {
    flex-direction: column;
    gap: 12px;
    padding: 16px var(--gutter);
  }
  .nav-links { justify-content: center; }
}

/* Móvil: cambios de estructura */
@media (max-width: 640px) {
  /* Menú compacto: etiquetas cortas para que quepan en una sola fila */
  .nav { gap: 10px; padding: 13px var(--gutter); }
  .nav-links { gap: 4px; }
  .nav-link { padding: 8px 11px; font-size: 11.5px; letter-spacing: .03em; }
  .nav-long { display: none; }
  .nav-short { display: inline; }

  /* Las verticales en pareja arriba, la horizontal a lo ancho debajo */
  .story-collage {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1.19fr 1fr;
    aspect-ratio: 1 / 1.18;
    gap: 10px;
  }
  .collage-a { grid-column: 1; grid-row: 1; }
  .collage-d { grid-column: 2; grid-row: 1; }
  .collage-c {
    grid-column: 1 / 3;
    grid-row: 2;
    align-self: stretch;
    aspect-ratio: auto;
  }

  .quick-grid,
  .quick-grid.cols-2 { grid-template-columns: 1fr; }

  .details-row { flex-direction: column; gap: 8px; }
  .details-label { width: auto; }

  .toggle-group { flex-direction: column; }
}

/* Pantallas muy estrechas */
@media (max-width: 360px) {
  .nav-link { padding: 8px 10px; font-size: 11px; }
  .hero-kicker { letter-spacing: .25em; }
}
