/* ==========================================================================
   MANSHUR DESIGN SYSTEM - PEYDA FONT & CORE TOKENS
   Strict implementation: Peyda font only, no Google Fonts, no legacy fonts
   ========================================================================== */

/* ── Peyda Font-Face Declarations ── */
@font-face {
  font-family: 'Peyda';
  src: url('../assets/fonts/Peyda.woff2') format('woff2'),
       url('../assets/fonts/Peyda.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Peyda';
  src: url('../assets/fonts/Peyda.woff2') format('woff2'),
       url('../assets/fonts/Peyda.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Peyda';
  src: url('../assets/fonts/Peyda.woff2') format('woff2'),
       url('../assets/fonts/Peyda.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Peyda';
  src: url('../assets/fonts/Peyda.woff2') format('woff2'),
       url('../assets/fonts/Peyda.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Peyda';
  src: url('../assets/fonts/Peyda.woff2') format('woff2'),
       url('../assets/fonts/Peyda.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ==========================================================================
     MANSHUR BRAND DESIGN TOKENS
     New Design Palette
     ========================================================================== */
  --brand-cream-50: #F9F0E7;        /* بکگراند اصلی روشن */
  --brand-sand-100: #E7CBB4;        /* سطوح نرم / کارت روشن */
  --brand-beige-200: #D2B098;       /* hover روشن / divider نرم */
  --brand-clay-300: #E89468;        /* اکسنت ملایم */
  --brand-terracotta-400: #DF734B;  /* رنگ برند فرعی */
  --brand-orange-500: #CF5735;      /* اکسنت اصلی / CTA */
  --brand-rust-600: #B64A2C;        /* hover دکمه / active */
  --brand-burgundy-700: #5E2219;    /* اکسنت تیره / emphasis */
  --brand-charcoal-900: #2E2824;    /* متن اصلی / آیکون اصلی */

  /* RGB channels for alpha composition */
  --brand-cream-50-rgb: 249, 240, 231;
  --brand-sand-100-rgb: 231, 203, 180;
  --brand-beige-200-rgb: 210, 176, 152;
  --brand-clay-300-rgb: 232, 148, 104;
  --brand-terracotta-400-rgb: 223, 115, 75;
  --brand-orange-500-rgb: 207, 87, 53;
  --brand-rust-600-rgb: 182, 74, 44;
  --brand-burgundy-700-rgb: 94, 34, 25;
  --brand-charcoal-900-rgb: 46, 40, 36;

  /* ==========================================================================
     SEMANTIC MAPPINGS (Manshur Design System)
     ========================================================================== */
  --m-paper: var(--brand-cream-50);             /* بکگراند اصلی روشن */
  --m-paper-dark: var(--brand-sand-100);        /* سطوح نرم و تفکیک */
  --m-card: #FFFFFF;                            /* کارت سفید تمیز */
  --m-card-soft: var(--brand-sand-100);         /* کارت با تم شن ملایم */
  --m-card-hover: var(--brand-beige-200);       /* hover روشن */
  --m-border-subtle: var(--brand-beige-200);    /* divider نرم / حاشیه‌ها */
  --m-border-soft: rgba(var(--brand-beige-200-rgb), 0.55);

  --m-ink: var(--brand-charcoal-900);           /* متن اصلی / آیکون اصلی */
  --m-ink-light: #4A403A;                       /* متن فرعی تیره */
  --m-muted: #73675F;                           /* متن کم‌رنگ / خاکستری گرم */
  --m-muted-light: var(--brand-beige-200);      /* خطوط راهنما / حاشیه کم‌رنگ */

  --m-accent: var(--brand-orange-500);          /* اکسنت اصلی / CTA */
  --m-accent-hover: var(--brand-rust-600);      /* hover دکمه / active */
  --m-accent-light: rgba(var(--brand-clay-300-rgb), 0.16); /* پس‌زمینه نشان و بج */
  --m-accent-border: var(--brand-clay-300);     /* حاشیه اکسنت ملایم */
  --m-brand-sub: var(--brand-terracotta-400);   /* رنگ برند فرعی */
  --m-emphasis: var(--brand-burgundy-700);      /* اکسنت تیره / تأکید ویژه */

  /* Dark Editorial Tokens */
  --m-dark: var(--brand-charcoal-900);          /* بوم تیره زغالی */
  --m-dark-surface: #221E1B;                    /* سطح عمق تیره */
  --m-dark-card: #342D28;                       /* کارت تیره */
  --m-dark-text: var(--brand-cream-50);         /* متن کرم روی تیره */
  --m-dark-muted: var(--brand-sand-100);        /* متن ملایم روی تیره */
  --m-dark-accent: var(--brand-clay-300);       /* اکسنت ملایم روی تیره */
  --m-dark-accent-warm: var(--brand-orange-500);/* اکسنت گرم روی تیره */
  --m-dark-border: #4A403A;                     /* خطوط تفکیک در تیره */
  --m-dark-emphasis: var(--brand-burgundy-700); /* تأکید تیره */

  /* Geometry & Radii */
  --m-radius-sm: 4px;
  --m-radius-md: 8px;
  --m-radius-lg: 14px;
  --m-radius-pill: 9999px;

  /* Shadows (Tuned with charcoal-900 and orange-500 glow) */
  --shadow-subtle: 0 1px 4px rgba(var(--brand-charcoal-900-rgb), 0.05);
  --shadow-card: 0 4px 18px rgba(var(--brand-charcoal-900-rgb), 0.07);
  --shadow-float: 0 12px 32px rgba(var(--brand-orange-500-rgb), 0.14);
  --shadow-dark: 0 16px 40px rgba(20, 17, 15, 0.55);
}

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

html {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  height: 100%;
  background-color: var(--brand-cream-50);
}

body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: 'Peyda', system-ui, -apple-system, sans-serif;
  color: var(--brand-charcoal-900);
  background-color: var(--brand-cream-50);
  background-image: radial-gradient(circle, rgba(var(--brand-charcoal-900-rgb), 0.08) 1.2px, transparent 1.2px);
  background-size: 24px 24px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Form inputs & buttons must strictly inherit Peyda */
button, input, textarea, select {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* SVG Text elements also inherit Peyda */
svg text {
  font-family: 'Peyda', system-ui, sans-serif !important;
}

/* Reduced Motion Preference */
@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;
  }
}
