/* =========================================================================
   X Charity — Design tokens
   Extracted from the Claude Design export (X Charity.dc.html).
   Every brand value lives here once, then is referenced by name below.
   ========================================================================= */
:root {
  /* Surfaces */
  --bg:           #000000;
  --surface-1:    #0B0B0B; /* cards */
  --surface-2:    #060606; /* ticker rail */
  --surface-3:    #0C0C0C; /* ghost / disabled fills */
  --surface-hover:#0F0F0F; /* card hover */

  /* Text */
  --text:         #F5F5F5;
  --text-bright:  #FFFFFF;
  --text-muted:   #9A9A9A;
  --text-dim:     #8A8A8A;
  --text-faint:   #7E7E7E;
  --text-label:   #7A7A7A;
  --text-disabled:#6A6A6A;

  /* Brand accents */
  --accent:       #FF4500;
  --accent-hover: #FF6322;
  --accent-ink:   #0A0A0A; /* text on accent */
  --green:        #22C55E;

  /* Lines */
  --border-1:     #141414; /* section dividers */
  --border-2:     #1E1E1E; /* grid hairlines */
  --border-3:     #262626; /* ghost button outline */
  --border-4:     #3A3A3A; /* ghost button hover */
  --track:        #1A1A1A; /* progress track */

  /* Typography */
  --font: "Space Grotesk", system-ui, -apple-system, sans-serif;

  /* Layout */
  --maxw: 1180px;
  --gutter: 32px;

  /* Radii */
  --radius:  8px;
  --pill:    999px;

  /* Motion */
  --ticker-speed: 45s;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================================================
   Reset & base
   ========================================================================= */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

body {
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  width: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

::selection { background: var(--accent); color: #000; }

/* Shared layout container */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Hairline grid: 1px gaps reveal the border colour beneath the cells */
.grid-lines {
  display: grid;
  gap: 1px;
  background: var(--border-2);
  border: 1px solid var(--border-2);
}

/* Eyebrow label above section titles */
.eyebrow {
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
}

.section-title {
  margin: 14px 0 0;
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-bright);
  line-height: 1.08;
  text-wrap: balance;
}

.section {
  width: 100%;
  border-top: 1px solid var(--border-1);
}

.tnum { font-variant-numeric: tabular-nums; }

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
  background: transparent;
  color: #EDEDED;
  border-color: var(--border-3);
  font-weight: 500;
}
.btn-ghost:hover { border-color: var(--border-4); background: var(--surface-3); }

.btn-sm  { font-size: 14.5px; padding: 11px 20px; }
.btn-md  { font-size: 16px;   padding: 15px 28px; }
.btn-md-ghost { font-size: 16px; padding: 14px 26px; }

.btn:disabled {
  background: var(--surface-3);
  color: var(--text-disabled);
  border-color: var(--border-2);
  cursor: not-allowed;
}

/* =========================================================================
   Header / nav
   ========================================================================= */
.site-header { width: 100%; border-bottom: 1px solid var(--border-1); }
.nav {
  padding-top: 22px;
  padding-bottom: 22px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.brand {
  justify-self: start;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-bright);
}
.brand .accent { color: var(--accent); }

.live-pill {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 9px;
}
.live-pill .label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.nav-cta { justify-self: end; }

/* Pulsing live dot */
.dot {
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  flex-shrink: 0;
}
.dot-lg { width: 8px; height: 8px; animation: pulse 2s infinite; }
.dot-sm { width: 7px; height: 7px; }
.dot-row { width: 8px; height: 8px; }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0   rgba(34, 197, 94, 0.45); }
  70%  { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0   rgba(34, 197, 94, 0); }
}

/* =========================================================================
   Live ticker
   ========================================================================= */
.ticker {
  width: 100%;
  overflow: hidden;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-1);
  padding: 13px 0;
}
.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 54px;
  white-space: nowrap;
  animation: marquee var(--ticker-speed) linear infinite;
  will-change: transform;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.ticker-item .handle { color: var(--green); }
.ticker-item .mid    { color: var(--text-faint); }
.ticker-item .sep    { color: #5E5E5E; }
.ticker-item .usd    { color: #EDEDED; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  padding: 116px 0 80px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero h1 {
  margin: 0;
  font-size: clamp(44px, 6vw, 80px);
  line-height: 1.03;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--text-bright);
  max-width: 960px;
  text-wrap: balance;
}
.hero h1 .accent { color: var(--accent); }
.hero p {
  margin: 28px 0 0;
  max-width: 600px;
  font-size: 18.5px;
  line-height: 1.62;
  color: var(--text-muted);
  font-weight: 400;
  text-wrap: pretty;
}
.hero p .bright { color: #EDEDED; }
.hero-actions {
  margin-top: 38px;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

/* =========================================================================
   Stats bar
   ========================================================================= */
.stats { padding-bottom: 104px; }
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stat { background: var(--surface-1); padding: 38px 34px; }
.stat-value {
  font-size: clamp(34px, 3.6vw, 52px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-bright);
  line-height: 1;
}
.stat-value.is-green { color: var(--green); }
.stat-label {
  margin-top: 12px;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--text-label);
  text-transform: uppercase;
  font-weight: 500;
}

/* =========================================================================
   Section heads
   ========================================================================= */
.section-inner { padding: 100px 0; }
.section-head { margin-bottom: 52px; max-width: 620px; }
.section-lead {
  margin: 16px 0 0;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--text-dim);
}

/* =========================================================================
   How it works
   ========================================================================= */
.steps-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step {
  background: var(--surface-1);
  padding: 36px 30px 40px;
  position: relative;
  overflow: hidden;
  min-height: 236px;
}
.step-num {
  position: absolute;
  top: 16px;
  right: 22px;
  font-size: 84px;
  line-height: 1;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.05);
  letter-spacing: -0.04em;
  pointer-events: none;
}
.step-icon { position: relative; height: 30px; }
.step-icon svg { stroke: var(--accent); }
.step-title {
  position: relative;
  margin-top: 26px;
  font-size: 19px;
  font-weight: 600;
  color: var(--text-bright);
  letter-spacing: -0.01em;
}
.step-desc {
  position: relative;
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-dim);
}

/* =========================================================================
   Community vote
   ========================================================================= */
.vote-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 46px;
}
.vote-head .copy { max-width: 560px; }
.vote-controls { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.countdown {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14.5px;
}
.countdown svg { stroke: var(--text-dim); }
.countdown .time { color: var(--text-bright); font-weight: 600; }

.btn-vote { font-size: 14.5px; padding: 11px 22px; }
.btn-vote.is-on { background: var(--accent); color: var(--accent-ink); }
.btn-vote.is-on:hover { background: var(--accent-hover); }

.vote-grid { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.vote-card {
  background: var(--surface-1);
  padding: 30px;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease;
}
.vote-card:hover { background: var(--surface-hover); }
.vote-card.is-selected::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--accent);
  pointer-events: none;
}
.vote-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.vote-handle {
  font-size: 19px;
  font-weight: 600;
  color: var(--text-bright);
  letter-spacing: -0.01em;
}
.vote-pct {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.02em;
}
.vote-bar {
  margin-top: 18px;
  height: 6px;
  background: var(--track);
  border-radius: var(--pill);
  overflow: hidden;
}
.vote-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--pill);
  transition: width 0.6s ease;
}
.vote-card-bottom {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.vote-votes { font-size: 13.5px; color: var(--text-dim); }
.vote-selected-tag {
  font-size: 12.5px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* =========================================================================
   Proof feed
   ========================================================================= */
.proof-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border-2);
  border: 1px solid var(--border-2);
}
.proof-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 26px;
  background: var(--surface-1);
  animation: rowIn 0.5s ease;
}
.proof-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.proof-text { font-size: 15px; letter-spacing: -0.01em; }
.proof-text .sender  { color: var(--accent); font-weight: 600; }
.proof-text .verb    { color: var(--text-faint); }
.proof-text .charity { color: var(--green); font-weight: 600; }
.proof-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  font-size: 14.5px;
}
.proof-amount { color: var(--text); font-weight: 600; }
.proof-usd    { color: var(--text-faint); }
.proof-ago    { color: #5E5E5E; }
.proof-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}
.proof-link:hover { color: var(--text-bright); }

@keyframes rowIn {
  from { opacity: 0; transform: translateY(-7px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { width: 100%; border-top: 1px solid var(--border-2); }
.footer-inner {
  padding: 36px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand { font-size: 14.5px; color: var(--text-faint); letter-spacing: -0.01em; }
.footer-brand .accent { color: var(--accent); }
.footer-brand .bright { color: #EDEDED; }
.footer-brand .sep    { color: #4E4E4E; }
.footer-links { display: flex; gap: 26px; font-size: 14.5px; }
.footer-links a { color: var(--text-dim); text-decoration: none; transition: color 0.15s ease; }
.footer-links a:hover { color: var(--text-bright); }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .nav {
    grid-template-columns: 1fr auto;
    row-gap: 14px;
  }
  .live-pill { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .hero { padding: 72px 0 56px; }
  .section-inner { padding: 64px 0; }
  .proof-right { gap: 12px; }
  .vote-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .dot-lg { animation: none; }
  .proof-row { animation: none; }
}
