:root {
  --navy-900: #081a27;
  --navy-800: #0c2232;
  --navy-700: #112c40;
  --navy-600: #17384f;
  --gold: #c6a670;
  --gold-soft: #b59563;
  --gold-light: #e3cfa5;
  --cream: #f3ede2;
  --muted: #9fb0bd;
  --error: #f08a7e;
  --radius: 12px;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --script: 'Great Vibes', cursive;
  --sans: 'Montserrat', system-ui, -apple-system, Segoe UI, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-weight: 400;
  color: var(--cream);
  background:
    radial-gradient(1200px 600px at 50% -10%, #173a52 0%, transparent 60%),
    linear-gradient(180deg, var(--navy-800) 0%, var(--navy-900) 100%);
  background-attachment: fixed;
  line-height: 1.5;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px calc(40px + env(safe-area-inset-bottom));
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 8px 0 28px; }

.brand { display: block; width: 104px; height: auto; margin: 0 4px 0 auto; }

.skyline-icon {
  width: 58px; height: 58px; margin: 12px auto 10px; display: block;
  fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
}

.invite-line {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin: 0; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: #d7dde2;
}
.invite-line span { width: 36px; height: 1px; background: var(--gold); opacity: .8; }

.title { margin: 6px 0 0; font-weight: 500; }
.title-main {
  display: block; font-family: var(--serif); font-weight: 600;
  font-size: clamp(44px, 12vw, 76px); letter-spacing: .02em; text-transform: uppercase; color: #fff; line-height: 1;
}
.title-script {
  display: block; font-family: var(--script); color: var(--gold);
  font-size: clamp(56px, 16vw, 96px); line-height: .9; margin-top: -4px;
}

.tagline {
  display: inline-block; margin: 14px 0 0; padding: 8px 4px;
  border-top: 1px solid rgba(198,166,112,.5); border-bottom: 1px solid rgba(198,166,112,.5);
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-light);
}

.event-meta {
  list-style: none; margin: 28px 0 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: left;
}
.event-meta li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; border: 1px solid rgba(198,166,112,.25); border-radius: var(--radius);
  background: rgba(255,255,255,.02);
}
.event-meta li.wide { grid-column: 1 / -1; }
.event-meta svg {
  flex: 0 0 auto; width: 22px; height: 22px; fill: none; stroke: var(--gold); stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round; margin-top: 2px;
}
.event-meta strong { display: block; font-size: 14px; font-weight: 600; color: #fff; }
.event-meta strong sup { font-size: .6em; }
.event-meta small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- Card ---------- */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(23,56,79,.65), rgba(17,44,64,.65));
  border: 1px solid rgba(198,166,112,.3);
  border-radius: 18px;
  padding: 28px 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  backdrop-filter: blur(6px);
}
.card::before {
  content: ''; position: absolute; inset: 6px; border-radius: 13px;
  border: 1px solid rgba(198,166,112,.12); pointer-events: none;
}
.card-head { text-align: center; margin-bottom: 8px; }
.card-logo {
  display: block; width: 80px; height: 80px; margin: -4px 0 12px auto; border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(198,166,112,.75), 0 6px 18px rgba(0,0,0,.35);
}
.card-head h2 {
  font-family: var(--serif); font-weight: 600; font-size: 28px; margin: 0; color: #fff; letter-spacing: .02em;
}
.card-head p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }

fieldset { border: 0; margin: 0 0 8px; padding: 0; min-width: 0; }
fieldset + fieldset { margin-top: 22px; }
.card-head + form fieldset:first-child { margin-top: 22px; }
legend {
  float: left; /* removes the native legend offset so spacing is predictable */
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 0; margin-bottom: 16px;
  font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold);
}
legend::after { content: ''; flex: 1; height: 1px; background: rgba(198,166,112,.25); }
legend em, label em { color: var(--gold); font-style: normal; }

legend + * { clear: both; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
.field { margin-bottom: 14px; }
.field label, .sub-label {
  display: block; font-size: 13px; font-weight: 500; color: #dfe5ea; margin-bottom: 6px;
}
.opt { color: var(--muted); font-weight: 400; font-size: 12px; }

input[type="text"], input:not([type]), input[type="tel"], input[type="email"], input[type="url"], textarea {
  width: 100%; font: inherit; font-size: 16px; /* 16px stops iOS zoom */
  color: #fff; background: rgba(8,26,39,.6);
  border: 1px solid rgba(159,176,189,.25); border-radius: 10px;
  padding: 12px 14px; outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
  -webkit-appearance: none; appearance: none;
}
textarea { resize: vertical; min-height: 64px; }
input::placeholder, textarea::placeholder { color: rgba(159,176,189,.55); }
input:focus, textarea:focus {
  border-color: var(--gold); background: rgba(8,26,39,.85);
  box-shadow: 0 0 0 3px rgba(198,166,112,.18);
}
.invalid input, .invalid textarea, input.invalid { border-color: var(--error); }

.prefix-input { display: flex; }
.prefix-input span {
  display: flex; align-items: center; padding: 0 12px; font-size: 15px; color: var(--gold-light);
  background: rgba(198,166,112,.08); border: 1px solid rgba(159,176,189,.25); border-right: 0;
  border-radius: 10px 0 0 10px;
}
.prefix-input input { border-radius: 0 10px 10px 0; }

.error { margin: 6px 0 0; font-size: 12px; color: var(--error); min-height: 0; }
.error:empty { display: none; }
.form-error { text-align: center; margin-top: 18px; font-size: 13px; }

/* Stepper */
.stepper {
  display: inline-flex; align-items: center; border: 1px solid rgba(198,166,112,.4);
  border-radius: 999px; overflow: hidden; background: rgba(8,26,39,.6);
}
.stepper button {
  width: 48px; height: 46px; border: 0; background: transparent; color: var(--gold);
  font-size: 22px; cursor: pointer; transition: background .2s;
}
.stepper button:hover:not(:disabled) { background: rgba(198,166,112,.12); }
.stepper button:disabled { opacity: .3; cursor: not-allowed; }
.stepper output { min-width: 44px; text-align: center; font-size: 18px; font-weight: 600; color: #fff; }

.companions { padding: 14px; border-radius: var(--radius); background: rgba(198,166,112,.05); border: 1px dashed rgba(198,166,112,.3); }
.companion-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.companion-row:last-child { margin-bottom: 0; }
.companion-row .num {
  flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: var(--navy-800); background: var(--gold);
}

/* Choice cards */
.choices { display: grid; gap: 10px; }
.choices.three { grid-template-columns: 1fr; }
.choices.two { grid-template-columns: 1fr 1fr; margin-bottom: 14px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: flex; flex-direction: column; gap: 2px; height: 100%;
  padding: 14px 16px 14px 44px; border-radius: var(--radius);
  border: 1px solid rgba(159,176,189,.25); background: rgba(8,26,39,.5);
  transition: border-color .2s, background .2s;
  position: relative;
}
.choice span::before {
  content: ''; position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--muted);
  transition: border-color .2s, box-shadow .2s;
}
.choice b { font-weight: 600; font-size: 14px; color: #fff; }
.choice small { font-size: 12px; color: var(--muted); }
.choice:hover span { border-color: rgba(198,166,112,.5); }
.choice input:checked + span { border-color: var(--gold); background: rgba(198,166,112,.1); }
.choice input:checked + span::before { border-color: var(--gold); box-shadow: inset 0 0 0 3.5px var(--navy-800), inset 0 0 0 8px var(--gold); }
.choice input:focus-visible + span { box-shadow: 0 0 0 3px rgba(198,166,112,.3); }

/* Submit */
.submit {
  position: relative; width: 100%; margin-top: 22px; padding: 16px; border: 0; border-radius: 999px;
  font: inherit; font-size: 13px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--navy-900); cursor: pointer;
  background: linear-gradient(135deg, #e3cfa5 0%, #c6a670 45%, #a88654 100%);
  box-shadow: 0 10px 24px rgba(198,166,112,.25);
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.submit:hover { filter: brightness(1.05); box-shadow: 0 12px 30px rgba(198,166,112,.35); }
.submit:active { transform: translateY(1px); }
.submit:disabled { cursor: wait; filter: grayscale(.3) brightness(.9); }
.submit .spinner {
  display: none; position: absolute; right: 22px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  border: 2px solid rgba(8,26,39,.3); border-top-color: var(--navy-900); border-radius: 50%;
  animation: spin .8s linear infinite;
}
.submit.loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Success */
.success { text-align: center; padding: 40px 22px; outline: none; }
.check svg { width: 72px; height: 72px; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.check circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .7s ease forwards; }
.check path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .4s .6s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.success h2 { font-family: var(--serif); font-size: 30px; font-weight: 600; margin: 14px 0 4px; color: #fff; }
.success p { margin: 0; color: #d7dde2; }
.success .script { font-family: var(--script); font-size: 32px; color: var(--gold); margin: 14px 0; }
.success-meta { font-size: 12px; letter-spacing: .08em; color: var(--muted); }

/* Footer */
.foot { text-align: center; margin-top: 30px; font-size: 13px; color: var(--muted); }
.foot p { max-width: 460px; margin: 0 auto 8px; }
.foot a { color: var(--gold); text-decoration: none; letter-spacing: .05em; }
.foot a:hover { text-decoration: underline; }

/* ---------- Larger screens ---------- */
@media (min-width: 600px) {
  .page { padding-top: 40px; }
  .card { padding: 36px 36px; }
  .brand { width: 124px; }
  .card-logo { position: absolute; top: 24px; right: 28px; width: 94px; height: 94px; margin: 0; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .choices.three { grid-template-columns: repeat(3, 1fr); }
  .choices.three .choice span { padding: 44px 14px 16px; text-align: center; align-items: center; }
  .choices.three .choice span::before { left: 50%; top: 16px; transform: translateX(-50%); }
}

@media (max-width: 380px) {
  .event-meta { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .invite-line { font-size: 10.5px; letter-spacing: .14em; gap: 8px; white-space: nowrap; }
  .invite-line span { width: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .check circle, .check path { stroke-dashoffset: 0; }
}
