/* ═══════════════════════════════════════
   CSS RESET & BASE STYLES
   ═══════════════════════════════════════ */

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

:root { color-scheme: dark; }
[data-theme="light"] { color-scheme: light; }

html {
  scroll-behavior: smooth;
}

body {
  background: var(--background);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--font-regular);
  line-height: var(--lh-body);
  letter-spacing: var(--tracking-normal);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[data-theme="light"] body {
  background: var(--bg-primary);
  color: var(--text-primary);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
ul, ol { list-style: none; }
button { font: inherit; }
input, select, textarea { font: inherit; }

/* ── INLINE SVG ICONS (shared) ── */

.icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  vertical-align: middle;
}

.btn-primary .icon, .btn-outline .icon, .btn-ghost .icon, .btn-don .icon, .nav-cta .icon, .mobile-cta .icon {
  width: 16px;
  height: 16px;
}

.ic {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
}

.ic svg { width: 100%; height: 100%; }

/* Icon slots inside cards / media tiles */
.card-icon,
.cause-emoji,
.story-img,
.news-main-img span,
.news-card-icon,
.don-feature-icon,
.ssl-icon,
.slide-visual {
  color: currentColor;
}

.slide-visual .icon {
  width: 200px;
  height: 200px;
}

.story-img .icon,
.news-main-img span .icon {
  width: 60px;
  height: 60px;
}

.news-card-icon .icon,
.pub-icon .icon,
.don-feature-icon .icon {
  width: 24px;
  height: 24px;
}

.news-card-icon img,
.pub-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.author-avatar .ic {
  width: 22px;
  height: 22px;
}

.ssl-icon .icon {
  width: 18px;
  height: 18px;
  color: var(--success);
}

/* ═══════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--font-bold);
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-section-title); }
h3 { font-size: var(--text-2xl); font-weight: var(--font-semibold); }
h4 { font-size: var(--text-xl); font-weight: var(--font-semibold); }

/* ═══════════════════════════════════════
   SKIP LINK
   ═══════════════════════════════════════ */

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-lg);
  background: var(--rouge);
  color: #fff;
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-mono);
  font-size: var(--fs-btn);
  font-weight: var(--font-semibold);
  text-decoration: none;
  z-index: 10000;
  transition: top var(--transition-base);
}

.skip-link:focus {
  top: var(--space-lg);
}

/* ═══════════════════════════════════════
   FOCUS STYLES
   ═══════════════════════════════════════ */

:focus-visible {
  outline: 2px solid var(--or);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════ */

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

.text-center { text-align: center; }
.text-or { color: var(--or); }
.text-rouge { color: var(--rouge); }

/* Section shared labels */
.section-label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: var(--font-semibold);
  letter-spacing: var(--tracking-tight);
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-section-title);
  font-weight: var(--font-bold);
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-tighter);
  margin-bottom: var(--space-xl);
}

.section-title em { color: var(--or); font-style: italic; }

.section-sub {
  font-size: var(--fs-body-lg);
  font-weight: var(--font-regular);
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: var(--space-5xl);
}

/* Fade-up animation classes */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }

/* Urgency pulse */
@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  margin-right: 8px;
  animation: pulse-red 1.5s ease-in-out infinite;
}

/* Demo banner */
.demo-banner {
  background: linear-gradient(90deg, #f39c12, #e67e22);
  color: #000;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-align: center;
  padding: var(--space-sm);
  position: relative;
  z-index: 1001;
}

/* ═══════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ticker-track { animation: none !important; }
}
