/* ============================================
   DAR ZAFRAN — BASE
   Reset · Design Tokens · Root Variables
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500;1,600&family=Cormorant+SC:wght@300;400;500&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');
/* Arabic web font — active when AR language selected */
@import url('https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;500;600&display=swap');


/* ============================================
   BASE PALETTE — raw values only.
   Never reference these in components.
   Always use semantic tokens below.
   ============================================ */
:root {

  /* Charcoal family — primary text and dark sections */
  --charcoal-900: #1A1614; /* footer / deepest dark */
  --charcoal-800: #24201E; /* primary text + dark section bg */
  --charcoal-700: #2D2826; /* elevated surfaces on dark */
  --charcoal-600: #3A3330; /* cards on dark */
  --charcoal-400: #706864; /* muted text on white — 4.9:1 ✅ */
  --charcoal-300: #9E9693; /* muted text on dark — 5.9:1 ✅ */

  /* Warm white family — clean, neutral warm backgrounds */
  --white-pure:  #FFFFFF;  /* primary bg */
  --white-warm:  #FAF8F4;  /* secondary bg / subtle separation */

  /* Terracotta family — primary brand accent */
  --terracotta-400: #D0795A; /* light terracotta — on dark bg, 5.3:1 ✅ */
  --terracotta-500: #B85C38; /* primary terracotta — on white, 4.5:1 ✅ */
  --terracotta-600: #954829; /* strong — on white 6.1:1 / warm-white 6.1:1 ✅ */

  /* Gold family — DEPRECATED in v2, keep for token compat only */
  --gold-400: #C9AE74;
  --gold-500: #B89A5A;
  --gold-600: #9A7E42;
  --gold-700: #6B5428;

  /* Legacy palette — kept for compatibility, no new usage */
  --burgundy-900: #3D0F18;
  --burgundy-800: #5A1825;
  --cream-200:    #F4EBDD;
  --espresso-800: #211817;

}


/* ============================================
   SEMANTIC COLOR TOKENS — v2 (Clean Modern)
   White / Warm White / Terracotta / Charcoal
   Use these in ALL component CSS.
   Never scatter raw palette values in components.
   ============================================ */
:root {

  /* --- Backgrounds ---
     White: primary sections, nav, content
     Warm White: alternating editorial sections
     Terracotta: accent CTA sections only
     Charcoal: hero fallback, footer, dark moments */
  --color-bg-dark:          var(--charcoal-800);   /* #24201E */
  --color-bg-darker:        var(--charcoal-900);   /* #1A1614 — footer */
  --color-bg-surface:       var(--charcoal-700);   /* surface on dark */
  --color-bg-elevated:      var(--charcoal-600);   /* elevated on dark */
  --color-bg-cream:         var(--white-pure);     /* #FFFFFF — primary sections */
  --color-bg-cream-light:   var(--white-pure);     /* #FFFFFF */
  --color-bg-cream-deep:    var(--white-warm);     /* #FAF8F4 — alt sections */
  --color-bg-burgundy:      var(--terracotta-500); /* #B85C38 — CTA sections */
  --color-bg-burgundy-deep: var(--terracotta-600); /* #954829 — deeper terracotta */

  /* --- Text ---
     All text values maintain WCAG AA on their intended background. */
  --color-text-on-dark:        var(--white-pure);      /* #FFF on charcoal — 16.2:1 ✅ */
  --color-text-on-cream:       var(--charcoal-800);   /* #24201E on white — 16.2:1 ✅ */
  --color-text-muted-dark:     var(--charcoal-300);   /* #9E9693 on charcoal — 5.9:1 ✅ */
  --color-text-muted-cream:    var(--charcoal-400);   /* #706864 on white — 4.9:1 ✅ */
  --color-text-burgundy:       var(--terracotta-500); /* terracotta for display text on white */
  --color-text-accent:         var(--terracotta-600); /* #954829 — small labels, AA on white+warm ✅ */
  --color-text-accent-on-dark: var(--terracotta-400); /* #D0795A — terracotta on charcoal — 5.3:1 ✅ */
  --color-text-accent-strong:  var(--terracotta-600); /* compat alias */

  /* --- Borders & Lines --- */
  --color-border-dark:         rgba(255, 255, 255, 0.08); /* on charcoal */
  --color-border-cream:        rgba(36, 32, 30, 0.08);    /* on white */
  --color-border-burgundy:     rgba(255, 255, 255, 0.15); /* on terracotta */
  --color-border-gold:         rgba(36, 32, 30, 0.10);    /* deprecated gold → neutral hairline */

  /* --- Accents ---
     --color-terracotta: interactive elements, hover states, large visual accents
     --color-burgundy: remapped to terracotta for backward compatibility */
  --color-terracotta:          var(--terracotta-500); /* #B85C38 — interactive */
  --color-terracotta-hover:    var(--terracotta-600); /* #954829 — hover/pressed */
  --color-gold:                var(--gold-500);       /* DEPRECATED — do not use in new design */
  --color-burgundy:            var(--terracotta-500); /* remapped → terracotta */
  --color-burgundy-hover:      var(--terracotta-600); /* remapped → terracotta-dark */

}


/* ============================================
   TYPOGRAPHY TOKENS
   ============================================ */
:root {
  --font-display:    'Cormorant Garamond', Georgia, serif;
  --font-display-sc: 'Cormorant SC', Georgia, serif;
  --font-body:       'DM Sans', system-ui, -apple-system, sans-serif;
  --font-arabic:     'Noto Naskh Arabic', 'Arabic Typesetting', Georgia, serif;

  /* Fluid type scale */
  --text-hero:       clamp(4.5rem, 13vw, 14rem);
  --text-display:    clamp(3rem, 6vw, 7rem);
  --text-h1:         clamp(2.5rem, 4vw, 4.5rem);
  --text-h2:         clamp(1.8rem, 3vw, 3rem);
  --text-h3:         clamp(1.4rem, 2vw, 1.8rem);
  --text-large:      1.2rem;
  --text-base:       1rem;
  --text-sm:         0.875rem;
  --text-xs:         0.75rem;

  /* Leading */
  --leading-tight:   1.08;
  --leading-snug:    1.3;
  --leading-normal:  1.6;
  --leading-loose:   1.85;

  /* Tracking */
  --tracking-tight:  -0.03em;
  --tracking-normal: 0;
  --tracking-wide:   0.05em;
  --tracking-label:  0.16em;
}


/* ============================================
   SPACING TOKENS
   ============================================ */
:root {
  --space-1:  0.25rem;   /*  4px */
  --space-2:  0.5rem;    /*  8px */
  --space-3:  0.75rem;   /* 12px */
  --space-4:  1rem;      /* 16px */
  --space-5:  1.25rem;   /* 20px */
  --space-6:  1.5rem;    /* 24px */
  --space-7:  1.75rem;   /* 28px */
  --space-8:  2rem;      /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-14: 3.5rem;    /* 56px */
  --space-16: 4rem;      /* 64px */
  --space-20: 5rem;      /* 80px */
  --space-24: 6rem;      /* 96px */
  --space-32: 8rem;      /* 128px */
  --space-40: 10rem;     /* 160px */
  --space-48: 12rem;     /* 192px */
}


/* ============================================
   ANIMATION TOKENS
   ============================================ */
:root {
  --ease-luxury:      cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out-expo:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart:   cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out-circ: cubic-bezier(0.85, 0, 0.15, 1);

  --duration-fast:      200ms;
  --duration-normal:    500ms;
  --duration-slow:      900ms;
  --duration-cinematic: 1300ms;
}


/* ============================================
   BORDER TOKENS
   ============================================ */
:root {
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-arch: 160px 160px 0 0;
}


/* ============================================
   CSS RESET
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: auto;
  scroll-padding-top: 88px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text-on-cream);
  background-color: var(--color-bg-cream); /* white — prevents dark flash on load */
  overflow-x: hidden;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button {
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

::selection {
  background-color: var(--color-bg-burgundy);
  color: var(--color-text-on-dark);
}

/* Smooth cursor: handled by JS, hide default on capable devices */
@media (pointer: fine) {
  body { cursor: none; }
  a, button, [role="button"] { cursor: none; }
}
