/* ------------------------------------------------
   TODAY - The Empathy Contract
   Minimalist, distraction-free design
   ------------------------------------------------ */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #fdfcf8;
  --text: #1c1c1c;
  --accent: #000000;
  --muted: #6b6b6b;
  --border: #e0ddd6;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

html {
  font-size: 18px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  width: 100%;
  max-width: 680px;
  padding: 4rem 1.5rem 3rem;
}

/* ---- Hero ---- */

.hero {
  text-align: center;
  margin-bottom: 3rem;
}

.title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 3rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* ---- Manifesto ---- */

.manifesto {
  margin-bottom: 3rem;
}

.manifesto blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.8;
}

.manifesto-lead {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.manifesto blockquote p + p {
  margin-top: 0.75rem;
}

/* ---- Action ---- */

.action {
  text-align: center;
  margin-bottom: 3rem;
}

/* ---- Verification spinner ---- */

.verify {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  transition: opacity 0.4s ease;
}

.verify.hidden {
  display: none;
}

.verify.verified .spinner {
  border-top-color: #3a3a3a;
  animation: none;
}

.verify-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--muted);
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- Button ---- */

.sign-btn {
  appearance: none;
  border: none;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1rem;
  padding: 0.9rem 2.5rem;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.sign-btn:hover:not(:disabled) {
  opacity: 0.85;
  transform: translateY(-1px);
}

.sign-btn:active:not(:disabled) {
  transform: translateY(0);
}

.sign-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.status {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 1rem;
  min-height: 1.4em;
}

/* ---- Goal / Progress ---- */

.goal {
  text-align: center;
  margin-bottom: 2.5rem;
}

.goal-remaining {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 2.4rem;
  line-height: 1.2;
}

.goal-label {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 0.15rem;
  margin-bottom: 1rem;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: var(--border);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.6s ease;
}

.goal-fraction {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.5rem;
  font-variant-numeric: tabular-nums;
}

/* ---- Counters (3-up) ---- */

.counters {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
  text-align: center;
}

.counter-card {
  flex: 1;
  min-width: 0;
}

.counter-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.counter-value {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 2rem;
}

/* ---- Stats Table ---- */

.stats-table {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-bottom: 3rem;
}

.stats-row {
  display: flex;
  align-items: baseline;
  padding: 0.35rem 0;
  font-size: 0.82rem;
}

.stats-header {
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 0.25rem;
}

.stats-cell {
  font-variant-numeric: tabular-nums;
}

.stats-country {
  flex: 1;
  color: var(--text);
}

.stats-num {
  width: 5.5rem;
  text-align: right;
  color: var(--muted);
}

.stats-header .stats-num {
  color: var(--muted);
}

/* ---- Footer / Closing ---- */

.closing {
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  font-family: var(--serif);
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--muted);
}

.closing strong {
  color: var(--text);
}

/* ---- Responsive ---- */

@media (max-width: 480px) {
  html {
    font-size: 16px;
  }

  main {
    padding: 2.5rem 1rem 2rem;
  }

  .title {
    font-size: 2.25rem;
  }

  .counters {
    gap: 1rem;
  }

  .counter-value {
    font-size: 1.5rem;
  }

  .stats-num {
    width: 4rem;
  }
}
