/* ── Design System ──────────────────────────── */

:root {
  --navy: #1e293b;
  --navy-dark: #0f172a;
  --slate: #1e293b;
  --blue: #2563eb;
  --blue-light: #dbeafe;
  --teal: #06b6d4;
  --green: #10b981;
  --green-light: #d1fae5;
  --text: #334155;
  --text-muted: #64748b;
  --bg: #ffffff;
  --bg-offset: #f8fafc;
  --border: #e2e8f0;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.08);
  --radius: 8px;
  --radius-lg: 12px;
}

[data-theme="dark"] {
  --navy: #0f172a;
  --navy-dark: #020617;
  --slate: #f1f5f9;
  --blue: #3b82f6;
  --blue-light: #1e3a5f;
  --teal: #22d3ee;
  --green: #34d399;
  --green-light: #064e3b;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --bg: #0f172a;
  --bg-offset: #1e293b;
  --border: #334155;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.4);
}

/* ── Reset & Base ───────────────────────────── */

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Navbar ─────────────────────────────────── */

.navbar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 36px;
  width: auto;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  align-items: center;
}

.nav-links a {
  display: block;
  padding: 0.5rem 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: 6px;
  transition: all 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--slate);
  background: var(--bg-offset);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text);
  padding: 0.25rem;
}

.lang-select {
  padding: 0.375rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  font-family: inherit;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  outline: none;
}

/* ── Buttons ────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.375rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.4;
}

.btn-primary {
  background: var(--blue);
  color: white;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-accent {
  background: var(--green);
  color: white;
}

.btn-accent:hover {
  background: #059669;
}

.btn-outline {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.25);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.5);
}

.btn-outline-dark {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline-dark:hover {
  background: var(--bg-offset);
  border-color: var(--text-muted);
}

.btn-sm {
  padding: 0.375rem 1rem;
  font-size: 0.8rem;
}

/* ── Hero ───────────────────────────────────── */

.hero {
  background: var(--navy-dark);
  color: white;
  padding: 5rem 0 6rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 60% 50%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 60% 50%, black 30%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37,99,235,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.025em;
  color: white;
}

.hero h1 span {
  color: var(--blue);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1.5rem;
  font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
}

.hero-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.55);
  max-width: 480px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ── Terminal Window ────────────────────────── */

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.terminal {
  width: 100%;
  max-width: 420px;
  background: #0a0f1e;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  font-family: "SF Mono", "Fira Code", "Cascadia Code", "Consolas", monospace;
  font-size: 0.8rem;
  line-height: 1.65;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.terminal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.terminal-dot:nth-child(1) { background: #ef4444; }
.terminal-dot:nth-child(2) { background: #eab308; }
.terminal-dot:nth-child(3) { background: #22c55e; }

.terminal-title {
  margin-left: 0.5rem;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.25);
}

.terminal-body {
  padding: 1.25rem;
}

.terminal-line {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
  white-space: nowrap;
}

.terminal-prompt {
  color: var(--green);
  user-select: none;
}

.terminal-cmd {
  color: rgba(255,255,255,0.85);
}

.terminal-comment {
  color: rgba(255,255,255,0.2);
  font-style: italic;
}

.terminal-keyword {
  color: #c084fc;
}

.terminal-string {
  color: #fbbf24;
}

.terminal-fn {
  color: #60a5fa;
}

.terminal-var {
  color: #f472b6;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: rgba(255,255,255,0.7);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.terminal-output {
  color: rgba(255,255,255,0.5);
  margin-top: 0.5rem;
  padding-left: 1.5rem;
  border-left: 2px solid rgba(255,255,255,0.06);
}

/* ── Sections ───────────────────────────────── */

section { padding: 5rem 0; }

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin-bottom: 0.5rem;
}

.section-header { margin-bottom: 3rem; }

.section-header h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--text-muted);
  max-width: 560px;
  font-size: 1rem;
  line-height: 1.7;
}

/* ── Cards ──────────────────────────────────── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all 0.2s;
}

.card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  background: var(--blue-light);
}

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--slate);
}

.card p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.65;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ── Stats ──────────────────────────────────── */

.stats {
  background: var(--bg-offset);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-number {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--slate);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* ── Page Header ────────────────────────────── */

.page-header {
  background: var(--navy);
  padding: 4rem 0 3rem;
}

.page-header h1 {
  font-size: 2.25rem;
  color: white;
  margin-bottom: 0.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-header p {
  color: rgba(255,255,255,0.5);
  font-size: 1rem;
}

/* ── Content ────────────────────────────────── */

.content { padding: 4rem 0; }
.content-narrow { max-width: 720px; margin: 0 auto; }

/* ── Forms ──────────────────────────────────── */

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.375rem;
  font-size: 0.85rem;
  color: var(--slate);
}

.form-control {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-light);
}

textarea.form-control { min-height: 130px; resize: vertical; }

.form-error { color: #dc2626; font-size: 0.8rem; margin-top: 0.25rem; }

/* ── Flash Messages ─────────────────────────── */

.flash-messages {
  position: fixed;
  top: 80px;
  right: 1.5rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.flash {
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.25s ease;
}

.flash-success {
  background: var(--green-light);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.flash-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ── Donate Tiers ───────────────────────────── */

.donate-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.donate-tier {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: border-color 0.15s;
}

.donate-tier:hover { border-color: var(--blue); }

.donate-tier.featured {
  border-color: var(--blue);
  background: var(--blue-light);
}

.donate-amount {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--slate);
  margin: 0.75rem 0;
}

/* ── Footer ─────────────────────────────────── */

.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.5);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer h4 {
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.footer p {
  font-size: 0.85rem;
  line-height: 1.7;
  max-width: 280px;
}

.footer a {
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  transition: color 0.15s;
}

.footer a:hover { color: white; }

.footer-links { list-style: none; }

.footer-links li { margin-bottom: 0.5rem; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
}

/* ── Admin ──────────────────────────────────── */

.admin-layout { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 240px;
  background: var(--navy);
  color: white;
  padding: 1.5rem 0;
  flex-shrink: 0;
}

.admin-sidebar h3 {
  padding: 0 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
}

.admin-nav { list-style: none; }

.admin-nav a {
  display: block;
  padding: 0.5rem 1.25rem;
  color: rgba(255,255,255,0.55);
  font-size: 0.85rem;
  transition: all 0.15s;
}

.admin-nav a:hover,
.admin-nav a.active {
  background: rgba(255,255,255,0.06);
  color: white;
}

.admin-content {
  flex: 1;
  padding: 2rem;
  background: var(--bg-offset);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.admin-stat-card {
  background: var(--bg);
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.admin-stat-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--slate);
}

.admin-stat-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.admin-table {
  width: 100%;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

.admin-table th,
.admin-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.admin-table th {
  background: var(--bg-offset);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

.admin-table td { color: var(--text); }

/* ── FAQ Accordion ─────────────────────────── */

details.faq-item {
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

details.faq-item summary {
  padding: 1.25rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--slate);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s;
}

details.faq-item summary:hover {
  background: var(--bg-offset);
}

details.faq-item summary::after {
  content: "+";
  color: var(--text-muted);
  font-size: 1.25rem;
  transition: transform 0.2s;
}

details.faq-item[open] summary {
  border-bottom: 1px solid var(--border);
}

details.faq-item[open] summary::after {
  transform: rotate(45deg);
}

details.faq-item div {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

details.faq-item div a {
  color: var(--blue);
  text-decoration: underline;
}

/* ── Share Buttons ─────────────────────────── */

.share-link {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color 0.15s;
}

.share-link:hover {
  color: var(--blue);
}

/* ── Partner Grid ──────────────────────────── */

.partner-logo {
  opacity: 0.5;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
}

.partner-logo:hover {
  opacity: 0.8;
}

/* ── Dark Mode Toggle ──────────────────────── */

.dark-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: var(--text-muted);
  transition: all 0.15s;
}

.dark-toggle:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

[data-theme="dark"] .dark-toggle {
  color: #fbbf24;
  border-color: #334155;
}

[data-theme="dark"] .dark-toggle:hover {
  color: #fde68a;
  border-color: #fbbf24;
}

/* ── Testimonial Carousel ──────────────────── */

.testimonial-carousel {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  overflow: hidden;
}

.testimonial-track {
  display: flex;
  transition: transform 0.4s ease;
}

.testimonial-card {
  min-width: 100%;
  padding: 1rem;
  text-align: center;
}

.testimonial-card blockquote {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text);
  font-style: italic;
  margin-bottom: 1.5rem;
  quotes: none;
}

.testimonial-author strong {
  display: block;
  font-size: 0.9rem;
  color: var(--slate);
  margin-bottom: 0.2rem;
}

.testimonial-author span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.testimonial-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.testimonial-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.testimonial-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.testimonial-dots {
  display: flex;
  gap: 0.4rem;
}

.testimonial-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s;
}

.testimonial-dot.active {
  background: var(--blue);
}

/* ── Responsive ─────────────────────────────── */

@media (max-width: 768px) {
  .container { padding: 0 1.25rem; }

  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 0.5rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    gap: 0;
  }

  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { padding: 0.625rem 1rem; }

  .hero .container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero { padding: 4rem 0 3rem; }
  .hero h1 { font-size: 2rem; }
  .hero-visual { display: none; }

  .card-grid,
  .donate-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .page-header h1 { font-size: 1.75rem; }
  .section-header h2 { font-size: 1.5rem; }
  section { padding: 3rem 0; }
}
