@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;1,400&display=swap");

/* =====================
   ACCESS SCREEN
   ===================== */
.access-screen {
  font-family: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  padding: 24px;
  box-sizing: border-box;
  width: 100%;
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 800ms ease, transform 800ms ease;
}

.access-screen.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.access-screen[hidden],
#wedding-invitation[hidden] {
  display: none !important;
}

/* =====================
   INVITATION FADE IN
   ===================== */
#wedding-invitation {
  opacity: 1;
  transition: opacity 1400ms ease;
}

#wedding-invitation.invitation-enter {
  opacity: 0;
}

#wedding-invitation.invitation-enter-active {
  opacity: 1;
}

.access-screen.is-fading {
  opacity: 0;
  transform: translateY(0);
}

/* =====================
   LANGUAGE ENTRY CARD
   ===================== */
.language-entry-card {
  width: min(360px, 100%);
  box-sizing: border-box;
  padding: 16px;
  text-align: center;
  background: rgba(245, 240, 230, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(212, 165, 116, 0.35);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.language-entry-actions {
  display: grid;
  gap: 12px;
  margin-top: 0;
}

.language-entry-button {
  display: block;
  width: 100%;
  padding: 14px 18px;
  border: 1px solid rgba(75, 56, 47, 0.24);
  border-radius: 999px;
  background: rgba(75, 56, 47, 0.96);
  color: #f5f2ed;
  cursor: pointer;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.84rem;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.language-entry-button:hover {
  background: #5d463b;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(16, 42, 36, 0.14);
}

.language-entry-button:focus-visible {
  outline: 2px solid rgba(75, 56, 47, 0.35);
  outline-offset: 3px;
}

.language-entry-button:disabled {
  cursor: wait;
  opacity: 0.84;
}

.access-screen.is-opening .language-entry-card {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 300ms ease, transform 300ms ease;
}

.access-screen.is-fading .language-entry-card {
  opacity: 0;
  transform: translateY(0);
}

/* =====================
   REDUCED MOTION
   ===================== */
@media (prefers-reduced-motion: reduce) {
  .access-screen,
  #wedding-invitation {
    transition: none;
  }

  .access-screen {
    animation: none;
  }

  #video-overlay {
    transition: none;
  }
}

@media (max-width: 480px) {
  .access-screen {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .language-entry-card {
    width: min(360px, 100%);
    padding: 14px;
  }

  .language-entry-button {
    padding: 13px 16px;
  }
}

/* =====================
   VIDEO BACKGROUND / UNLOCK OVERLAY
   ===================== */
#video-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #f5f2ed;
  pointer-events: none;
  transition: opacity 700ms ease;
}

#video-overlay[hidden] {
  display: none !important;
}

#video-overlay.is-playing {
  z-index: 1000;
  pointer-events: auto;
}

#video-overlay.is-fading-out {
  opacity: 0;
  z-index: 1000;
  pointer-events: none;
}

#unlock-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: #f5f2ed;
  opacity: 0;
  filter: blur(8px);
  transform: scale(1.015);
  transition: opacity 700ms ease, filter 700ms ease, transform 700ms ease;
  will-change: opacity, filter, transform;
}

#unlock-video.is-ready {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}

@media (max-width: 768px) {
  #unlock-video {
    object-fit: cover;
  }
}

@media (prefers-reduced-motion: reduce) {
  #unlock-video {
    opacity: 1;
    filter: none;
    transform: none;
    transition: none;
  }
}
