/* Landing page: the scene, the names, the RSVP ledger and the guest states.
   Look and feel: docs/superpowers/specs/2026-10-21-ui-design.md. Behavior lives in js/rsvp.js. */
:root {
  --ledger-width: 640px;
  --fs-eyebrow: clamp(14px, calc(14px + (100vw - 360px) * 5 / 840), 19px);
  --fs-names: clamp(36px, calc(36px + (100vw - 360px) * 20 / 840), 56px);
  --fs-and: clamp(24px, calc(24px + (100vw - 360px) * 10 / 840), 34px);
  --fs-when: clamp(17px, calc(17px + (100vw - 360px) * 7 / 840), 24px);
  --fs-row: clamp(16px, calc(16px + (100vw - 360px) * 6 / 840), 22px);
}

/* The scene: full width, flush to the top and both edges. */
.hero { display: block; }
.hero img { display: block; width: 100%; height: auto; }
body[data-view="scan"] .hero,
body[data-view="error"] .hero { display: none; }

.has-hero .page { max-width: none; padding-top: 0; }
.has-hero .page > * { max-width: var(--ledger-width); margin-left: auto; margin-right: auto; }
.has-hero .page > .intro { max-width: none; }

/* Names, date and place */
.intro { padding: var(--space-4) 0 var(--space-2); text-align: center; }
.eyebrow {
  margin: 0;
  color: var(--color-muted);
  font-variant: small-caps;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.14em;
}
.names {
  margin: var(--space-2) 0;
  font-size: var(--fs-names);
  font-variant: small-caps;
  letter-spacing: 0.05em;
  line-height: 1.05;
}
.name { display: block; }
.and {
  display: block;
  color: var(--color-muted);
  font-size: var(--fs-and);
  font-style: italic;
  font-variant: normal;
  letter-spacing: 0;
}
.when { margin: 0; font-size: var(--fs-when); font-style: italic; }

@media (min-width: 48rem) {
  .names { display: flex; align-items: baseline; justify-content: center; gap: 0.35em; }
  .name, .and { display: inline; }
}

.quiet { text-align: center; color: var(--color-muted); font-style: italic; }

/* Reply line and party name */
.reply { margin: var(--space-3) auto var(--space-2); text-align: center; }
.party { margin: var(--space-1) 0 0; color: var(--color-muted); font-size: var(--fs-when); font-style: italic; }

/* The ledger: one bordered list, a ruled row per person */
.ledger { border-top: 1.5px solid var(--color-text); border-bottom: 1.5px solid var(--color-text); }
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  padding: 0.8rem 0;
  border-top: 1px solid var(--color-border);
}
.row:first-child { border-top: 0; }
.row-name {
  min-width: 0;
  font-size: var(--fs-row);
  font-variant: small-caps;
  letter-spacing: 0.06em;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

/* Accepts / Declines: real radio buttons drawn as two bordered buttons. */
.choice-group { display: flex; gap: var(--space-2); }
.choice-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(5.5rem, 24vw, 8rem);
  min-height: var(--tap-size);
  border: 1.5px solid var(--color-text);
  background: transparent;
  color: var(--color-text);
  container-type: inline-size;   /* lets the label text shrink with the button's width */
  cursor: pointer;
}
.choice-text {
  font-variant: small-caps;
  font-size: min(1em, 17cqi);
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.choice-input:checked + .choice-label { background: var(--color-text); color: var(--color-accent-contrast); }
.choice-input:focus-visible + .choice-label { outline: 3px solid var(--color-text); outline-offset: 2px; }

.dietary { grid-column: 1 / -1; }
.dietary-label { display: block; margin-bottom: 3px; color: var(--color-muted); font-size: 0.8125em; font-style: italic; }
.dietary-input {
  display: block;
  width: 100%;
  padding: var(--space-2);
  border: 1px solid var(--color-text);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.35);
  color: var(--color-text);
  font: inherit;
  resize: vertical;
}
.row-error { grid-column: 1 / -1; margin: 0; font-style: italic; }

.rsvp-form .submit-button,
.submit-button {
  display: block;
  width: 100%;
  min-height: 3rem;
  margin-top: var(--space-4);
  border: 0;
  border-radius: 0;
  background: var(--color-text);
  color: var(--color-accent-contrast);
  font-family: var(--font-ui);
  font-variant: small-caps;
  font-size: 1.2rem;
  letter-spacing: 0.16em;
  cursor: pointer;
}
.submit-button:disabled { opacity: 0.55; cursor: progress; }

/* After Submit: Response Received, framed by fleuron bands, then the recap */
.received { margin: var(--space-4) auto var(--space-3); text-align: center; }
.received .eyebrow { margin-top: var(--space-4); }
.received-title {
  margin: var(--space-1) 0;
  font-size: clamp(32px, calc(32px + (100vw - 360px) * 12 / 840), 44px);
  font-weight: 400;
  font-variant: small-caps;
  letter-spacing: 0.05em;
}
.received-note { margin: 0 0 var(--space-3); color: var(--color-muted); font-size: var(--fs-when); font-style: italic; }
.recap .row { grid-template-columns: minmax(0, 1fr) auto; padding: 0.6rem 0; }
.answer { color: var(--color-muted); font-style: italic; text-align: right; }
.dietary-note { grid-column: 1 / -1; margin: 0; color: var(--color-muted); font-size: 0.875em; font-style: italic; }
.change { margin: var(--space-3) 0 var(--space-4); text-align: center; }
.link-button {
  border: 0;
  background: none;
  color: var(--color-text);
  font-family: var(--font-ui);
  font-variant: small-caps;
  font-size: 1.0625rem;
  letter-spacing: 0.12em;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.closing { margin-top: var(--space-4); margin-bottom: var(--space-4); text-align: center; color: var(--color-muted); font-style: italic; }
.page > .fleuron { margin: var(--space-4) auto; }

/* Headings and notices are focused by script after an action; they are not controls, so no ring. */
.page [tabindex="-1"]:focus { outline: none; }
