/* ==========================================================================
   TASWEEQA — DESIGN SYSTEM TOKENS & CORE UTILITIES
   Egyptian Local Commerce & Delivery Marketplace (https://tasweeqa.store)
   ========================================================================== */

/* Google Fonts: Cairo & Tajawal */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&family=Tajawal:wght@400;500;700;800&display=swap');

:root {
  /* Nile Green Primary (Ecosystem Trust) */
  --c-green-primary: #0b6623;
  --c-green-dark: #064e3b;
  --c-green-light: #15803d;
  --c-green-soft: #e8f5e9;
  --c-green-subtle: #f0fdf4;

  /* Terracotta Orange Accent (Energy, Orders & Speed) */
  --c-orange-accent: #ff6b00;
  --c-orange-dark: #d95300;
  --c-orange-light: #ff8533;
  --c-orange-soft: #fff3e0;

  /* Egyptian Sand & Warm Marketplace Neutrals */
  --c-gold: #d4af37;
  --c-gold-dark: #b89528;
  --c-amber-soft: #fef3c7;
  --c-warm-bg: #faf7f2;
  --c-warm-surface: #ffffff;
  --c-warm-border: #ede8df;

  /* Slate Scale */
  --c-slate-950: #020617;
  --c-slate-900: #0f172a;
  --c-slate-800: #1e293b;
  --c-slate-700: #334155;
  --c-slate-600: #475569;
  --c-slate-500: #64748b;
  --c-slate-400: #94a3b8;
  --c-slate-300: #cbd5e1;
  --c-slate-200: #e2e8f0;
  --c-slate-100: #f1f5f9;
  --c-slate-50: #f8fafc;

  /* Typography Scale (Fluid clamp) */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */
  --text-6xl: 3.75rem;     /* 60px */

  /* Spacing Scale */
  --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 Radii */
  --radius-xs: 0.25rem;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --radius-3xl: 1.75rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-subtle: 0 2px 8px -2px rgba(15, 23, 42, 0.05);
  --shadow-card: 0 10px 25px -4px rgba(15, 23, 42, 0.06);
  --shadow-elevated: 0 18px 40px -6px rgba(15, 23, 42, 0.12);
  --shadow-float: 0 25px 60px -12px rgba(0, 0, 0, 0.22);

  /* Transitions */
  --trans-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --trans-base: 300ms cubic-bezier(0.16, 1, 0.3, 1);
  --trans-slow: 500ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Font Families */
  --font-heading: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-body: 'Tajawal', system-ui, -apple-system, sans-serif;
}

/* RTL / LTR Configuration */
[dir="rtl"] {
  --font-heading: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-body: 'Tajawal', system-ui, -apple-system, sans-serif;
  text-align: right;
}

[dir="ltr"] {
  --font-heading: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-body: 'Cairo', system-ui, -apple-system, sans-serif;
  text-align: left;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--c-warm-bg);
  color: var(--c-slate-900);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Links & Focus States */
a {
  text-decoration: none;
  color: inherit;
  transition: color var(--trans-fast);
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(11, 102, 35, 0.35);
  outline-offset: 2px;
}

/* Responsive Containers */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (min-width: 640px) {
  .container { padding-inline: var(--space-6); }
}

@media (min-width: 1024px) {
  .container { padding-inline: var(--space-8); }
}

/* Typography Classes */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
}

.title-display {
  font-size: clamp(2.25rem, 5vw, 3.85rem);
  font-weight: 900;
  color: var(--c-slate-950);
  letter-spacing: -0.02em;
}

.title-section {
  font-size: clamp(1.65rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: var(--c-slate-900);
  letter-spacing: -0.01em;
}

.title-subsection {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: var(--c-slate-900);
}

.title-card {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--c-slate-900);
}

.text-body {
  font-size: var(--text-base);
  color: var(--c-slate-700);
}

.text-subhead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 500;
  color: var(--c-slate-600);
  line-height: 1.6;
}

.text-small {
  font-size: var(--text-sm);
  color: var(--c-slate-600);
}

.text-caption {
  font-size: var(--text-xs);
  color: var(--c-slate-500);
}

/* Badges & Chips */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1;
}

.badge-green, .badge-primary {
  background-color: var(--c-green-soft);
  color: var(--c-green-dark);
  border: 1px solid rgba(11, 102, 35, 0.2);
}

.badge-orange, .badge-accent {
  background-color: var(--c-orange-soft);
  color: var(--c-orange-dark);
  border: 1px solid rgba(255, 107, 0, 0.2);
}

.badge-gold {
  background-color: var(--c-amber-soft);
  color: var(--c-gold-dark);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.badge-preview {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  font-size: 11px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.65rem;
  border-radius: var(--radius-xl);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-base);
  line-height: 1;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--trans-base);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--c-green-primary) 0%, var(--c-green-dark) 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(11, 102, 35, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 8px 22px rgba(11, 102, 35, 0.35);
  color: white;
}

.btn-accent {
  background: linear-gradient(135deg, var(--c-orange-accent) 0%, var(--c-orange-dark) 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.25);
}

.btn-accent:hover {
  box-shadow: 0 8px 22px rgba(255, 107, 0, 0.35);
  color: white;
}

.btn-outline {
  background-color: white;
  border-color: var(--c-slate-300);
  color: var(--c-slate-800);
}

.btn-outline:hover {
  border-color: var(--c-green-primary);
  color: var(--c-green-primary);
  background-color: var(--c-green-soft);
}

.btn-dark {
  background-color: var(--c-slate-900);
  color: white;
}

.btn-dark:hover {
  background-color: var(--c-slate-950);
  color: white;
}

.btn-sm {
  padding: 0.5rem 1.15rem;
  font-size: var(--text-sm);
  border-radius: var(--radius-lg);
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: var(--text-lg);
  border-radius: var(--radius-2xl);
}

/* Sections */
.section {
  padding-block: var(--space-16);
  position: relative;
}

@media (min-width: 768px) {
  .section { padding-block: var(--space-20); }
}

.section-warm { background-color: var(--c-warm-bg); }
.section-white { background-color: #ffffff; }
.section-dark {
  background-color: var(--c-slate-950);
  color: white;
}
.section-dark .title-section, .section-dark .title-display, .section-dark h2 { color: white; }
.section-dark .text-subhead, .section-dark p { color: var(--c-slate-300); }

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--trans-slow), transform var(--trans-slow);
}

.reveal.visible, .reveal.active {
  opacity: 1;
  transform: translateY(0);
}

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

/* Utilities */
.text-center { text-align: center; }
.text-start { text-align: start; }
[dir="rtl"] .text-start { text-align: right; }
[dir="ltr"] .text-start { text-align: left; }

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