/* ==========================================================================
   QPort design system — tokens
   Extracted from qport.ir by measurement (Chrome DevTools Protocol, computed
   styles at 1440 / 768 / 390) and normalised onto one scale.
   Persian-first, right-to-left. Dark only: the product has no light theme.

   Every value below is a token. Components reference tokens only.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* --- Ground -------------------------------------------------------------
     Five grounds, all taken from the live site. They get lighter as they come
     forward, so depth is a tone step, never a drop or a rule.            */
  --qp-bg: #000b22;            /* the page                             */
  --qp-field: #020d27;         /* alternating section band             */
  --qp-soft: #07142f;          /* recessed band                        */
  --qp-panel: #0a1837;         /* raised panel, product console        */
  --qp-panel-light: #0d1d42;   /* panel inside a panel                 */

  /* --- Ink ----------------------------------------------------------------
     Contrast on --qp-bg, measured. Body copy is ink or ink-soft, never muted. */
  --qp-ink: #f5f6fa;           /* 18.16:1   headings, running text     */
  --qp-ink-soft: #b4b8c9;      /*  9.94:1   supporting text            */
  --qp-ink-muted: #7f859e;     /*  5.37:1   notes, meta only           */

  /* --- Accent: one violet, three jobs ------------------------------------
     The saturated violet is a FILL, not a text colour: 3.29:1 on the ground
     fails AA. Text and hairlines use violet-bright; display emphasis uses
     violet-pale.                                                           */
  --qp-violet: #6556b2;        /* fills, primary action                */
  --qp-violet-deep: #4f4199;   /* pressed state                        */
  --qp-violet-bright: #9486e8; /* 6.38:1   accent text, hairline, glow */
  --qp-violet-pale: #c2b9ff;   /* 10.90:1  display emphasis            */
  --qp-violet-wash: rgba(101, 86, 178, 0.075);

  /* --- Data ---------------------------------------------------------------
     Five status colours, used as chips and marks, always with dark ink on
     top: white on --qp-pink is 2.22:1 and must never happen.               */
  --qp-green: #70dab1;         /* 11.53:1 on ground                    */
  --qp-pink: #fb8298;
  --qp-amber: #e8be6a;
  --qp-blue: #76b6ed;
  --qp-lilac: #bb91f0;

  /* --- Lines and surfaces -------------------------------------------------
     The line is the brand's signature: 1px of light, not a border. Surfaces
     are white at 2.4%, which is how a panel steps up on a dark ground.     */
  --qp-line: rgba(183, 191, 224, 0.11);
  --qp-line-strong: rgba(183, 191, 224, 0.18);
  --qp-line-violet: rgba(148, 134, 232, 0.18);
  --qp-surface: rgba(255, 255, 255, 0.024);
  --qp-surface-2: rgba(255, 255, 255, 0.045);

  /* --- Elevation ----------------------------------------------------------
     Resting elements are flat. These exist for things that truly float: the
     product console, a menu, the primary action.                           */
  --qp-lift: 0 12px 28px rgba(0, 3, 18, 0.25);
  --qp-lift-deep: 0 36px 100px rgba(0, 4, 18, 0.42);
  --qp-inset: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  --qp-glow: 0 10px 30px -10px rgba(101, 86, 178, 0.72);

  /* --- Type ---------------------------------------------------------------
     One family, six real cuts (300 400 500 600 700 900). The live site also
     asks for 650/750/850, which the font does not have and the browser fakes;
     this scale uses the real cuts only.
     Five visible steps: display, h2, h3, body, small. Nothing between.     */
  --qp-font: "Modam", "Vazirmatn", "IRANSansX", Tahoma, sans-serif;
  --qp-display: clamp(36px, 8.2vw, 118px);
  --qp-h2: clamp(28px, 4.2vw, 60px);
  --qp-h3: clamp(21px, 2vw, 29px);
  --qp-body: 18px;
  --qp-small: 13px;

  --qp-lh-display: 1.15;
  --qp-lh-h2: 1.22;
  --qp-lh-h3: 1.45;
  --qp-lh-body: 1.85;          /* Arabic script needs the extra leading  */
  --qp-lh-small: 1.7;

  --qp-track-display: -0.04em; /* measured: -4.5% at 72px               */
  --qp-track-h2: -0.03em;
  --qp-track-h3: -0.01em;
  --qp-track-small: 0.01em;

  /* --- Space --------------------------------------------------------------
     One scale. Section rhythm is 124px on desktop and 88px on a phone; that
     gap is always larger than any gap inside a section.                    */
  --qp-s1: 8px;
  --qp-s2: 16px;
  --qp-s3: 24px;
  --qp-s4: 32px;
  --qp-s5: 48px;
  --qp-s6: 80px;
  --qp-section: 124px;

  /* The frame: one pair of equal outer margins at every width.             */
  --qp-frame: clamp(24px, 5.5vw, 80px);   /* 80 at 1440, 42 at 768, 24 at 390 */
  --qp-max: 1280px;
  --qp-inset: 64px;                        /* text column = 1152 on 1280   */

  /* --- Radius -------------------------------------------------------------
     Measured, the live site runs 6px to 28px with no scale. This is the
     scale; --qp-r-tab is the asymmetric corner the product uses on bubbles
     and tabs (14px 14px 14px 4px on the site).                             */
  --qp-r-1: 4px;
  --qp-r-2: 8px;
  --qp-r-3: 12px;
  --qp-r-4: 16px;
  --qp-r-5: 20px;
  --qp-r-6: 24px;
  --qp-r-tab: 14px 14px 4px 14px;
  --qp-r-full: 999px;

  /* --- Motion -------------------------------------------------------------
     Fast and plain: 180–250ms, one ease for entering, one for leaving.     */
  --qp-ease: cubic-bezier(0.2, 0.75, 0.25, 1);
  --qp-ease-soft: cubic-bezier(0, 0, 0.2, 1);
  --qp-t1: 0.18s;
  --qp-t2: 0.25s;
  --qp-t3: 0.5s;
}

/* --- Reusable measurements ------------------------------------------------ */
.qp-wrap {
  width: 100%;
  max-width: var(--qp-max);
  margin-inline: auto;
  padding-inline: var(--qp-frame);
}

.qp-inset {
  padding-inline: var(--qp-inset);
}

@media (max-width: 1100px) {
  :root { --qp-inset: 0px; }
}

@media (max-width: 700px) {
  :root { --qp-section: 88px; }
}

/* --- Base ----------------------------------------------------------------- */
.qp-reset,
.qp-reset *,
.qp-reset *::before,
.qp-reset *::after { box-sizing: border-box; }

.qp-reset {
  margin: 0;
  background: var(--qp-bg);
  color: var(--qp-ink);
  font-family: var(--qp-font);
  font-size: var(--qp-body);
  line-height: var(--qp-lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.qp-reset h1,
.qp-reset h2,
.qp-reset h3,
.qp-reset h4,
.qp-reset p,
.qp-reset figure,
.qp-reset ul,
.qp-reset ol { margin: 0; }

.qp-reset a { color: inherit; text-decoration: none; }
.qp-reset img { display: block; max-width: 100%; height: auto; }
.qp-reset button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }

.qp-reset :focus-visible {
  outline: 2px solid var(--qp-violet-bright);
  outline-offset: 3px;
  border-radius: var(--qp-r-1);
}

.qp-reset ::selection {
  background: var(--qp-violet);
  color: #fff;
}
