/* ==========================================================================
   Silent Auction -- shared styling
   Deep navy + gold, classic nonprofit gala. No web fonts, no images:
   the site looks the same with or without an internet connection.
   ========================================================================== */

:root {
  --navy-900: #071426;
  --navy-800: #0b1e38;
  --navy-700: #122c4d;
  --navy-600: #1b3f6b;
  --gold-500: #c9a227;
  --gold-400: #d8b643;
  --gold-100: #f3e6bd;
  --cream: #faf7f1;
  --paper: #ffffff;
  --ink: #1a2233;
  --ink-soft: #5a6579;
  --line: #e3ddd1;
  --green: #1f7a4d;
  --red: #a32036;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(7, 20, 38, 0.08);
  --shadow-md: 0 6px 22px rgba(7, 20, 38, 0.10);
  --shadow-lg: 0 18px 50px rgba(7, 20, 38, 0.28);
  --serif: Georgia, 'Times New Roman', 'Iowan Old Style', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy-600); }

.wrap {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ------------------------------------------------------------------ header */

.masthead {
  background: linear-gradient(160deg, var(--navy-900), var(--navy-700) 60%, var(--navy-600));
  color: #fff;
  border-bottom: 4px solid var(--gold-500);
}

.masthead__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}

.brand__mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  border: 2px solid var(--gold-500);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 19px;
  color: var(--gold-400);
  letter-spacing: 0.02em;
}

.brand__name {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
}

.brand__sub {
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-100);
  opacity: 0.85;
}

.navlinks { display: flex; gap: 8px; flex-wrap: wrap; }

.navlinks a {
  color: var(--gold-100);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.navlinks a:hover { border-color: rgba(212, 182, 67, 0.5); color: #fff; }
.navlinks a[aria-current='page'] { border-color: var(--gold-500); color: #fff; }

.hero { padding: 46px 0 52px; text-align: center; }

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 5.2vw, 50px);
  line-height: 1.12;
  margin: 0 0 14px;
  font-weight: 400;
}

.hero p {
  margin: 0 auto;
  max-width: 640px;
  color: #d9e2ee;
  font-size: 16.5px;
}

.hero__rule {
  width: 74px;
  height: 2px;
  background: var(--gold-500);
  margin: 0 auto 22px;
}

/* --------------------------------------------------------------- countdown */

.countdown {
  display: inline-flex;
  gap: 10px;
  margin-top: 26px;
  padding: 14px 20px;
  border: 1px solid rgba(212, 182, 67, 0.45);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
}

.countdown__unit { min-width: 62px; text-align: center; }

.countdown__num {
  font-family: var(--serif);
  font-size: 27px;
  color: var(--gold-400);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.countdown__label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c6d2e0;
}

.countdown--closed {
  border-color: rgba(255, 255, 255, 0.3);
  font-family: var(--serif);
  font-size: 19px;
  color: var(--gold-100);
  display: inline-block;
  margin-top: 26px;
}

/* ------------------------------------------------------------------- banner */

.banner {
  padding: 13px 18px;
  border-radius: 10px;
  margin: 0 0 22px;
  font-size: 14.5px;
  border: 1px solid;
}

.banner--info { background: #eef4fb; border-color: #cbdcee; color: #1c3f66; }
.banner--warn { background: #fdf5e3; border-color: #eddcae; color: #7a5a12; }
.banner--good { background: #edf7f1; border-color: #bfe0cd; color: #135437; }
.banner--bad  { background: #fdeef0; border-color: #f0c7ce; color: #86182b; }

/* ------------------------------------------------------------------- items */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 44px 0 20px;
}

.section-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 27px;
  margin: 0;
}

.section-head .muted { color: var(--ink-soft); font-size: 14px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 24px;
  padding-bottom: 56px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.card__art {
  height: 168px;
  display: grid;
  place-items: center;
  font-size: 62px;
  position: relative;
  line-height: 1;
}

.card__art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.22), transparent 62%);
  pointer-events: none;
}

.card__fmv {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(7, 20, 38, 0.62);
  color: var(--gold-100);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  z-index: 1;
}

.card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }

.card__title {
  font-family: var(--serif);
  font-size: 20px;
  margin: 0 0 8px;
  font-weight: 400;
  line-height: 1.25;
}

.card__desc { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 14px; flex: 1; }

.card__donor {
  font-size: 12px;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0 0 14px;
}

.card__stats {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  margin-bottom: 14px;
}

.stat__label {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.stat__value {
  font-family: var(--serif);
  font-size: 25px;
  color: var(--navy-800);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.stat__value--muted { color: var(--ink-soft); font-size: 20px; }
.stat--right { text-align: right; }
.stat__sub { font-size: 12.5px; color: var(--ink-soft); }

.leader {
  font-size: 12.5px;
  color: var(--green);
  margin: -6px 0 12px;
}

.leader--none { color: var(--ink-soft); }

/* ----------------------------------------------------------------- buttons */

.btn {
  font: inherit;
  font-size: 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px 18px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.btn--primary {
  background: var(--navy-700);
  color: #fff;
  letter-spacing: 0.04em;
}
.btn--primary:hover:not(:disabled) { background: var(--navy-600); }

.btn--gold {
  background: var(--gold-500);
  color: var(--navy-900);
  font-weight: 600;
  letter-spacing: 0.05em;
}
.btn--gold:hover:not(:disabled) { background: var(--gold-400); }

.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover:not(:disabled) { border-color: var(--ink-soft); }

.btn--block { display: block; width: 100%; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ------------------------------------------------------------------ modals */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(7, 20, 38, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 90;
  overflow-y: auto;
}

.modal[open], .modal.is-open { display: flex; }

.modal__panel {
  background: var(--paper);
  border-radius: var(--radius);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin: auto;
}

.modal__head {
  background: linear-gradient(150deg, var(--navy-800), var(--navy-600));
  color: #fff;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.modal__head h3 { font-family: var(--serif); font-weight: 400; margin: 0; font-size: 21px; }
.modal__head p { margin: 4px 0 0; font-size: 13px; color: var(--gold-100); }

.modal__close {
  background: none;
  border: none;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.75;
}
.modal__close:hover { opacity: 1; }

.modal__body { padding: 22px 24px 26px; }

/* ------------------------------------------------------------------- forms */

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.field input, .field select {
  width: 100%;
  font: inherit;
  font-size: 16px; /* 16px stops iOS from zooming on focus */
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
}

.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--navy-600);
  box-shadow: 0 0 0 3px rgba(27, 63, 107, 0.12);
}

.field input[aria-invalid='true'] { border-color: var(--red); }

.field__hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; }
.field__error { font-size: 13px; color: var(--red); margin-top: 6px; display: none; }
.field__error.is-shown { display: block; }

.input-money { position: relative; }
.input-money span {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-soft);
  font-size: 16px;
}
.input-money input { padding-left: 28px; }

.quickbids { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.quickbid {
  font: inherit;
  font-size: 13.5px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  color: var(--navy-700);
}
.quickbid:hover { border-color: var(--navy-600); background: #f4f7fb; }

/* ------------------------------------------------------------------ panels */

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.panel h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 23px;
  margin: 0 0 6px;
}

.panel > p.lead { color: var(--ink-soft); margin: 0 0 20px; font-size: 15px; }

/* ------------------------------------------------------------------ tables */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 560px;
}

table.data th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 2px solid var(--line);
  padding: 10px 12px;
  white-space: nowrap;
}

table.data td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.data tr:last-child td { border-bottom: none; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ------------------------------------------------------------------ badges */

.badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}

.badge--paid    { background: #edf7f1; border-color: #bfe0cd; color: var(--green); }
.badge--unpaid  { background: #fdf5e3; border-color: #eddcae; color: #7a5a12; }
.badge--pending { background: #eef4fb; border-color: #cbdcee; color: #1c3f66; }
.badge--failed  { background: #fdeef0; border-color: #f0c7ce; color: var(--red); }
.badge--open    { background: #edf7f1; border-color: #bfe0cd; color: var(--green); }
.badge--closed  { background: #fdeef0; border-color: #f0c7ce; color: var(--red); }

/* ------------------------------------------------------------------ toasts */

.toasts {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: calc(100% - 32px);
  max-width: 430px;
  pointer-events: none;
}

.toast {
  background: var(--navy-800);
  color: #fff;
  padding: 14px 18px;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  font-size: 14.5px;
  border-left: 4px solid var(--gold-500);
  animation: toast-in 0.22s ease;
}

.toast--good { border-left-color: #3fbc7d; }
.toast--bad  { border-left-color: #e2637a; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

.footer {
  background: var(--navy-900);
  color: #9fb0c4;
  padding: 34px 0;
  font-size: 13.5px;
  text-align: center;
  border-top: 4px solid var(--gold-500);
}

.footer a { color: var(--gold-100); }

/* ----------------------------------------------------------------- utility */

.muted { color: var(--ink-soft); }
.small { font-size: 13px; }
.center { text-align: center; }
.hidden { display: none !important; }
.stack > * + * { margin-top: 14px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.skeleton {
  background: linear-gradient(90deg, #eee 25%, #f6f6f6 37%, #eee 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
  border-radius: var(--radius);
  height: 340px;
}

@keyframes shimmer {
  from { background-position: 100% 50%; }
  to   { background-position: 0 50%; }
}

/* ------------------------------------------------------------------ mobile */

@media (max-width: 620px) {
  .masthead__bar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .navlinks { width: 100%; }
  .hero { padding: 32px 0 38px; }
  .countdown { gap: 4px; padding: 12px 14px; width: 100%; justify-content: space-between; }
  .countdown__unit { min-width: 0; flex: 1; }
  .countdown__num { font-size: 22px; }
  .grid { grid-template-columns: 1fr; gap: 18px; }
  .panel { padding: 20px; }
  .modal { align-items: flex-end; padding: 0; }
  .modal__panel { max-width: 100%; border-radius: 16px 16px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
