:root {
  --navy: #050a18;
  --gold: #e6c27a;
  --gold-hi: #fbeecb;
  --gold-lo: #c59446;
  --ink: #f4f6fb;
  --muted: #a9b3cb;
  --line: rgba(230, 194, 122, .38);
  --err: #ffa392;
  --sans: Montserrat, 'Segoe UI', system-ui, sans-serif;
  --display: Marcellus, 'Times New Roman', serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; background: var(--navy); }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--ink);
  font: 500 16px/1.5 var(--sans);
  background: var(--navy) radial-gradient(ellipse 90% 70% at 50% 38%, #0d1a3a 0%, #081027 46%, #04070f 100%) fixed;
}

[hidden] { display: none !important; }

.ribbon {
  position: fixed;
  z-index: 0;
  width: clamp(210px, 40vw, 640px);
  pointer-events: none;
}
.ribbon-tl { top: 0; left: 0; }
.ribbon-br { right: 0; bottom: 0; width: clamp(230px, 46vw, 760px); transform: rotate(180deg); }

.invite {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(34px, 7vh, 80px) 22px 72px;
  text-align: center;
}

.logos { display: flex; align-items: center; justify-content: center; gap: clamp(16px, 4.4vw, 48px); }
.logo-times { height: clamp(30px, 5.6vw, 60px); width: auto; color: #fff; }
.logo-inmerge { height: clamp(42px, 7.8vw, 84px); width: auto; }
.logo-rule { width: 1px; height: clamp(46px, 8.6vw, 92px); background: rgba(255, 255, 255, .38); }

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2.6vw, 30px);
  margin: clamp(34px, 6.5vh, 66px) 0 0;
  font-size: clamp(12px, 2vw, 23px);
  font-weight: 400;
  letter-spacing: .42em;
  text-transform: uppercase;
}
.eyebrow span { margin-right: -.42em; white-space: nowrap; }
.eyebrow::before, .eyebrow::after { content: ''; flex: 0 1 132px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.eyebrow::after { background: linear-gradient(90deg, var(--gold), transparent); }

.title {
  margin: .26em 0 .22em;
  font: 400 clamp(44px, 10.6vw, 122px)/1.06 var(--display);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--gold);
  background: linear-gradient(180deg, var(--gold-hi) 10%, #edcf93 46%, var(--gold-lo) 94%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.occasion { margin: 0; font-size: clamp(11px, 1.75vw, 20px); font-weight: 400; letter-spacing: .3em; text-transform: uppercase; }
.summit { margin: .3em 0 0; font-size: clamp(16px, 2.5vw, 29px); font-weight: 400; letter-spacing: .09em; }

.facts { display: flex; align-items: center; justify-content: center; margin: clamp(32px, 6vh, 66px) 0; padding: 0; list-style: none; }
.facts li { display: flex; align-items: center; gap: clamp(12px, 1.8vw, 22px); padding: 6px clamp(16px, 3.6vw, 52px); font-size: clamp(15px, 1.9vw, 22px); line-height: 1.45; text-align: left; }
.facts li + li { border-left: 1px solid rgba(230, 194, 122, .6); }
.facts svg, .done svg { flex: none; width: clamp(30px, 3.4vw, 42px); fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fact-time { font-size: 1.2em; font-weight: 600; letter-spacing: .04em; }

.rsvp {
  max-width: 740px;
  margin: 0 auto;
  padding: clamp(24px, 4.4vw, 44px);
  border: 1.5px solid var(--gold);
  border-radius: 30px;
  background: rgba(6, 11, 26, .62);
  box-shadow: 0 0 46px rgba(230, 194, 122, .09), inset 0 0 30px rgba(120, 165, 240, .05);
}
.rsvp h2 { margin: 0 0 clamp(20px, 3vw, 30px); font: 500 clamp(13px, 1.9vw, 20px)/1.55 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.rsvp h2 span { display: block; color: var(--gold); font-weight: 600; }

form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; text-align: left; }
.field { min-width: 0; }
label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: rgba(255, 255, 255, .035);
  color: var(--ink);
  font: 500 16px/1.4 var(--sans);
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: rgba(169, 179, 203, .5); }
input:focus-visible { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(230, 194, 122, .2); }
input[aria-invalid='true'] { border-color: var(--err); }
input:-webkit-autofill { -webkit-text-fill-color: var(--ink); box-shadow: 0 0 0 1000px #0b1531 inset; caret-color: var(--ink); }
.field small { display: block; margin-top: 6px; color: var(--err); font-size: 13px; line-height: 1.4; }
.field small:empty { display: none; }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.send {
  grid-column: 1 / -1;
  justify-self: center;
  margin-top: 8px;
  padding: 15px 46px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold-hi), #e4be75 55%, var(--gold-lo));
  color: #0a1022;
  font: 600 14px/1.3 var(--sans);
  letter-spacing: .18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter .15s, transform .15s;
}
.send:hover { filter: brightness(1.07); }
.send:active { transform: translateY(1px); }
.send:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.send:disabled { opacity: .6; cursor: progress; }

.note { grid-column: 1 / -1; margin: 0; color: var(--err); font-size: 14px; text-align: center; }
.note:empty { display: none; }

.done { outline: none; }
.done svg { width: 54px; }
.done p { max-width: 520px; margin: 10px auto 0; color: #dfe5f3; font-weight: 400; }
.done .done-title { margin-top: 12px; color: var(--gold); font: 400 clamp(24px, 3.6vw, 34px)/1.25 var(--display); letter-spacing: .04em; }

.lost { display: grid; place-content: center; gap: 14px; min-height: 100vh; text-align: center; }
.lost p { margin: 0; color: var(--gold); font: 400 30px var(--display); letter-spacing: .04em; }
.lost a { color: var(--ink); }

@media (max-width: 680px) {
  .eyebrow { letter-spacing: .3em; }
  .eyebrow span { margin-right: -.3em; }
  .eyebrow::before, .eyebrow::after { flex: 1 1 0; min-width: 14px; }
  .facts { flex-direction: column; align-items: flex-start; gap: 14px; width: max-content; max-width: 100%; margin-left: auto; margin-right: auto; }
  .facts li { padding: 0; }
  .facts li + li { border-left: 0; }
  form { grid-template-columns: 1fr; }
  .rsvp { border-radius: 24px; }
  .send { width: 100%; padding-left: 20px; padding-right: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
