/* ============================================================
   main.css — Design System DSC Waqf Website
   Tokens, Typography, Layout, Utilities, Animations
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&family=Amiri:ital,wght@0,400;0,700;1,400&display=swap");

/* ── CSS Custom Properties (Design Tokens) ───────────────── */
:root {
  /* Colors */
  --primary: #1a6b5a;
  --primary-light: #22886f;
  --primary-dark: #134d41;
  --accent: #c9a84c;
  --accent-light: #d9bc72;
  --accent-dark: #a8883a;

  --dark: #0d1f1c;
  --dark-2: #102420;
  --surface: #152b26;
  --surface-2: #1c3830;
  --surface-3: #243f39;
  --border: rgba(201, 168, 76, 0.15);
  --border-light: rgba(255, 255, 255, 0.08);

  --text-primary: #f7f3eb;
  --text-secondary: #b8c4c1;
  --text-muted: #6b8a84;
  --text-gold: #c9a84c;

  --success: #2ecc71;
  --success-bg: rgba(46, 204, 113, 0.12);
  --danger: #e74c3c;
  --danger-bg: rgba(231, 76, 60, 0.12);
  --warning: #f39c12;
  --warning-bg: rgba(243, 156, 18, 0.12);
  --info: #3498db;
  --info-bg: rgba(52, 152, 219, 0.12);

  /* Chain Colors */
  --eth-color: #627eea;
  --matic-color: #8247e5;
  --bnb-color: #f3ba2f;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #1a6b5a 0%, #0d4a3b 100%);
  --gradient-accent: linear-gradient(135deg, #c9a84c 0%, #a8883a 100%);
  --gradient-hero: linear-gradient(
    135deg,
    #0d1f1c 0%,
    #152b26 40%,
    #1a3d35 100%
  );
  --gradient-card: linear-gradient(
    145deg,
    rgba(26, 107, 90, 0.08) 0%,
    rgba(201, 168, 76, 0.04) 100%
  );
  --gradient-gold-line: linear-gradient(
    90deg,
    transparent,
    #c9a84c,
    transparent
  );

  /* Glassmorphism */
  --glass-bg: rgba(21, 43, 38, 0.7);
  --glass-border: rgba(201, 168, 76, 0.2);
  --glass-blur: blur(16px);

  /* Typography */
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-arabic: "Amiri", serif;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.563rem;
  --text-3xl: 1.953rem;
  --text-4xl: 2.441rem;
  --text-5xl: 3.052rem;
  --text-6xl: 3.815rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
  --shadow-gold: 0 4px 24px rgba(201, 168, 76, 0.2);
  --shadow-primary: 0 4px 24px rgba(26, 107, 90, 0.3);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition: 250ms ease;
  --transition-slow: 400ms ease;

  /* Layout */
  --container-max: 1280px;
  --nav-height: 72px;
}

/* ── Reset & Base ─────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--dark);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input,
textarea,
select {
  font-family: inherit;
}

/* ── Typography Utilities ─────────────────────────────────── */
.font-display {
  font-family: var(--font-display);
}
.font-arabic {
  font-family: var(--font-arabic);
  direction: rtl;
}

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.text-5xl { font-size: var(--text-5xl); }
.text-6xl { font-size: var(--text-6xl); }

.text-primary { color: var(--text-primary); }
.text-primary-light { color: var(--primary-light); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--accent); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.leading-relaxed { line-height: 1.7; }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.05em; }
.tracking-wider { letter-spacing: 0.1em; }

/* ── Layout Utilities ─────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section {
  padding: var(--space-20) 0;
}

.section-sm {
  padding: var(--space-12) 0;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-0 { gap: 0; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.hidden { display: none; }

.overflow-hidden { overflow: hidden; }
.rounded { border-radius: var(--radius); }
.rounded-full { border-radius: var(--radius-full); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.border { border: 1px solid var(--border-light); }
.border-t { border-top: 1px solid var(--border-light); }
.border-b { border-bottom: 1px solid var(--border-light); }
.border-light { border-color: var(--border-light); }
.border-border-light { border-color: var(--border-light); }

/* ── Spacing Utilities ───────────────────────────────────── */
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-10 { margin-bottom: var(--space-10); }
.mb-12 { margin-bottom: var(--space-12); }
.pt-2 { padding-top: var(--space-2); }
.pt-4 { padding-top: var(--space-4); }
.p-2 { padding: var(--space-2); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.py-12 { padding-top: var(--space-12); padding-bottom: var(--space-12); }

/* ── Max-width Utilities ─────────────────────────────────── */
.max-w-lg { max-width: 32rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }

/* ── Background Utilities ─────────────────────────────────── */
.bg-dark { background: var(--dark); }
.bg-surface { background: var(--surface); }
.bg-surface-2 { background: var(--surface-2); }

/* ── Section Header ──────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-4);
}

.section-eyebrow::before,
.section-eyebrow::after {
  content: "";
  display: block;
  width: 24px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: var(--space-4);
}

.section-title span {
  color: var(--accent);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Divider ─────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--gradient-gold-line);
  margin: var(--space-8) 0;
  opacity: 0.4;
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--dark-2);
}
::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

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

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
}

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes goldGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(201, 168, 76, 0.2); }
  50% { box-shadow: 0 0 28px rgba(201, 168, 76, 0.5); }
}

@keyframes borderRotate {
  to { background-position: 200% center; }
}

.animate-fade-in { animation: fadeIn var(--transition) forwards; }
.animate-fade-in-up {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }

/* ── Shimmer Loading Skeleton ────────────────────────────── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--surface) 25%,
    var(--surface-2) 50%,
    var(--surface) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ── Live Pulse Badge ─────────────────────────────────────── */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--success);
  letter-spacing: 0.05em;
}

.live-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: pulseDot 1.5s ease-in-out infinite;
}

/* ── Scroll Reveal (JS-driven) ───────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Responsive Breakpoints ──────────────────────────────── */
@media (max-width: 1024px) {
  :root { --container-max: 960px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .section-title { font-size: var(--text-3xl); }
}

@media (max-width: 768px) {
  :root { --nav-height: 64px; }
  .container { padding: 0 var(--space-4); }
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }
  .section { padding: var(--space-12) 0; }
  .section-title { font-size: var(--text-2xl); }
  .section-subtitle { font-size: var(--text-base); }
}

@media (max-width: 480px) {
  html { font-size: 15px; }
  .container { padding: 0 var(--space-4); }
}
