/* ==========================================================================
   Nael.org - Open AI Literacy & Humanitarian Tech Foundation
   Design System: Luminous Warm Canvas with Modern Dark Glassmorphic Highlights
   ========================================================================== */

:root {
  /* Lighter Base Canvas */
  --bg-body: #fbfcfe;
  --bg-surface: #ffffff;
  --bg-surface-elevated: rgba(255, 255, 255, 0.9);
  --bg-surface-muted: #f1f5f9;
  
  /* Modern Dark Glassmorphism for Impact Highlights */
  --bg-glass-dark: rgba(15, 23, 42, 0.94);
  --bg-glass-dark-card: rgba(30, 41, 59, 0.7);
  --border-glass-dark: rgba(255, 255, 255, 0.12);
  
  /* Borders & Lines */
  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-card: rgba(15, 23, 42, 0.1);
  --border-highlight: rgba(2, 132, 199, 0.4);
  
  /* Non-Profit Brand Accents */
  --primary: #0284c7; /* Hope Azure */
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --primary-glow: rgba(2, 132, 199, 0.25);
  
  --secondary: #059669; /* Life Emerald */
  --secondary-light: #ecfdf5;
  --accent-amber: #d97706; /* Community Warmth */
  --accent-amber-light: #fef3c7;
  --accent-rose: #e11d48;
  
  /* Text Tokens */
  --text-heading: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --text-on-dark: #f8fafc;
  --text-on-dark-muted: #cbd5e1;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 9999px;

  /* Elevation Shadows */
  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 40px -10px rgba(15, 23, 42, 0.12);
  --shadow-dark-glass: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  --shadow-primary-glow: 0 0 25px rgba(2, 132, 199, 0.25);
  
  --glass-blur: blur(16px);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-body);
  background-image: 
    radial-gradient(circle at 12% 15%, rgba(2, 132, 199, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 88% 25%, rgba(5, 150, 105, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(217, 119, 6, 0.04) 0%, transparent 50%);
  color: var(--text-body);
  font-family: var(--font-sans);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-body);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

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

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 0;
  transition: all 0.25s ease;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-heading);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}

.brand-badge-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0284c7 0%, #059669 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

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

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  font-family: var(--font-sans);
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
  transform: translateY(-2px);
  color: #fff;
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-heading);
  border-color: var(--border-card);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-surface-muted);
  border-color: var(--text-dim);
  color: var(--text-heading);
  transform: translateY(-2px);
}

.btn-emerald {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
}

.btn-emerald:hover {
  background: #047857;
  transform: translateY(-2px);
  color: #fff;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
}

/* Hero Section */
.hero-section {
  padding: 4.5rem 0 3.5rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: var(--primary-light);
  border: 1px solid rgba(2, 132, 199, 0.25);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3.25rem;
  line-height: 1.15;
  font-weight: 900;
  color: var(--text-heading);
  letter-spacing: -0.035em;
  margin-bottom: 1.25rem;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #0284c7 0%, #059669 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 620px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-subtle);
}

.stat-number {
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--text-heading);
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Dark Glassmorphism Impact Console */
.hero-glass-console {
  background: var(--bg-glass-dark);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glass-dark);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-dark-glass), 0 0 40px rgba(2, 132, 199, 0.15);
  color: var(--text-on-dark);
  position: relative;
  overflow: hidden;
}

.console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1.25rem;
}

.impact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-glass-dark-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  transition: all 0.2s ease;
}

.impact-row:hover {
  background: rgba(47, 63, 89, 0.85);
  border-color: var(--primary);
  transform: translateX(4px);
}

/* Section */
.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--text-heading);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Feature Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.75rem;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-highlight);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  transition: all 0.25s ease;
}

.feature-card:hover .card-icon {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(2, 132, 199, 0.35);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 0.65rem;
  letter-spacing: -0.02em;
}

.card-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

/* Forms */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
}

.contact-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

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

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.4rem;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--text-heading);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

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

/* Footer */
.footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 4rem 0 2rem;
  margin-top: 5rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand {
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.footer-desc {
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-heading {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

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

.footer-link {
  margin-bottom: 0.65rem;
}

.footer-link a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s ease;
}

.footer-link a:hover {
  color: #38bdf8;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: #64748b;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.active {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  max-width: 520px;
  width: 100%;
  padding: 2rem;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalScaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dim);
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-heading);
}

/* Google Groups Collaborative Feed */
.group-thread-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.35rem;
  margin-bottom: 0.85rem;
  transition: all 0.25s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}

.group-thread-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.thread-tag-badge {
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: var(--primary-light);
  color: var(--primary);
}

.thread-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
}

@media (max-width: 960px) {
  .hero-grid, .contact-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2.1rem;
  }
  .nav-links {
    display: none;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
}
