/* ============================================================
   ANJAAN — DESIGN TOKENS
   Single source of truth for color, type, spacing, motion.
   NEVER hardcode values outside this file. Reference these vars.
   ============================================================ */

:root {
  /* ---------- COLOR ------------------------------------------ */
  /* Core ink & paper — the whole brand rides on these two. */
  --ink:            #0A0A0A;   /* near-black, slightly warm */
  --ink-90:         #1A1A1A;
  --ink-80:         #2B2B2B;
  --paper:          #FAFAF7;   /* off-white with warmth */
  --pure-white:     #FFFFFF;

  /* Neutral scale — for hierarchy, borders, muted text */
  --grey-100:       #F2F1EC;
  --grey-200:       #E4E3DD;
  --grey-300:       #CFCEC7;
  --grey-400:       #A8A7A0;
  --grey-500:       #808079;
  --grey-600:       #5C5B56;
  --grey-700:       #3E3D39;
  --grey-800:       #26251F;   /* deep neutral, near ink */
  --grey-900:       #14130F;

  /* Semantic surfaces (default: light editorial theme) */
  --surface:              var(--paper);
  --surface-alt:          var(--grey-100);
  --surface-inverse:      var(--ink);
  --text:                 var(--ink);
  --text-muted:           var(--grey-600);
  --text-inverse:         var(--paper);
  --border-subtle:        var(--grey-200);
  --border-strong:        var(--ink);
  --overlay:              rgba(10, 10, 10, 0.55);
  --overlay-strong:       rgba(10, 10, 10, 0.82);

  /* State */
  --focus-ring:           var(--ink);
  --sale-tag:             var(--ink);         /* no red — luxury brands don't scream */
  --sold-out:             var(--grey-500);

  /* ---------- TYPOGRAPHY ------------------------------------- */
  /* Families — loaded from Google Fonts via enqueue */
  --font-display:   "Fraunces", "Times New Roman", Georgia, serif;
  --font-body:      "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-urdu:      "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif;
  --font-mono:      ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Fluid type scale — clamp(min, preferred, max) */
  --text-2xs:       clamp(0.6875rem, 0.65rem + 0.15vw, 0.75rem);   /* 11 → 12 */
  --text-xs:        clamp(0.75rem, 0.7rem + 0.2vw, 0.8125rem);     /* 12 → 13 */
  --text-sm:        clamp(0.8125rem, 0.78rem + 0.25vw, 0.875rem);  /* 13 → 14 */
  --text-base:      clamp(0.9375rem, 0.9rem + 0.3vw, 1rem);        /* 15 → 16 */
  --text-md:        clamp(1rem, 0.94rem + 0.4vw, 1.125rem);        /* 16 → 18 */
  --text-lg:        clamp(1.125rem, 1rem + 0.6vw, 1.375rem);       /* 18 → 22 */
  --text-xl:        clamp(1.5rem, 1.2rem + 1.2vw, 2rem);           /* 24 → 32 */
  --text-2xl:       clamp(2rem, 1.4rem + 2.5vw, 3rem);             /* 32 → 48 */
  --text-3xl:       clamp(2.75rem, 1.8rem + 4vw, 4.5rem);          /* 44 → 72 */
  --text-4xl:       clamp(3.5rem, 2rem + 6vw, 6.5rem);             /* 56 → 104 */
  --text-hero:      clamp(4rem, 2rem + 9vw, 9rem);                 /* 64 → 144 */

  /* Weights */
  --weight-light:    300;
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* Line-heights */
  --leading-tight:   1.05;
  --leading-snug:    1.2;
  --leading-normal:  1.5;
  --leading-loose:   1.7;

  /* Letter-spacing */
  --tracking-tightest: -0.04em;   /* editorial display */
  --tracking-tight:    -0.02em;
  --tracking-normal:   0;
  --tracking-wide:     0.04em;
  --tracking-wider:    0.12em;    /* nav labels, eyebrows */
  --tracking-widest:   0.24em;    /* small caps labels */

  /* ---------- SPACING (8pt base) ----------------------------- */
  --space-1:        4px;
  --space-2:        8px;
  --space-3:        12px;
  --space-4:        16px;
  --space-5:        24px;
  --space-6:        32px;
  --space-7:        48px;
  --space-8:        64px;
  --space-9:        96px;
  --space-10:       128px;
  --space-11:       160px;
  --space-12:       200px;

  /* ---------- LAYOUT ----------------------------------------- */
  --container-max:  1440px;
  --container-wide: 1680px;
  --gutter:         clamp(16px, 4vw, 40px);
  --section-y:      clamp(64px, 10vw, 160px);   /* vertical padding for sections */

  /* Header */
  --header-h:       72px;
  --header-h-md:    88px;
  --marquee-h:      36px;

  /* ---------- BORDERS & RADIUS ------------------------------- */
  /* Luxury reads sharp. Radii near zero. */
  --radius-0:       0;
  --radius-1:       2px;    /* buttons, chips */
  --radius-2:       4px;    /* inputs */
  --radius-full:    999px;  /* pills only if needed */

  --border-hairline: 1px solid var(--border-subtle);
  --border-ink:      1px solid var(--ink);

  /* ---------- SHADOWS (used sparingly) ----------------------- */
  --shadow-1:  0 1px 2px rgba(10, 10, 10, 0.04);
  --shadow-2:  0 8px 24px rgba(10, 10, 10, 0.06);
  --shadow-3:  0 24px 60px rgba(10, 10, 10, 0.10);

  /* ---------- MOTION ----------------------------------------- */
  /* Slow, deliberate, cinematic. Never bouncy. */
  --ease-out:      cubic-bezier(0.22, 1, 0.36, 1);        /* natural deceleration */
  --ease-in-out:   cubic-bezier(0.65, 0, 0.35, 1);        /* editorial transitions */
  --ease-expo:     cubic-bezier(0.16, 1, 0.3, 1);         /* hero reveals */

  --dur-instant:   80ms;
  --dur-quick:     160ms;
  --dur-base:      280ms;
  --dur-slow:      520ms;
  --dur-slower:    900ms;
  --dur-cinema:    1400ms;

  /* ---------- Z-INDEX ---------------------------------------- */
  --z-base:        1;
  --z-sticky:      10;
  --z-header:      50;
  --z-drawer:      80;
  --z-overlay:     90;
  --z-modal:       100;
  --z-toast:       120;
}

/* ============================================================
   INVERSE THEME — use on sections that need dark editorial feel
   Apply with:  <section data-theme="ink"> ... </section>
   ============================================================ */
[data-theme="ink"] {
  --surface:         var(--ink);
  --surface-alt:     var(--ink-90);
  --surface-inverse: var(--paper);
  --text:            var(--paper);
  --text-muted:      var(--grey-400);
  --text-inverse:    var(--ink);
  --border-subtle:   var(--ink-80);
  --border-strong:   var(--paper);
  --focus-ring:      var(--paper);

  background: var(--surface);
  color: var(--text);
}

/* ============================================================
   MOTION PREFERENCES
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-instant:  0ms;
    --dur-quick:    0ms;
    --dur-base:     0ms;
    --dur-slow:     0ms;
    --dur-slower:   0ms;
    --dur-cinema:   0ms;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
