/* ──────────────────────────────────────────────────────────────────────────
   Portal — guest-facing chrome + wizard styles
   ────────────────────────────────────────────────────────────────────────── */

@import url('tokens.css');

body.portal { padding-bottom: 96px; }

.top {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--s-6);
  position: sticky; top: 0; z-index: var(--z-sticky);
}
.top__brand { display: flex; align-items: center; gap: var(--s-2); text-decoration: none; color: inherit; }
.top__brand-mark {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  padding: 3px;
  flex-shrink: 0;
}
.top__brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.top__brand-name { font-weight: var(--fw-semi); font-size: var(--fs-md); }
.top__nav { display: flex; gap: var(--s-2); align-items: center; }

/* ── Hero / page intro ──────────────────────────────────────────────── */
.hero {
  max-width: var(--reading-max);
  margin: 0 auto;
  padding: var(--s-10) var(--s-6) var(--s-7);
  text-align: center;
}
.hero__crest {
  width: 96px; height: 96px;
  margin: 0 auto var(--s-5);
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(31, 30, 27, 0.08));
}
.hero__greeting {
  font-size: var(--fs-sm);
  color: var(--accent-ink);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-bottom: var(--s-3);
  font-weight: var(--fw-medium);
}
.hero__title {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-semi);
  letter-spacing: var(--tracking-tight);
  margin: 0 0 var(--s-3);
  line-height: 1.15;
}
.hero__body {
  font-size: var(--fs-md);
  line-height: var(--lh-md);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ── Wizard ─────────────────────────────────────────────────────────── */
.wizard { max-width: var(--reading-max); margin: 0 auto var(--s-9); padding: 0 var(--s-6); }
.sec {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-3); padding: var(--s-6);
  margin-bottom: var(--s-4);
}
.sec__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-ink);
  font-size: var(--fs-xs); font-weight: var(--fw-semi);
  margin-right: var(--s-2);
}
.sec__head { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-2); }
.sec__title { font-size: var(--fs-lg); font-weight: var(--fw-semi); letter-spacing: var(--tracking-tight); }
.sec__sub   { font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: var(--s-5); }

/* Identified donor card */
.donor {
  display: grid; grid-template-columns: 56px 1fr auto;
  gap: var(--s-4); align-items: center;
  background: var(--accent-soft); border-radius: var(--r-2);
  padding: var(--s-4);
}
.donor__avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--surface); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
  font-weight: var(--fw-semi); font-size: var(--fs-lg);
  border: 1.5px solid var(--accent);
}
.donor__name { font-size: var(--fs-md); font-weight: var(--fw-semi); color: var(--accent-ink); }
.donor__meta { font-size: var(--fs-sm); color: var(--accent-ink); opacity: 0.8; margin-top: 2px; }

/* Choice cards */
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.choice {
  position: relative; padding: var(--s-5);
  border: 1.5px solid var(--border); border-radius: var(--r-3);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.choice:hover { border-color: var(--border-strong); }
.choice.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.choice__check {
  position: absolute; top: var(--s-3); right: var(--s-3);
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-inverse);
}
.choice.is-selected .choice__check { background: var(--accent); border-color: var(--accent); }
.choice__title { font-size: var(--fs-md); font-weight: var(--fw-semi); }
.choice__sub   { font-size: var(--fs-sm); color: var(--text-muted); margin-top: var(--s-1); }
.choice__price { font-size: var(--fs-sm); color: var(--accent-ink); font-weight: var(--fw-medium); margin-top: var(--s-3); }

/* Stepper */
.stepper {
  display: inline-flex; align-items: center;
  border: 1px solid var(--border-strong); border-radius: var(--r-pill);
  background: var(--surface); overflow: hidden;
}
.stepper button {
  width: 32px; height: 32px; border: none; background: transparent;
  cursor: pointer; color: var(--text-muted);
  font-size: var(--fs-base);
  transition: background var(--t-fast), color var(--t-fast);
}
.stepper button:hover { background: var(--surface-2); color: var(--text); }
.stepper button:disabled { opacity: 0.4; cursor: not-allowed; }
.stepper__value {
  min-width: 40px; text-align: center;
  font-size: var(--fs-base); font-weight: var(--fw-medium);
  font-variant-numeric: tabular-nums;
  padding: 0 var(--s-2);
}

/* Modes */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
.mode {
  padding: var(--s-4); border: 1.5px solid var(--border);
  border-radius: var(--r-3); cursor: pointer; text-align: center;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.mode:hover { border-color: var(--border-strong); }
.mode.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.mode__icon {
  width: 32px; height: 32px;
  border-radius: var(--r-2);
  background: var(--surface-2); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--s-2);
}
.mode.is-selected .mode__icon { background: var(--surface); color: var(--accent); }
.mode__title { font-size: var(--fs-base); font-weight: var(--fw-medium); }
.mode__sub   { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 2px; }

/* Sticky pay bar */
.paybar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: var(--s-3) var(--s-6);
  z-index: var(--z-sticky);
}
.paybar__inner {
  max-width: var(--reading-max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4);
}
.paybar__total-label { font-size: var(--fs-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: var(--tracking-wide); }
.paybar__total { font-size: var(--fs-xl); font-weight: var(--fw-semi); letter-spacing: var(--tracking-tight); font-variant-numeric: tabular-nums; }
.paybar__breakdown { font-size: var(--fs-xs); color: var(--text-subtle); margin-top: 2px; }
.paybar__cta { display: flex; align-items: center; gap: var(--s-3); }
.paybar__secure { font-size: var(--fs-xs); color: var(--text-subtle); display: flex; align-items: center; gap: var(--s-1); }

@media (max-width: 640px) {
  .choices, .modes { grid-template-columns: 1fr; }
  .hero { padding: var(--s-7) var(--s-4) var(--s-5); }
  .hero__title { font-size: var(--fs-2xl); }
}
