/* Johan & Mónica — invitación de boda
   Mobile-first. Not designed for desktop use: on wide viewports the mobile
   card is centered on a soft backdrop instead of stretching full-width. */

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

html,
body {
  margin: 0;
  padding: 0;
  background: #e7dfd0;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
}

a {
  color: #5f7d5b;
  text-decoration: none;
}
a:hover {
  color: #3e5546;
}

/* Desktop / wide-viewport fallback: center the phone-width card on a calm
   backdrop rather than stretching the layout — this experience is designed
   for mobile only. */
.site-frame {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  justify-content: center;
  background: #e7dfd0;
}

.site-card {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  background: #fbf7f0;
  color: #2f3a33;
  font-family: Karla, system-ui, sans-serif;
  overflow-x: clip;
  position: relative;
}

@media (min-width: 620px) {
  .site-frame {
    padding: 32px 16px;
    align-items: center;
  }
  .site-card {
    min-height: unset;
    border-radius: 22px;
    box-shadow: 0 30px 70px rgba(47, 58, 51, 0.22);
    overflow: clip;
  }
}

/* Gate shown instead of the invitation on real desktops/laptops (wide
   viewport + a mouse-precision pointer). A wide phone or tablet held in
   landscape still has a coarse/touch pointer, so it keeps seeing the
   invitation — only an actual computer gets the "open it on your phone"
   message. Pure CSS so it applies before anything paints. */
.mobile-gate {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px;
  text-align: center;
  background: #fbf7f0;
  color: #2f3a33;
  font-family: Karla, system-ui, sans-serif;
}

.mobile-gate-kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #9c9483;
}

.mobile-gate-title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: 38px;
  line-height: 1.15;
}

.mobile-gate-title span {
  font-style: italic;
  font-size: 26px;
  color: #a8b795;
}

.mobile-gate-divider {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-gate-divider span {
  width: 34px;
  height: 1px;
  background: #d9cfbe;
}

.mobile-gate-message {
  margin: 0;
  max-width: 300px;
  font-size: 14px;
  line-height: 1.7;
  color: #6f6a5d;
}

@media (min-width: 620px) and (pointer: fine) {
  .site-frame {
    display: none;
  }
  .mobile-gate {
    display: flex;
  }
}

/* City gate — shown on load until the guest types the city assigned to
   their family group. Sits above the whole card (fixed, full-viewport) and
   is hidden by JS once a valid city is entered (or already saved). */
.city-gate {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px;
  text-align: center;
  background: #fbf7f0;
  color: #2f3a33;
  font-family: Karla, system-ui, sans-serif;
}

.city-gate-kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #9c9483;
}

.city-gate-title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: 30px;
  line-height: 1.25;
}

.city-gate-message {
  margin: 0;
  max-width: 280px;
  font-size: 13px;
  line-height: 1.7;
  color: #6f6a5d;
}

.city-gate-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 280px;
  margin-top: 6px;
}

.city-gate-input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 999px;
  border: 1.5px solid #d9cfbe;
  background: #fff;
  font-size: 14px;
  color: #2f3a33;
  text-align: center;
}

.city-gate-input:focus-visible {
  outline: 2px solid #7e9a76;
  outline-offset: 2px;
}

.city-gate-button {
  width: 100%;
  padding: 14px 16px;
  border-radius: 999px;
  border: none;
  background: #3f5a42;
  color: #f7f4ec;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
}

.city-gate-button:hover,
.city-gate-button:focus-visible {
  background: #334b36;
}

.city-gate-error {
  margin: 0;
  font-size: 12px;
  color: #b06a5f;
}

/* Dress code lightbox — full-viewport reference image overlay opened from
   the "Código de vestuario" carousel card, closed via backdrop, button, or Esc. */
.lightbox {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 210;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(47, 58, 51, 0.72);
}

.lightbox-content {
  position: relative;
  max-width: 420px;
  width: 100%;
  max-height: 86vh;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.lightbox-img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 86vh;
  object-fit: contain;
  background: #fbf7f0;
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(251, 247, 240, 0.92);
  color: #2f3a33;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-carousel] {
  scrollbar-width: none;
}
[data-carousel]::-webkit-scrollbar {
  display: none;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(7px);
  }
}

@keyframes sway {
  0%,
  100% {
    transform: rotate(-2.5deg);
  }
  50% {
    transform: rotate(2.5deg);
  }
}

/* Clips + fades the drifting aurora so it dissolves into the page background
   well before the section ends, instead of cutting hard into section 2.
   Sits on a non-animating wrapper so the mask stays put while the aurora
   drifts inside it. */
.opening-aurora-mask {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 33%, transparent 88%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 33%, transparent 88%);
}

/* Constantly-drifting aurora glow behind the opening section — deliberately
   noticeable but blurred/desaturated enough to stay in the background. */
.opening-aurora {
  position: absolute;
  inset: -12% -20%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.75;
  filter: blur(40px);
  background: radial-gradient(
      42% 34% at 20% 20%,
      rgba(126, 154, 118, 0.85),
      transparent 70%
    ),
    radial-gradient(48% 40% at 76% 16%, rgba(214, 160, 154, 0.9), transparent 70%),
    radial-gradient(46% 38% at 55% 34%, rgba(168, 183, 149, 0.75), transparent 70%),
    radial-gradient(40% 34% at 26% 68%, rgba(159, 194, 178, 0.65), transparent 70%),
    radial-gradient(38% 32% at 82% 66%, rgba(210, 165, 168, 0.7), transparent 70%);
  background-repeat: no-repeat;
  animation: auroraDrift 2.4s linear infinite;
  will-change: transform;
}

/* City gate variant: the aurora is the only visual on this full-screen
   modal (no next section to dissolve into), so skip the bottom fade. Kept
   subtler than a first pass that read as too intense against the form. */
.opening-aurora-mask--gate {
  -webkit-mask-image: none;
  mask-image: none;
}

.opening-aurora--strong {
  opacity: 0.6;
  filter: blur(46px) saturate(1.05);
}

@keyframes auroraDrift {
  0% {
    transform: translate3d(-12%, -9%, 0) rotate(0deg) scale(1.08);
  }
  12.5% {
    transform: translate3d(10%, -10%, 0) rotate(6deg) scale(1.16);
  }
  25% {
    transform: translate3d(13%, -2%, 0) rotate(11deg) scale(1.24);
  }
  37.5% {
    transform: translate3d(9%, 8%, 0) rotate(15deg) scale(1.3);
  }
  50% {
    transform: translate3d(-2%, 11%, 0) rotate(8deg) scale(1.22);
  }
  62.5% {
    transform: translate3d(-11%, 8%, 0) rotate(-6deg) scale(1.16);
  }
  75% {
    transform: translate3d(-13%, -1%, 0) rotate(-12deg) scale(1.26);
  }
  87.5% {
    transform: translate3d(-6%, -9%, 0) rotate(-6deg) scale(1.14);
  }
  100% {
    transform: translate3d(-12%, -9%, 0) rotate(0deg) scale(1.08);
  }
}

/* Interactive states that the design expressed as inline "style-hover" —
   promoted to real CSS so :hover / :focus-visible work everywhere. */
.cta-link:hover,
.cta-link:focus-visible {
  background: #334b36 !important;
}

button {
  font: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #7e9a76;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
