/* Abrova Center catalog. Tokens follow the abrova.ir site (direction D · One App). */
@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/inter-latin-wght-normal.woff2) format("woff2"); }
@font-face { font-family: "Vazirmatn Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/vazirmatn-arabic-wght-normal.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Vazirmatn Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/vazirmatn-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "JetBrains Mono Variable"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url(fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2"); }

:root {
  color-scheme: light;
  --bg: #F7F6F2; --surface: #FFFFFF; --surface-2: #FBFBFA; --surface-3: #F1F3F6;
  --line: #E4E1D8; --line-2: #ECEEF2; --line-strong: #C9CED8;
  --ink: #10203A; --ink-2: #3E4654; --muted: #5E6573;
  --brand: #1C72C8; --brand-ink: #FFFFFF; --brand-tint: #EEF5FD; --brand-tint-line: #CFE4F8; --focus: #3BBCF3;
  --live: #1E6B44; --live-bg: #E6F4EC; --info: #155EA8; --info-bg: #EEF5FD; --warn: #7A5410; --warn-bg: #FFF3D6;
  --code-bg: #10203A; --code-bar: #172A47; --code-ink: #E6EEF8; --code-muted: #B5C1D3;
  --font-en: "Inter Variable", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-fa: "Vazirmatn Variable", "Vazirmatn", Tahoma, sans-serif;
  --font-code: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, Menlo, monospace;
  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-pill: 999px;
  --e1: 0 1px 2px rgba(16, 32, 58, 0.08), 0 0 0 1px rgba(16, 32, 58, 0.06);
  --e2: 0 16px 40px -16px rgba(16, 32, 58, 0.30), 0 0 0 1px rgba(16, 32, 58, 0.06);
  --t-fast: 120ms; --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --content: 1120px; --gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 16px; }
[lang|="en"] { font-family: var(--font-en); line-height: 1.6; }
[lang|="fa"] { font-family: var(--font-fa); line-height: 1.85; letter-spacing: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-xs); }
h1, h2, h3, h4 { margin: 0; color: var(--ink); }
p { margin: 0; }
.wrap { max-width: var(--content); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.mono, code, pre { font-family: var(--font-code); font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 17px;
  font-family: var(--font-en); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand b { font-weight: 800; }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { color: var(--ink-2); padding: 6px 10px; border-radius: var(--r-sm); font-size: 15px; }
.nav a:hover { background: var(--surface-3); text-decoration: none; }
.nav a[aria-current] { color: var(--ink); font-weight: 600; }
.nav .lang { border: 1px solid var(--line); }

/* hero */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 56px 0 48px; }
.eyebrow { color: var(--brand); font-weight: 700; font-size: 14px; font-family: var(--font-en); margin-bottom: 10px; }
.hero h1 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; max-width: 20ch; }
[lang|="fa"] .hero h1 { line-height: 1.45; font-weight: 900; letter-spacing: 0; }
.lead { color: var(--ink-2); font-size: 19px; margin-top: 14px; max-width: 62ch; }
.search { margin-top: 28px; max-width: 640px; }
.search input { width: 100%; font: inherit; font-size: 17px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 14px 18px; box-shadow: var(--e1);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint-line); }

/* blocks */
.block { padding-top: 48px; padding-bottom: 8px; }
.block h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
[lang|="fa"] .block h2 { font-weight: 900; letter-spacing: 0; }
.block > .muted { margin-top: 8px; max-width: 70ch; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.count { font-size: 15px; font-weight: 500; color: var(--muted); margin-inline-start: 8px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter, .tab { font: inherit; font-size: 14px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 6px 14px; cursor: pointer; }
.filter:hover, .tab:hover { border-color: var(--line-strong); }
.filter.is-on, .tab.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* package list */
.pkgs { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.pkg-link { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 20px; background: var(--surface);
  border-radius: var(--r-lg); box-shadow: var(--e1); color: var(--ink);
  transition: box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.pkg-link:hover { text-decoration: none; box-shadow: var(--e2); transform: translateY(-1px); }
.pkg-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pkg-name { font-family: var(--font-code); font-size: 14px; font-weight: 600; color: var(--brand); overflow-wrap: anywhere; }
[dir="rtl"] .pkg-name { text-align: right; }
.pkg-title { font-weight: 700; font-size: 17px; }
.pkg-summary { color: var(--ink-2); font-size: 15px; flex: 1; }
.pkg-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; margin-top: 6px;
  padding-top: 10px; border-top: 1px solid var(--line-2); }
.ver { font-family: var(--font-code); font-weight: 600; color: var(--ink); }
.empty { margin-top: 18px; color: var(--muted); }

.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; line-height: 1.6;
  padding: 1px 9px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.chip-android { background: var(--live-bg); color: var(--live); }
.chip-ios { background: var(--surface-3); color: var(--ink); }
.chip-flutter { background: var(--info-bg); color: var(--info); }
.chip-node { background: #EEF6E9; color: #335C1E; }
.chip-php { background: #F1EEFB; color: #4B3A8C; }
.chip-dev { background: var(--warn-bg); color: var(--warn); }
.chip-ver b { font-family: var(--font-code); }

/* tabs + code */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 20px 0 14px; }
.panel { margin-top: 18px; }
.panel h4 { font-size: 15px; margin: 14px 0 8px; }
.js .panel-title { display: none; }
.panel-title { font-size: 16px; margin-bottom: 8px; }
.code { background: var(--code-bg); border-radius: var(--r-md); overflow: hidden; margin-top: 10px; text-align: left; }
.code-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--code-bar);
  padding: 6px 8px 6px 14px; }
.code-file { color: var(--code-muted); font-family: var(--font-code); font-size: 12.5px; }
.copy { font: 600 12.5px var(--font-en); color: var(--code-ink); background: transparent; border: 1px solid #3D5275;
  border-radius: var(--r-xs); padding: 3px 10px; cursor: pointer; }
.copy:hover { background: #2A3B57; }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; color: var(--code-ink); font-size: 13.5px; line-height: 1.7; }

/* package page */
.pkg-page { padding-top: 28px; }
.crumbs { font-size: 14px; }
.crumbs a::before { content: "← "; }
[dir="rtl"] .crumbs a::before { content: "→ "; }
.pkg-top { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; margin-top: 18px; align-items: start; }
.pkg-h1 { font-family: var(--font-code); font-size: clamp(22px, 3.2vw, 32px); font-weight: 700; overflow-wrap: anywhere;
  text-align: start; }
[dir="rtl"] .pkg-h1 { text-align: right; }
.pkg-title-lg { font-weight: 700; font-size: 19px; margin-top: 6px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.side { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--e1); padding: 18px 20px; }
.side dl { margin: 0; display: grid; gap: 4px; }
.side dt { color: var(--muted); font-size: 13px; margin-top: 8px; }
.side dt:first-child { margin-top: 0; }
.side dd { margin: 0; font-size: 15px; }
.addr { font-size: 12.5px; overflow-wrap: anywhere; direction: ltr; text-align: left; }
.button { display: inline-block; margin-top: 16px; background: var(--brand); color: var(--brand-ink); font-weight: 600;
  padding: 9px 16px; border-radius: var(--r-sm); }
.button:hover { text-decoration: none; filter: brightness(1.06); }
.note { margin-top: 12px; background: var(--info-bg); color: var(--info); border-radius: var(--r-sm); padding: 10px 14px;
  font-size: 15px; max-width: 75ch; }
.steps { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.steps > li, .panel, .pkg-top > * { min-width: 0; }
.steps h3 { display: flex; align-items: center; gap: 10px; font-size: 17px; margin-top: 12px; }
.steps .n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand-tint); color: var(--brand); font-size: 14px; font-weight: 700; }
.steps .muted { margin-top: 6px; font-size: 15px; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.versions { margin-top: 14px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--e1); }
.versions th, .versions td { text-align: start; padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.versions tr:last-child td { border-bottom: 0; }
.versions th { color: var(--muted); font-weight: 600; font-size: 13px; }
details summary { cursor: pointer; color: var(--brand); }
.files { margin-top: 10px; font-size: 13px; }
.files th, .files td { text-align: start; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
[dir="rtl"] .files th, [dir="rtl"] .files td { padding: 6px 0 6px 10px; }
.hash { font-size: 12px; color: var(--ink-2); }

/* footer */
.foot { margin-top: 72px; border-top: 1px solid var(--line); background: var(--surface); }
.foot-row { display: flex; flex-direction: column; gap: 6px; padding-top: 22px; padding-bottom: 28px; font-size: 14px; }

@media (max-width: 760px) {
  .hero { padding: 36px 0 32px; }
  .lead { font-size: 17px; }
  .pkgs { grid-template-columns: 1fr; }
  .pkg-top { grid-template-columns: 1fr; gap: 20px; }
  .nav a { padding: 6px 8px; font-size: 14px; }
  .brand span { font-size: 16px; }
}
@media (max-width: 420px) {
  .nav a:not(.lang):not([href*="#packages"]) { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
