@font-face {
  font-family: Newsreader;
  src: url("fonts/newsreader-roman-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@property --wipe-width {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

@property --wipe-height {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

:root {
  color-scheme: dark;
  --black: #000;
  --ivory: #fcf7f2;
  --muted: #655f5a;
  --rule: #d2c9c0;
  --edge: clamp(1.4rem, 6vw, 7rem);
  --serif: Newsreader, Georgia, serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.23, 1, .32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--black); color: var(--ivory); font-family: var(--sans); }
body:has(dialog[open]) { overflow: hidden; }
h1, h2, p, figure, dl, dd, fieldset { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: .88; }
a { color: inherit; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
[tabindex="-1"]:focus { outline: none; }

.eyebrow {
  font-size: .6875rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.editorial-copy {
  max-width: 26ch;
  font-family: var(--serif);
  font-size: clamp(1.24rem, 2.15vw, 1.65rem);
  line-height: 1.37;
}

.button {
  min-height: 3rem;
  width: fit-content;
  padding: .75rem 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.8rem;
  border: 1px solid transparent;
  color: inherit;
  text-decoration: none;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .12em;
  line-height: 1.35;
  text-transform: uppercase;
  transition: background-color .2s, color .2s, border-color .2s;
}

.button span, .text-link span { font-size: 1.1rem; line-height: 1; }
.button--light { background: var(--ivory); color: var(--black); }
.button--dark { background: var(--black); color: var(--ivory); }
.button--light:hover { border-color: var(--ivory); background: var(--black); color: var(--ivory); }
.button--dark:hover { border-color: var(--black); background: var(--ivory); color: var(--black); }
.button:disabled { cursor: default; opacity: .5; }

.text-link {
  min-height: 2.75rem;
  padding: 0;
  display: inline-flex;
  gap: .75rem;
  align-items: center;
  width: fit-content;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: none;
  color: inherit;
  font-size: .75rem;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
}

.skip-link {
  position: fixed;
  z-index: 3;
  top: .5rem;
  left: .5rem;
  transform: translateY(-200%);
  padding: .75rem;
  background: var(--ivory);
  color: var(--black);
}
.skip-link:focus { transform: none; }

.arrival, .reply {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--black);
  color: var(--ivory);
}

.arrival {
  isolation: isolate;
  overflow: hidden;
  --touch-x: 50%;
  --touch-y: 68%;
  --opening-duration: .98s;
}
.arrival::backdrop, .reply::backdrop { background: var(--black); }

.arrival__texture, .hero__media, .passage__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.arrival__surface, .arrival__transfer {
  position: absolute;
  inset: 0;
}

.arrival__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}
.arrival.has-live-surface .arrival__canvas {
  opacity: 1;
  transition: opacity .4s ease;
}
.arrival.has-live-surface .arrival__transfer,
.arrival.has-live-surface .arrival__pulse { visibility: hidden; }

.arrival__surface { animation: fabric-arrive 1.55s var(--ease) both; }
.arrival__texture { object-position: 53% 50%; filter: brightness(1.48) contrast(1.04); }
.arrival__motion { opacity: 0; transition: opacity .55s ease; }
.arrival__motion.is-playing { opacity: 1; }
.arrival__surface::after {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(ellipse at 50% 44%, transparent 5%, rgb(0 0 0 / .32) 73%),
              linear-gradient(0deg, rgb(0 0 0 / .66), transparent 45%);
  pointer-events: none;
}

@keyframes fabric-arrive {
  from { opacity: .18; transform: scale(1.10); }
  to { opacity: 1; transform: scale(1); }
}

.arrival__transfer {
  opacity: 0;
  overflow: hidden;
  transition: opacity var(--opening-duration) var(--ease);
}
.arrival.is-opening .arrival__transfer { opacity: 1; }

@supports (clip-path: ellipse(10% 10% at 50% 50%)) {
  .arrival__transfer {
    opacity: 1;
    clip-path: ellipse(0 0 at var(--touch-x) var(--touch-y));
    transition: clip-path var(--opening-duration) cubic-bezier(.64, 0, .25, 1);
  }
  .arrival.is-opening .arrival__transfer {
    clip-path: ellipse(165vmax 125vmax at var(--touch-x) var(--touch-y));
  }
}

.arrival.has-soft-wipe .arrival__transfer {
  opacity: 1;
  clip-path: none;
  mask-image: radial-gradient(ellipse var(--wipe-width) var(--wipe-height) at var(--touch-x) var(--touch-y), #000 0 68%, transparent 100%);
  transition: --wipe-width var(--opening-duration) cubic-bezier(.64, 0, .25, 1),
              --wipe-height var(--opening-duration) cubic-bezier(.64, 0, .25, 1);
}
.arrival.has-soft-wipe.is-opening .arrival__transfer {
  --wipe-width: 185vmax;
  --wipe-height: 155vmax;
}

.arrival__pulse {
  position: absolute;
  top: var(--touch-y);
  left: var(--touch-x);
  width: 50vmin;
  aspect-ratio: 1;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.15);
  background: radial-gradient(ellipse, rgb(252 247 242 / .37), transparent 66%);
  mix-blend-mode: screen;
  pointer-events: none;
}
.arrival.is-opening .arrival__pulse { animation: touch-light .86s ease-out both; }
@keyframes touch-light {
  15% { opacity: .65; }
  to { opacity: 0; transform: translate(-50%, -50%) scale(2.7); }
}

.arrival__inner {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 5rem var(--edge) 8rem;
  text-align: center;
  pointer-events: none;
  transition: opacity .26s ease, transform .45s ease-out;
}

.arrival__logo {
  position: absolute;
  top: max(8svh, calc(env(safe-area-inset-top) + 1.5rem));
  width: clamp(4.75rem, 8vw, 6.375rem);
  height: auto;
  animation: invitation-beat 1s .19s var(--ease) both;
}

.arrival__title {
  font-size: clamp(3.35rem, 12vw, 10rem);
  letter-spacing: -.055em;
  text-shadow: 0 4px 25px rgb(0 0 0 / .45);
  animation: invitation-beat 1.1s .48s var(--ease) both;
}
.arrival__date {
  margin-top: 1rem;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.6vw, 2.25rem);
  animation: invitation-beat 1s .76s var(--ease) both;
}

.arrival__touch {
  position: absolute;
  inset: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 0 var(--edge) max(12svh, calc(env(safe-area-inset-bottom) + 3.5rem));
  border: 0;
  background: transparent;
  color: var(--ivory);
  -webkit-tap-highlight-color: transparent;
}
.arrival__touch:focus-visible { outline-offset: -.6rem; }
.arrival__cue {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  min-height: 2.75rem;
  padding: .2rem 0;
  border-bottom: 1px solid rgb(252 247 242 / .53);
  font-size: .67rem;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  animation: invitation-beat .9s 1.07s var(--ease) both;
}
.arrival__cue span { font-size: 1.12rem; line-height: 1; }
.arrival__touch:hover .arrival__cue { border-color: var(--ivory); }
.arrival__skip {
  position: absolute;
  right: max(1.4rem, env(safe-area-inset-right));
  bottom: max(.5rem, env(safe-area-inset-bottom));
  min-height: 2.75rem;
  display: grid;
  align-items: center;
  opacity: .82;
  font-size: .74rem;
  text-underline-offset: .26rem;
}
.arrival.is-opening :is(.arrival__inner, .arrival__touch) { opacity: 0; }
.arrival.is-opening .arrival__inner { transform: translateY(-.5rem); }
.arrival.is-opening .arrival__touch { pointer-events: none; transition: opacity .2s ease; }

@keyframes invitation-beat {
  from { opacity: 0; transform: translateY(.8rem); }
  to { opacity: 1; transform: none; }
}

.floating-rsvp {
  position: fixed;
  z-index: 2;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  gap: .62rem;
  padding: .25rem .9rem;
  border: 1px solid rgb(252 247 242 / .58);
  background: var(--black);
  color: var(--ivory);
  text-decoration: none;
  font-size: .7rem;
  letter-spacing: .13em;
}
.floating-rsvp:focus-visible { outline-color: var(--ivory); }

.hero {
  position: relative;
  isolation: isolate;
  min-height: min(100svh, 75rem);
  display: grid;
  align-items: end;
  overflow: clip;
}

.hero__media { object-position: 62% 46%; }
.hero__film { opacity: 0; transition: opacity .32s ease; }
.hero__film.has-played { opacity: 1; }
.hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgb(0 0 0 / .67), transparent 76%),
              linear-gradient(0deg, rgb(0 0 0 / .67), transparent 48%);
}
.hero__logo { position: absolute; top: max(2rem, env(safe-area-inset-top)); left: var(--edge); width: clamp(4rem, 7vw, 6.125rem); height: auto; }
.hero__content { position: relative; padding: 10rem var(--edge) clamp(3.75rem, 10vh, 8rem); }
.hero h1 { margin: .9rem 0 1.2rem; font-size: clamp(5rem, 15vw, 14rem); letter-spacing: -.065em; }
.hero h1 span { display: block; }
.hero.is-revealing .hero__logo { animation: invitation-beat .95s .08s var(--ease) both; }
.hero.is-revealing .eyebrow { animation: invitation-beat .9s .27s var(--ease) both; }
.hero.is-revealing h1 span { animation: invitation-beat 1.1s .43s var(--ease) both; }
.hero.is-revealing h1 span + span { animation-delay: .56s; }
.hero.is-revealing .hero__content .text-link { animation: invitation-beat .85s .94s var(--ease) both; }

.film-control {
  position: absolute;
  right: var(--edge);
  bottom: 1rem;
  min-height: 2.75rem;
  padding: .35rem .7rem;
  border: 1px solid rgb(252 247 242 / .55);
  background: rgb(0 0 0 / .6);
  color: var(--ivory);
  font-size: .72rem;
}

.passage {
  position: relative;
  height: clamp(19rem, 63svh, 46rem);
  overflow: clip;
}

.passage__image { object-position: 56% 57%; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .passage__image {
      animation: passage-scale linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }
    @keyframes passage-scale {
      from { transform: scale(1.10); }
      to { transform: scale(1); }
    }
  }
}

.event, .rsvp { background: var(--ivory); color: var(--black); color-scheme: light; }
.event__inner, .rsvp__inner, .collection__inner { max-width: 92rem; margin-inline: auto; }
.event__inner, .rsvp__inner {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(3rem, 9vw, 10rem);
  padding: clamp(4rem, 11vw, 10rem) var(--edge);
}

.event h2, .rsvp h2, .collection h2, .reply h2 {
  margin: 1.1rem 0 1.15rem;
  font-size: clamp(3.55rem, 8.3vw, 8.2rem);
  letter-spacing: -.054em;
}

.event__details { margin: 0 0 1.5rem; border-top: 1px solid var(--rule); }
.event__details div {
  display: grid;
  gap: .5rem 1rem;
  grid-template-columns: minmax(5.1rem, .55fr) 1fr;
  align-items: baseline;
  padding: .85rem 0;
  border-bottom: 1px solid var(--rule);
}
.event__details dt { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .13em; }
.event__details dd { font-family: var(--serif); font-size: clamp(1.15rem, 2.2vw, 1.5rem); line-height: 1.27; }
.event__countdown { margin-bottom: 1.25rem; color: var(--muted); font-size: .82rem; }

.collection__inner {
  padding: clamp(4rem, 11vw, 10rem) var(--edge);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
  gap: 2rem 1rem;
}
.collection__detail { grid-column: 1 / 9; grid-row: 1; width: 100%; }
.collection__portrait { grid-column: 9 / -1; grid-row: 1 / 3; align-self: end; }
.collection__copy { grid-column: 1 / 9; grid-row: 2; }
.collection__copy h2 { font-size: clamp(3rem, 6.9vw, 6.2rem); }
.collection figure img { width: 100%; height: 100%; object-fit: cover; }
.collection__detail { aspect-ratio: 16 / 9; }
.collection__portrait { aspect-ratio: 4 / 5; }

.rsvp__deadline, .rsvp__contact { margin-top: 1.25rem; font-size: .88rem; line-height: 1.45; }
.rsvp__contact { color: var(--muted); }
.rsvp-form { display: grid; gap: 1.3rem; min-width: 0; }
.field { display: grid; gap: .4rem; }
.field label, .choices legend {
  color: var(--black);
  font-size: .71rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.field label > span { color: var(--muted); text-transform: none; letter-spacing: 0; }
.field :is(input, textarea) {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid #9b9085;
  border-radius: 0;
  padding: .55rem .7rem;
  background: transparent;
  color: var(--black);
  font-size: 1rem;
}
.field textarea { resize: vertical; }
.choices { padding: 0; border: 0; display: flex; flex-wrap: wrap; column-gap: 1.2rem; }
.choices label, .guest-option { display: flex; align-items: center; gap: .5rem; min-height: 2.75rem; font-size: .9rem; }
.choices input, .guest-option input { width: 1rem; height: 1rem; margin: 0; flex: none; accent-color: var(--black); }
.guest-name { margin-top: .65rem; }
.rsvp-form__note, .form-status { color: var(--muted); font-size: .8rem; line-height: 1.5; }
.form-status:empty { display: none; }

.closing { padding: clamp(3rem, 7vw, 5rem) var(--edge); display: grid; justify-items: center; gap: 1.25rem; }
.closing > p { font-family: var(--serif); font-size: 1.3rem; }
.closing img { height: auto; }
.reply__inner {
  min-height: 100%;
  max-width: 60rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  padding: 2rem var(--edge);
  text-align: center;
}
.reply h2 { margin-bottom: 0; }
.reply__inner .editorial-copy { max-width: 33ch; }
.reply__inner form { margin-top: 1.15rem; }

@media (max-width: 720px) {
  .arrival__texture { object-position: 59% 50%; }
  .hero__media { object-position: 82% 37%; }
  .hero__shade { background: linear-gradient(0deg, rgb(0 0 0 / .83), transparent 69%), linear-gradient(180deg, rgb(0 0 0 / .43), transparent 27%); }
  .hero__content { padding-bottom: 5rem; }
  .hero h1 { font-size: clamp(4.65rem, 17vw, 8rem); }
  .event__inner, .rsvp__inner { grid-template-columns: 1fr; gap: 2rem; }
  .collection__inner { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.65rem .65rem; }
  .collection__detail { grid-column: 1 / -1; }
  .collection__copy { grid-column: 1 / -1; }
  .collection__portrait { grid-column: 3 / -1; grid-row: 3; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
