/* Formal edition of the invitation (served at the FormalSiteDomain).
   Shares markup hooks with web/index.html so app.js drives both. */
:root {
  --ivory: #f8f5ee;
  --paper: #fffdf9;
  --navy: #1d2436;
  --navy-soft: #3a4257;
  --gold: #a88a4f;
  --gold-light: #c6a664;
  --muted: #6b6f7b;
  --line: #e4ddcc;
  --serif: "Cormorant Garamond", "Iowan Old Style", Garamond, "Times New Roman", serif;
  --sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--navy);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy); }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  left: 12px; top: 12px; z-index: 10;
  background: var(--paper); padding: 10px 16px;
  font-family: var(--sans); font-size: 14px;
}

/* ------------------------------------------------------------- shared --- */
.eyebrow, label, legend, .btn, .detail h3, .attire span, .guests__head h3 {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-weight: 500;
}

.eyebrow {
  margin: 0;
  text-align: center;
  font-size: 11px;
  color: var(--gold);
}

.rule {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 220px;
  margin: 28px auto;
}
.rule::before, .rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gold-light);
}
.rule span {
  width: 7px; height: 7px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}

/* ------------------------------------------------------------- invite --- */
.invite {
  padding: 56px 20px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(198, 166, 100, .10), transparent 65%),
    var(--ivory);
}

.invite__card {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding: 72px 40px 64px;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--gold-light);
  box-shadow: 0 18px 50px rgba(29, 36, 54, .07);
}
/* Inner hairline: the double border of a printed invitation. */
.invite__card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--line);
  pointer-events: none;
}

.invite__overline {
  margin: 0 0 18px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
}

.invite__line {
  margin: 0;
  font-style: italic;
  font-size: clamp(19px, 3.6vw, 23px);
  color: var(--navy-soft);
}

.invite__name {
  margin: 6px 0 2px;
  font-weight: 500;
  font-size: clamp(64px, 15vw, 104px);
  line-height: 1;
  letter-spacing: .02em;
}

.invite__title {
  margin: 10px 0 0;
  font-size: clamp(26px, 5.5vw, 36px);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.invite__when {
  margin: 0 0 6px;
  font-size: clamp(21px, 4vw, 25px);
  font-weight: 600;
}
.invite__where { margin: 0 0 36px; font-size: 20px; }
.invite__address { color: var(--muted); font-size: 17px; }

@media (max-width: 520px) {
  .invite { padding: 24px 16px; }
  .invite__card { padding: 56px 24px 48px; }
}

/* ------------------------------------------------------------- layout --- */
.section {
  max-width: 860px;
  margin: 0 auto;
  padding: 72px 20px;
}

.section__title {
  margin: 6px 0 0;
  text-align: center;
  font-weight: 500;
  font-size: clamp(34px, 6vw, 46px);
  line-height: 1.15;
}
.section__title::after {
  content: "";
  display: block;
  width: 56px;
  height: 1px;
  margin: 18px auto 0;
  background: var(--gold-light);
}

.section__lede {
  max-width: 560px;
  margin: 22px auto 40px;
  text-align: center;
  color: var(--navy-soft);
}
.section__lede strong { font-weight: 600; color: var(--navy); }

.section--reply {
  max-width: none;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section--reply > * { max-width: 620px; margin-left: auto; margin-right: auto; }

/* ------------------------------------------------------------ details --- */
.details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 44px;
  text-align: center;
}
.detail { padding: 8px 28px; }
.detail + .detail { border-left: 1px solid var(--line); }
.detail h3 { margin: 0 0 10px; font-size: 12px; color: var(--gold); }
.detail__time { margin: 0 0 8px; font-size: 24px; font-weight: 600; }
.detail p { margin: 0; }
.detail p:not(.detail__time) { font-size: 18px; color: var(--navy-soft); }
.detail__link {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--gold-light);
  padding-bottom: 2px;
}

@media (max-width: 680px) {
  .details { grid-template-columns: 1fr; gap: 28px; }
  .detail + .detail { border-left: 0; border-top: 1px solid var(--line); padding-top: 28px; }
}

.attire {
  margin: 48px 0 0;
  text-align: center;
  font-size: 22px;
  font-style: italic;
}
.attire span {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: var(--gold);
  margin-bottom: 2px;
}

/* --------------------------------------------------------------- form --- */
.form { display: grid; gap: 24px; }

.field { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field-row { display: grid; gap: 24px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

label, legend { font-size: 11px; color: var(--navy-soft); padding: 0; }
.hint {
  font-family: var(--serif);
  text-transform: none;
  letter-spacing: 0;
  font-style: italic;
  font-size: 16px;
  color: var(--muted);
}
label .hint { font-size: 14px; }

input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%;
  padding: 10px 2px;
  font: inherit;
  font-size: 20px;
  color: var(--navy);
  background: transparent;
  border: 0;
  border-bottom: 1px solid #cfc6b1;
  border-radius: 0;
}
textarea {
  resize: vertical;
  border: 1px solid #cfc6b1;
  padding: 10px 12px;
}
input:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 1px 0 var(--navy);
}

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 460px) { .choices { grid-template-columns: 1fr; } }

.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice__box {
  display: block;
  padding: 14px 16px;
  text-align: center;
  font-family: var(--serif);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  font-style: italic;
  font-size: 21px;
  background: var(--paper);
  border: 1px solid #cfc6b1;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.choice__box:hover { border-color: var(--navy); }
.choice input:checked + .choice__box {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--ivory);
}
.choice input:focus-visible + .choice__box { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ------------------------------------------------------------- guests --- */
.guests {
  padding: 24px;
  background: var(--ivory);
  border: 1px solid var(--line);
}
.guests__head h3 { margin: 0; font-size: 11px; color: var(--navy-soft); }
.guests__head p { margin: 4px 0 12px; }

.guest-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}
/* The per-row label is redundant under the section heading. */
.guest-row label { position: absolute; left: -9999px; }
.guest-remove {
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.guest-remove:hover { color: var(--navy); border-color: var(--line); }

/* ------------------------------------------------------------ buttons --- */
.btn {
  display: inline-block;
  padding: 16px 34px;
  font-size: 12px;
  text-decoration: none;
  border: 1px solid var(--navy);
  border-radius: 0;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn--primary { background: var(--navy); color: var(--ivory); }
.btn--primary:hover { background: #2c3550; }
.btn--primary[disabled] { opacity: .6; cursor: progress; }
.btn--text {
  justify-self: start;
  padding: 8px 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--gold-light);
  color: var(--navy);
  font-size: 11px;
}
.btn--wide { width: 100%; }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* -------------------------------------------------------------- state --- */
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert {
  padding: 12px 16px;
  font-family: var(--sans);
  font-size: 14px;
}
.alert--error { background: #f8ecea; border-left: 2px solid #9b3b2e; color: #7a2b20; }

.success {
  padding: 8px 24px 40px;
  text-align: center;
  border: 1px solid var(--line);
  background: var(--ivory);
}
.success h3 { margin: 0 0 12px; font-weight: 500; font-size: 32px; }
.success p { margin: 0 0 8px; }
.success .btn--text { margin-top: 14px; }

/* ---------------------------------------------------------------- faq --- */
.faq { max-width: 640px; margin: 36px auto 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 4px; }
.faq summary {
  cursor: pointer;
  font-size: 22px;
  font-weight: 500;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-weight: 400; }
.faq details[open] summary::after { content: "\2013"; }
.faq p { margin: 10px 0 0; color: var(--navy-soft); }

/* ------------------------------------------------------------- footer --- */
.footer {
  padding: 24px 20px 64px;
  text-align: center;
  font-style: italic;
  color: var(--muted);
}
.footer .rule { margin-top: 0; }
