/*
 * The functional pages: RSVP, and later the registry and admin.
 *
 * A quieter register than the save-the-date. That page is a printed card; this
 * one is a form that people fill in on a phone, sometimes for a household of
 * five, so legibility and tap targets beat decoration. EB Garamond carries the
 * family resemblance to Cinzel without Lancelot's decorative letterforms.
 */

.page--form, .page--card-and-form {
  display: block;
  background: var(--green);
  font-family: "EB Garamond", Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.5;
  padding: clamp(12px, 3vw, 40px);
}

.sheet {
  background: var(--paper);
  color: var(--ink);
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(22px, 5vw, 52px);
  box-shadow: 0 18px 50px rgb(0 0 0 / 0.3);
}

.sheet--narrow { max-width: 30rem; text-align: center; }

.sheet__header { text-align: center; border-bottom: 1px solid #e6e1d6; padding-bottom: 1.4em; }

.sheet__eyebrow {
  font-family: var(--display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.sheet__header h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  letter-spacing: -0.015em;
  margin-top: 0.35em;
}

.sheet__intro { color: var(--ink-soft); margin-top: 0.6em; text-wrap: pretty; }

.block { margin-top: clamp(26px, 5vw, 42px); }

.block h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.9em;
}

.block__intro { color: var(--ink-soft); margin-bottom: 1em; }

/* ------------------------------------------------------------------ guests */

.guest {
  border: 1px solid #e6e1d6;
  padding: clamp(14px, 3vw, 22px);
  margin-bottom: 14px;
}

.guest__name {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.2rem;
  margin-bottom: 0.7em;
}

.guest__band {
  font-family: "EB Garamond", serif;
  font-size: 0.78rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  margin-left: 0.5em;
}

.events { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.event {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  justify-content: space-between;
}

.event__label { display: flex; flex-direction: column; }
.event__name { font-size: 1rem; }
.event__when { font-size: 0.82rem; color: var(--ink-soft); }

/* --------------------------------------------------------- choice controls */

/* Radios styled as a segmented control: on a phone a real radio dot is a
   miserable tap target, and households are answering this several times over. */
.choice { display: flex; gap: 6px; }
.choice--wrap { flex-wrap: wrap; }

.choice input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }

.choice label {
  border: 1px solid #d8d2c4;
  padding: 0.42em 0.95em;
  cursor: pointer;
  font-size: 0.92rem;
  white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.choice label:hover { border-color: var(--green); }

.choice input[type="radio"]:checked + label {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

/* Keyboard users must still be able to see where they are. */
.choice input[type="radio"]:focus-visible + label {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ fields */

.questions { margin-top: 1.1em; padding-top: 1em; border-top: 1px dashed #e6e1d6; }

.field { margin-top: 1em; }
.field fieldset { border: 0; }
.field legend, .field > label { display: block; margin-bottom: 0.45em; font-size: 0.95rem; }

.field input[type="text"], .plus-one input[type="text"], .plus-one select {
  width: 100%;
  font: inherit;
  padding: 0.5em 0.65em;
  border: 1px solid #d8d2c4;
  background: #fff;
  color: var(--ink);
}

.field input[type="text"]:focus, .plus-one input:focus, .plus-one select:focus {
  outline: 2px solid var(--green);
  outline-offset: -1px;
}

.plus-one {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  border: 1px solid #e6e1d6;
  padding: clamp(14px, 3vw, 20px);
  margin-bottom: 12px;
}

.plus-one label span { display: block; margin-bottom: 0.35em; font-size: 0.88rem; color: var(--ink-soft); }

/* ------------------------------------------------------------------ footer */

.sheet__footer { margin-top: clamp(26px, 5vw, 40px); text-align: center; }

.button {
  font-family: var(--display);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--green);
  color: #fff;
  border: 1px solid var(--green);
  padding: 0.85em 2.2em;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}

.button:hover { background: var(--green-deep); border-color: var(--green-deep); }
.button--quiet { background: transparent; color: var(--green); }
.button--quiet:hover { background: var(--green); color: #fff; }

.sheet__note { margin-top: 1em; font-size: 0.85rem; color: var(--ink-soft); }

.notice { padding: 0.8em 1em; margin-top: 1.2em; font-size: 0.92rem; }
.notice--alert { background: #fdf2f2; border: 1px solid #e4bcbc; color: #8a2b2b; }

.languages {
  display: flex;
  justify-content: center;
  gap: 0.75em;
  margin-top: 2em;
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.languages a { color: var(--ink-soft); }
.languages a:hover { color: var(--green); }
.languages [aria-current] { color: var(--green); text-decoration: underline; text-underline-offset: 0.25em; }

.form--signin .field { margin-top: 1.1em; text-align: left; }
.form--signin label { display: block; margin-bottom: 0.35em; font-size: 0.9rem; color: var(--ink-soft); }
.form--signin input[type="email"], .form--signin input[type="password"] {
  width: 100%;
  font: inherit;
  padding: 0.55em 0.7em;
  border: 1px solid #d8d2c4;
  background: #fff;
  color: var(--ink);
}
.form--signin input:focus { outline: 2px solid var(--green); outline-offset: -1px; }

/* ------------------------------------------------------ contact details */

.form--details .field { margin-top: 0.9em; display: block; }
.form--details .field > span { display: block; font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 0.3em; }

.form--details input[type="text"], .form--details input[type="email"], .form--details input[type="tel"] {
  width: 100%;
  font: inherit;
  padding: 0.55em 0.7em;
  border: 1px solid #d8d2c4;
  background: #fff;
  color: var(--ink);
}

.form--details input:focus { outline: 2px solid var(--green); outline-offset: -1px; }

.field-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 14px; }

.field-group {
  font-family: var(--display);
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 1.8em 0 0.2em;
}

.field-note { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 0.3em; }

.block--quiet { border-top: 1px solid #e6e1d6; padding-top: clamp(18px, 4vh, 32px); }

.events-plain { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.events-plain li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.events-plain strong { font-family: var(--display); font-weight: 400; color: var(--green); min-width: 6em; }
.events-plain span { font-size: 0.95rem; }

/* The form that follows the card on a guest's own page. */
.sheet--after-card {
  display: block;
  max-width: 44rem;
  margin: 0 auto clamp(20px, 5vh, 56px);
  background: var(--paper);
  color: var(--ink);
  padding: clamp(22px, 5vw, 46px);
  box-shadow: 0 18px 50px rgb(0 0 0 / 0.3);
}

.page--card-and-form { padding: 0 clamp(12px, 3vw, 40px) 1px; }

.aside-header { border-bottom: 1px solid #e6e1d6; padding-bottom: 1.1em; margin-bottom: 0.4em; }

.aside-header h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  letter-spacing: -0.01em;
  margin-top: 0.2em;
}

.aside-header .sheet__eyebrow { color: var(--green); }

/* The button that moves from the card to the form, and the language toggle
   that sits with it while the card is the whole of the page. */
.card-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9em;
  padding: clamp(14px, 3vh, 26px) clamp(12px, 3vw, 24px) clamp(22px, 5vh, 44px);
}

.card-cta .button { background: var(--paper); color: var(--green); border-color: var(--paper); }
.card-cta .button:hover { background: #fff; border-color: #fff; }
.card-cta .languages { margin-top: 0; }
.card-cta .languages a { color: rgb(255 255 255 / 0.65); }
.card-cta .languages a:hover { color: #fff; }
.card-cta .languages [aria-current] { color: #fff; }

/* The card-stage is a flex container; with the call to action beneath it the
   two need stacking rather than sitting side by side. */
.card-stage--top { flex-direction: column; }
.card-stage--top .save-the-date { margin-bottom: 0; }

/* For a household whose details we already hold: available, not insistent. */
.link-button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-family: var(--display);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.7);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}
.link-button:hover { color: #fff; }
