/* rsvp - Hope Town event RSVP
   Brand: orange #F09018, grey #6C6C6C, same language as rco-checkin.
   Phone-first: this page is reached by scanning a QR off a paper flyer, so every
   control is thumb-sized and nothing needs a keyboard except name and phone. */

:root {
  --orange: #f09018;
  --orange-dark: #d67d0b;
  --orange-deep: #b8650a;
  --orange-tint: #fdf3e6;
  --plum: #3b2a4a;
  --grey: #6c6c6c;
  --ink: #241f2b;
  --muted: #7e848b;
  --line: #e8e2da;
  --bg: #faf6f0;
  --card: #ffffff;
  --error: #b3261e;
  --error-bg: #fbeae8;
  --shadow: 0 1px 2px rgba(36,31,43,.05), 0 8px 28px rgba(36,31,43,.07);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at 12% -8%, rgba(240,144,24,.16), transparent 46%),
    radial-gradient(circle at 92% 4%, rgba(59,42,74,.11), transparent 42%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
}

.wrap { max-width: 560px; margin: 0 auto; padding: 34px 18px 60px; }
.wrap.wide { max-width: 900px; }

/* ---------------------------------------------------------------- masthead */
.masthead { text-align: center; margin-bottom: 22px; }
.logo { width: 190px; max-width: 58%; height: auto; }
.masthead h1 {
  margin: 18px 0 8px;
  font-size: clamp(1.6rem, 6.2vw, 2.05rem);
  line-height: 1.12;
  letter-spacing: -.022em;
}
.lede { margin: 0 auto; max-width: 27rem; color: var(--grey); font-size: 1.02rem; }

/* Event facts */
.facts {
  margin: 20px auto 0;
  padding: 15px 20px;
  background: linear-gradient(180deg, #fff, var(--orange-tint));
  border: 1px solid #f2ddbe;
  border-radius: 14px;
  text-align: center;
}
.facts .when {
  display: block; font-weight: 700; font-size: 1.08rem;
  letter-spacing: -.01em; color: var(--ink);
}
.facts .where { display: block; color: var(--grey); font-size: .95rem; margin-top: 3px; }

/* -------------------------------------------------------------------- card */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 28px 30px;
  box-shadow: var(--shadow);
}
.center-card { text-align: center; }
@media (max-width: 540px) {
  .card { padding: 22px 18px 26px; border-radius: 15px; }
  .wrap { padding-top: 24px; }
}

.eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-size: .72rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--orange-deep); margin: 0 0 20px;
}
.eyebrow::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

/* ------------------------------------------------------------------ fields */
.field { margin-bottom: 20px; }
label, .label-text {
  display: block; font-weight: 650; font-size: .97rem; margin-bottom: 7px;
}
label .req { color: var(--orange); margin-left: 1px; }
.hint {
  display: block; font-weight: 400; color: var(--muted);
  font-size: .855rem; margin-top: 2px; line-height: 1.45;
}

input[type="text"], input[type="tel"], input[type="password"], textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color .12s, box-shadow .12s;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3.5px rgba(240,144,24,.17);
}
textarea { min-height: 74px; resize: vertical; }

/* Steppers. Typing digits on a phone is the worst part of a form like this, so
   counts are +/- buttons. The number input stays real, so this still works with
   JS off and still submits the same field names. */
.counts { display: grid; gap: 12px; margin-bottom: 20px; }
.count {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 13px; background: #fdfcfa;
}
.count .lab { flex: 1; min-width: 0; }
.count .lab b { display: block; font-weight: 650; font-size: .97rem; }
.count .lab span { display: block; color: var(--muted); font-size: .83rem; line-height: 1.4; }
.stepper { display: flex; align-items: center; gap: 4px; flex: none; }
.stepper button {
  width: 42px; height: 42px; flex: none; padding: 0;
  border: 1.5px solid var(--line); border-radius: 11px;
  background: #fff; color: var(--orange-deep);
  font: 700 1.35rem/1 inherit; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .12s, border-color .12s;
}
.stepper button:hover:not(:disabled) { background: var(--orange-tint); border-color: #f0d3a6; }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper input {
  width: 46px; padding: 8px 0; text-align: center;
  border: none; background: transparent;
  font: 700 1.18rem/1 inherit; color: var(--ink);
  -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; }
/* JS off: show the native spinners so the field is still usable */
.no-js .stepper button { display: none; }
.no-js .stepper input { -moz-appearance: auto; width: 78px; }
.no-js .stepper input::-webkit-inner-spin-button { -webkit-appearance: auto; }

/* Checkbox card */
.check {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 13px;
  background: #fdfcfa; cursor: pointer; transition: border-color .12s, background .12s;
}
.check:hover { border-color: #f0d3a6; background: var(--orange-tint); }
.check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--orange); }
.check b { font-weight: 650; font-size: .97rem; }

/* ----------------------------------------------------------------- buttons */
.actions { margin-top: 26px; }
button.go {
  width: 100%; padding: 16px 20px;
  border: none; border-radius: 13px;
  background: linear-gradient(180deg, var(--orange), var(--orange-dark));
  color: #fff; font: 700 1.08rem/1.2 inherit; cursor: pointer;
  box-shadow: 0 2px 10px rgba(214,125,11,.28);
  transition: filter .12s, transform .08s, box-shadow .12s;
}
button.go:hover { filter: brightness(1.05); box-shadow: 0 4px 16px rgba(214,125,11,.34); }
button.go:active { transform: translateY(1px); }

.reassure { color: var(--muted); font-size: .9rem; margin: 18px 0 0; text-align: center; }

/* ---------------------------------------------------------------- banners */
.error-banner {
  background: var(--error-bg); border: 1px solid #f0c9c4; color: var(--error);
  border-radius: 13px; padding: 13px 17px; margin-bottom: 20px; font-size: .95rem;
}
.error-banner ul { margin: 6px 0 0; padding-left: 20px; }
.error-banner li { margin-top: 2px; }

/* ------------------------------------------------------------ done screen */
.bigtick { font-size: 3.2rem; line-height: 1; margin: 0 0 12px; }
.biglabel {
  font-size: clamp(1.25rem, 5.4vw, 1.5rem); font-weight: 750;
  margin: 0 0 10px; letter-spacing: -.015em; line-height: 1.2;
}
.partyline { font-size: 1.06rem; margin: 0; }
.partyline b { color: var(--orange-deep); }
.addbox {
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: .94rem; color: var(--grey);
}

/* ------------------------------------------------------- staff dashboard */
.hero {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 30px 28px; text-align: center; margin-bottom: 14px;
}
.hero .n {
  font-size: clamp(3.4rem, 15vw, 5rem); font-weight: 800; line-height: .95;
  letter-spacing: -.04em; color: var(--orange-deep);
}
.hero .k {
  font-size: .82rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--muted); margin-top: 8px;
}
.hero .split { margin-top: 10px; color: var(--grey); font-size: 1rem; }
.hero.over { border-color: #f0c9c4; background: var(--error-bg); }
.hero.over .n { color: var(--error); }
.overnote { color: var(--error); font-weight: 650; font-size: .92rem; margin-top: 8px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
@media (max-width: 520px) { .stats { grid-template-columns: 1fr; } }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; box-shadow: 0 1px 2px rgba(36,31,43,.04);
}
.stat .n { font-size: 1.85rem; font-weight: 750; line-height: 1.05; letter-spacing: -.02em; }
.stat .k {
  font-size: .74rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted); margin-top: 3px;
}

.shop {
  background: linear-gradient(180deg, #fff, var(--orange-tint));
  border: 1px solid #f2ddbe; border-radius: 14px;
  padding: 18px 20px; margin-bottom: 20px;
}
.shop h2 { margin: 0 0 10px; font-size: 1rem; letter-spacing: -.01em; }
.shop ul { margin: 0; padding-left: 20px; }
.shop li { margin-top: 4px; }
.shop .note { margin: 10px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.45; }

table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th {
  font-size: .73rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); font-weight: 700;
}
tbody tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; }
.tablewrap {
  overflow-x: auto; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 1px 2px rgba(36,31,43,.04);
}
.toolbar {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px;
}
.toolbar a {
  padding: 9px 15px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink); text-decoration: none;
  font-size: .91rem; font-weight: 600; transition: border-color .12s, background .12s;
}
.toolbar a:hover { border-color: var(--orange); background: var(--orange-tint); }

.foot { text-align: center; color: var(--muted); font-size: .86rem; margin-top: 28px; }
.foot a { color: var(--orange-deep); }
a { color: var(--orange-deep); }

/* ------------------------------------------------------ printable poster */
@media print {
  body { background: #fff; }
  .noprint { display: none !important; }
  .poster { border: none; box-shadow: none; page-break-inside: avoid; }
}
.poster { text-align: center; padding: 42px 30px; }
.poster h1 { font-size: 2.5rem; margin: 12px 0 4px; line-height: 1.08; }
.poster h2 { font-size: 1.28rem; color: var(--grey); font-weight: 600; margin: 0 0 24px; }
.poster .qr { width: 300px; max-width: 78%; height: auto; margin: 8px auto; display: block; }
.poster .url { font-size: 1.55rem; font-weight: 800; letter-spacing: -.015em; margin: 10px 0 4px; }
.poster .when2 { font-size: 1.18rem; margin: 20px 0 2px; font-weight: 700; }
.poster .where2 { color: var(--grey); }
