/* ==========================================================================
   Design Tokens — Dr. Khoshknabi Theme
   Persian-tile-inspired color palette, editorial typography, 8px grid
   ========================================================================== */

/* ---------- Font Faces ---------- */

@font-face {
  font-family: 'Playfair Display';
  src: url('../fonts/playfair-display-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter.woff2') format('woff2');
  font-weight: 300 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/vazirmatn.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Custom Properties ---------- */

:root {
  /* Typography */
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  --font-persian: 'Vazirmatn', 'Tahoma', sans-serif;

  /* Type Scale (Major Third — 1.25) */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-md: 1.125rem;     /* 18px */
  --text-lg: 1.25rem;      /* 20px */
  --text-xl: 1.5rem;       /* 24px */
  --text-2xl: 2rem;        /* 32px */
  --text-3xl: 2.5rem;      /* 40px */
  --text-4xl: 3.5rem;      /* 56px */
  --text-5xl: 4.5rem;      /* 72px */
  --text-hero: clamp(2.5rem, 5vw + 1rem, 5.5rem);

  /* Line Heights */
  --leading-tight: 1.1;
  --leading-snug: 1.25;
  --leading-normal: 1.6;
  --leading-relaxed: 1.8;

  /* Letter Spacing */
  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.05em;
  --tracking-wider: 0.1em;
  --tracking-widest: 0.2em;

  /* Spacing (8px grid) */
  --space-1: 0.25rem;    /* 4px */
  --space-2: 0.5rem;     /* 8px */
  --space-3: 0.75rem;    /* 12px */
  --space-4: 1rem;       /* 16px */
  --space-5: 1.5rem;     /* 24px */
  --space-6: 2rem;       /* 32px */
  --space-8: 3rem;       /* 48px */
  --space-10: 4rem;      /* 64px */
  --space-12: 5rem;      /* 80px */
  --space-16: 7rem;      /* 112px */
  --space-20: 9rem;      /* 144px */
  --space-section: clamp(5rem, 10vw, 10rem);

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 800px;
  --container-wide: 1400px;
  --gutter: clamp(1.5rem, 4vw, 3rem);

  /* Borders */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 200ms;
  --duration-normal: 400ms;
  --duration-slow: 800ms;
  --duration-slower: 1200ms;

  /* Z-Index */
  --z-base: 1;
  --z-nav: 100;
  --z-overlay: 200;
  --z-modal: 300;
  --z-max: 999;
}

/* ---------- Light Theme (Default) ---------- */

[data-theme="light"] {
  --color-bg: #FAF9F6;
  --color-bg-alt: #F2F0EB;
  --color-surface: #FFFFFF;
  --color-surface-elevated: #FFFFFF;

  --color-text: #1A1A1E;
  --color-text-secondary: #4A4A50;
  --color-text-muted: #7A7A80;
  --color-text-subtle: #A0A0A6;

  --color-accent: #3D5A73;
  --color-accent-hover: #2D4A63;
  --color-accent-warm: #B8936A;
  --color-accent-warm-hover: #A07B52;
  --color-gold: #C9A96E;

  --color-border: rgba(26, 26, 30, 0.08);
  --color-border-strong: rgba(26, 26, 30, 0.15);
  --color-overlay: rgba(26, 26, 30, 0.5);
  --color-overlay-heavy: rgba(26, 26, 30, 0.75);

  --color-hero-overlay: linear-gradient(
    135deg,
    rgba(250, 249, 246, 0.92) 0%,
    rgba(250, 249, 246, 0.7) 40%,
    rgba(250, 249, 246, 0.3) 70%,
    rgba(250, 249, 246, 0.05) 100%
  );

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);
  --shadow-image: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* ---------- Dark Theme ---------- */

[data-theme="dark"] {
  --color-bg: #0D0D10;
  --color-bg-alt: #141418;
  --color-surface: #1A1A1F;
  --color-surface-elevated: #222228;

  --color-text: #E8E6E1;
  --color-text-secondary: #B8B6B1;
  --color-text-muted: #8A8A8E;
  --color-text-subtle: #5A5A5E;

  --color-accent: #7BA3C7;
  --color-accent-hover: #93B5D5;
  --color-accent-warm: #D4AF7A;
  --color-accent-warm-hover: #E0C192;
  --color-gold: #D4AF7A;

  --color-border: rgba(255, 255, 255, 0.07);
  --color-border-strong: rgba(255, 255, 255, 0.13);
  --color-overlay: rgba(0, 0, 0, 0.6);
  --color-overlay-heavy: rgba(0, 0, 0, 0.85);

  --color-hero-overlay: linear-gradient(
    135deg,
    rgba(13, 13, 16, 0.95) 0%,
    rgba(13, 13, 16, 0.85) 40%,
    rgba(13, 13, 16, 0.65) 70%,
    rgba(13, 13, 16, 0.40) 100%
  );

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
  --shadow-image: 0 8px 30px rgba(0, 0, 0, 0.5);
}
