/* Colin Brown · 100 — RSVP page. White and gold, mobile first. */

:root {
  --bg: #FBF8F1;
  --paper: #FFFFFF;
  --field: #FFFEFB;
  --ink: #2A251D;
  --ink-soft: #6E655A;
  --ink-faint: #B4AA9B;
  --gold: #B08D3C;
  --gold-deep: #8C6B22;
  --gold-light: #E3CF9A;
  --gold-wash: #F6EFDC;
  --line: #E9DDBF;
  --error: #A23B2C;
  --error-wash: #FBEDEA;
  --radius: 14px;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image: radial-gradient(ellipse 90% 50% at 50% 0%, #F3E7C6 0%, rgba(243, 231, 198, 0) 70%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 56px 16px 40px;
}

/* ─── Hero ─── */

.hero {
  text-align: center;
  padding: 0 8px 40px;
}
.hero > * { animation: rise .8s ease-out both; }
.hero > :nth-child(2) { animation-delay: .1s; }
.hero > :nth-child(3) { animation-delay: .2s; }
.hero > :nth-child(4) { animation-delay: .3s; }
.hero > :nth-child(n+5) { animation-delay: .45s; }

.eyebrow {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.honoree {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 8vw, 48px);
  line-height: 1.1;
  letter-spacing: .04em;
}

.hundred {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(120px, 36vw, 200px);
  line-height: .95;
  background: linear-gradient(160deg, #7E5E1A 0%, #C9A452 28%, #F1DEA6 48%, #B8913F 66%, #7E5E1A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.occasion {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 5.5vw, 28px);
}

.ornament {
  width: 220px;
  max-width: 70%;
  margin: 28px auto;
  color: var(--gold);
}
.ornament svg { display: block; width: 100%; height: auto; }
.ornament-sm { width: 160px; margin: 12px auto 16px; }

.details {
  display: grid;
  gap: 18px;
  max-width: 420px;
  margin: 0 auto;
}
.details dt {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.details dd {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.35;
}
.details a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--gold-light);
  transition: border-color .15s;
}
.details a:hover { border-color: var(--gold); }

.provided {
  margin: 22px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--gold-deep);
}

.preview-banner {
  margin: 0;
  padding: 8px 16px;
  font-size: 12px;
  letter-spacing: .06em;
  text-align: center;
  color: var(--gold-deep);
  background: var(--gold-wash);
  border-bottom: 1px solid var(--line);
}

.deadline {
  margin: 22px 0 0;
  font-size: 14px;
  letter-spacing: .06em;
  color: var(--ink-soft);
}
.deadline strong { font-weight: 500; color: var(--ink); }

/* ─── Card ─── */

.card {
  position: relative;
  padding: 32px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(80, 60, 20, .04), 0 12px 40px -12px rgba(120, 90, 30, .18);
  animation: rise .8s .55s ease-out both;
}
.card::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid var(--gold-wash);
  border-radius: calc(var(--radius) - 4px);
  pointer-events: none;
}

.card-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 34px;
  letter-spacing: .08em;
  text-align: center;
}
.card-intro {
  margin: 4px 0 0;
  text-align: center;
  color: var(--ink-soft);
}

/* ─── Form ─── */

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }

.group { margin-top: 32px; }
.group-title {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-bottom: 16px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.group-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.group-hint { margin: -6px 0 14px; }

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }

label, .label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
}
.choice-opt { margin-bottom: 0; }
.optional {
  margin-left: 4px;
  font-size: 12px;
  font-weight: 300;
  color: var(--ink-soft);
}

input[type="text"], textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px; /* 16px stops iOS zooming in on focus */
  font-weight: 400;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 10px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 110px; line-height: 1.5; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--ink-faint); font-weight: 300; }
input[type="text"]:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176, 141, 60, .18);
}

.hint { margin: 6px 0 0; font-size: 13px; color: var(--ink-soft); }

.field-error { display: none; margin: 6px 0 0; font-size: 13px; color: var(--error); }
.field.invalid .field-error { display: block; }
.field.invalid input[type="text"] { border-color: var(--error); }

/* Choice pills (radio buttons) */

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice-3 { grid-template-columns: repeat(3, 1fr); }
.choice-opt { position: relative; }
.choice-opt input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.choice-opt span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;
  text-align: center;
  color: var(--ink-soft);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
}
.choice-opt:hover span { border-color: var(--gold-light); }
.choice-opt input:checked + span {
  color: var(--ink);
  background: var(--gold-wash);
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold);
}
.choice-opt input:checked + span::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--gold);
}
.choice-opt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(176, 141, 60, .3); }
.field.invalid .choice-opt span { border-color: var(--error); }

/* Guest cards */

.guest-list { display: grid; gap: 14px; }
.guest {
  padding: 16px;
  background: linear-gradient(180deg, #FFFDF8, #FFFFFF);
  border: 1px solid var(--line);
  border-radius: 12px;
  animation: rise .35s ease-out both;
}
.guest-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.guest-label {
  font-family: var(--serif);
  font-size: 20px;
  font-style: italic;
  color: var(--gold-deep);
}
.guest-remove {
  padding: 4px 0;
  font: inherit;
  font-size: 13px;
  color: var(--ink-soft);
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}
.guest-remove:hover { color: var(--error); }
.guest.declined .guest-dietary { display: none; }
.guest.declined .choice-field { margin-bottom: 0; }

/* Buttons */

.btn-ghost {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 13px;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .06em;
  color: var(--gold-deep);
  background: transparent;
  border: 1px dashed var(--gold-light);
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn-ghost:hover { background: var(--gold-wash); border-color: var(--gold); }

.btn-primary {
  display: block;
  width: 100%;
  margin-top: 32px;
  padding: 17px 24px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: #FFFFFF;
  background: linear-gradient(135deg, #9C7A2C, #C4A055 50%, #9C7A2C);
  background-size: 200% 100%;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 8px 20px -8px rgba(140, 107, 34, .6);
  cursor: pointer;
  transition: background-position .4s, transform .1s, opacity .2s;
}
.btn-primary:hover { background-position: 100% 0; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: .6; cursor: wait; }
.btn-ghost:focus-visible, .btn-primary:focus-visible, .guest-remove:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.form-error {
  margin: 20px 0 0;
  padding: 12px 14px;
  font-size: 14px;
  text-align: center;
  color: var(--error);
  background: var(--error-wash);
  border-radius: 10px;
}

/* Spam trap, kept off-screen */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ─── Thank-you panel ─── */

.thanks { text-align: center; animation: rise .5s ease-out both; }
.thanks:focus { outline: none; }
.thanks-lead {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.4;
}
.thanks-summary {
  display: grid;
  gap: 14px;
  margin: 0 0 16px;
  padding: 16px 0;
  text-align: left;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.thanks-summary:empty { display: none; }
.thanks-summary h3 {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.thanks-summary ul { margin: 0; padding: 0; list-style: none; }
.thanks-summary li { font-family: var(--serif); font-size: 19px; }
.thanks-summary .diet { font-family: var(--sans); font-size: 13px; color: var(--ink-soft); }
.preview-note {
  margin: 16px 0 0;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--ink-faint);
}

/* ─── Footer ─── */

.footer {
  margin-top: 36px;
  font-size: 13px;
  line-height: 1.8;
  text-align: center;
  color: var(--ink-soft);
}
.footer p { margin: 0; }
.footer a { color: var(--gold-deep); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ─── Motion & breakpoints ─── */

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 600px) {
  .page { padding-top: 80px; }
  .card { padding: 44px 40px; }
}

@media (max-width: 360px) {
  .choice-3 { grid-template-columns: 1fr; }
}

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