@font-face {
  font-family: 'TAN Angleton';
  src: url('assets/font/tan-angleton/tan-angleton.woff2') format('woff2'),
    url('assets/font/tan-angleton/32aac839ec8704951d812018c43e298d.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Snell Roundhand';
  src: url('assets/font/snell-roundhand/snell-roundhand.woff2') format('woff2'),
    url('assets/font/snell-roundhand/f8deb3c1a029ec56b15bb462c1518f07.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  background-color: #F3F0E7;
  color: #661d11;
  overflow-x: clip;
}

/* ---------------------------------------------------------
   Sobre / Overlay de apertura
   --------------------------------------------------------- */
#envelope-overlay {
  opacity: 1;
  background-color: #736b46;
  background-image: linear-gradient(rgba(56, 89, 38, 0.18), rgba(56, 89, 38, 0.18)), url('assets/poster.webp');
  background-size: cover;
  background-position: center;
}

#envelope-overlay.is-closing {
  opacity: 0;
  pointer-events: none;
}

#envelope-overlay.is-hidden {
  display: none;
}

.scroll-indicator {
  position: fixed;
  top: 94%;
  left: 90%;
  transform: translate(-50%, -50%);
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(243, 240, 231, 0.95) 0%, rgba(243, 240, 231, 0.8) 38%, rgba(243, 240, 231, 0.3) 72%, rgba(243, 240, 231, 0) 100%);
  box-shadow: 0 0 0 1px rgba(102, 29, 17, 0.08), 0 12px 28px rgba(102, 29, 17, 0.16);
  opacity: 0;
  visibility: hidden;
  transition: opacity 250ms ease, visibility 250ms ease, transform 250ms ease;
  pointer-events: none;
}

.scroll-indicator img {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(102, 29, 17, 0.18));
}

@media (min-width: 640px) {
  .scroll-indicator {
    width: 7rem;
    height: 7rem;
  }

  .scroll-indicator img {
    width: 5rem;
    height: 5rem;
  }
}

.scroll-indicator.is-visible {
  opacity: 1;
  visibility: visible;
}

.scroll-indicator.is-hidden {
  opacity: 0;
  visibility: hidden;
}

#envelope-overlay.is-playing #envelope-label {
  opacity: 0;
}

#envelope-label {
  animation: pulse-fade 1.5s ease-in-out infinite;
}

@keyframes pulse-fade {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

/* ---------------------------------------------------------
   Columna central / fondo de franjas
   --------------------------------------------------------- */
.invitation {
  width: 100%;
  max-width: 40rem;
  min-height: 100svh;
  margin-left: auto;
  margin-right: auto;
  overflow: visible;
  background-color: #f4f0e6;
  background-image: url('assets/franjas.png');
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% 100%;
}

.hero-container {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: 0 1.35rem 0;
}

.hero-copy {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.45rem;
  min-height: 0;
  padding-top: 8.15rem;
  padding-bottom: 0.5rem;
  padding-left: 1.1rem;
  padding-right: 1.1rem;
}

.hero-kicker,
.hero-date,
.hero-venue,
.hero-calendar-btn,
.hero-name,
.calendar-modal__title,
.calendar-modal__btn,
.calendar-modal__close {
  font-family: 'TAN Angleton', serif;
}

.hero-script,
.hero-ampersand {
  font-family: 'Snell Roundhand', cursive;
}

.hero-kicker {
  margin: 0;
  font-size: clamp(1.05rem, 4.4vw, 1.55rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.15;
}

.hero-script {
  margin: 0.35rem 0 0;
  font-size: clamp(1.35rem, 5.4vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.hero-names {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  line-height: 0.98;
}

.hero-name {
  font-size: clamp(2.45rem, 11vw, 4.35rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-ampersand {
  display: block;
  margin: 0.28rem 0 0.38rem;
  font-size: clamp(1.55rem, 6.4vw, 2.35rem);
  line-height: 1;
}

.hero-when {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-date {
  margin: 0;
  font-size: clamp(0.92rem, 3.6vw, 1.18rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.45;
}

.hero-venue {
  margin: 0.4rem 0 0;
  font-size: clamp(0.72rem, 2.85vw, 1rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.45;
}

.hero-calendar-btn {
  margin-top: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: clamp(0.68rem, 2.7vw, 0.82rem);
  box-shadow: 0 1px 0 rgba(102, 29, 17, 0.12);
}

.hero-palace {
  width: calc(100% + 2.7rem);
  margin-left: -1.35rem;
  margin-right: -1.35rem;
  margin-top: 0;
  padding-bottom: 0;
  flex: 0 0 auto;
}

.hero-palace-img {
  display: block;
  width: 100%;
  height: auto;
}

.site-credit {
  position: absolute;
  right: 1.05rem;
  bottom: 0.45rem;
  z-index: 4;
  margin: 0;
  font-family: 'Snell Roundhand', cursive;
  font-size: 0.58rem;
  line-height: 1;
  color: #661d11;
  opacity: 0.7;
  pointer-events: none;
}

/* ---------------------------------------------------------
   Flores: brisa sutil
   --------------------------------------------------------- */
.flor {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  height: auto;
  will-change: transform;
}

.flor--izq {
  top: 0;
  left: -22%;
  width: min(78%, 23.5rem);
  transform-origin: 18% 22%;
  animation: breeze-left 4.5s ease-in-out infinite;
}

.flor--der {
  top: 0.4%;
  right: -20%;
  width: min(72%, 21rem);
  transform-origin: 82% 18%;
  animation: breeze-right 5.4s ease-in-out infinite;
}

@media (min-width: 900px) {
  .flor--izq {
    left: -2.5rem;
    width: 23.5rem;
  }

  .flor--der {
    right: -1.75rem;
    width: 21rem;
  }
}

@keyframes breeze-left {
  0%,
  100% {
    transform: rotate(0deg) translate3d(0, 0, 0);
  }

  40% {
    transform: rotate(1.15deg) translate3d(0.35%, 0.6%, 0);
  }

  70% {
    transform: rotate(-0.55deg) translate3d(-0.2%, 0.25%, 0);
  }
}

@keyframes breeze-right {
  0%,
  100% {
    transform: rotate(0deg) translate3d(0, 0, 0);
  }

  35% {
    transform: rotate(-1.05deg) translate3d(-0.3%, 0.5%, 0);
  }

  68% {
    transform: rotate(0.65deg) translate3d(0.18%, 0.2%, 0);
  }
}

/* ---------------------------------------------------------
   Modal de calendario
   --------------------------------------------------------- */
.calendar-modal {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.calendar-modal[hidden] {
  display: none;
}

.calendar-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(47, 28, 18, 0.38);
}

.calendar-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 22.5rem);
  padding: 1.85rem 1.5rem 1.35rem;
  text-align: center;
  color: #661d11;
  background-color: #f6f2e8;
  border: 1px solid rgba(102, 29, 17, 0.28);
  border-radius: 1.15rem;
  box-shadow: 0 18px 40px rgba(47, 28, 18, 0.2);
}

.calendar-modal__title {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.3;
}

.calendar-modal__lead {
  margin: 0.55rem 0 1.35rem;
  font-family: 'Snell Roundhand', cursive;
  font-size: 1.2rem;
}

.calendar-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.calendar-modal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: #661d11;
  color: #F3F0E7;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  text-decoration: none;
  transition: opacity 250ms ease;
}

.calendar-modal__btn:hover {
  opacity: 0.82;
}

.calendar-modal__close {
  margin-top: 1rem;
  background: transparent;
  border: 0;
  color: #661d11;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.68rem;
  opacity: 0.7;
  cursor: pointer;
}

.calendar-modal__close:hover {
  opacity: 1;
}

body.modal-open {
  overflow: hidden;
}

/* ---------------------------------------------------------
   Accesibilidad
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {

  #envelope-label,
  .flor {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}

#envelope-overlay:focus-visible,
#music-toggle:focus-visible,
#calendar-open:focus-visible,
.calendar-modal__btn:focus-visible,
.calendar-modal__close:focus-visible,
.calendar-modal__panel:focus-visible {
  outline: 2px solid #661d11;
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 639px) {
  html,
  body {
    height: 100svh;
    max-height: 100svh;
    overflow: hidden;
  }

  .invitation,
  .hero-container {
    height: 100svh;
    max-height: 100svh;
    min-height: 100svh;
    overflow: hidden;
  }

  .hero-kicker {
    font-size: 0.92rem;
  }

  .hero-script {
    margin-top: 0.22rem;
    font-size: 1.12rem;
  }

  .hero-name {
    font-size: 2.05rem;
  }

  .hero-ampersand {
    margin: 0.16rem 0 0.2rem;
    font-size: 1.28rem;
  }

  .hero-date {
    font-size: 0.78rem;
  }

  .hero-venue {
    margin-top: 0.28rem;
    font-size: 0.64rem;
  }

  .hero-calendar-btn {
    font-size: 0.6rem;
    padding: 0.48rem 1.15rem;
  }

  .hero-palace-img {
    max-height: 30svh;
    width: auto;
    max-width: 100%;
    height: auto;
    margin-inline: auto;
  }
}

@media (min-width: 640px) {
  .invitation,
  .hero-container {
    min-height: 100vh;
  }

  .hero-container {
    padding-left: 1.75rem;
    padding-right: 1.75rem;
  }

  .hero-copy {
    gap: 2.25rem;
    padding-top: 8.5rem;
    padding-bottom: 1.1rem;
  }

  .hero-palace {
    width: calc(100% + 3.5rem);
    margin-left: -1.75rem;
    margin-right: -1.75rem;
    margin-top: 0;
  }
}
