@font-face {
  font-family: "Reunion Narrow";
  src: url("assets/NimbusSansNarrow-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --cream: #fff1d2;
  --paper: #f4dfb4;
  --navy: #102b42;
  --lake: #173e54;
  --red: #8f2f22;
  --red-bright: #b64028;
  --gold: #dda94d;
  --green: #243f2d;
  --ink: #152635;
  --muted: #62717b;
  --line: rgba(16, 43, 66, 0.22);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Arial Narrow", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--navy); color: var(--ink); font-family: var(--sans); }
body.locked { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }

.opening,
.hero {
  min-height: 100svh;
  position: relative;
  overflow: hidden;
  background-color: var(--navy);
  background-image: url("assets/road-home.webp");
  background-size: cover;
  background-position: center;
}
.opening {
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 7svh 22px 28px;
  color: var(--cream);
  text-align: center;
  transition: opacity 0.9s ease, visibility 0.9s ease;
  z-index: 5;
}
.opening::after,
.hero::after,
.potluck-section::after,
.closing-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 24, 35, 0.42);
  pointer-events: none;
}
.opening.is-open { opacity: 0; visibility: hidden; pointer-events: none; }
.opening > *, .hero > *, .potluck-copy, .closing-section > * { position: relative; z-index: 1; }
.opening-heading h1,
.opening-title {
  font-family: "Reunion Narrow", Impact, "Arial Narrow", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  font-size: clamp(3.7rem, 16vw, 7.5rem);
  line-height: 0.78;
  margin: 12px 0 18px;
  color: var(--cream);
  text-shadow: 0 4px 24px rgba(10, 26, 35, 0.6);
}
.opening-heading > p:last-child { text-transform: uppercase; letter-spacing: 0.16em; font-weight: 700; font-size: 0.76rem; }
.route-label, .stop-label {
  margin: 0 0 12px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.68rem;
  font-weight: 700;
}
.journey-section .stop-label { color: var(--red); }
.route-trigger {
  width: min(70vw, 340px);
  aspect-ratio: 1;
  place-self: center;
  margin-top: 8svh;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--cream);
  animation: breathe 2.4s ease-in-out infinite;
}
.route-trigger span {
  display: inline-block;
  padding: 14px 20px;
  border-radius: 8px;
  background: var(--red);
  border: 2px solid var(--gold);
  box-shadow: 0 10px 30px rgba(0,0,0,0.32);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}
.opening-note { margin: 0; font-size: 0.72rem; letter-spacing: 0.08em; color: var(--cream); }

.invitation { display: none; background: var(--paper); }
.invitation.is-visible { display: block; }
.hero {
  color: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  padding: 38svh 22px 8svh;
}
.hero::after { background: rgba(8, 24, 35, 0.58); }
.hero h1,
.hero h2 {
  font-family: "Reunion Narrow", Impact, "Arial Narrow", sans-serif;
  text-transform: uppercase;
  font-size: clamp(3.1rem, 14vw, 7rem);
  line-height: 0.84;
  letter-spacing: 0.01em;
  margin: 8px 0 18px;
}
.hero-copy { font-family: var(--serif); font-style: italic; font-size: clamp(1.05rem, 4vw, 1.45rem); margin: 0 0 24px; }
.event-summary { width: min(100%, 660px); padding: 18px 0; border-top: 1px solid rgba(255,241,210,0.45); border-bottom: 1px solid rgba(255,241,210,0.45); }
.event-summary p { margin: 5px 0; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.77rem; font-weight: 700; }
.primary-button, .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 24px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.primary-button { margin-top: 26px; color: var(--cream); background: var(--red); border: 2px solid var(--gold); box-shadow: 0 10px 28px rgba(61,28,20,0.24); }
.secondary-button { color: var(--navy); background: transparent; border: 1px solid var(--line); }
.primary-button:hover, .secondary-button:hover { transform: translateY(-2px); }
.primary-button:focus-visible, .secondary-button:focus-visible, .route-trigger:focus-visible, .journey-link:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.journey-link { color: var(--cream); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.66rem; margin-top: 20px; text-underline-offset: 5px; }

.journey-section { padding: 96px max(24px, calc((100vw - 760px) / 2)); background: var(--paper); text-align: center; border-top: 1px solid var(--line); }
.journey-section h3, .potluck-copy h3, .rsvp-panel h2 {
  margin: 6px 0 28px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 10vw, 5rem);
  line-height: 0.94;
  letter-spacing: -0.035em;
}
.section-copy { max-width: 590px; margin: 0 auto; color: var(--muted); font-family: var(--serif); font-size: 1.08rem; line-height: 1.7; }
.countdown-section { background: var(--navy); color: var(--cream); }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(255,241,210,0.25); border-bottom: 1px solid rgba(255,241,210,0.25); }
.countdown span { padding: 22px 4px; border-right: 1px solid rgba(255,241,210,0.25); color: #b7c8cf; font-size: 0.56rem; text-transform: uppercase; letter-spacing: 0.1em; }
.countdown span:last-child { border-right: 0; }
.countdown strong { display: block; color: var(--cream); font-family: var(--serif); font-size: clamp(1.7rem, 7vw, 3.1rem); font-weight: 400; margin-bottom: 4px; }
blockquote { max-width: 610px; margin: 42px auto 0; padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--red); font-family: var(--serif); font-size: 1.35rem; line-height: 1.5; font-style: italic; }
.detail-list { max-width: 650px; margin: 0 auto; text-align: left; border-top: 1px solid var(--line); }
.detail-list article { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.detail-list p { margin: 0; line-height: 1.6; color: var(--muted); }
.detail-list .detail-title { color: var(--red); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 800; padding-top: 4px; }
.button-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }

.potluck-section {
  min-height: 88svh;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  color: var(--cream);
  padding: 45svh 24px 70px;
  background-color: var(--navy);
  background-image: url("assets/potluck-table.webp");
  background-size: cover;
  background-position: center;
}
.potluck-section::after { background: rgba(15, 24, 26, 0.52); }
.potluck-copy { max-width: 620px; }
.potluck-copy p:not(.stop-label) { font-family: var(--serif); font-size: 1.05rem; line-height: 1.6; color: var(--cream); }
.menu-section { background: #f8e9c8; }
.menu-list { max-width: 620px; margin: 0 auto; border-top: 1px solid var(--line); text-align: left; }
.menu-list p { display: grid; grid-template-columns: 100px 1fr; gap: 18px; margin: 0; padding: 18px 0; border-bottom: 1px solid var(--line); }
.menu-list span { color: var(--red); text-transform: uppercase; letter-spacing: 0.11em; font-size: 0.68rem; font-weight: 800; }
.menu-list strong { font-family: var(--serif); font-weight: 400; }
.menu-note { color: var(--muted); font-size: 0.72rem; margin-top: 20px; }
.closing-section {
  min-height: 78svh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  background-color: var(--navy);
  background-image: url("assets/road-home.webp");
  background-size: cover;
  background-position: center bottom;
}
.closing-section::after { background: rgba(8,24,35,0.68); }
.signature { margin-top: 44px; font-family: var(--serif); color: var(--cream); line-height: 1.8; }
.signature em { color: var(--gold); font-size: 1.35rem; }

.rsvp-dialog { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(6,19,28,0.78); }
.rsvp-dialog::backdrop { background: rgba(6,19,28,0.78); }
.rsvp-panel { width: min(100%, 580px); min-height: 100%; margin-left: auto; padding: 34px 24px 70px; background: #f7e8c8; color: var(--ink); overflow-y: auto; }
.rsvp-panel h2 { font-size: 2.8rem; }
.close-button { float: right; border: 0; padding: 8px; background: transparent; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; }
label, legend { display: block; margin: 18px 0 8px; color: var(--red); font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; }
label span, legend span { color: var(--muted); }
input, select, textarea { width: 100%; padding: 14px 15px; border: 1px solid var(--line); border-radius: 8px; background: #fff9ed; color: var(--ink); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(143,47,34,0.12); }
fieldset { border: 0; padding: 0; margin: 18px 0 0; }
.choice { display: flex; align-items: center; gap: 10px; padding: 13px; margin: 8px 0; color: var(--ink); background: #fff9ed; border: 1px solid var(--line); border-radius: 8px; font-size: 0.92rem; font-weight: 400; text-transform: none; letter-spacing: 0; }
.choice input { width: auto; margin: 0; accent-color: var(--red); }
.dish-fields { margin: 18px 0 6px; padding: 2px 16px 18px; border-left: 3px solid var(--gold); background: #f0d8aa; }
.submit-button { width: 100%; }
.form-success { margin-top: 24px; padding: 18px 0; color: var(--green); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-family: var(--serif); font-size: 1.12rem; line-height: 1.5; }

.reveal { opacity: 0; transform: translateY(18px); }
.invitation.is-revealed .reveal { animation: rise 0.72s ease forwards; }
.invitation.is-revealed .reveal:nth-child(2) { animation-delay: 0.1s; }
.invitation.is-revealed .reveal:nth-child(3) { animation-delay: 0.2s; }
.invitation.is-revealed .reveal:nth-child(4) { animation-delay: 0.3s; }
.invitation.is-revealed .reveal:nth-child(5) { animation-delay: 0.4s; }
.invitation.is-revealed .reveal:nth-child(6) { animation-delay: 0.5s; }

.demo-notice {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(30, 58, 72, 0.25);
  background: rgba(250, 245, 234, 0.94);
  color: var(--ink);
  font-size: 0.88rem;
}

.demo-notice a {
  color: var(--pine);
  font-weight: 800;
}

@keyframes breathe { 50% { transform: scale(1.04); } }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

@media (min-width: 720px) {
  .opening, .hero { background-size: cover; background-repeat: no-repeat; background-position: center 42%; }
  .opening-heading h1, .opening-title { font-size: clamp(4.5rem, 7vw, 6rem); }
  .hero { padding-top: 41svh; }
  .hero h1, .hero h2 { max-width: 820px; font-size: clamp(4rem, 6.5vw, 5.8rem); }
  .potluck-section { background-size: cover; background-repeat: no-repeat; background-position: center 58%; }
  .closing-section { background-position: center 70%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
