:root {
  --paper: #f4efe6;
  --paper-raised: #fbf8f2;
  --ink: #1a1012;
  --ink-soft: #5c4a4e;
  --maroon: #5a0722;
  --maroon-deep: #3e0417;
  --line: #e4d8cc;
  --cream: #ede4d6;
  --destructive: #8b1e1e;
  --shadow: 0 0 0 1px rgba(26, 16, 18, 0.06), 0 1px 2px -1px rgba(26, 16, 18, 0.06),
    0 2px 4px 0 rgba(26, 16, 18, 0.04);
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Figtree", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  min-height: 100dvh;
  line-height: 1.5;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  text-wrap: balance;
  line-height: 1.15;
}

a {
  color: var(--maroon);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
[role="button"] {
  cursor: pointer;
  font-family: inherit;
}

.container {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  height: 3.5rem;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--maroon);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.brand:hover {
  text-decoration: none;
}

.mark {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.45rem;
  background: var(--maroon);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 0.95rem;
}

.kicker {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--maroon);
  margin: 0;
}

.hero {
  display: grid;
  gap: 3rem;
  padding: 3.5rem 0 4rem;
  align-items: center;
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: 1fr auto;
    gap: 4rem;
  }
}

.hero h1 {
  font-size: clamp(2.75rem, 6vw, 3.75rem);
  margin: 0.75rem 0 0;
  letter-spacing: -0.02em;
  max-width: 12ch;
}

.lede {
  margin: 1.25rem 0 0;
  max-width: 38ch;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1.25rem;
  border-radius: 0.5rem;
  border: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:active:not(:disabled) {
  transform: scale(0.96);
}

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

.btn-primary {
  background: var(--maroon);
  color: var(--paper-raised);
}

.btn-primary:hover:not(:disabled) {
  background: var(--maroon-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
}

.btn-ghost:hover {
  color: var(--ink);
}

.btn-lg {
  height: 3rem;
  padding: 0 1.5rem;
}

.btn-block {
  width: 100%;
}

.phone {
  width: 280px;
  margin: 0 auto;
  background: var(--ink);
  border-radius: 2.2rem;
  padding: 10px;
  box-shadow: 0 24px 60px -24px rgba(26, 16, 18, 0.55);
}

.phone-screen {
  background: var(--paper-raised);
  border-radius: 1.7rem;
  overflow: hidden;
  position: relative;
  padding: 0.85rem 1rem 1.25rem;
}

.phone-notch {
  position: absolute;
  top: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 88px;
  height: 22px;
  background: var(--ink);
  border-radius: 999px;
}

.phone-status {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--ink-soft);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.letter-row {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.75rem;
}

.letter {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-soft);
}

.letter.on {
  background: var(--maroon);
  color: var(--paper-raised);
  font-weight: 600;
}

.card-soft {
  background: color-mix(in srgb, var(--cream) 80%, transparent);
  border-radius: 0.75rem;
  padding: 0.9rem;
  margin-top: 1.25rem;
}

.card-border {
  box-shadow: var(--shadow);
  border-radius: 0.75rem;
  padding: 0.9rem;
  margin-top: 0.65rem;
  background: var(--paper-raised);
}

.rule {
  height: 1px;
  background: color-mix(in srgb, var(--maroon) 22%, var(--line));
  max-width: 64rem;
  margin: 0 auto;
}

.section {
  padding: 4rem 0;
}

.section h2 {
  font-size: 2.25rem;
  margin: 0.5rem 0 0;
  max-width: 22ch;
}

.features {
  display: grid;
  gap: 2rem;
  margin-top: 2.5rem;
}

@media (min-width: 640px) {
  .features {
    grid-template-columns: 1fr 1fr;
  }
}

.feature h3 {
  font-size: 1.5rem;
  margin: 0.75rem 0 0.5rem;
}

.feature p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.875rem;
  max-width: 28rem;
}

.band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--cream) 50%, transparent);
}

.band-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .band-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.progress-card {
  background: var(--paper-raised);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.progress-bar {
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 1rem;
}

.progress-bar > span {
  display: block;
  height: 100%;
  background: var(--maroon);
  border-radius: 999px;
  width: 0%;
  transition: width 0.5s ease;
}

.pledge-wrap {
  max-width: 48rem;
  margin: 0 auto;
  padding: 4rem 1.25rem 6rem;
}

.panel {
  background: var(--paper-raised);
  border-radius: 0.75rem;
  padding: 1.25rem 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

@media (min-width: 640px) {
  .panel {
    padding: 2rem;
  }
}

.tier-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 640px) {
  .tier-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.tier {
  min-height: 5rem;
  border-radius: 0.5rem;
  padding: 0.75rem;
  text-align: left;
  border: none;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.tier small {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}

.tier strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
}

.tier.selected {
  background: var(--maroon);
  color: var(--paper-raised);
  box-shadow: none;
}

.tier.selected small {
  color: color-mix(in srgb, var(--paper-raised) 70%, transparent);
}

.benefits {
  margin-top: 1.25rem;
  background: color-mix(in srgb, var(--cream) 70%, transparent);
  border-radius: 0.5rem;
  padding: 1rem;
}

.benefits ul {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.benefits li {
  display: flex;
  gap: 0.5rem;
  font-size: 0.875rem;
  align-items: flex-start;
}

.benefits li::before {
  content: "✓";
  color: var(--maroon);
  font-weight: 700;
  flex-shrink: 0;
}

.form-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

input,
textarea {
  width: 100%;
  height: 2.75rem;
  border: none;
  border-radius: 0.5rem;
  padding: 0 0.75rem;
  background: var(--paper-raised);
  color: var(--ink);
  box-shadow: var(--shadow);
  font: inherit;
  font-size: 1rem;
}

textarea {
  height: auto;
  min-height: 7rem;
  padding: 0.7rem 0.75rem;
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--maroon) 35%, transparent);
  outline-offset: 0;
}

.forward-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.forward-row input {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875rem;
}

.hint {
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin: 0.35rem 0 0;
}

.error {
  color: var(--destructive);
  font-size: 0.875rem;
  margin-top: 1rem;
}

.success h3 {
  font-size: 1.5rem;
  margin: 1rem 0 0.5rem;
}

.success p {
  color: var(--ink-soft);
  font-size: 0.875rem;
  max-width: 28rem;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Admin */
.admin-shell {
  min-height: 100dvh;
}

.admin-center {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.admin-card {
  width: 100%;
  max-width: 24rem;
  background: var(--paper-raised);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.stats {
  display: grid;
  gap: 0.75rem;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat {
  background: var(--paper-raised);
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.stat .label {
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}

.stat .value {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 600;
  margin-top: 0.25rem;
  font-variant-numeric: tabular-nums;
}

.stat .hint {
  margin-top: 0.25rem;
}

.tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--cream);
  border-radius: 0.5rem;
  padding: 0.25rem;
  margin-top: 2rem;
}

.tab {
  flex: 1;
  height: 2.25rem;
  border: none;
  border-radius: 0.375rem;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 500;
}

.tab.active {
  background: var(--paper-raised);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(26, 16, 18, 0.06);
}

.table-wrap {
  margin-top: 1rem;
  overflow-x: auto;
  background: var(--paper-raised);
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

th {
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

tr:last-child td {
  border-bottom: none;
}

.mail-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 1rem;
}

@media (min-width: 900px) {
  .mail-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.outbox {
  background: var(--paper-raised);
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.outbox-head {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}

.outbox ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 28rem;
  overflow: auto;
}

.outbox li {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.outbox li:last-child {
  border-bottom: none;
}

.badge {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-soft);
}

.badge.sent {
  color: var(--maroon);
}

.badge.failed {
  color: var(--destructive);
}

.notice {
  background: var(--cream);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

.empty {
  padding: 3rem 1.25rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.875rem;
}
