:root {
  --paper: #F3F0EA;
  --paper-2: #EAE6DE;
  --ink: #000000;
  --muted: #5B5852;
  --red: #BB1919;
  --red-2: #8E1111;
  --rule: rgba(0, 0, 0, 0.16);

  --serif-display: 'Averia Serif Libre', 'Iowan Old Style', Georgia, serif;
  --serif-body: 'Amiri', 'Iowan Old Style', Georgia, serif;

  --fs-0: 1.1875rem;
  --fs-1: 1.4375rem;
  --fs-2: 1.8125rem;
  --fs-3: 2.3125rem;
  --fs-4: 3rem;
  --display: clamp(2.6rem, 9vw, 6.75rem);

  --measure: 36rem;
  --gutter: 1.25rem;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.is-intro { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--fs-0) / 1.7 var(--serif-body);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}

a { color: var(--red); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--red-2); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

h1, h2, h3, p, dl, dd, dt, ol, ul, fieldset { margin: 0; }
fieldset { padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
img { max-width: 100%; height: auto; }

/* Intro */
.intro {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--paper);
  display: grid;
  place-items: center;
  transition: transform 0.9s cubic-bezier(0.77, 0, 0.18, 1);
}
.intro.is-done { transform: translateY(-100%); }
.intro__mark img { width: 72px; display: block; clip-path: inset(100% 0 0 0); opacity: 0; }
.intro.is-running .intro__mark img { animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s forwards; }
@keyframes rise { to { clip-path: inset(0 0 0 0); opacity: 1; } }
.intro__count {
  position: absolute;
  left: 0; right: 0; bottom: 2rem;
  text-align: center;
  font: italic 400 1rem / 1 var(--serif-body);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* Fixed bar */
.bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem var(--gutter);
  background: rgba(243, 240, 234, 0.92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.bar.is-visible { transform: none; }
.bar__mark { display: block; line-height: 0; }
.bar__mark img { width: 18px; display: block; }
.bar__nav { display: flex; gap: clamp(0.85rem, 3vw, 1.75rem); font-style: italic; font-size: 1rem; }
.bar__nav a { color: inherit; text-decoration: none; }
.bar__nav a:hover { color: var(--red); }

/* Hero */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 5rem var(--gutter) 2.25rem;
}
.hero__center { margin: auto 0; }
.hero__center > * {
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
html.is-intro .hero__center > * { opacity: 0; transform: translateY(14px); }
.hero__center > :nth-child(1) { transition-delay: 0.05s; }
.hero__center > :nth-child(2) { transition-delay: 0.15s; }
.hero__center > :nth-child(3) { transition-delay: 0.3s; }
.hero__center > :nth-child(4) { transition-delay: 0.45s; }
.hero__center > :nth-child(5) { transition-delay: 0.55s; }

.hero__kicker {
  font: 400 0.8125rem / 1 var(--serif-display);
  letter-spacing: 0.36em;
  text-transform: uppercase;
  margin-bottom: 2.25rem;
}
.hero__mark img { width: clamp(64px, 9vw, 88px); display: block; margin: 0 auto; }
.hero__names {
  font: 300 var(--display) / 1 var(--serif-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 2rem 0 1.25rem;
  padding-left: 0.12em;
}
.hero__date { font-size: var(--fs-1); }
.hero__place { font-style: italic; margin-top: 0.15rem; }

.countdown {
  width: 100%;
  max-width: 40rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.4rem;
  display: flex;
  justify-content: center;
  gap: clamp(1.25rem, 6vw, 3.5rem);
}
.countdown[hidden] { display: none; }
.countdown__unit { display: grid; justify-items: center; min-width: 3.2rem; }
.countdown__num {
  font: 400 var(--fs-3) / 1 var(--serif-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.countdown__label { font-style: italic; font-size: 0.95rem; margin-top: 0.35rem; }

/* Sections */
.section {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(5rem, 12vw, 8.5rem) var(--gutter);
  text-align: center;
}
.section--wide { max-width: 54rem; }
.section__title {
  font: 400 var(--fs-1) / 1.2 var(--serif-display);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding-left: 0.3em;
  margin-bottom: 3rem;
}
.subtitle {
  font: 400 var(--fs-0) / 1.3 var(--serif-display);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding-left: 0.22em;
  margin: 2.5rem 0 0.75rem;
}

/* Invitation */
.invite { max-width: 46rem; padding-top: 1rem; }
.invite p { max-width: 34rem; margin-inline: auto; margin-bottom: 1.5em; text-wrap: balance; }
.facts {
  margin-top: 3.5rem;
  display: grid;
  gap: 1.5rem;
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
}
@media (min-width: 44rem) {
  .facts { grid-template-columns: 1fr auto 1fr; align-items: end; gap: 2rem; }
  .facts__item:first-child { text-align: left; }
  .facts__item:last-child { text-align: right; }
  .facts__value { white-space: nowrap; }
}
.facts__label { font-style: italic; color: var(--red); line-height: 1.3; }
.facts__value { font-weight: 700; color: var(--red); line-height: 1.35; }
.facts__value a { text-decoration: none; }
.facts__value a:hover { text-decoration: underline; }

/* Timeline */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 20rem;
  text-align: left;
  position: relative;
  --progress: 0;
}
.timeline::before, .timeline::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7rem;
  width: 1px;
}
.timeline::before { bottom: 0.7rem; background: var(--rule); }
.timeline::after {
  height: calc((100% - 1.4rem) * var(--progress));
  background: var(--red);
}
.timeline__item { position: relative; padding-left: 2.25rem; margin-bottom: 2.5rem; }
.timeline__item:last-child { margin-bottom: 0; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 0.75rem;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--ink);
}
.timeline__time {
  display: block;
  font: 400 var(--fs-3) / 1 var(--serif-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.timeline__what { display: block; margin-top: 0.4rem; }

/* Venue */
.venue__name { font: 400 var(--fs-2) / 1.2 var(--serif-display); }
.venue__address { margin-top: 0.4rem; margin-bottom: 2.25rem; }
.map {
  border: 1px solid var(--ink);
  aspect-ratio: 16 / 10;
  width: 100%;
  overflow: hidden;
  background: var(--paper-2);
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; filter: grayscale(1) contrast(1.02); }
.venue__links { margin-top: 1rem; font-style: italic; }
.venue__notes { max-width: var(--measure); margin: 1.5rem auto 0; }
.venue__notes p { text-wrap: pretty; }

/* Menu */
.course { margin-bottom: 3rem; }
.course:last-child { margin-bottom: 0; }
.course + .course::before {
  content: "";
  display: block;
  width: 1.5rem; height: 1px;
  background: var(--red);
  margin: 0 auto 3rem;
}
.course__name {
  font: 400 var(--fs-0) / 1.3 var(--serif-display);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding-left: 0.24em;
  margin-bottom: 1rem;
}
.course ul { list-style: none; padding: 0; }
.course li { margin: 0.4rem 0; text-wrap: balance; }

/* RSVP */
.rsvp__lead { margin-bottom: 3rem; }
.form { text-align: left; max-width: 28rem; margin: 0 auto; }
.field { margin-bottom: 2rem; }
.field__label { display: block; font-style: italic; color: var(--red); margin-bottom: 0.3rem; line-height: 1.3; }
.input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  padding: 0.35rem 0;
  transition: border-color 0.2s;
}
.input:focus { outline: none; border-bottom-color: var(--red); box-shadow: 0 1px 0 var(--red); }
textarea.input { resize: vertical; min-height: 3.2rem; }
.input--select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 1.5rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='black' stroke-width='1'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.15rem center;
}
.choice { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; padding-top: 0.25rem; }
.choice label { display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; }
.choice input {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  width: 16px; height: 16px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  flex: none;
  transition: background-color 0.15s, border-color 0.15s;
}
.choice input:checked { background: var(--red); border-color: var(--red); box-shadow: inset 0 0 0 3px var(--paper); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.seal-wrap { text-align: center; margin-top: 2.5rem; }
.seal {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: inline-grid;
  justify-items: center;
  gap: 0.9rem;
  padding: 0.5rem;
  font: inherit;
  color: var(--ink);
}
.seal:disabled { cursor: default; }
.seal__disc {
  position: relative;
  width: 6rem; height: 6rem;
  border-radius: 47% 53% 51% 49% / 52% 48% 53% 47%;
  background: radial-gradient(circle at 36% 30%, #C4211F 0%, #B31717 48%, #8C1010 100%);
  box-shadow:
    0 10px 16px -12px rgba(0, 0, 0, 0.55),
    inset 0 1px 2px rgba(255, 255, 255, 0.18),
    inset 0 -3px 6px rgba(0, 0, 0, 0.25);
  display: grid;
  place-items: center;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s;
}
.seal__disc::before {
  content: "";
  position: absolute;
  inset: -5px;
  z-index: -1;
  border-radius: 52% 48% 47% 53% / 49% 53% 47% 51%;
  background: radial-gradient(circle at 60% 70%, #A71616, #7A0E0E);
  opacity: 0.9;
}
.seal__mark { position: relative; width: 2.5rem; height: 3.35rem; }
.seal__mark::before, .seal__mark::after {
  content: "";
  position: absolute;
  inset: 0;
  -webkit-mask: url("/logo.svg") center / contain no-repeat;
  mask: url("/logo.svg") center / contain no-repeat;
}
.seal__mark::before { background: #520606; transform: translate(1px, 1.3px); opacity: 0.85; }
.seal__mark::after { background: #F1D8D2; opacity: 0.95; }
.seal:hover .seal__disc { transform: translateY(-2px); }
.seal:active .seal__disc,
.seal.is-sending .seal__disc,
.seal__disc--pressed {
  transform: scale(0.94);
  box-shadow:
    0 4px 8px -6px rgba(0, 0, 0, 0.5),
    inset 0 2px 3px rgba(255, 255, 255, 0.2),
    inset 0 -3px 6px rgba(0, 0, 0, 0.35);
}
.seal:focus-visible { outline: none; }
.seal:focus-visible .seal__disc { outline: 2px solid var(--ink); outline-offset: 5px; }
.seal__label { font-style: italic; }
.form__status { margin-top: 1rem; min-height: 1.7em; color: var(--red); }

.sent { display: grid; justify-items: center; gap: 1.25rem; padding-top: 0.5rem; }
.sent__text { font-size: var(--fs-1); }
.sent__text:focus { outline: none; }

/* Footer */
.footer {
  text-align: center;
  padding: 4rem var(--gutter) 3rem;
  border-top: 1px solid var(--rule);
  max-width: var(--measure);
  margin: 2rem auto 0;
}
.footer__mark { width: 30px; display: block; margin: 0 auto 1.25rem; }
.footer__names {
  font: 400 0.9375rem / 1 var(--serif-display);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding-left: 0.3em;
  margin-bottom: 0.9rem;
}
.footer__meta { font-style: italic; line-height: 1.5; }
.footer__meta a { text-decoration: none; }
.footer__meta a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro, .bar, .seal__disc, .hero__center > *, .input { transition: none !important; animation: none !important; }
  html.is-intro .hero__center > * { opacity: 1; transform: none; }
}
