/* Vazirmatn, SIL OFL — see fonts/OFL.txt */

@font-face {
  font-family: Vazirmatn;
  src: url("fonts/vazirmatn-wght.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #0b1220;
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --blue: #2563eb;
  --blue-deep: #1d4ed8;
  --blue-soft: #dbeafe;
  --bg: #f4f7fb;
  --card: #ffffff;
  --hero-text: #e2e8f0;
  --hero-dim: #cbd5e1;
  --max: 1120px;
  --header: 72px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Vazirmatn, Tahoma, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--blue-deep);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.site-header :focus-visible,
.hero :focus-visible,
.site-footer :focus-visible {
  outline-color: #fff;
}

::selection {
  background: #bfdbfe;
  color: var(--ink);
}

[data-en] {
  display: none;
}

html[lang="en"] [data-fa] {
  display: none;
}

html[lang="en"] [data-en] {
  display: inline;
}

.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: 8px;
  z-index: 40;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  transform: translateY(-150%);
}

.skip:focus {
  transform: none;
}

.wrap {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.noscript {
  margin: 0;
  padding: 10px 16px;
  background: #fff7ed;
  color: #9a3412;
  text-align: center;
  font-size: 0.95rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(11, 18, 32, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.nav-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
}

.nav-primary a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 10px;
  color: var(--hero-dim);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
}

.nav-primary a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.lang {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
  margin-inline-start: auto;
}

.lang button {
  border: 0;
  background: transparent;
  color: var(--hero-dim);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  cursor: pointer;
}

html[lang="fa"] .lang [data-lang="fa"],
html[lang="en"] .lang [data-lang="en"] {
  background: #fff;
  color: var(--ink);
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(37, 99, 235, 0.45), transparent 60%),
    var(--navy);
  color: #fff;
  text-align: center;
  padding: 72px 0 80px;
}

.hero-watermark {
  position: absolute;
  width: min(440px, 80vw);
  height: auto;
  inset-inline-end: -90px;
  bottom: -120px;
  opacity: 0.09;
  pointer-events: none;
  user-select: none;
}

.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.eyebrow {
  margin: 18px 0 0;
  color: #bfdbfe;
  font-weight: 600;
  font-size: 0.98rem;
}

.hero h1 {
  margin: 8px 0 0;
  font-size: clamp(3rem, 8vw, 5.4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0;
  text-wrap: balance;
}

.subname {
  margin: 2px 0 0;
  font-weight: 650;
  font-size: 1.15rem;
  color: #93c5fd;
}

html[lang="fa"] .subname {
  letter-spacing: 0.14em;
}

.lede {
  margin: 18px 0 0;
  max-width: 38rem;
  color: var(--hero-text);
  font-size: 1.15rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 12px;
  font: inherit;
  font-weight: 750;
  font-size: 1rem;
  text-decoration: none;
  line-height: 1.3;
}

.btn svg {
  flex-shrink: 0;
}

.btn-light {
  background: #fff;
  color: var(--navy);
}

.btn-light:hover {
  background: #eff6ff;
}

.btn-ghost {
  color: #fff;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.45);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-blue {
  background: var(--blue);
  color: #fff;
}

.btn-blue:hover {
  background: var(--blue-deep);
  color: #fff;
}

.btn-line {
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.btn-line:hover {
  border-color: transparent;
  box-shadow: inset 0 0 0 1.5px var(--blue);
  color: var(--blue-deep);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding-block: 4px;
  padding-inline: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--hero-text);
  font-size: 0.92rem;
}

.facts a {
  color: #fff;
  font-weight: 700;
}

kbd,
code,
pre,
.keys {
  font-family: ui-monospace, SFMono-Regular, "Cascadia Code", Menlo, Consolas, monospace;
  direction: ltr;
  unicode-bidi: isolate;
}

.keys {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  font-family: inherit;
}

code {
  overflow-wrap: anywhere;
}

kbd {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 0.82em;
  line-height: 1.6;
}

.hero kbd {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

section {
  padding: 80px 0;
  scroll-margin-top: 84px;
}

.section-head {
  max-width: 42rem;
  margin-bottom: 28px;
}

.section-head h2,
.contrib h2,
.privacy-copy h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  line-height: 1.35;
  font-weight: 800;
}

.section-head p,
.lead {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.grid-2 > *,
.steps > *,
.gallery > *,
.privacy-grid > *,
.contrib-grid > *,
.card,
.step,
.mock-card,
.privacy-copy,
.contrib-copy {
  min-width: 0;
}

.card {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
}

.card:hover {
  border-color: #bfdbfe;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue-deep);
  margin-bottom: 14px;
}

.card h3,
.step h3,
.mock-card h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.45;
  font-weight: 800;
}

.card p,
.step p,
.mock-card .caption {
  margin: 8px 0 0;
  color: var(--muted);
}

.num {
  display: inline-grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  margin-inline-end: 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-size: 0.95rem;
  vertical-align: middle;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.step {
  min-width: 0;
  padding: 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.mock-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.canvas {
  flex: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  min-height: 300px;
  padding: 18px 14px;
  border-radius: 18px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(180deg, #dbeafe, #e2e8f0) border-box;
  border: 1px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.mock-tag {
  margin: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--blue-deep);
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--blue-soft);
}

.caption strong {
  color: var(--ink);
  font-weight: 700;
}

.mock-popup {
  width: min(320px, 100%);
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
  color: #0f172a;
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(15, 23, 42, 0.06);
  text-align: start;
}

.mock-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.mock-head img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.mock-head strong,
.mock-menu strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.mock-head span,
.mock-hint,
.mock-links {
  color: #64748b;
  font-size: 11px;
  line-height: 1.6;
}

.mock-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.mock-input,
.mock-go {
  height: 40px;
  border-radius: 10px;
  font-size: 13px;
}

.mock-input {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  height: auto;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  line-height: 1.45;
  white-space: normal;
}

.mock-go {
  display: grid;
  place-items: center;
  padding: 0 14px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}

.mock-hint {
  margin: 10px 2px 0;
}

.mock-hint kbd {
  background: #fff;
  color: #0f172a;
  border-color: #e2e8f0;
  font-size: 10px;
}

.mock-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
  font-weight: 700;
  color: #1d4ed8;
}

.omnibox,
.menu {
  width: min(100%, 320px);
  border-radius: 14px;
  background: #fff;
  box-shadow:
    0 16px 36px rgba(15, 23, 42, 0.1),
    0 0 0 1px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  text-align: start;
}

.omni-bar,
.omni-suggest,
.menu-item {
  padding: 10px 12px;
  font-size: 0.92rem;
}

.omni-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.kw {
  color: var(--blue);
  font-weight: 800;
}

.omni-suggest {
  background: #eff6ff;
  color: var(--ink);
}

.match {
  color: var(--blue-deep);
  font-weight: 800;
}

.selection-sample {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.selection-sample mark {
  background: var(--blue);
  color: #fff;
  padding: 0 4px;
  border-radius: 4px;
}

.menu-item {
  color: var(--ink);
}

.menu-item + .menu-item {
  border-top: 1px solid var(--line);
}

.menu-item.is-active {
  background: #eff6ff;
  color: var(--blue-deep);
  font-weight: 700;
}

.band {
  background: #fff;
}

.url-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--navy);
  color: var(--hero-text);
}

.url-row span {
  font-weight: 700;
  color: #fff;
}

.url-row code {
  min-width: 0;
  color: #dbeafe;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.privacy-grid,
.contrib-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: start;
}

.privacy-copy p,
.contrib-copy p,
.contrib-copy li {
  color: var(--muted);
}

.privacy-copy a,
.contrib-copy a {
  font-weight: 700;
}

.callout {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--ink);
}

.callout p {
  margin: 0;
  color: var(--ink);
}

.perms {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.perms li {
  padding: 16px 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
}

.perm-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.perms code {
  display: inline-block;
  margin-top: 4px;
  color: var(--blue-deep);
  font-size: 0.95rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.perms p {
  margin: 6px 0 0;
}

.contrib {
  background:
    radial-gradient(700px 240px at 100% 0%, rgba(37, 99, 235, 0.08), transparent 50%),
    #fff;
}

.contrib-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.steps-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  counter-reset: contrib;
}

.steps-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg);
  color: var(--ink);
}

.steps-list li::before {
  counter-increment: contrib;
  content: counter(contrib);
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: #fff;
  color: var(--blue-deep);
  font-weight: 800;
  font-size: 0.9rem;
}

html[lang="fa"] .steps-list li::before {
  content: counter(contrib, persian);
}

pre {
  margin: 16px 0 0;
  max-width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--navy);
  color: #e2e8f0;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.92rem;
  line-height: 1.6;
}

.site-footer {
  background: var(--navy);
  color: var(--hero-dim);
  padding: 36px 0 28px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  align-items: start;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
}

.footer-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.footer-brand p {
  margin: 0;
  font-size: 0.95rem;
}

.ver {
  display: block;
  color: var(--hero-dim);
  font-weight: 600;
  font-size: 0.82rem;
}

.nav-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  max-width: 36rem;
}

.nav-footer a {
  color: #dbeafe;
  font-weight: 650;
  text-decoration: none;
}

.nav-footer a:hover {
  text-decoration: underline;
}

.credit {
  width: 100%;
  margin: 8px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.95rem;
}

.credit a {
  color: #fff;
  font-weight: 800;
}

.copy {
  width: 100%;
  margin: 0;
  color: #94a3b8;
  font-size: 0.88rem;
}

@media (max-width: 980px) {
  .steps,
  .gallery,
  .privacy-grid,
  .contrib-grid {
    grid-template-columns: 1fr;
  }

  .canvas {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .header-inner {
    flex-wrap: wrap;
    padding-block: 8px;
  }

  .nav-primary {
    order: 3;
    width: 100%;
    margin-inline-start: 0;
  }

  .lang {
    margin-inline-start: auto;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 48px 0 56px;
  }

  section {
    padding: 56px 0;
  }

  .facts li {
    padding-inline-end: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .card {
    transition: none;
  }
}

@media print {
  .site-header,
  .skip,
  .lang,
  .actions,
  .noscript {
    display: none;
  }

  .hero,
  .site-footer,
  .url-row,
  pre {
    background: #fff;
    color: #000;
  }

  .hero-watermark {
    display: none;
  }

  a {
    text-decoration: underline;
  }
}
