:root {
  --backdrop-color: #0e0d0c;
  --ivory: #f8f3ec;
  --ivory-soft: rgba(248, 243, 236, 0.9);
  --ivory-muted: rgba(248, 243, 236, 0.75);
  --ivory-hairline: rgba(248, 243, 236, 0.22);
}

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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--backdrop-color);
  color: var(--ivory);
  font-family: "Cormorant Garamond", Georgia, serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Full-Bleed Black & White Film Stage */
.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background-color: var(--backdrop-color);
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Keeps both Marnicq & Marie gracefully framed across desktop and mobile */
  object-position: 50% 30%;
  filter: grayscale(100%) contrast(1.09) brightness(0.72);
  transform: scale(1.015);
}

.grade-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 78% 62% at 50% 50%, rgba(12, 11, 10, 0.14) 0%, rgba(10, 9, 9, 0.68) 100%),
    linear-gradient(180deg, rgba(12, 11, 10, 0.34) 0%, rgba(12, 11, 10, 0.16) 50%, rgba(10, 9, 9, 0.56) 100%);
  pointer-events: none;
}

/* Smooth Curtain Across Video Loop Boundary */
.loop-veil {
  position: absolute;
  inset: 0;
  background-color: var(--backdrop-color);
  opacity: 0;
  transition: opacity 1.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.loop-veil.is-fading {
  opacity: 0.92;
}

/* Subtle Analog Film Grain */
.film-grain {
  position: absolute;
  inset: 0;
  opacity: 0.045;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Delicate Editorial Stationery Border */
.stationery-border {
  position: fixed;
  inset: clamp(14px, 2.6vmin, 28px);
  border: 1px solid var(--ivory-hairline);
  pointer-events: none;
  z-index: 1;
}

/* Centered Invitation Composition */
.invitation {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(2rem, 6vw, 4.5rem);
}

.invitation-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 960px;
  text-shadow:
    0 2px 28px rgba(0, 0, 0, 0.55),
    0 1px 6px rgba(0, 0, 0, 0.35);
}

/* "Marie & Marnicq" in Pinyon Script (matching the Canva invitation calligraphy) */
.names {
  font-family: "Pinyon Script", "Snell Roundhand", cursive;
  font-weight: 400;
  font-size: clamp(3.75rem, 8.6vw, 7.25rem);
  line-height: 1.08;
  color: var(--ivory);
  letter-spacing: 0.01em;
  margin-bottom: clamp(1.25rem, 3vh, 2.1rem);
  opacity: 0;
  transform: translateY(14px);
  animation: revealUp 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

.name-amp {
  display: inline-block;
  font-size: 0.74em;
  margin: 0 0.18em;
  opacity: 0.92;
  vertical-align: 0.04em;
}

/* "May 2027" & "Puglia" in Cormorant Garamond with Oldstyle Numerals */
.details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.45rem, 1.1vh, 0.75rem);
  opacity: 0;
  transform: translateY(12px);
  animation: revealUp 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.45s forwards;
}

.date,
.location {
  font-family: "Cormorant Garamond", "Cormorant SC", Georgia, serif;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--ivory-soft);
  font-variant-numeric: oldstyle-nums;
  font-feature-settings: "onum" 1;
}

.date {
  font-size: clamp(1.05rem, 1.85vw, 1.42rem);
  letter-spacing: 0.3em;
  padding-left: 0.3em;
}

.location {
  font-size: clamp(0.98rem, 1.65vw, 1.28rem);
  letter-spacing: 0.36em;
  padding-left: 0.36em;
}

/* Subtle Stationery Rule */
.divider {
  display: block;
  width: 38px;
  height: 1px;
  background-color: rgba(248, 243, 236, 0.42);
  margin: clamp(1.35rem, 3.2vh, 2.1rem) 0 clamp(1.1rem, 2.6vh, 1.65rem);
  opacity: 0;
  animation: fadeIn 1.6s ease 0.75s forwards;
}

/* "more info coming soon" */
.soon {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.02rem, 1.6vw, 1.26rem);
  letter-spacing: 0.11em;
  padding-left: 0.11em;
  color: var(--ivory-muted);
  opacity: 0;
  transform: translateY(8px);
  animation: revealUp 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.9s forwards;
}

/* Mobile Portrait Layout: Stack "Marie / & / Marnicq" like the invitation */
@media (max-width: 640px) {
  .bg-video {
    object-position: 48% 28%;
  }

  .names {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: clamp(3.9rem, 16vw, 5.2rem);
    line-height: 0.96;
    gap: 0.04em;
  }

  .name-amp {
    font-size: 0.52em;
    margin: 0.08em 0 0.02em;
  }
}

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .names,
  .details,
  .divider,
  .soon {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
