/* =====================================================
   FUENTES
===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital@0;1&display=swap');

@font-face {
  font-family: "Bocklin";
  src: url("./fonts/Bocklin-2E0e.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}


/* =====================================================
   VARIABLES
===================================================== */

:root {
  --paper: #ead3b6;
  --green: #71805b;
  --dark: #596846;
  --blue: #9da9b1;
  --yellow: #e4b86f;
}


/* =====================================================
   BASE
===================================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  color: var(--dark);

  background:
    radial-gradient(
      rgba(89,104,70,.055) .7px,
      transparent .7px
    ),
    var(--paper);

  background-size: 5px 5px;

  font-family:
    "Libre Baskerville",
    Georgia,
    serif;

  line-height: 1.7;
}

main {
  overflow: hidden;
}


/* =====================================================
   SECCIONES
===================================================== */

.hero,
.section,
.closing {
  width: min(920px, calc(100% - 28px));

  min-height: calc(100vh + 1px);
  min-height: calc(100svh + 1px);

  margin: auto;

  padding: 9rem 7vw;

  text-align: center;

  position: relative;
}

.section {
  display: flex;
  flex-direction: column;
  padding: clamp(2.5rem, 7vh, 4.5rem) 7vw clamp(4rem, 8vh, 6rem);
}

.hero {
  display: flex;

  flex-direction: column;

  justify-content: center;

  align-items: center;

  padding: clamp(2.5rem, 7vh, 4.5rem) 7vw;
}


/* =====================================================
   TIPOGRAFÍA
===================================================== */

h1, h2, h3 {
  font-family: "Bocklin", Georgia, serif !important;
  font-weight: 400;
  line-height: .95;
}


/* Título principal */

h1 {
  font-size: clamp(4rem, 13vw, 8rem);

  margin: .2rem 0 1.4rem;
}


/* & */

h1 span {
  display: block;

  font-size: .55em;

  font-style: normal;
}


/* Títulos de secciones */

h2 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);

  margin: .3rem 0 1rem;
}


/* Títulos pequeños */

h3 {
  margin: 0;

  font-size: 1.6rem;
}


/* =====================================================
   TEXTOS
===================================================== */

.eyebrow {
  text-transform: uppercase;

  letter-spacing: .22em;

  font-size: .78rem;

  margin: 0 0 1rem;
}

.venue,
.place {
  text-transform: uppercase;

  letter-spacing: .12em;

  font-size: .75rem;
}

.intro,
.story-copy {
  max-width: 560px;

  margin: 1rem auto 2.5rem;

  font-size: .95rem;
}


/* =====================================================
   ELEMENTOS DECORATIVOS
===================================================== */

.scroll-cue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--dark);
  text-decoration: none;
}

.scroll-cue svg {
  display: block;
  width: 2rem;
  height: 2rem;
  transition: transform .2s ease;
}

.scroll-cue:hover svg {
  transform: translateY(4px);
}

.section-scroll-cue {
  display: flex;
  width: fit-content;
  margin: 2.5rem auto 0;
}

.section > .section-scroll-cue {
  margin: auto auto 0;
  padding-top: 2.5rem;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  margin-top: 2rem;
  color: var(--dark);
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: .9rem;
  text-decoration: none;
  transition: color .2s ease;
}

.back-to-top svg {
  display: block;
  width: 2rem;
  height: 2rem;
  transition: transform .2s ease;
}

.back-to-top:hover {
  color: var(--green);
}

.back-to-top:hover svg {
  transform: translateY(-4px);
}

.back-to-top:focus-visible,
.scroll-cue:focus-visible,
.menu-trigger:focus-visible,
.menu a:focus-visible,
.historia-arrow:focus-visible,
.guest-option:focus-visible,
.button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 5px;
}


/* Los revelados solo se activan desde JavaScript, por lo que el
   contenido permanece visible si el navegador no ejecuta scripts. */
.reveal-pending {
  opacity: 0;
  translate: 0 14px;
  transition:
    opacity 600ms ease,
    translate 600ms cubic-bezier(.22, .61, .36, 1);
}

.reveal-pending.is-revealed {
  opacity: 1;
  translate: 0 0;
  transition-delay: var(--reveal-delay, 0ms);
}


/* =====================================================
   ANTIGUA FOTO / POLAROID
===================================================== */

.childhood-collage {
  max-width: 650px;

  margin: 3rem auto;

  min-height: 330px;
}

.photo {
  width: min(78vw, 520px);

  margin: auto;

  background: #f1dfc3;

  padding: 12px 12px 42px;

  box-shadow:
    0 8px 25px rgba(50,45,30,.14);

  transform: rotate(-2deg);
}

.photo img {
  width: 100%;

  display: block;
}

.photo figcaption {
  font-family:
    "Bocklin",
    Georgia,
    serif;

  font-size: 1.2rem;

  margin-top: 8px;
}


/* =====================================================
   CARRUSEL — NUESTRA HISTORIA
===================================================== */

.historia {
  overflow: hidden;
}

.historia-carousel {
  position: relative;

  width: 100%;

  margin-top: 45px;
}


/* Ventana */

.historia-carousel-window {
  width: 100%;

  overflow: hidden;

  position: relative;
}


/* Fila horizontal */

.historia-carousel-track {
  display: flex;

  flex-direction: row;

  gap: 35px;

  overflow-x: auto;

  overflow-y: hidden;

  scroll-behavior: smooth;

  scroll-snap-type: x mandatory;

  padding: 15px 50px 35px;

  scrollbar-width: none;

  -webkit-overflow-scrolling: touch;

  cursor: grab;
}

.historia-carousel-track::-webkit-scrollbar {
  display: none;
}

.historia-carousel-track:active {
  cursor: grabbing;
}


/* Cada tarjeta */

.historia-card {
  flex: 0 0 300px;

  width: 300px;

  scroll-snap-align: center;

  text-align: center;
}


/* Marco de la foto */

.historia-card-photo {
  width: 270px;

  height: 270px;

  margin: 0 auto;

  padding: 10px;

  background: #f7f2e8;

  border: 1px solid rgba(48,70,52,.28);

  box-shadow:
    0 8px 22px rgba(40,55,40,.13);

  display: flex;

  align-items: center;

  justify-content: center;

  transition:
    transform .3s ease,
    box-shadow .3s ease;
}

.historia-card:hover .historia-card-photo {
  transform: translateY(-5px);

  box-shadow:
    0 14px 28px rgba(40,55,40,.18);
}


/* Foto */

.historia-card-photo img {
  width: 100%;

  height: 100%;

  object-fit: contain;

  display: block;
}


/* Texto */

.historia-card-info {
  margin-top: 20px;

  padding: 0 8px;
}

.historia-card-year {
  display: block;

  font-family:
    "Libre Baskerville",
    Georgia,
    serif;

  font-size: .7rem;

  letter-spacing: .18em;

  text-transform: uppercase;

  color: #71806b;

  margin-bottom: 7px;
}

.historia-card-info p {
  margin: 0;

  font-size: .88rem;

  line-height: 1.65;

  color: #60685d;
}


/* =====================================================
   FLECHAS DEL CARRUSEL
===================================================== */

.historia-arrow {
  position: absolute;

  top: 135px;

  z-index: 10;

  width: 44px;

  height: 44px;

  border-radius: 50%;

  border: 1px solid rgba(48,70,52,.3);

  background: #f5f0e5;

  color: #304634;

  font-size: 1.25rem;

  display: flex;

  align-items: center;

  justify-content: center;

  cursor: pointer;

  box-shadow:
    0 4px 12px rgba(40,55,40,.12);

  transition:
    transform .2s ease,
    background .2s ease;
}

.historia-arrow:hover {
  transform: scale(1.08);

  background: #ebe5d7;
}

.historia-arrow-left {
  left: 5px;
}

.historia-arrow-right {
  right: 5px;
}


/* =====================================================
   PUNTITOS
===================================================== */

.historia-dots {
  display: flex;

  justify-content: center;

  align-items: center;

  gap: 7px;

  margin-top: 5px;
}

.historia-dot {
  width: 7px;

  height: 7px;

  border-radius: 50%;

  background: #c7cec1;

  transition:
    width .25s ease,
    background .25s ease;
}

.historia-dot.active {
  width: 22px;

  border-radius: 10px;

  background: #5d7059;
}


/* =====================================================
   BOTONES
===================================================== */

.button {
  display: inline-block;

  border: 1px solid var(--green);

  background: var(--green);

  color: #f8ead3;

  border-radius: 999px;

  padding: .75rem 1.6rem;

  text-decoration: none;

  font: inherit;

  cursor: pointer;
}

.place-directions {
  position: relative;
  display: block;
  width: fit-content;
  margin: 0 auto;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 94%, var(--dark));
  color: var(--green);
}

.place-directions::before {
  position: absolute;
  inset: .35rem;
  border: 1px solid rgba(89, 104, 70, .2);
  border-radius: 999px;
  content: "";
  pointer-events: none;
}

.place-ornament {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  margin: 0 auto;
}

.place-ornament--mirrored {
  transform: scaleY(-1);
  margin: 0 auto;
  margin-bottom: clamp(-2.5rem, -6vw, -1rem);
}

.place-ornament--mirrored + .place-map {
  margin-top: .0625rem;
}

.place-map + .place-ornament {
  margin-top: clamp(-2.5rem, -6vw, -1rem);
}


/* =====================================================
   TIMELINE
===================================================== */

.timeline {
  --timeline-image-width: clamp(210px, 32vw, 310px);
  --timeline-event-overlap: clamp(66px, calc(6vw + 12px), 92px);
  --timeline-shift: clamp(-24px, -2vw, -10px);

  display: grid;
  grid-template-columns: var(--timeline-image-width) 215px;
  align-items: stretch;
  justify-content: center;
  gap: clamp(.5rem, 2vw, 1.25rem);
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 3rem;
  text-align: left;
  position: relative;
  left: var(--timeline-shift);
}

.timeline-botanical {
  display: block;
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: auto;
  align-self: start;
}

.timeline-events {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  min-width: 0;
  min-height: 100%;
  margin: 0 0 0 calc(-1 * var(--timeline-event-overlap));
  width: calc(100% + var(--timeline-event-overlap));
  padding: 0;
  list-style: none;
}

.timeline-event {
  position: absolute;
  top: var(--twig-y);
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: minmax(4.1rem, auto) minmax(0, 1fr);
  align-items: center;
  column-gap: .55rem;
  transform: translateY(-50%);
  line-height: 1.35;
}

.timeline-event time {
  font-family:
    "Bocklin",
    Georgia,
    serif;
  font-size: clamp(1.15rem, 2.3vw, 1.5rem);
  font-weight: normal;
}

.timeline-event span {
  font-family: inherit;
  color: var(--dark);
  font-size: 1rem;
}

/* Ajustes de ritmo vertical para la sección «El día». */
#dia > h2 {
  margin-bottom: .15rem;
}

#dia > .timeline {
  margin-bottom: .25rem;
}

#dia > .section-scroll-cue {
  margin: .15rem auto 0;
  padding-top: 0;
}

.place-map {
  width: min(80%, 480px);
  aspect-ratio: 16 / 9;
  margin: 2rem auto;
  margin-bottom: .5rem;
  overflow: hidden;
  border: 1px solid rgba(89, 104, 70, .3);
  box-shadow: 0 8px 22px rgba(40, 55, 40, .13);
}

.place-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (min-width: 701px) {
  #lugar > h2 {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
  }

  #lugar .place-map {
    width: min(80%, 30vh);
    margin: .125rem auto;
    margin-bottom: .125rem;
  }
}


/* =====================================================
   FORMULARIO
===================================================== */

form,
#rsvp-search {
  max-width: 620px;

  margin: 2rem auto;

  text-align: left;
}

.rsvp-search-group {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
}

.rsvp-search-group > h2 {
  width: fit-content;
  max-width: 100%;
  margin-right: auto;
  margin-bottom: .2rem;
  margin-left: auto;
}

.rsvp-search-group #rsvp-search {
  width: 100%;
  max-width: none;
  margin: .4rem auto .5rem;
}

.rsvp-search-group #rsvp-search > label {
  text-align: center;
}

.guest-search-field {
  position: relative;
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 94%, var(--dark));
}

.guest-search-field::before {
  position: absolute;
  inset: .35rem;
  border: 1px solid rgba(89, 104, 70, .2);
  border-radius: 999px;
  content: "";
  pointer-events: none;
}

#guest-search {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--green);
}

#guest-search::placeholder {
  color: var(--green);
  opacity: .82;
}

label,
legend {
  display: block;

  font-family:
    "Bocklin",
    Georgia,
    serif;

  font-weight: normal;

  font-size: 1.2rem;

  margin: 1.2rem 0 .4rem;
}

input:not([type="radio"]),
textarea,
select {
  width: 100%;

  border:
    1px solid rgba(89,104,70,.45);

  background:
    rgba(250,235,210,.35);

  color: var(--dark);

  padding: .85rem 1rem;

  border-radius: 2px;

  font: inherit;
}

input[type="radio"] {
  width: auto;
  accent-color: var(--green);
}

fieldset {
  border: 0;

  padding: 0;

  margin: 1.5rem 0;
}

fieldset label {
  font-family:
    "Libre Baskerville",
    Georgia,
    serif;

  font-size: .9rem;

  font-weight: 400;
}

.guest-results {
  display: grid;
  justify-items: start;

  gap: .5rem;

  margin-top: .8rem;
}

#guest-results .guest-option {
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  overflow-wrap: anywhere;
}

.guest-option {
  border:
    1px solid rgba(89,104,70,.35);

  background:
    rgba(250,235,210,.45);

  color: var(--dark);

  padding: .75rem 1rem;

  text-align: left;

  cursor: pointer;

  font: inherit;
}

#group-rsvp-container {
  max-width: 620px;
  margin: .5rem auto 2rem;
}

#rsvp-search-message {
  min-height: 0;
  margin: 0;
}

#group-rsvp-container > .rsvp-status {
  margin: 0 0 .75rem;
}

.guest-rsvp-card {
  border: 1px solid rgba(89, 104, 70, .24);
  border-radius: 12px;
  background: rgba(250, 235, 210, .28);
  padding: 1.25rem 1.25rem .8rem;
}

.saved-response-prompt {
  margin: .75rem 0 .5rem;
}

.saved-response-prompt p {
  margin: 0 0 .75rem;
}

.saved-response-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem .6rem;
}

.saved-response-actions .guest-option {
  position: relative;
  width: auto;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 94%, var(--dark));
  color: var(--green);
  transition: background-color .2s ease, color .2s ease;
}

.saved-response-actions .guest-option::before,
.guest-rsvp-editor > .button::before {
  position: absolute;
  inset: .35rem;
  border: 1px solid rgba(89, 104, 70, .2);
  border-radius: 999px;
  content: "";
  pointer-events: none;
}

.guest-rsvp-editor > .button {
  position: relative;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 94%, var(--dark));
  color: var(--green);
  transition: background-color .2s ease, color .2s ease;
}

.saved-response-actions .guest-option:hover,
.saved-response-actions .guest-option:active,
.guest-rsvp-editor > .button:hover,
.guest-rsvp-editor > .button:active {
  background: color-mix(in srgb, var(--paper) 90%, var(--dark));
  color: var(--green);
}

.guest-rsvp-editor[hidden] {
  display: none;
}

.guest-rsvp-card h3 {
  margin-top: 0;
}

.guest-rsvp-card > .rsvp-status {
  min-height: 0;
  margin: 0;
}

.guest-rsvp-card button:disabled {
  cursor: wait;
  opacity: .7;
}

.rsvp-status {
  min-height: 1.5em;
  font-size: .9rem;
}

[hidden] {
  display: none !important;
}


/* =====================================================
   INFORMACIÓN
===================================================== */

.info-list {
  max-width: 700px;

  margin: 3rem auto;
}

.info-list article {
  border-top:
    1px solid rgba(89,104,70,.35);

  padding: 1rem 0;
}

.info-list h3 {
  margin: 0;
}

.info-list p {
  margin: 0;

  font-size: .85rem;
}

.calendar-options h3 {
  margin-bottom: .35rem;
}

.calendar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
  margin-top: 1rem;
}

.calendar-actions .button {
  max-width: 100%;
  text-align: center;
}


/* =====================================================
   CIERRE
===================================================== */

.closing {
  display: flex;

  flex-direction: column;

  justify-content: flex-start;

  align-items: center;

  padding-top: clamp(2.5rem, 7vh, 4.5rem);
  padding-bottom: clamp(3rem, 7vh, 5rem);
}

.closing > .back-to-top {
  margin-top: 1rem;
}

.countdown-ornament {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.countdown-ornament-frame {
  display: grid;
  width: 100%;
  aspect-ratio: 1500 / 360;
  place-items: center;
  overflow: hidden;
}

.countdown-ornament-frame--top .countdown-ornament {
  transform: scaleY(-1);
}

.countdown-content {
  display: grid;
  width: 100%;
  place-items: center;
}

.closing-signoff {
  margin-top: auto;
}

.wedding-countdown {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: center;
  align-items: center;
  justify-items: center;
  gap: clamp(.15rem, .6vh, .4rem);
  width: min(100%, 700px);
  min-height: 0;
  margin: clamp(1rem, 4vh, 2rem) auto clamp(1.25rem, 4vh, 2rem);
  padding: .3rem clamp(.65rem, 2vw, 1rem);
  border-radius: 12px;
  background: color-mix(in srgb, var(--paper) 94%, var(--dark));
  text-align: center;
}

.wedding-countdown::before {
  position: absolute;
  inset: .45rem;
  border: 1px solid rgba(89, 104, 70, .2);
  border-radius: 8px;
  content: "";
  pointer-events: none;
}

.countdown-intro {
  margin: 0 0 1.5rem;
  color: var(--dark);
  font-size: clamp(.88rem, 2vw, 1rem);
  font-style: italic;
}

.countdown-values {
  display: grid;
  width: min(100%, 560px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  gap: clamp(.15rem, .6vw, .5rem);
  padding-inline: clamp(0rem, 1vw, .75rem);
}

.countdown-unit {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
}

.countdown-number {
  color: var(--green);
  font-family: "Bocklin", Georgia, serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.countdown-label {
  color: var(--dark);
  font-size: clamp(.55rem, 1.5vw, .68rem);
  letter-spacing: .12em;
}

.countdown-today {
  margin: 0;
  color: var(--green);
  font-family: "Bocklin", Georgia, serif;
  font-size: clamp(1.7rem, 5vw, 2.5rem);
  line-height: 1.2;
}

.countdown-values[hidden],
.countdown-today[hidden] {
  display: none;
}

.closing-couple {
  margin: .6rem 0 .3rem;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
}

.closing-date {
  margin: 0 0 1rem;
  letter-spacing: .12em;
  font-size: .9rem;
}

@media (max-width: 380px) {
  .countdown-values {
    gap: .2rem;
  }

  .countdown-number {
    font-size: clamp(1.75rem, 8vw, 2.2rem);
  }

  .countdown-label {
    font-size: .52rem;
    letter-spacing: .02em;
  }
}


/* =====================================================
   MENÚ
===================================================== */

.menu-trigger {
  position: fixed;

  z-index: 20;

  top: 18px;

  left: 18px;

  display: grid;
  place-items: center;

  width: 44px;
  height: 44px;

  padding: 0;

  border: 0;

  background: transparent;

  color: var(--dark);

  cursor: pointer;
}

.menu-icon {
  width: 24px;
  height: 24px;
}

.menu {
  position: fixed;

  z-index: 19;

  top: 52px;

  left: 18px;

  width: 220px;

  padding: 1.2rem;

  background: var(--green);

  border: 1px solid var(--paper);

  box-shadow:
    0 12px 35px rgba(50,45,30,.15);

  display: none;
}

.menu.is-open {
  display: grid;
}

.menu a {
  color: var(--paper);

  text-decoration: none;

  padding: .55rem .2rem;

  font-family:
    "Libre Baskerville",
    Georgia,
    serif;

  font-size: 1.2rem;

  transition: background-color .2s ease;
}

.menu a:hover,
.menu a:active,
.menu a:focus-visible {
  background: var(--dark);
}

.menu a:focus-visible {
  outline-color: var(--paper);
}


/* =====================================================
   MÓVIL
===================================================== */

@media (max-width: 700px) {

  .hero,
  .section,
  .closing {
    padding-left: 8vw;

    padding-right: 8vw;
  }


  .hero {
    padding-top: 5rem;
  }


  .photo {
    width: 88vw;
  }


  .timeline {
    --timeline-image-width: clamp(220px, 58vw, 270px);
    --timeline-event-overlap: clamp(82px, calc(12vw + 32px), 110px);
    --timeline-shift: clamp(-82px, calc(-8vw - 24px), -54px);
    grid-template-columns: var(--timeline-image-width) minmax(0, 1fr);
    width: min(100%, 480px);
    gap: .35rem;
    margin-top: 0;
  }

  .timeline-event {
    grid-template-columns: 3.35rem minmax(0, 1fr);
    column-gap: .35rem;
  }

  .timeline-event time {
    font-size: clamp(1rem, 4.3vw, 1.25rem);
  }

  .timeline-event span {
    font-size: clamp(.82rem, 3.5vw, .95rem);
    line-height: 1.3;
  }


  /* Carrusel */

  .historia-carousel {
    margin-top: 35px;
  }


  .historia-carousel-track {
    gap: 20px;

    padding-left: 40px;

    padding-right: 40px;
  }


  .historia-card {
    flex: 0 0 245px;

    width: 245px;
  }


  .historia-card-photo {
    width: 215px;

    height: 215px;

    padding: 8px;
  }


  .historia-card-info p {
    font-size: .82rem;
  }


  .historia-arrow {
    width: 36px;

    height: 36px;

    top: 108px;

    font-size: 1rem;
  }


  .historia-arrow-left {
    left: 2px;
  }


  .historia-arrow-right {
    right: 2px;
  }


}


/* =====================================================
   MÓVILES MUY PEQUEÑOS
===================================================== */

@media (max-width: 480px) {

  .hero,
  .section,
  .closing {
    padding-left: 8vw;

    padding-right: 8vw;
  }


  h1 {
    font-size: clamp(3.5rem, 16vw, 5rem);
  }


  h2 {
    font-size: clamp(2.2rem, 10vw, 3.5rem);
  }


  .photo {
    width: 88vw;
  }

}


/* Historia: carousel styles moved here from index.html */
/* =====================================================
   CARRUSEL — NUESTRA HISTORIA
   Todo el estilo está aquí para no tener que modificar
   style.css
===================================================== */

.historia-carousel {
  position: relative;
  width: 100%;
  margin-top: 32px;
}


/* Ventana del carrusel */

.historia-carousel-window {
  width: 100%;
  overflow: hidden;
  position: relative;
}


/* Fila horizontal */

.historia-carousel-track {
  display: flex;
  flex-direction: row;
  gap: 35px;

  overflow-x: auto;
  overflow-y: hidden;

  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;

  padding: 15px 50px 12px;

  scrollbar-width: none;

  -webkit-overflow-scrolling: touch;

  cursor: grab;
}

.historia-carousel-track::-webkit-scrollbar {
  display: none;
}

.historia-carousel-track:active {
  cursor: grabbing;
}


/* Cada tarjeta */

.historia-card {
  flex: 0 0 300px;
  width: 300px;

  scroll-snap-align: center;

  text-align: center;
}


/* Marco de la foto */

.historia-card-photo {
  width: 270px;
  height: 270px;

  margin: 0 auto;

  padding: 10px;

  background: #f7f2e8;

  border: 1px solid rgba(48, 70, 52, 0.28);

  box-shadow:
    0 8px 22px rgba(40, 55, 40, 0.13);

  display: flex;
  align-items: center;
  justify-content: center;

  box-sizing: border-box;

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}


.historia-card:hover .historia-card-photo {
  transform: translateY(-5px);

  box-shadow:
    0 14px 28px rgba(40, 55, 40, 0.18);
}


/* Imagen */

.historia-card-photo img {
  width: 100%;
  height: 100%;

  object-fit: contain;

  display: block;
}


/* Texto */

.historia-card-info {
  margin-top: 12px;

  padding: 0 8px;
}


.historia-card-year {
  display: block;

  font-family: "Libre Baskerville", serif;

  font-size: 0.65rem;

  letter-spacing: 0.18em;

  text-transform: uppercase;

  color: #71806b;

  margin-bottom: 3px;
}


.historia-card-info h4 {
  max-width: 100%;
  margin: 0;

  font-family: "Bocklin", Georgia, serif;

  font-size: 1rem;

  font-weight: 400;

  color: #304634;

  line-height: 1.25;

  overflow-wrap: anywhere;
}


.historia-card-info p {
  margin: 0;

  font-size: 0.78rem;

  line-height: 1.4;

  color: #60685d;

  overflow-wrap: anywhere;
}


/* =====================================================
   FLECHAS
===================================================== */

.historia-arrow {
  position: absolute;

  top: 135px;

  z-index: 10;

  width: 32px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;

  color: #304634;

  font-size: 1.25rem;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;

  transition:
    transform 0.2s ease;
}

.historia-arrow:hover {
  transform: scale(1.12);
  background: transparent;
  box-shadow: none;
}

.historia-arrow svg {
  display: block;
  width: 18px;
  height: 18px;
}


.historia-arrow-left {
  left: -40px;
}


.historia-arrow-right {
  right: -40px;
}


/* =====================================================
   INDICADORES
===================================================== */

.historia-dots {
  display: flex;

  justify-content: center;

  align-items: center;

  gap: 7px;

  margin-top: 2px;
}


.historia-dot {
  appearance: none;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;

  border-radius: 50%;

  background: #c7cec1;

  transition:
    width 0.25s ease,
    background 0.25s ease;
}


.historia-dot.active {
  width: 22px;

  border-radius: 10px;

  background: #5d7059;
}

.historia-dot:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}


.historia > .section-scroll-cue {
  margin: auto auto 0;
  padding-top: 1.5rem;
}


/* =====================================================
   MÓVIL
===================================================== */

@media (max-width: 700px) {

  .historia-carousel {
    margin-top: 24px;
  }

  .historia-carousel-track {
    gap: 20px;

    padding-left: 40px;
    padding-right: 40px;
  }

  .historia-card {
    flex: 0 0 245px;
    width: 245px;
  }

  .historia-card-photo {
    width: 215px;
    height: 215px;

    padding: 8px;
  }

  .historia-card-info h4 {
    font-size: 0.95rem;
  }

  .historia-card-info p {
    font-size: 0.75rem;
  }

  .historia-arrow {
    top: 108px;

    font-size: 1rem;
  }


  .historia-arrow-left {
    left: -40px;
  }


  .historia-arrow-right {
    right: -40px;
  }

}


/* =================================
   ENTRADA DE LOS CISNES
   ================================= */

.hero {
  position: relative;
  overflow: hidden;
}

.hero-title-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  width: calc(100% + 14vw + 40px);
  max-width: 1100px;
  margin-top: auto;
}

.hero-title-layout h1 {
  grid-column: 2;
  width: max-content;
  max-width: 100%;
  margin: .2rem 0 1.4rem;
  font-size: clamp(2.2rem, 10vw, 7rem);
}

.hero > .scroll-cue {
  margin-top: auto;
}

.swan {
  display: block;
  width: min(100%, 220px);
  aspect-ratio: 565 / 781;
  pointer-events: none;
  background-color: var(--dark);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  opacity: 0;

  animation-duration: 5s;
  animation-timing-function: cubic-bezier(.22, .75, .25, 1);
  animation-fill-mode: forwards;
}

/* Cisne que entra desde la izquierda */
.swan-left {
  grid-column: 1;
  justify-self: end;
  -webkit-mask-image: url("./images/cisne-izquierdo.png");
  mask-image: url("./images/cisne-izquierdo.png");
  animation-name: swan-enter-left;
}

/* Cisne que entra desde la derecha */
.swan-right {
  grid-column: 3;
  justify-self: start;
  -webkit-mask-image: url("./images/cisne-derecho.png");
  mask-image: url("./images/cisne-derecho.png");
  animation-name: swan-enter-right;
}

@keyframes swan-enter-left {
  0% {
    opacity: 0;
    transform: translateY(33%) translateX(-100%);
  }

  15% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    transform: translateY(33%) translateX(0);
  }
}

@keyframes swan-enter-right {
  0% {
    opacity: 0;
    transform: translateY(33%) translateX(100%);
  }

  15% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    transform: translateY(33%) translateX(0);
  }
}

@media (max-width: 700px) {
  .hero-title-layout {
    width: calc(100% + 40px);
  }

  .hero-title-layout h1 {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .swan {
    width: 100%;
  }
}


/* =====================================================
   INFORMACIÓN ÚTIL · FILAS INTERACTIVAS Y DIÁLOGOS
===================================================== */

.info-list {
  width: min(700px, 100%);
  margin: clamp(1.5rem, 4vh, 2.5rem) auto;
  text-align: left;
}

.info-list article {
  padding: 0;
  border-top: 1px solid rgba(89, 104, 70, .35);
}

.info-list article:last-child {
  border-bottom: 1px solid rgba(89, 104, 70, .35);
}

.info-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-height: 76px;
  padding: .85rem .5rem .85rem .15rem;
  border: 0;
  background: transparent;
  color: var(--dark);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background-color .2s ease, padding .2s ease;
}

.info-trigger:hover,
.info-trigger:active {
  padding-left: .75rem;
  background: rgba(113, 128, 91, .08);
}

.info-trigger:focus-visible,
.info-dialog-close:focus-visible,
.dialog-button:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 4px;
}

.info-trigger-copy {
  display: grid;
  gap: .08rem;
}

.info-trigger-title {
  font-family: "Bocklin", Georgia, serif;
  font-size: 1.45rem;
  line-height: 1.15;
}

.info-trigger-description {
  font-size: .78rem;
  line-height: 1.5;
}

.info-trigger-mark {
  flex: 0 0 auto;
  color: var(--green);
  font-family: Georgia, serif;
  font-size: 1.25rem;
  transition: transform .2s ease;
}

.info-trigger:hover .info-trigger-mark,
.info-trigger:focus-visible .info-trigger-mark {
  transform: rotate(45deg);
}

.info-dialog {
  width: min(560px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - max(32px, env(safe-area-inset-top)) - max(32px, env(safe-area-inset-bottom)));
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(234, 211, 182, .5);
  border-radius: 3px;
  background: var(--green);
  color: var(--paper);
  box-shadow: 0 24px 80px rgba(26, 34, 24, .3);
  opacity: 0;
  transform: translateY(9px) scale(.99);
  transition: opacity .18s ease, transform .18s ease;
}

.info-dialog[open] {
  display: flex;
  flex-direction: column;
}

.info-dialog[open].is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.info-dialog::backdrop {
  background: rgba(30, 37, 27, .64);
  backdrop-filter: blur(2px);
  transition: background-color .18s ease;
}

.info-dialog-panel {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  max-height: inherit;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  overflow: hidden;
  text-align: center;
}

.info-dialog-panel::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(234, 211, 182, .2);
  pointer-events: none;
}

.info-dialog-close {
  position: absolute;
  z-index: 1;
  top: 13px;
  right: 15px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(234, 211, 182, .35);
  border-radius: 50%;
  background: transparent;
  color: var(--paper);
  font: 300 1.8rem/1 Georgia, serif;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}

.info-dialog-close:hover {
  transform: rotate(90deg);
  background: rgba(234, 211, 182, .12);
}

.info-dialog-panel > h2 {
  flex: 0 0 auto;
  margin: 0 2rem .65rem;
  color: var(--paper);
  font-size: clamp(2.1rem, 6vw, 3rem);
  line-height: 1;
}

.info-dialog-content {
  position: relative;
  z-index: 0;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: .9rem .25rem .2rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(234, 211, 182, .5) transparent;
  scrollbar-width: thin;
  font-size: .88rem;
  line-height: 1.75;
  text-align: left;
}

.info-dialog-content p {
  margin: .35rem 0 0;
}

.info-dialog-label {
  display: block;
  margin-bottom: .35rem;
  color: rgba(234, 211, 182, .72);
  font-size: .61rem;
  letter-spacing: .17em;
  line-height: 1.4;
  text-transform: uppercase;
}

.lodging-placeholder {
  padding: 1rem;
  border: 1px solid rgba(234, 211, 182, .3);
  background: rgba(234, 211, 182, .055);
}

.dialog-button {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .65rem .9rem;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 94%, var(--dark));
  color: var(--green);
  font-size: .76rem;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  transition: color .2s ease, background-color .2s ease;
}

.dialog-button::before {
  position: absolute;
  inset: .35rem;
  border: 1px solid rgba(89, 104, 70, .2);
  border-radius: 999px;
  content: "";
  pointer-events: none;
}

.dialog-button:hover {
  background: color-mix(in srgb, var(--paper) 90%, var(--dark));
  color: var(--green);
}

.transport-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: .45rem;
}

.dialog-lead {
  margin: 0 0 1rem !important;
  color: var(--paper);
  font-size: .95rem;
  line-height: 1.65;
  text-align: center;
}

.lodging-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .7rem;
}

.lodging-message {
  max-width: 440px;
  margin: 0 auto !important;
  font-size: .9rem;
  line-height: 1.8;
  text-align: center;
}

.lodging-recommendations {
  align-self: center;
}

.transport-intro,
.transport-outro {
  margin: 0 !important;
  color: var(--paper);
  line-height: 1.6;
  text-align: center;
}

.transport-intro {
  font-size: .9rem;
}

.transport-outro {
  font-size: .78rem;
  font-style: italic;
}

.transport-block {
  padding: .5rem .1rem .55rem;
  border-top: 1px solid rgba(234, 211, 182, .28);
}

.transport-heading {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: 0;
  color: var(--paper);
  font-family: "Bocklin", Georgia, serif;
  font-size: 1.22rem;
  font-weight: 400;
  line-height: 1.2;
}

.transport-icon {
  display: block;
  flex: 0 0 1.15rem;
  width: 1.15rem;
  height: 1.15rem;
  color: var(--paper);
}

.transport-list {
  margin: .3rem 0 0;
  padding-left: 1.35rem;
  color: rgba(234, 211, 182, .96);
  font-size: .78rem;
  line-height: 1.6;
  text-align: left;
}

.transport-list li + li {
  margin-top: .12rem;
}

.transport-list li::marker {
  color: rgba(234, 211, 182, .7);
}

.transport-location {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  margin: 0 !important;
  padding: .55rem .1rem 0;
  border-top: 1px solid rgba(234, 211, 182, .28);
  color: var(--paper);
  font-size: .78rem;
  line-height: 1.55;
  text-align: left;
}

.transport-content > .dialog-button {
  align-self: center;
  margin: .1rem auto 0;
}

.gift-panel {
  min-height: 350px;
}

.dress-panel {
  min-height: 430px;
}

.dress-content,
.gift-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.gift-ornament {
  color: rgba(234, 211, 182, .78);
  font-size: 2.2rem;
  line-height: 1;
}

.gift-message {
  max-width: 360px;
  margin: .7rem auto !important;
  color: var(--paper);
  font-family: "Libre Baskerville", serif;
  font-size: .9rem;
  line-height: 1.8;
  text-align: center;
}

.gift-iban-row {
  display: flex;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin: .15rem auto 0;
}

.gift-iban {
  color: var(--paper);
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(.72rem, 3.3vw, .86rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: .025em;
  white-space: nowrap;
}

.gift-copy-button {
  display: grid;
  width: 44px;
  min-height: 44px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: .68rem;
  cursor: pointer;
  transition: color .2s ease;
}

.gift-copy-button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.gift-copy-button:hover {
  color: #fff8ed;
}

.gift-copy-button:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

.gift-copy-status {
  min-height: 1em;
  color: var(--paper);
  font-size: .7rem;
  line-height: 1;
}

.dress-panel > h2 {
  margin-bottom: .35rem;
}

.dress-category {
  flex: 0 0 auto;
  width: 100%;
  padding: .55rem .25rem .6rem;
  text-align: center;
}

.dress-category + .dress-category {
  border-top: 1px solid rgba(234, 211, 182, .28);
}

.dress-category h3 {
  margin: 0;
  color: var(--paper);
  font-family: "Bocklin", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.2;
}

.dress-category p {
  max-width: 430px;
  margin: .2rem auto 0;
  color: rgba(234, 211, 182, .94);
  font-size: .78rem;
  line-height: 1.55;
  text-align: center;
}

.calendar-dialog {
  width: min(620px, calc(100vw - 40px));
}

.calendar-dialog-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: .35rem;
}

.calendar-event-details {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .3rem .8rem;
  margin: 0 auto .9rem;
  color: rgba(234, 211, 182, .82);
  font-size: .7rem;
  line-height: 1.5;
  text-align: center;
}

.calendar-event-details span + span::before {
  content: "·";
  margin-right: .8rem;
  color: var(--yellow);
}

.calendar-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  margin-top: .15rem;
}

.calendar-actions .dialog-button {
  min-height: 52px;
}

.calendar-actions .dialog-button-outline {
  border-radius: 999px;
}

@media (max-width: 600px) {
  .info-trigger {
    min-height: 78px;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .info-trigger-title {
    font-size: 1.3rem;
  }

  .info-dialog {
    width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - max(20px, env(safe-area-inset-top)) - max(20px, env(safe-area-inset-bottom)));
  }

  .info-dialog-panel {
    padding: 1.6rem 1.25rem 1.35rem;
  }

  .info-dialog-panel::before {
    inset: 7px;
  }

  .info-dialog-close {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
  }

  .info-dialog-panel > h2 {
    font-size: clamp(1.9rem, 9vw, 2.5rem);
  }

  .info-dialog-content {
    padding-top: .65rem;
    font-size: .83rem;
  }

  .dress-panel {
    min-height: 0;
  }

  .dress-panel .info-dialog-content {
    padding-top: .35rem;
  }

  .dress-category {
    padding: .4rem .15rem .45rem;
  }

  .dress-category h3 {
    font-size: 1.15rem;
  }

  .dress-category p {
    font-size: .77rem;
    line-height: 1.5;
  }

  .lodging-placeholder {
    padding: .8rem;
  }

  .transport-content {
    gap: .35rem;
  }

  .transport-block {
    padding: .4rem .05rem .45rem;
  }

  .transport-heading {
    font-size: 1.16rem;
  }

  .transport-list {
    font-size: .76rem;
    line-height: 1.55;
  }

  .calendar-dialog {
    width: calc(100vw - 32px);
  }

  .calendar-actions {
    grid-template-columns: 1fr;
    gap: .55rem;
  }

  .calendar-actions .dialog-button {
    min-height: 46px;
  }

  .calendar-event-details {
    gap: .15rem;
    margin-bottom: .65rem;
    font-size: .66rem;
  }

  .calendar-event-details span {
    flex-basis: 100%;
  }

  .calendar-event-details span + span::before {
    content: "";
    margin: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .info-dialog,
  .info-dialog::backdrop,
  .info-trigger,
  .info-trigger-mark,
  .info-dialog-close,
  .dialog-button {
    transition-duration: .01ms;
  }
}

.photo img,
.historia-card-photo img {
  filter: grayscale(100%);
}

@media (prefers-reduced-motion: reduce) {
  html,
  .historia-carousel-track {
    scroll-behavior: auto;
  }

  .hero > :not(.hero-title-layout),
  .hero-title-layout,
  .swan {
    animation: none;
  }

  .hero > :not(.hero-title-layout),
  .hero-title-layout {
    opacity: 1;
    transform: none;
  }

  .swan {
    opacity: 1;
    transform: translateY(33%) translateX(0);
  }

  .reveal-pending,
  .reveal-pending.is-revealed {
    opacity: 1;
    translate: none;
    transition: none;
  }

  .scroll-cue svg,
  .back-to-top svg,
  .historia-card-photo,
  .historia-arrow,
  .historia-dot {
    transition: none;
  }

  .scroll-cue:hover svg,
  .back-to-top:hover svg,
  .historia-card:hover .historia-card-photo,
  .historia-arrow:hover {
    transform: none;
  }
}
