/* ============================================================
   NEXO PRINT — Design Tokens
   Source of truth: uploads/DESIGN_SYSTEM.md
   ============================================================ */

@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root {
  /* ───── Brand Colors ───── */
  --color-navy:        #1B3A6B;
  --color-navy-dark:   #14305B;
  --color-navy-light:  #2C4F85;

  --color-slate:       #575C69;
  --color-slate-dark:  #3F434E;
  --color-slate-light: #7A7F8B;

  --color-blue:        #2683C5;
  --color-blue-dark:   #1E6BA3;
  --color-blue-light:  #4FA0DC;

  --color-sky:         #CDE6F5;
  --color-sky-dark:    #B8D8EB;

  --color-mist:        #F2F7F2;
  --color-cream:       #F2EEE5;
  --color-cream-dark:  #EAE4D7;

  /* ───── Neutrals ───── */
  --color-neutral-50:  #F8FAFC;
  --color-neutral-100: #F1F5F9;
  --color-neutral-200: #E2E8F0;
  --color-neutral-300: #CBD5E1;
  --color-neutral-400: #94A3B8;
  --color-neutral-500: #64748B;
  --color-neutral-600: #475569;
  --color-neutral-700: #334155;
  --color-neutral-800: #1E293B;
  --color-neutral-900: #0F172A;

  --color-surface:      #FFFFFF;
  --color-text:         #1A1A1A;
  --color-text-muted:   #575C69;
  --color-text-faint:   #94A3B8;
  --color-border:       #E2E8F0;
  --color-border-strong:#CBD5E1;

  /* ───── Semantic ───── */
  --color-success:     #16A34A;
  --color-success-bg:  #DCFCE7;
  --color-warning:     #EA580C;
  --color-warning-bg:  #FFEDD5;
  --color-danger:      #DC2626;
  --color-danger-bg:   #FEE2E2;
  --color-info:        #2683C5;
  --color-info-bg:     #CDE6F5;

  /* ───── Loyalty Tiers ───── */
  --tier-bronze:    #B87333;
  --tier-bronze-bg: #FDF2E6;
  --tier-silver:    #B0BEC5;
  --tier-silver-bg: #F5F7F8;
  --tier-gold:      #D4A437;
  --tier-gold-bg:   #FDF6E3;

  /* ───── Typography ───── */
  --font-sans: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
  --font-mono: 'Vazirmatn', ui-monospace, 'SF Mono', Menlo, monospace;

  /* ───── Spacing ───── */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* ───── Radius ───── */
  --radius-xs:   2px;
  --radius-sm:   4px;
  --radius-md:   6px;
  --radius-lg:   8px;
  --radius-xl:   12px;
  --radius-2xl:  16px;
  --radius-full: 9999px;

  /* ───── Shadow ───── */
  --shadow-xs:   0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-sm:   0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.06);
  --shadow-md:   0 4px 8px -2px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg:   0 12px 20px -4px rgba(15, 23, 42, 0.10), 0 4px 8px -4px rgba(15, 23, 42, 0.06);
  --shadow-xl:   0 24px 32px -8px rgba(15, 23, 42, 0.12), 0 8px 16px -8px rgba(15, 23, 42, 0.08);
  --shadow-focus: 0 0 0 3px rgba(38, 131, 197, 0.25);

  /* ───── Motion ───── */
  --duration-fast:    150ms;
  --duration-normal:  220ms;
  --duration-slow:    320ms;
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ───── Layout ───── */
  --container-max: 1320px;
  --header-h: 76px;
}

/* ───── Reset / base ───── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-feature-settings: 'kern' 1, 'ss01' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--color-text);
  background: var(--color-mist);
  line-height: 1.5;
  word-spacing: -0.02em;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ───── Container ───── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
@media (max-width: 768px) {
  .container { padding-inline: var(--space-4); }
}

/* ───── Typography helpers ───── */
.t-display { font-size: clamp(2rem, 5.5vw, 3.75rem); line-height: 1.05; font-weight: 800; letter-spacing: -0.025em; }
.t-h1      { font-size: clamp(1.75rem, 3.5vw, 2.5rem); line-height: 1.15; font-weight: 700; letter-spacing: -0.015em; }
.t-h2      { font-size: clamp(1.375rem, 2.5vw, 1.875rem); line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.t-h3      { font-size: 1.25rem; line-height: 1.3; font-weight: 600; }
.t-body    { font-size: 1rem; line-height: 1.6; }
.t-small   { font-size: 0.875rem; line-height: 1.45; }
.t-tiny    { font-size: 0.75rem; line-height: 1.4; font-weight: 500; letter-spacing: 0.02em; }
.t-muted   { color: var(--color-text-muted); }
.t-italic  { font-style: italic; }

/* ───── Button base ───── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-lg);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  transition: transform var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
  border: 1.5px solid transparent;
  min-height: 48px;
  background: transparent;
  color: inherit;
  white-space: nowrap;
}
.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.btn-primary {
  background: var(--color-navy);
  color: white;
}
.btn-primary:hover { background: var(--color-navy-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary {
  background: white;
  color: var(--color-navy);
  border-color: var(--color-navy);
}
.btn-secondary:hover { background: var(--color-sky); }
.btn-ghost { color: var(--color-navy); }
.btn-ghost:hover { background: var(--color-neutral-100); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; min-height: 36px; }
.btn-lg { padding: 1rem 1.75rem; font-size: 1.0625rem; min-height: 56px; }

/* ───── Persian number ───── */
.fa-num { font-variant-numeric: tabular-nums; }

/* ───── Reduced motion ───── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
