/* Chris Getty for Congress — RSVP page (rsvp/styles.css)
   Cohesion pass + State B hero (2026-07-18). Bottom-half polish, Style B
   checkbox chips, up-to-4 write-in, SUMMIT kicker (2026-07-19). Confirmation
   + sending views matched; green reserved for the CTA; add-to-calendar two
   providers (2026-07-21). NO RED (native emoji exempt). Gold: none. */

:root {
  --navy:        #132E5D;
  --navy-dark:   #051528;
  --navy-light:  #1A3A6E;
  --navy-press:  #0F2447;
  --cornflower:  #417CDF;
  --cornflower-press: #2E63BE;
  --link:        #2E63BE;
  --green:       #059669;
  --green-press: #0B7A56;
  --muted:       #4B5563;
  --warn-ink:    #B45309;

  --kicker-on-navy: #AFC3EC;
  --body-on-navy:   #DCE6F6;

  --paper:       #F4F6FA;
  --panel:       #F3F6FC;
  --line:        #E1E7F1;
  --field-border:#C7D2E4;
  --chip-sel-bg: #EAF1FC;
  --warn-bg:     #FEF3E2;
  --warn-border: #F0CE8F;
  --disabled-bg: #F1F4F9;
  --disabled-fg: #A9B4C6;

  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-6: 24px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--navy-press); text-decoration: underline; }

img { display: block; }
img.img-missing { visibility: hidden; }

input, textarea, select { font-size: 16px; }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- card shell ---------- */
.card {
  max-width: 440px;
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
  overflow: hidden;
}
.view { padding: 20px 20px 28px; }
.view[hidden] { display: none; }

@media (max-width: 519.98px) {
  html, body { background: #fff; }
  .card { min-height: 100svh; }
}

@media (min-width: 520px) {
  body { padding: 28px 16px; }
  .card {
    min-height: 0;
    border-radius: 18px;
    border: 1px solid var(--line);
    box-shadow: 0 18px 48px -22px rgba(19,46,93,.45);
  }
}

/* ---------- header ---------- */
.head { margin-bottom: var(--sp-3); }
.lang-row { display: flex; justify-content: flex-end; margin-bottom: var(--sp-2); }

.lang {
  display: inline-flex;
  border: 1px solid #D5DEEC;
  border-radius: 999px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
}
.lang button {
  appearance: none;
  border: 0;
  background: #fff;
  color: var(--muted);
  font: inherit;
  padding: 8px 14px;
  min-height: 36px;
  cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--cornflower); color: #fff; }

.logo { display: block; width: 100%; max-width: 420px; margin: 0 auto; height: auto; border-radius: 12px; }
.logo--state { max-width: 320px; }

/* ---------- hero-into-content card (State B; form + confirmation) ---------- */
.hero-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: var(--navy);
  background-image: linear-gradient(165deg, var(--navy-light), var(--navy) 55%, var(--navy-dark));
  color: #fff;
  margin-bottom: var(--sp-4);
}
.hero-card__photo {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #0e244c;
  border-bottom: 3px solid var(--cornflower);
}
.hero-card__photo .hero__img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.hero-card__body { padding: 16px 18px 18px; text-align: center; }
.hero-card .invite { margin: 0; }
.hero-card .invite__kicker { color: var(--kicker-on-navy); }
.hero-card .invite__names { color: #fff; }
.hero-card .invite__sub { color: var(--body-on-navy); }
.hero-card .conf-heading { margin-bottom: 0; }
.hero-card .conf-heading h2 { color: #fff; }
.hero-card .conf-heading p { color: var(--body-on-navy); }

.lang--overlay {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  border: 1px solid rgba(255,255,255,.55);
}
.lang--overlay button { background: rgba(5,21,40,.45); color: #fff; }
.lang--overlay button[aria-pressed="true"] { background: #fff; color: var(--navy); }

/* hero photo image (form + confirmation) */
.hero__img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }

/* ---------- host invitation ---------- */
.invite { text-align: center; margin: var(--sp-4) 0; }
.invite__kicker { font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--link); margin-bottom: var(--sp-2); }
.invite__names { margin: 0; font-size: 17px; line-height: 1.35; color: var(--navy); font-weight: 800; }
.invite__sub { margin: var(--sp-2) 0 0; font-size: 14.5px; line-height: 1.45; color: var(--muted); }

/* ---------- event details card ---------- */
.details { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: var(--sp-4); }
.details__row { display: flex; gap: 12px; align-items: flex-start; }
.details__row + .details__row { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.details__row .ico { margin-top: 1px; }
.date-big { font-size: 18px; font-weight: 800; line-height: 1.2; }
.time-big { font-size: 16px; font-weight: 700; color: var(--navy); }
.venue-name { font-size: 15px; font-weight: 700; line-height: 1.25; }
.venue-sub { font-size: 13px; color: var(--muted); }
.venue-addr { font-size: 13px; color: var(--muted); margin-top: 3px; }

/* ---------- form ---------- */
.label { display: block; font-size: 14px; font-weight: 700; margin-bottom: var(--sp-2); }
.label .opt { font-weight: 400; color: var(--muted); }

.row { display: flex; gap: 10px; margin-bottom: var(--sp-4); }
.field {
  width: 100%; min-width: 0; height: 48px;
  border: 1px solid var(--field-border); border-radius: 12px;
  padding: 0 14px; font-size: 16px; font-family: inherit; color: var(--navy);
  background: #fff;
}
.field::placeholder { color: #64748B; }
.field[aria-invalid="true"] { border-color: var(--warn-border); background: var(--warn-bg); }
.field--contact { margin-top: var(--sp-2); margin-bottom: var(--sp-4); }
.field-err { font-size: 12.5px; color: var(--warn-ink); font-weight: 700; margin: 6px 0 0; display: none; }
.field-err.show { display: block; }
.mb0 { margin-bottom: 0; }

/* keep updated */
.check-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: var(--sp-6); cursor: pointer; }
.check-row input { position: absolute; opacity: 0; width: 0; height: 0; }
.check-box {
  width: 24px; height: 24px; flex: none; border: 2px solid var(--field-border);
  border-radius: 7px; background: #fff; margin-top: 1px;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.check-row input:checked + .check-box { background: var(--cornflower); border-color: var(--cornflower); }
.check-box::after { content: "✓"; font-size: 14px; font-weight: 700; opacity: 0; }
.check-row input:checked + .check-box::after { opacity: 1; }
.check-row span.txt { font-size: 14px; line-height: 1.45; color: var(--muted); }

/* headcount stepper — boxed count */
.step { display: flex; align-items: center; gap: 14px; margin-bottom: var(--sp-6); }
.step__btn {
  width: 48px; height: 48px; border-radius: 12px;
  border: 1.5px solid var(--cornflower); background: #fff; color: var(--cornflower);
  font-size: 24px; line-height: 1; cursor: pointer; font-family: inherit;
}
.step__btn:disabled {
  border: 1px solid var(--line); background: var(--disabled-bg);
  color: var(--disabled-fg); cursor: not-allowed;
}
.step__count {
  min-width: 54px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--field-border); border-radius: 12px; background: #fff;
  font-size: 20px; font-weight: 700; color: var(--navy);
}

/* priorities group — chips + write-ins share one light-blue panel */
.pgroup { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: var(--sp-6); }
.pgroup .chips { margin-bottom: 9px; }

/* shared square checkbox (chips + write-ins; matches Keep-me-updated) */
.cbox {
  width: 20px; height: 20px; flex: 0 0 auto;
  border: 2px solid var(--field-border); border-radius: 6px; background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 800;
}
.cbox .tick { opacity: 0; }

/* issue chips — Style B: checkbox + emoji + label */
.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chip {
  display: flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 11px; border-radius: 14px;
  border: 1.5px solid var(--field-border); background: #fff;
  font-size: 14px; font-family: inherit; color: var(--navy);
  text-align: left; cursor: pointer;
}
.chip .ico { font-size: 17px; }
.chip .lbl { flex: 1; min-width: 0; }
.chip[aria-pressed="true"] {
  border-color: var(--cornflower);
  box-shadow: inset 0 0 0 .75px var(--cornflower);
  background: var(--chip-sel-bg);
  font-weight: 700;
}
.chip[aria-pressed="true"] .cbox { background: var(--cornflower); border-color: var(--cornflower); }
.chip[aria-pressed="true"] .cbox .tick { opacity: 1; }

/* write-in rows — up to 4, ballot line matching the chips */
.wi-wrap { display: flex; flex-direction: column; gap: 8px; }
.writein {
  display: flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 11px; border-radius: 14px;
  border: 1.5px dashed var(--field-border); background: #fff;
}
.writein .ico { font-size: 16px; }
.wi-input {
  border: 0; outline: 0; background: transparent;
  font-size: 16px; font-family: inherit; color: var(--navy);
  flex: 1; min-width: 0;
}
.wi-input::placeholder { color: #64748B; }
.writein.on { border-style: solid; border-color: var(--cornflower); background: var(--chip-sel-bg); }
.writein.on .cbox { background: var(--cornflower); border-color: var(--cornflower); }
.writein.on .cbox .tick { opacity: 1; }
.wi-hint { font-size: 11.5px; color: var(--muted); text-align: right; padding: 6px 2px 0; }

/* buttons */
.btn {
  width: 100%; height: 54px; border: none; border-radius: 14px;
  font-size: 17px; font-weight: 700; font-family: inherit; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-press); }
.btn--outline {
  height: 50px; background: #fff; color: var(--link);
  border: 1.5px solid var(--cornflower); font-size: 15px;
}
.btn--outline:hover { background: var(--chip-sel-bg); }

/* CTA sheen */
.cta { position: relative; overflow: hidden; }
.cta-sheen { position: absolute; top: 0; left: -60%; width: 45%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.38), transparent); transform: skewX(-20deg); animation: shimmer 3.4s ease-in-out infinite; }
.cta-label { position: relative; }
@keyframes shimmer { 0% { left: -60%; } 55% { left: 150%; } 100% { left: 150%; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* sending view — calm, on-system (cornflower spinner = in-progress) */
.sending { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 16px 44px; }
.sending__spinner {
  width: 34px; height: 34px; border-radius: 999px;
  border: 3px solid var(--body-on-navy); border-top-color: var(--cornflower);
  animation: spin .8s linear infinite; margin-bottom: 18px;
}
.sending__msg { margin: 0; font-size: 16px; font-weight: 700; color: var(--navy); }
.sending__evt { margin: 6px 0 0; font-size: 13px; color: var(--muted); }

/* network error block */
.alert { display: flex; gap: 12px; align-items: flex-start; background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: 14px; padding: 14px; margin-bottom: var(--sp-4); }
.alert__title { font-size: 15px; font-weight: 700; color: var(--navy); }
.alert__body { font-size: 13.5px; line-height: 1.45; color: var(--muted); margin-top: 3px; }
.note { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; color: var(--muted); font-size: 14px; margin-bottom: var(--sp-4); background: var(--panel); }

/* confirmation */
.conf-heading { text-align: center; margin-bottom: var(--sp-4); }
.conf-heading h2 { margin: 0; font-size: 23px; font-weight: 800; }
.conf-heading p { margin: var(--sp-2) 0 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.recap { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: var(--sp-4); }
.recap__row { display: flex; gap: 12px; align-items: flex-start; }
.recap__date { font-size: 16px; font-weight: 700; }
.recap__venue { font-size: 14px; color: var(--muted); margin-top: 2px; }

/* add to calendar — two providers (Google + Apple/Outlook) */
.addcal { margin-bottom: var(--sp-6); }
.addcal__label { text-align: center; font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: var(--sp-2); }
.addcal__row { display: flex; gap: 10px; }
.addcal__row .btn { height: 48px; font-size: 14px; gap: 8px; }

.bring { border-top: 1px solid var(--line); padding-top: var(--sp-6); }
.bring__title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.bring__body { margin: 0 0 var(--sp-3); font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.bring__row { display: flex; gap: 10px; }
.bring__row .btn { height: 48px; font-size: 14px; gap: 8px; }
/* Text invite is the green CTA on confirmation (green = go, one meaning/surface) */
.btn--share { background: var(--green); color: #fff; border: 1.5px solid var(--green); }
.btn--share:hover { background: var(--green-press); }
.btn--ghost { background: #fff; color: var(--navy); border: 1.5px solid var(--field-border); }

/* footer / compliance — bold */
.paidfor { text-align: center; margin-top: var(--sp-6); font-size: 12px; font-weight: 700; color: var(--muted); }

/* icons — native color emoji, sized by font-size. LOCKED set. */
.ico { width: auto; height: auto; flex: none; font-size: 19px; line-height: 1; }
.ico--lg { font-size: 23px; }
.ico--md { font-size: 21px; }
.ico--sm { font-size: 15px; }

:focus-visible { outline: 3px solid var(--cornflower); outline-offset: 2px; border-radius: 6px; }
