/* Invite landing styles. Phase 3 = view-only (PIN entry + render).
   Phase 4 will layer in the RSVP form. Kept under ~3 KB so the
   SMS-linked first paint stays instant. */
:root {
  --brand: #FC6600;
  --brand-soft: rgba(252, 102, 0, 0.1);
  --ink: #222;
  --muted: #666;
  --hairline: #e5e5e5;
  --error: #d33;
  --error-soft: rgba(221, 51, 51, 0.08);
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: #fafafa;
}
.shell {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}
.brand {
  display: flex;
  justify-content: center;
  padding: 8px 0 24px;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.brand-logo {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 12px;
}
.brand-wordmark {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--ink);
  line-height: 1;
}
.brand-dot { color: var(--brand); }
.muted { color: var(--muted); }
.center { text-align: center; }
.card {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 24px 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

/* ── PIN entry ─────────────────────────────────────────────────── */
h2 { margin: 0 0 8px; font-size: 20px; }
.sub { margin: 0 0 20px; color: var(--muted); font-size: 14px; text-align: center; }
.pin-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 24px 0 8px;
}
.pin-input {
  width: 52px;
  height: 64px;
  font-size: 26px;
  font-weight: 700;
  text-align: center;
  border: 1.5px solid var(--hairline);
  border-radius: 8px;
  background: #fafafa;
  -moz-appearance: textfield;
  appearance: textfield;
}
.pin-input::-webkit-outer-spin-button,
.pin-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.pin-input:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
}
.btn {
  display: inline-block;
  width: 100%;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border: 0;
  border-radius: 8px;
  padding: 14px 16px;
  cursor: pointer;
  margin-top: 16px;
  -webkit-tap-highlight-color: transparent;
}
.btn:disabled { opacity: 0.55; cursor: default; }
.error-msg {
  color: var(--error);
  background: var(--error-soft);
  border-radius: 6px;
  padding: 10px 12px;
  margin: 16px 0 0;
  font-size: 13px;
  text-align: center;
}

/* ── Invite card ───────────────────────────────────────────────── */
.invite-frame {
  position: relative;
  width: 100%;
  background: #f0f0f0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.invite-bg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.invite-overlay {
  position: absolute;
  /* width is clamped via JS (template's maxWidthPct).
     line-height kept tight so multi-line placeholders read cleanly. */
  line-height: 1.15;
  word-wrap: break-word;
  /* Prevent the iOS Safari long-press save-image menu over the card. */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.invite-footer {
  margin: 16px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
/* ── RSVP form ─────────────────────────────────────────────────── */
.rsvp-card {
  margin: 16px 0 0;
  padding: 18px 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--hairline);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.rsvp-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
}
.rsvp-help {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--muted);
}
.form-row { margin: 10px 0; }
.form-row label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.form-row input[type=text],
.form-row input[type=email],
.form-row input[type=number],
.form-row textarea {
  width: 100%;
  border: 1.5px solid var(--hairline);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  background: #fafafa;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
}
.form-row textarea { min-height: 64px; resize: vertical; }
.response-row { display: flex; gap: 8px; margin: 6px 0 0; }
.response-pill {
  flex: 1;
  border: 1.5px solid var(--hairline);
  background: #fafafa;
  color: var(--ink);
  padding: 10px 6px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.response-pill.selected {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.field-error {
  color: var(--error);
  font-size: 12px;
  margin: 6px 0 0;
}
.field-hint {
  color: var(--muted);
  font-size: 11px;
  margin: 4px 0 0;
}
.rsvp-thanks {
  margin: 16px 0 0;
  padding: 14px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--ink);
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
}
.rsvp-thanks .check {
  color: var(--brand);
  font-size: 28px;
  display: block;
  line-height: 1;
  margin-bottom: 6px;
}

/* ── Site footer ───────────────────────────────────────────────── */
.site-footer {
  margin: 32px 0 0;
  padding: 24px 16px 4px;
  border-top: 1px solid var(--hairline);
  text-align: center;
}
.footer-tag {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}
.footer-cta {
  margin: 0 0 14px;
}
.footer-cta a {
  display: inline-block;
  padding: 10px 18px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}
.footer-cta a:hover {
  /* Subtle hover for desktop — does nothing on mobile but doesn't
     hurt; -webkit-tap-highlight zeroed below. */
  background: #e35d00;
}
.footer-meta {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
