@font-face { font-family: "Shrikhand"; src: url(fonts/Shrikhand.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Bebas Neue"; src: url(fonts/BebasNeue.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url(fonts/PlayfairDisplay.woff2) format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url(fonts/CormorantGaramond.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url(fonts/CormorantGaramond-italic.woff2) format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }

:root {
  --yellow: #f7f56b;
  --yellow-glow: rgba(247, 245, 107, 0.55);
  --teal: #5f9f90;
  --teal-ink: #24524b;
  --cream: #efe6d3;
  --burgundy: #6d1d22;
  --burgundy-soft: #7f3a36;
}

* { box-sizing: border-box; }
html { background: #000; scroll-behavior: auto; }
body {
  margin: 0;
  color: var(--cream);
  background: #000;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-variant-numeric: lining-nums;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#scene {
  position: fixed;
  inset: 0 auto auto 0;
  width: 100vw;
  height: calc(var(--vh, 1vh) * 100);
  display: block;
  z-index: 0;
}

.veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(ellipse 60% 55% at 50% 50%, rgba(255, 190, 110, 0.10), transparent 70%),
    radial-gradient(ellipse at 50% 50%, rgba(4, 3, 8, 0.45), rgba(2, 1, 4, 0.9));
}

/* ------------------------------------------------ scroll hint */
.hint {
  position: fixed;
  left: 50%;
  bottom: max(4.5vh, 22px);
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--yellow);
  font-family: "Bebas Neue", sans-serif;
  font-size: 17px;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-shadow: 0 0 14px var(--yellow-glow);
  pointer-events: none;
}
.hint svg { overflow: visible; animation: bob 1.9s ease-in-out infinite; }
.hint path {
  fill: none;
  stroke: var(--yellow);
  stroke-width: 3.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 5px var(--yellow-glow)) drop-shadow(0 0 14px var(--yellow-glow));
}
@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: 0.75; }
  50% { transform: translateY(9px); opacity: 1; }
}

/* ------------------------------------------------ floating title (RSVP lettering) */
.title {
  /* centred on the galaxy core by scene.js, which also grows it out of it */
  position: fixed;
  top: 31vh;
  left: 50%;
  z-index: 2;
  width: 100%;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0.08);
  will-change: transform, opacity, filter;
}
.title p { margin: 0; }
.title::before {
  /* night halo so the lettering reads over the galaxy behind it */
  content: "";
  position: absolute;
  inset: -18% 4% -22%;
  z-index: -1;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(2, 3, 12, 0.78), rgba(2, 3, 12, 0.45) 55%, transparent 75%);
  filter: blur(10px);
}
.title-main {
  font-family: "Shrikhand", serif;
  color: var(--yellow);
  font-size: clamp(54px, 8.6vw, 136px);
  line-height: 1.02;
  -webkit-text-stroke: 0.06em var(--teal-ink);
  paint-order: stroke fill;
  text-shadow: 0 0 28px rgba(247, 245, 107, 0.45), 0 4px 0 rgba(0, 0, 0, 0.25);
}
.title-main br { display: none; }
.title-sub {
  font-family: "Bebas Neue", sans-serif;
  color: var(--teal);
  font-size: clamp(34px, 5vw, 70px);
  letter-spacing: 0.02em;
  margin-top: 0.12em !important;
  text-shadow: 0 0 18px rgba(16, 40, 40, 0.65);
  -webkit-text-stroke: 1px rgba(10, 30, 30, 0.35);
}
.title-date {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(24px, 3vw, 40px);
  letter-spacing: 0.12em;
  color: var(--yellow);
  text-shadow: 0 0 2px rgba(2, 3, 12, 0.9), 0 0 16px rgba(247, 245, 107, 0.35);
  margin-top: 0.25em !important;
}

/* ------------------------------------------------ layout */
main { position: relative; z-index: 2; }
.journey { height: calc(var(--vh, 1vh) * 1361); }

/* ------------------------------------------------ invitation: save-the-date poster */
.invite {
  display: flex;
  justify-content: center;
  padding: calc(var(--vh, 1vh) * 16) 16px calc(var(--vh, 1vh) * 8);
  /* the card's glow reaches past the screen edge; without this, phones widen
     the page and zoom out, leaving the fixed scene short on the right */
  overflow-x: clip;
}
.card-wrap {
  will-change: transform, opacity;
  opacity: 0;
  transform-origin: 50% 30%;
}

/* shared by the invitation card and the RSVP form */
.poster {
  --pad: 40px;
  --stroke: #2f625a;
  position: relative;
  width: min(520px, 92vw);
  border-radius: 6px;
  overflow: hidden;
  color: #efe6d3;
  background: #050505;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7), 0 0 60px rgba(247, 245, 107, 0.1), inset 0 0 0 1px rgba(247, 245, 107, 0.16);
}
.poster p, .poster h2, .poster h3 { margin: 0; font-weight: 400; }
.poster-sky { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.poster-body { position: relative; padding: var(--pad) var(--pad) 0; text-align: center; }
.poster-kicker {
  font: clamp(30px, 7vw, 38px) "Bebas Neue", sans-serif;
  letter-spacing: 0.04em;
  color: #64a596;
  text-shadow: 0 0 14px rgba(95, 159, 144, 0.5);
}
.poster-title, .poster-venue, .ev-name {
  font-family: "Shrikhand", serif;
  color: var(--yellow);
  -webkit-text-stroke: 0.06em var(--stroke);
  paint-order: stroke fill;
  text-shadow: 0 0 26px rgba(247, 245, 107, 0.38);
}
.poster-title { margin: 2px 0 10px !important; font-size: clamp(52px, 13vw, 70px); line-height: 0.98; }
.poster-day { margin-top: 30px; }
.poster-dow, .ev-dow {
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.08em;
  color: transparent;
  -webkit-text-stroke: 1.3px var(--yellow);
  text-shadow: 0 0 14px rgba(247, 245, 107, 0.3);
}
.poster-dow { font-size: clamp(28px, 6.4vw, 34px); }
.poster-venue { font-size: clamp(25px, 6vw, 31px); line-height: 1.1; margin: 2px 0 4px !important; }
.poster-where { font: 18px "Bebas Neue", sans-serif; letter-spacing: 0.16em; color: #7cc0b0; margin-bottom: 8px !important; text-shadow: 0 0 6px #050505; }
.poster-motto { margin: 0 0 6px !important; font: 19px "Bebas Neue", sans-serif; letter-spacing: 0.16em; color: var(--yellow); }
/* small pill under Saturday's theme: costume ideas on Pinterest */
.poster-inspo { margin: 2px 0 4px !important; }
.inspo-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 2px 9px;
  border: 1px solid rgba(124, 192, 176, 0.65);
  border-radius: 999px;
  font: 13px/1 "Bebas Neue", sans-serif;
  letter-spacing: 0.18em;
  color: #9fd8ca;
  text-decoration: none;
  background: rgba(124, 192, 176, 0.08);
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.inspo-link:hover { color: var(--yellow); border-color: var(--yellow); box-shadow: 0 0 14px rgba(247, 245, 107, 0.3); }
.inspo-icon { width: 14px; height: 12px; margin-top: -2px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; overflow: visible; }
.inspo-flash { stroke: var(--yellow); filter: drop-shadow(0 0 2px rgba(247, 245, 107, 0.9)); }
/* the RSVP's door scene, bled to the card edges and faded into its sky */
.poster-scene {
  position: relative;
  margin: 40px calc(-1 * var(--pad)) 0;
  /* no stars on the floor: back the floor half of the picture */
  background: linear-gradient(to bottom, transparent 50%, #050505 60%);
}
.poster-door {
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 22%);
}
/* on the door picture's floor, the same hint as the page's "Scroll" one,
   pointing to the RSVP card below */
.rsvp-note {
  position: absolute;
  left: 50%;
  bottom: 6%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px;
  color: var(--yellow);
  font: clamp(26px, 6.4vw, 34px)/1 "Shrikhand", serif;
  text-decoration: none;
  /* same lettering as the R.S.V.P. card's heading */
  -webkit-text-stroke: 0.06em var(--stroke);
  paint-order: stroke fill;
  text-shadow: 0 0 22px rgba(247, 245, 107, 0.5);
}
.rsvp-note svg { overflow: visible; animation: bob 1.9s ease-in-out infinite; }
.rsvp-note path {
  fill: none;
  stroke: var(--yellow);
  stroke-width: 3.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 5px var(--yellow-glow)) drop-shadow(0 0 14px var(--yellow-glow));
}
.rsvp-note:focus-visible { outline: 2px solid #9ff6e2; outline-offset: 4px; border-radius: 8px; }
.map-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  white-space: nowrap;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.map-link .pin { width: 0.72em; height: 0.96em; margin-right: 0.3em; vertical-align: -0.1em; }
.poster .map-link { text-decoration-color: rgba(247, 245, 107, 0.6); text-decoration-thickness: 2px; }
.poster .map-link:hover { color: #fffbc2; text-decoration-color: currentColor; }
.poster .pin { color: var(--yellow); }

/* ------------------------------------------------ RSVP, in the same poster style */
.rsvp {
  display: flex;
  justify-content: center;
  padding: calc(var(--vh, 1vh) * 6) 16px calc(var(--vh, 1vh) * 10);
}
.rsvp-card {
  width: min(560px, 100%);
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1s ease, transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.rsvp-card.in { opacity: 1; transform: none; }
.rsvp-inner { position: relative; padding: clamp(40px, 8vw, 56px) clamp(24px, 7vw, 52px) clamp(40px, 8vw, 52px); text-align: center; }
.rsvp-title { margin-bottom: 26px !important; font-size: clamp(50px, 12vw, 66px); }

.field { display: block; text-align: left; margin: 0 0 24px; }
.field > span {
  display: block;
  margin-bottom: 4px;
  font: 17px "Bebas Neue", sans-serif;
  letter-spacing: 0.2em;
  color: #7cc0b0;
}
.field small { font: italic 500 16px "Cormorant Garamond", serif; letter-spacing: 0.02em; color: rgba(239, 230, 211, 0.6); }
.field input, .field textarea {
  width: 100%;
  font: italic 500 20px/1.35 "Cormorant Garamond", Georgia, serif;
  color: #f6eedb;
  caret-color: var(--yellow);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid rgba(247, 245, 107, 0.45);
  padding: 6px 2px 7px;
  outline: none;
  border-radius: 0;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { border: 1.5px solid rgba(247, 245, 107, 0.35); border-radius: 4px; padding: 8px 10px; background: rgba(0, 0, 0, 0.35); }
.field input::placeholder, .field textarea::placeholder { color: rgba(239, 230, 211, 0.38); }
.field input:focus, .field textarea:focus { border-color: var(--yellow); box-shadow: 0 10px 18px -14px rgba(247, 245, 107, 0.9); }

.event {
  border: 0;
  border-top: 1px solid rgba(247, 245, 107, 0.18);
  margin: 0;
  padding: 20px 0 22px;
  text-align: left;
}
.event:last-of-type { border-bottom: 1px solid rgba(247, 245, 107, 0.18); margin-bottom: 26px; }
.event legend { float: left; width: 100%; padding: 0; margin-bottom: 14px; }
.ev-dow { display: block; font-size: 26px; line-height: 1; }
.ev-name { display: block; margin-top: 2px; font-size: clamp(23px, 5.6vw, 27px); line-height: 1.15; }
.event legend small { display: block; margin-top: 4px; font: 17px "Bebas Neue", sans-serif; letter-spacing: 0.16em; color: #7cc0b0; }
.choices { clear: both; display: flex; gap: 10px; flex-wrap: wrap; }
.choices label { position: relative; flex: 1 1 140px; cursor: pointer; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices span {
  display: block;
  white-space: nowrap;
  text-align: center;
  padding: 10px 12px 8px;
  border: 1.5px solid rgba(247, 245, 107, 0.6);
  border-radius: 999px;
  font: 19px/1.1 "Bebas Neue", sans-serif;
  letter-spacing: 0.16em;
  color: var(--yellow);
  transition: background 0.25s, color 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.choices label:hover span { border-color: var(--yellow); box-shadow: 0 0 14px rgba(247, 245, 107, 0.25); }
.choices input:focus-visible + span { outline: 2px solid #9ff6e2; outline-offset: 2px; }
.choices input[value="yes"]:checked + span {
  background: var(--yellow);
  color: #10302c;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(47, 98, 90, 0.9), 0 0 22px rgba(247, 245, 107, 0.45);
}
.choices input[value="no"]:checked + span {
  border-style: dashed;
  border-color: #7cc0b0;
  color: #9fd8ca;
  background: rgba(124, 192, 176, 0.08);
}
.field-sub { margin: 16px 0 0; display: none; }
.event.attending .field-sub { display: block; }
.event.missing .ev-dow { -webkit-text-stroke-color: #ff9a85; }
.event.missing .ev-name { color: #ffb4a3; }

.form-error { min-height: 1.3em; margin: -6px 0 12px !important; font: italic 600 18px "Cormorant Garamond", serif; color: #ffb4a3; }
.send {
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 15px 38px 12px;
  border-radius: 999px;
  font: 24px/1 "Bebas Neue", sans-serif;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  color: #10302c;
  background: var(--yellow);
  box-shadow: 0 0 0 3px var(--stroke), 0 0 30px rgba(247, 245, 107, 0.45), 0 12px 26px -10px rgba(0, 0, 0, 0.8);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.send:hover { transform: translateY(-1px); background: #fbf98f; box-shadow: 0 0 0 3px var(--stroke), 0 0 44px rgba(247, 245, 107, 0.65), 0 16px 30px -10px rgba(0, 0, 0, 0.8); }
.send:active { transform: translateY(1px); }
.send:focus-visible { outline: 2px solid #9ff6e2; outline-offset: 4px; }
.send:disabled { opacity: 0.7; cursor: wait; transform: none; }

.rsvp-card.done .field,
.rsvp-card.done .event,
.rsvp-card.done .send,
.rsvp-card.done .form-error { display: none; }
.thanks { padding: 6px 0 4px; }
.thanks-main {
  margin: 0 0 14px !important;
  font-family: "Shrikhand", serif;
  font-size: clamp(30px, 6vw, 42px);
  line-height: 1.08;
  color: var(--yellow);
  -webkit-text-stroke: 0.07em var(--stroke);
  paint-order: stroke fill;
  text-shadow: 0 0 26px rgba(247, 245, 107, 0.38);
}
.thanks-sub { font: italic 500 21px/1.45 "Cormorant Garamond", serif; color: #f1e9d8; margin: 0 0 18px !important; }
.link {
  background: none;
  border: 0;
  cursor: pointer;
  font: 18px "Bebas Neue", sans-serif;
  letter-spacing: 0.2em;
  color: #7cc0b0;
  text-decoration: underline;
  text-underline-offset: 4px;
}


@media (max-width: 700px) {
  .title-main br { display: inline; }
  .invite { padding-top: calc(var(--vh, 1vh) * 10); }
  .poster { --pad: 24px; }

  .choices span { padding: 10px 6px 8px; font-size: 17px; letter-spacing: 0.1em; }
}

@media (prefers-reduced-motion: reduce) {
  .hint svg { animation: none; }
  .rsvp-note svg { animation: none; }
  .rsvp-card { transition: none; }
}
