/* ==========================================================================
   PetPay «پت پی» — Web brand tokens  ·  v1.0  ·  Azar 1405 (Nov 2026)
   Source of truth: PetPay brand book v1.2. Paths assume this file sits in /css
   next to /fonts and /graphics. Use with <html lang="fa" dir="rtl">.
   ========================================================================== */

/* ── Fonts ─────────────────────────────────────────────────────────────── */
@font-face { font-family: "B Yekan"; src: url("../fonts/b-yekan/BYekan.woff2") format("woff2"), url("../fonts/b-yekan/BYekan.ttf") format("truetype");
             font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins/Poppins-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins/Poppins-Medium.woff2") format("woff2");  font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins/Poppins-Bold.woff2") format("woff2");    font-weight: 700; font-display: swap; }

:root {
  /* Brand — primary */
  --pp-blue: #1E32C5;        /* رنگ اصلی برند: دکمه اصلی، لینک، وضعیت فعال */
  --pp-navy: #0A1543;        /* متن و لوگوتایپ، فوتر */
  --pp-cream: #F6F2E7;       /* زمینه اصلی صفحه */
  --pp-white: #FFFFFF;       /* زمینه دوم: کارت‌ها و فرم‌ها */
  /* Brand — accents (one accent per page/screen) */
  --pp-yellow: #F9C93A;      /* تنها رنگ تأکید برای دکمه و نشان */
  --pp-orange: #FF9F1C;      /* فقط تصویرسازی؛ هرگز برای متن یا دکمه */
  --pp-red: #EE3B2E;         /* فقط پیام خطا و تصویرسازی */
  /* Horse product */
  --pp-brown: #7A4A30;       /* اسب */
  --pp-butter: #FCEFC7;      /* زمینه روشن اسب */

  /* Blue scale */
  --pp-blue-50: #EFF1FB;  --pp-blue-100: #DDE0F6; --pp-blue-200: #BCC2EE; --pp-blue-300: #8E98E2; --pp-blue-400: #5867D4;
  --pp-blue-500: #1E32C5; --pp-blue-600: #192BA4; --pp-blue-700: #142484; --pp-blue-800: #0F1C64; --pp-blue-900: #0A1543;
  /* Neutral scale */
  --pp-gray-50: #F3F3F6;  --pp-gray-100: #E2E3E8; --pp-gray-300: #B1B4C3; --pp-gray-500: #787E98; --pp-gray-700: #40486C; --pp-gray-900: #0A1543;

  /* Semantic */
  --pp-bg: var(--pp-cream);
  --pp-surface: var(--pp-white);
  --pp-text: var(--pp-navy);
  --pp-text-2: var(--pp-gray-700);
  --pp-text-muted: var(--pp-gray-500);
  --pp-border: #E9E3D3;
  --pp-primary: var(--pp-blue);
  --pp-primary-hover: var(--pp-blue-600);
  --pp-primary-active: var(--pp-blue-700);
  --pp-primary-soft: var(--pp-blue-50);
  --pp-accent: var(--pp-yellow);
  --pp-error: var(--pp-red);
  --pp-focus: 0 0 0 3px rgba(30, 50, 197, .35);

  /* Typography */
  --pp-font-fa: "B Yekan", Tahoma, sans-serif;
  --pp-font-en: "Poppins", "Segoe UI", Arial, sans-serif;
  --pp-fs-display: 48px; --pp-lh-display: 1.3;
  --pp-fs-h1: 32px;      --pp-lh-h1: 1.4;
  --pp-fs-h2: 24px;      --pp-lh-h2: 1.5;
  --pp-fs-h3: 18px;      --pp-lh-h3: 1.6;
  --pp-fs-body: 16px;    --pp-lh-body: 1.9;
  --pp-fs-small: 14px;   --pp-lh-small: 1.8;
  --pp-fs-caption: 12px; --pp-lh-caption: 1.8;

  /* Spacing (4px base) */
  --pp-space-1: 4px; --pp-space-2: 8px; --pp-space-3: 12px; --pp-space-4: 16px; --pp-space-5: 24px;
  --pp-space-6: 32px; --pp-space-7: 48px; --pp-space-8: 64px; --pp-space-9: 96px;

  /* Radius & elevation */
  --pp-radius-sm: 8px; --pp-radius-md: 12px; --pp-radius-lg: 16px; --pp-radius-xl: 24px; --pp-radius-pill: 999px;
  --pp-shadow-1: 0 1px 2px rgba(10, 21, 67, .04), 0 8px 22px -12px rgba(10, 21, 67, .16);
  --pp-shadow-2: 0 12px 32px -14px rgba(10, 21, 67, .30);

  /* Layout */
  --pp-container: 1200px;
  --pp-gutter: 16px;   /* mobile; 24px ≥ 768px; 32px ≥ 1200px */
}
@media (min-width: 768px)  { :root { --pp-gutter: 24px; } }
@media (min-width: 1200px) { :root { --pp-gutter: 32px; } }
@media (max-width: 767px)  { :root { --pp-fs-display: 34px; --pp-fs-h1: 26px; --pp-fs-h2: 21px; --pp-fs-body: 15px; } }

/* ── Base ─────────────────────────────────────────────────────────────── */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--pp-font-fa); font-size: var(--pp-fs-body); line-height: var(--pp-lh-body);
       color: var(--pp-text); background: var(--pp-bg); }
h1, h2, h3 { margin: 0 0 var(--pp-space-3); color: var(--pp-text); font-weight: 700; }
h1 { font-size: var(--pp-fs-h1); line-height: var(--pp-lh-h1); }
h2 { font-size: var(--pp-fs-h2); line-height: var(--pp-lh-h2); }
h3 { font-size: var(--pp-fs-h3); line-height: var(--pp-lh-h3); }
p  { margin: 0 0 var(--pp-space-4); }
a  { color: var(--pp-primary); text-decoration: none; } a:hover { text-decoration: underline; }
:focus-visible { outline: none; box-shadow: var(--pp-focus); border-radius: var(--pp-radius-sm); }
.pp-display { font-size: var(--pp-fs-display); line-height: var(--pp-lh-display); font-weight: 700; }
.pp-small { font-size: var(--pp-fs-small); line-height: var(--pp-lh-small); }
.pp-caption { font-size: var(--pp-fs-caption); line-height: var(--pp-lh-caption); color: var(--pp-text-2); }
/* --pp-text-muted (gray-500) is 4.0:1 on white, 3.6:1 on cream: only for text ≥ 18px, placeholders and decoration */
/* Latin words, card numbers, IBAN, emails, URLs inside Persian text */
.pp-ltr, bdi.pp-ltr { direction: ltr; unicode-bidi: isolate; font-family: var(--pp-font-en); }
.pp-container { max-width: var(--pp-container); margin-inline: auto; padding-inline: var(--pp-gutter); }

/* ── Components ───────────────────────────────────────────────────────── */
.pp-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--pp-space-2); min-height: 48px; padding: 0 var(--pp-space-5);
          border-radius: var(--pp-radius-md); border: 1.5px solid transparent; font: 700 var(--pp-fs-body)/1 var(--pp-font-fa); cursor: pointer;
          transition: background-color .15s, border-color .15s, color .15s; }
.pp-btn--primary   { background: var(--pp-primary); color: var(--pp-white); }
.pp-btn--primary:hover { background: var(--pp-primary-hover); } .pp-btn--primary:active { background: var(--pp-primary-active); }
.pp-btn--secondary { background: var(--pp-surface); color: var(--pp-navy); border-color: var(--pp-gray-100); }
.pp-btn--secondary:hover { border-color: var(--pp-blue-300); }
.pp-btn--accent    { background: var(--pp-accent); color: var(--pp-navy); }          /* yellow + navy text only */
.pp-btn--ghost     { background: transparent; color: var(--pp-primary); }
.pp-btn:disabled   { background: var(--pp-gray-100); color: var(--pp-gray-500); border-color: transparent; cursor: not-allowed; }

.pp-card { background: var(--pp-surface); border: 1px solid var(--pp-border); border-radius: var(--pp-radius-lg); box-shadow: var(--pp-shadow-1); padding: var(--pp-space-5); }
.pp-card--navy { background: var(--pp-navy); color: var(--pp-white); border-color: transparent; }
.pp-card--horse { background: var(--pp-butter); border-color: transparent; }
/* «نوار کارت»: thin horizontal gap splitting one card into two parts; thickness = 1/10 of the part height */
.pp-card-stripe { height: 0; border-top: 6px solid var(--pp-bg); margin: var(--pp-space-4) calc(-1 * var(--pp-space-5)); }

.pp-badge { display: inline-flex; align-items: center; padding: 2px 12px; border-radius: var(--pp-radius-pill); font-size: var(--pp-fs-small); font-weight: 700;
            background: var(--pp-primary-soft); color: var(--pp-navy); }
.pp-badge--accent { background: var(--pp-accent); }

.pp-input { width: 100%; min-height: 48px; padding: 0 var(--pp-space-4); border: 1.5px solid var(--pp-gray-100); border-radius: var(--pp-radius-md);
            background: var(--pp-surface); font: 400 var(--pp-fs-body) var(--pp-font-fa); color: var(--pp-text); box-sizing: border-box; }
.pp-input:focus { border-color: var(--pp-primary); box-shadow: var(--pp-focus); outline: none; }
.pp-input--error { border-color: var(--pp-error); }
/* red on white is 4.0:1 (below AA for small text): keep the message navy, mark it with a red dot */
.pp-error-text { color: var(--pp-text); font-size: var(--pp-fs-small); display: flex; align-items: center; gap: 6px; }
.pp-error-text::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pp-error); flex: none; }

.pp-icon { width: 24px; height: 24px; color: var(--pp-navy); flex: none; } .pp-icon--active { color: var(--pp-blue); }

/* Eared frame for animal photos only (never people, products or text) */
.pp-frame { aspect-ratio: 125 / 140; -webkit-mask: url("../graphics/animals/frame-eared.svg") center / contain no-repeat;
            mask: url("../graphics/animals/frame-eared.svg") center / contain no-repeat; object-fit: cover; }

/* Patterns */
.pp-pattern-ears { background: url("../graphics/patterns/pattern-ears-tile.svg") repeat-x left center / auto 100%; }
.pp-pattern-mark { background: var(--pp-blue) url("../graphics/patterns/pattern-mark-tile.svg") repeat; }
