/* IqraSpace Academy — Design Tokens & Base */

:root {
  /* Brand palette — Emerald & Gold */
  --c-primary:        #0C7C59;
  --c-primary-700:    #086043;
  --c-primary-900:    #06382A;
  --c-primary-300:    #5FC2A0;
  --c-deep:           #0A3D2E;
  --c-hero-1:         #0B4733;
  --c-hero-2:         #08231A;
  --c-secondary:      #E6A938;
  --c-secondary-700:  #C2841C;
  --c-bg:             #FBF7EE;
  --c-bg-elev:        #FFFFFF;
  --c-card:           #FFFFFF;
  --c-accent:         #F3E8C9;
  --c-accent-soft:    #FAF3E0;
  --c-dark-bg:        #06231B;
  --c-dark-card:      #0E3528;

  /* Text */
  --c-text:           #122019;
  --c-text-muted:     #4B5C53;
  --c-text-soft:      #8A9A91;
  --c-border:         #E7E2D6;
  --c-border-strong:  #D2CBBB;

  /* Status */
  --c-success:        #10b981;
  --c-error:          #ef4444;
  --c-warning:        #f59e0b;

  /* Type */
  --ff-heading: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ff-display: 'Marcellus', 'Amiri', Georgia, serif;
  --ff-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ff-arabic:  'Amiri', 'Scheherazade New', serif;

  --fs-xs:    clamp(0.75rem, 0.72rem + 0.1vw, 0.8rem);
  --fs-sm:    clamp(0.85rem, 0.82rem + 0.1vw, 0.9rem);
  --fs-base:  clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
  --fs-lg:    clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  --fs-xl:    clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-2xl:   clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --fs-3xl:   clamp(1.8rem, 1.5rem + 1.5vw, 2.6rem);
  --fs-4xl:   clamp(2.1rem, 1.6rem + 2.5vw, 3.4rem);
  --fs-5xl:   clamp(2.5rem, 1.8rem + 4vw, 4.4rem);

  /* Spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  /* Radius */
  --r-sm: 6px;
  --r:    12px;
  --r-lg: 18px;
  --r-xl: 28px;
  --r-full: 999px;

  /* Shadow */
  --sh-sm: 0 1px 2px rgba(15,23,42,0.06);
  --sh:    0 4px 14px rgba(15,23,42,0.08);
  --sh-lg: 0 12px 32px rgba(15,23,42,0.12);
  --sh-glow: 0 0 0 4px rgba(15,118,110,0.18);

  /* Layout */
  --container: 1200px;
  --container-narrow: 880px;
  --nav-h: 72px;
  --top-h: 40px;

  /* Motion */
  --ease: cubic-bezier(.2,.7,.2,1);
  --dur-fast: 150ms;
  --dur:      280ms;
  --dur-slow: 600ms;
}

[data-theme="dark"] {
  --c-bg:           var(--c-dark-bg);
  --c-bg-elev:      #0c2429;
  --c-card:         var(--c-dark-card);
  --c-text:         #E2E8F0;
  --c-text-muted:   #94A3B8;
  --c-text-soft:    #64748b;
  --c-border:       rgba(255,255,255,0.08);
  --c-border-strong:rgba(255,255,255,0.18);
  --c-accent:       #c8a536;
  --sh:    0 4px 14px rgba(0,0,0,0.4);
  --sh-lg: 0 12px 32px rgba(0,0,0,0.55);
}

* { box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html:focus-within { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-heading);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--sp-4);
  color: var(--c-text);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-5xl); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-4xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-base); }

p { margin: 0 0 var(--sp-4); color: var(--c-text-muted); }
a { color: var(--c-primary); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--c-primary-700); }

img, picture, video, svg { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.25rem; }
hr { border: 0; border-top: 1px solid var(--c-border); margin: var(--sp-8) 0; }

/* Accessibility */
:focus-visible { outline: 3px solid var(--c-primary-300); outline-offset: 2px; border-radius: 6px; }
.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;
}
.skip-link {
  position: absolute; left: 8px; top: 8px;
  background: var(--c-primary); color: #fff;
  padding: 8px 14px; border-radius: var(--r-sm);
  transform: translateY(-200%); transition: transform var(--dur);
  z-index: 9999;
}
.skip-link:focus { transform: translateY(0); }

/* Container */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-5); }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--sp-5); }
.section { padding: var(--sp-16) 0; }
.section-tight { padding: var(--sp-10) 0; }
@media (min-width: 768px) {
  .section { padding: var(--sp-24) 0; }
}

.section-head { text-align: center; margin-bottom: var(--sp-12); max-width: 720px; margin-inline: auto; }
.eyebrow {
  display: inline-block; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--c-primary); margin-bottom: var(--sp-3);
}
.section-head h2 { margin-bottom: var(--sp-3); }
.section-head p { color: var(--c-text-muted); font-size: var(--fs-lg); margin: 0 auto; }

/* Reduced motion */
@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; }
}
