:root {
  --rfi-black: #000000;
  --rfi-deep-blue: #3759B6;
  --rfi-pastel-blue: #97CEFF;
  --rfi-white: #FFFFFF;
  --rfi-dark-surface: #0a0a0a;
  --rfi-muted: #888;
  --rfi-glow: rgba(55, 89, 182, 0.3);
}

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

html {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Chakra Petch', sans-serif;
  background: var(--rfi-black);
  color: var(--rfi-white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---- PROGRESS BAR ---- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--rfi-deep-blue), var(--rfi-pastel-blue));
  z-index: 1000;
  transition: width 0.3s ease;
  width: 0%;
}

/* ---- NAV DOTS ---- */
.nav-dots {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-dot.active {
  background: var(--rfi-pastel-blue);
  border-color: var(--rfi-pastel-blue);
  box-shadow: 0 0 12px var(--rfi-glow);
  transform: scale(1.3);
}

/* ---- SLIDE ---- */
.slide {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
}

.slide-inner {
  max-width: 680px;
  width: 100%;
  text-align: center;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide.visible .slide-inner {
  opacity: 1;
  transform: translateY(0);
}

/* ---- TYPOGRAPHY ---- */
.tag {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--rfi-pastel-blue);
  margin-bottom: 24px;
}

.headline {
  font-size: clamp(32px, 7vw, 56px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1.1;
  margin-bottom: 24px;
}

.subhead {
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 400;
  color: var(--rfi-muted);
  line-height: 1.6;
  margin-bottom: 32px;
}

.accent { color: var(--rfi-pastel-blue); }
.blue { color: var(--rfi-deep-blue); }

/* ---- BIG NUMBER ---- */
.big-number {
  font-size: clamp(64px, 15vw, 120px);
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--rfi-white) 30%, var(--rfi-pastel-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.big-label {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--rfi-muted);
  margin-bottom: 40px;
}

/* ---- STAT ROW ---- */
.stat-row {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 32px 0;
}

.stat-item {
  text-align: center;
  min-width: 120px;
}

.stat-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--rfi-white);
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--rfi-muted);
  margin-top: 4px;
}

/* ---- IMPACT CHAIN ---- */
.impact-chain {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: center;
  margin: 32px 0;
}

.chain-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 32px;
  background: var(--rfi-dark-surface);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide.visible .chain-item {
  opacity: 1;
  transform: translateX(0);
}

.slide.visible .chain-item:nth-child(1) { transition-delay: 0.2s; }
.slide.visible .chain-item:nth-child(2) { transition-delay: 0.5s; }
.slide.visible .chain-item:nth-child(3) { transition-delay: 0.8s; }
.slide.visible .chain-item:nth-child(4) { transition-delay: 1.1s; }
.slide.visible .chain-item:nth-child(5) { transition-delay: 1.4s; }

.chain-arrow {
  font-size: 20px;
  color: var(--rfi-deep-blue);
  margin: 4px 0;
}

.chain-icon {
  font-size: 28px;
  min-width: 40px;
}

.chain-text {
  text-align: left;
}

.chain-text .value {
  font-size: 20px;
  font-weight: 700;
}

.chain-text .label {
  font-size: 12px;
  color: var(--rfi-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ---- EVIDENCE BOX ---- */
.evidence-box {
  background: var(--rfi-dark-surface);
  border: 1px solid rgba(151, 206, 255, 0.15);
  border-radius: 12px;
  padding: 28px 32px;
  text-align: left;
  margin: 32px auto;
  max-width: 520px;
}

.evidence-box .ev-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--rfi-pastel-blue);
  margin-bottom: 12px;
}

.evidence-box p {
  font-size: 14px;
  color: var(--rfi-muted);
  line-height: 1.7;
  margin-bottom: 8px;
}

.evidence-box a {
  color: var(--rfi-pastel-blue);
  text-decoration: none;
  border-bottom: 1px solid rgba(151, 206, 255, 0.3);
}

/* ---- SHARE CARD ---- */
.share-card {
  background: linear-gradient(145deg, #0d1117, #111827);
  border: 1px solid rgba(55, 89, 182, 0.3);
  border-radius: 16px;
  padding: 40px;
  margin: 32px auto;
  max-width: 440px;
  position: relative;
  overflow: hidden;
}

.share-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(55, 89, 182, 0.08), transparent 60%);
}

.share-card .card-content { position: relative; z-index: 1; }

.share-card .card-name {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--rfi-pastel-blue);
  margin-bottom: 16px;
}

.share-card .card-stat {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 8px;
}

.share-card .card-desc {
  font-size: 15px;
  color: var(--rfi-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.share-card .card-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.share-card .brand-name {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--rfi-muted);
}

.share-card .hashtag {
  font-size: 12px;
  color: var(--rfi-deep-blue);
  font-weight: 600;
}

/* ---- CTA BUTTON ---- */
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--rfi-deep-blue);
  color: var(--rfi-white);
  padding: 14px 32px;
  border-radius: 8px;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  margin: 8px;
}

.cta-btn:hover {
  background: #4568c5;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--rfi-glow);
}

.cta-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.cta-btn.outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
}

.cta-btn.outline:hover {
  border-color: var(--rfi-pastel-blue);
  background: rgba(55, 89, 182, 0.1);
}

.cta-btn.outline:disabled:hover {
  border-color: rgba(255,255,255,0.2);
  background: transparent;
}

/* ---- COLLECTIVE BAR ---- */
.collective-bar {
  width: 100%;
  max-width: 520px;
  margin: 24px auto;
}

.bar-track {
  width: 100%;
  height: 32px;
  background: var(--rfi-dark-surface);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rfi-deep-blue), var(--rfi-pastel-blue));
  border-radius: 16px;
  width: 0%;
  transition: width 2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 12px;
  font-size: 12px;
  font-weight: 700;
}

.bar-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: var(--rfi-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ---- METHODOLOGY FOOTER ---- */
.method-footer {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  margin-top: 48px;
  line-height: 1.8;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- BACKGROUND EFFECTS ---- */
.bg-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
}

.bg-glow-blue {
  background: var(--rfi-deep-blue);
  top: 20%;
  right: -10%;
}

.bg-glow-pastel {
  background: var(--rfi-pastel-blue);
  bottom: 20%;
  left: -10%;
}

/* ---- TIMER/RACE DISPLAY ---- */
.race-time {
  font-size: clamp(48px, 10vw, 80px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 4px;
  margin-bottom: 8px;
}

.race-category {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--rfi-deep-blue);
  font-weight: 600;
}

/* ---- COUNT UP ANIMATION ---- */
.count-up {
  display: inline-block;
}

/* ---- SCROLL PROMPT ---- */
.scroll-prompt {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: pulse 2s ease-in-out infinite;
}

.scroll-prompt span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--rfi-muted);
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--rfi-muted);
  border-bottom: 2px solid var(--rfi-muted);
  transform: rotate(45deg);
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: translateX(-50%) translateY(0); }
  50% { opacity: 1; transform: translateX(-50%) translateY(8px); }
}

/* ---- SEPARATOR ---- */
.sep {
  width: 40px;
  height: 2px;
  background: var(--rfi-deep-blue);
  margin: 24px auto;
}

/* ---- PROTOTYPE BANNER ---- */
.proto-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--rfi-deep-blue);
  padding: 10px 24px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-align: center;
  z-index: 1000;
  font-weight: 600;
}

/* ---- LOADING & ERROR SCREENS ---- */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--rfi-black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.loading-screen .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--rfi-pastel-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 24px;
}

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

.loading-screen .loading-text {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--rfi-muted);
}

.error-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
}

.error-screen .error-title {
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.error-screen .error-message {
  font-size: 16px;
  color: var(--rfi-muted);
  max-width: 480px;
  line-height: 1.6;
  margin-bottom: 32px;
}

/* ---- DONOR LIST ---- */
.donor-list {
  max-width: 520px;
  margin: 24px auto 0;
  max-height: 60vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.donor-item {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.donor-item:last-child {
  border-bottom: none;
}

.donor-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.donor-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--rfi-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.donor-amount {
  font-size: 15px;
  font-weight: 700;
  color: var(--rfi-pastel-blue);
  white-space: nowrap;
  flex-shrink: 0;
}

.donor-message {
  font-size: 13px;
  color: var(--rfi-muted);
  font-style: italic;
  margin-top: 4px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donor-more {
  padding: 16px 0 4px;
  font-size: 13px;
  color: var(--rfi-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
}

/* ---- HIDDEN UTILITY ---- */
.hidden {
  display: none !important;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
  .stat-row { gap: 20px; }
  .stat-value { font-size: 28px; }
  .chain-item { padding: 16px 20px; }
  .share-card { padding: 28px; }
  .nav-dots { right: 10px; gap: 10px; }
  .nav-dot { width: 8px; height: 8px; }
  .donor-list { max-height: 50vh; }
  .donor-name { font-size: 14px; }
  .donor-amount { font-size: 14px; }
}
