:root {
  color-scheme: dark;
  --ink: #050913;
  --ink-soft: #0a1220;
  --blue: #0d2950;
  --blue-light: #315e91;
  --paper: #f2efe7;
  --muted: #9ca8b9;
  --gold: #d1aa64;
  --line: rgba(209, 170, 100, 0.34);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 72% 12%, rgba(28, 75, 128, 0.3), transparent 28rem),
    linear-gradient(155deg, #081120 0%, var(--ink) 42%, #02050a 100%);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.75'/%3E%3C/svg%3E");
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-content: center;
  min-height: 100svh;
  padding: max(2rem, env(safe-area-inset-top)) 1.5rem max(2rem, env(safe-area-inset-bottom));
  text-align: center;
  background:
    linear-gradient(180deg, rgba(2, 7, 15, 0.24), rgba(2, 7, 15, 0.93)),
    url("assets/marc-30.jpg") center 24% / cover no-repeat;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.intro::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(209, 170, 100, 0.16);
  margin: 0.75rem;
  pointer-events: none;
}

.intro.is-open {
  opacity: 0;
  visibility: hidden;
}

.intro__halo {
  position: absolute;
  inset: auto 50% 12%;
  width: min(88vw, 36rem);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(12, 32, 58, 0.74);
  filter: blur(55px);
  pointer-events: none;
}

.intro > *:not(.intro__halo) {
  position: relative;
}

.eyebrow {
  margin: 0 0 1.2rem;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  line-height: 1.4;
  text-transform: uppercase;
}

.intro h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.08em;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(5rem, 25vw, 10rem);
  font-weight: 400;
  letter-spacing: -0.08em;
  line-height: 0.78;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.75);
}

.intro__number {
  color: transparent;
  font-style: italic;
  -webkit-text-stroke: 1px var(--gold);
}

.intro__theme {
  margin: 1.65rem 0 2.25rem;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 4vw, 1.45rem);
  font-style: italic;
  letter-spacing: 0.035em;
}

.open-invitation {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  min-height: 3.5rem;
  padding: 0.9rem 1.55rem;
  border: 1px solid var(--gold);
  border-radius: 0;
  background: rgba(5, 9, 19, 0.72);
  color: var(--paper);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.25s ease, color 0.25s ease;
}

.open-invitation:hover,
.open-invitation:focus-visible {
  background: var(--gold);
  color: var(--ink);
  outline: none;
}

.sound-note {
  margin: 0.85rem 0 0;
  color: rgba(242, 239, 231, 0.64);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.invitation {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease 0.3s, visibility 0.9s ease 0.3s;
}

.invitation.is-visible {
  opacity: 1;
  visibility: visible;
}

.film {
  display: grid;
  align-content: center;
  padding: max(2rem, env(safe-area-inset-top)) 1.5rem 2rem;
}

.film__topline {
  display: flex;
  justify-content: space-between;
  width: min(100%, 48rem, 64svh);
  margin: 0 auto 0.8rem;
  color: var(--muted);
  font-size: 0.67rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.film__frame {
  position: relative;
  width: min(100%, 48rem, 64svh);
  margin: 0 auto;
  border: 1px solid var(--line);
  background: #000;
  box-shadow: 0 2rem 6rem rgba(0, 0, 0, 0.68);
}

.film__frame::before,
.film__frame::after {
  content: "";
  position: absolute;
  z-index: 1;
  width: 2rem;
  height: 2rem;
  pointer-events: none;
}

.film__frame::before {
  top: -0.45rem;
  left: -0.45rem;
  border-top: 1px solid var(--gold);
  border-left: 1px solid var(--gold);
}

.film__frame::after {
  right: -0.45rem;
  bottom: -0.45rem;
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}

video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #000;
  object-fit: contain;
}

.skip-film {
  justify-self: center;
  margin-top: 1.35rem;
  padding: 0.65rem;
  border: 0;
  border-bottom: 1px solid rgba(242, 239, 231, 0.5);
  background: transparent;
  color: rgba(242, 239, 231, 0.72);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.film__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 1.5rem;
  margin-top: 1.5rem;
}

.film__actions .skip-film { margin-top: 0; }
.rsvp-button {
  min-height: 3.1rem;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--gold);
  border-radius: 0;
  background: var(--gold);
  color: var(--ink);
  font: 600 0.95rem/1.4 var(--sans);
  cursor: pointer;
}
.rsvp-button:hover { background: #e2bc78; }
.rsvp-button:focus-visible, .rsvp-close:focus-visible, .rsvp-retry:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 4px;
}
.rsvp-button:disabled { opacity: 0.5; cursor: wait; }
.rsvp-button--details { margin-top: 2rem; width: 100%; }
.rsvp-button--secondary { background: transparent; color: var(--paper); }
.rsvp-button--secondary:hover { background: #253044; }
.rsvp-dialog {
  width: min(30rem, calc(100% - 2rem));
  max-height: calc(100svh - 2rem);
  padding: 3.5rem 1.5rem 1.5rem;
  border: 1px solid var(--gold);
  background: var(--ink-soft);
  color: var(--paper);
  overflow-y: auto;
}
.rsvp-dialog::backdrop { background: rgba(0, 3, 10, 0.85); }
.rsvp-dialog h2 { margin: 0 0 1.5rem; font: 400 2.5rem/1.1 var(--serif); }
.rsvp-close {
  position: absolute;
  top: 0.25rem;
  right: 0.4rem;
  padding: 0 0.75rem;
  height: 2.75rem;
  border: 0;
  background: transparent;
  color: var(--paper);
  font-size: 0.875rem;
  cursor: pointer;
}
.rsvp-dialog label { display: block; margin-bottom: 0.5rem; }
.rsvp-name-field + .rsvp-name-field { margin-top: 1rem; }
.rsvp-dialog input {
  width: 100%;
  padding: 0.85rem;
  border: 1px solid #71809a;
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
}
.rsvp-dialog input:focus { outline: 2px solid var(--gold); outline-offset: 2px; }
.rsvp-hint { color: #b5becc; font-size: 0.875rem; line-height: 1.5; }
.rsvp-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 1.5rem; }
.rsvp-message { margin: 1.25rem 0; color: var(--paper); }
.rsvp-message:empty { display: none; }
.rsvp-retry { padding: 0.7rem; background: transparent; color: var(--gold); border: 1px solid var(--gold); cursor: pointer; }

.details {
  display: grid;
  min-height: 100svh;
  background: #060b14;
}

.details__portrait-wrap {
  position: relative;
  min-height: 72svh;
}

.portrait {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
}

.portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 54%, #060b14 100%);
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 28%;
  filter: saturate(0.82) contrast(1.06);
}

.portrait figcaption {
  position: absolute;
  z-index: 1;
  right: 1rem;
  bottom: 1rem;
  color: rgba(242, 239, 231, 0.6);
  font-size: 0.63rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.details__content {
  grid-row: 1;
  align-self: center;
  max-width: 42rem;
  padding: 1.75rem 1.4rem 5rem;
}

.details h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.7rem, 12vw, 5rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.details__lead {
  max-width: 34rem;
  margin: 2rem 0 2.5rem;
  color: #c9ced6;
  font-family: var(--serif);
  font-size: clamp(1.08rem, 4vw, 1.35rem);
  line-height: 1.55;
}

.details__name {
  margin-bottom: 1rem;
}

.details__name + .details__lead {
  margin-top: 0;
}

.facts {
  margin: 0;
  border-top: 1px solid var(--line);
}

.facts__item {
  display: grid;
  grid-template-columns: 6.4rem 1fr;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.facts dt {
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.facts dd {
  margin: 0;
  color: var(--paper);
  font-size: 1rem;
  line-height: 1.5;
}

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

.detail-action {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 0.5rem;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--paper);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.detail-action:hover { background: rgba(209, 170, 100, 0.12); }
.detail-action:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 4px;
}

.closing {
  margin: 3.5rem 0 0;
  color: #c9ced6;
  font-family: var(--serif);
  font-size: 1.08rem;
  font-style: italic;
}

.signature {
  margin: 1.3rem 0 0;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 2.5rem;
  font-style: italic;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1rem max(1.25rem, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(209, 170, 100, 0.16);
  color: #737d8b;
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

@media (min-width: 800px) {
  .intro h1 {
    font-size: clamp(8rem, 15vw, 13rem);
  }

  .film {
    padding-inline: 3rem;
  }

  .details {
    grid-template-columns: minmax(20rem, 0.9fr) minmax(28rem, 1.1fr);
  }

  .details__portrait-wrap {
    min-height: 100svh;
  }

  .portrait {
    position: sticky;
    top: 0;
    height: 100svh;
  }

  .portrait::after {
    background: linear-gradient(90deg, transparent 66%, #060b14 100%);
  }

  .details__content {
    grid-row: auto;
    align-self: start;
    padding: 3rem clamp(3rem, 5vw, 6rem);
  }

  .details h2 {
    font-size: clamp(2.3rem, 4.8vw, 5rem);
  }

  .facts__item {
    grid-template-columns: 8rem 1fr;
  }

  footer {
    padding-inline: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .intro,
  .invitation,
  .open-invitation {
    transition: none;
  }
}
