/*
  Self-hosted font: the CDN (jsdelivr) is kept as a fallback in <head>, but if
  it's ever unreachable the whole site's typography shouldn't shift. Download
  the two Vazirmatn weights below into client/assets/fonts/ and this
  @font-face will be used first (browsers only fetch a @font-face file when
  it's actually needed, so this costs nothing while the files are missing -
  it just silently falls through to the CDN font declared in <head>).
  Get them from: https://github.com/rastikerdar/vazirmatn/releases
*/
@font-face {
  font-family: 'VazirmatnLocal';
  src: url('/assets/fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'VazirmatnLocal';
  src: url('/assets/fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-fa);
  background: var(--bg);
  color: var(--text);
  line-height: 1.85;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3, h4 { line-height: 1.4; font-weight: 700; }
h2 { font-size: 26px; color: var(--navy); }
html.theme-dark h2 { color: #dfe7f5; }

/* Visible focus ring everywhere for keyboard users. */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
