/* Base: font, reset, typography and accessibility primitives. */
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Variable.woff2") format("woff2-variations"), url("../fonts/Vazirmatn-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.75;
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, h4 { margin: 0; color: var(--text); line-height: 1.45; font-weight: 800; text-wrap: balance; }
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-lg); font-weight: 700; }
p { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
ul, ol { margin: 0; padding: 0; list-style: none; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
table { border-collapse: collapse; width: 100%; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1:focus, h1:focus-visible { outline: none; }

::selection { background: var(--accent-soft); color: var(--text); }

/* Layout helpers */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: var(--z-toast); padding: 10px 16px; border-radius: var(--radius-md); background: var(--primary); color: var(--on-primary); font-weight: 700; }
.skip-link:focus { top: 12px; }

.eyebrow { display: inline-block; color: var(--accent-text); font-size: var(--text-sm); font-weight: 700; }
.muted { color: var(--text-2); }
.num { font-variant-numeric: tabular-nums; }
.show-sm { display: none !important; }
@media (max-width: 760px) {
  .hide-sm { display: none !important; }
  .show-sm { display: revert !important; }
  a.show-sm, button.show-sm { display: flex !important; }
}

/* Blazor error bar */
#blazor-error-ui {
  display: none; position: fixed; inset-inline: 0; bottom: 0; z-index: var(--z-toast);
  padding: 12px 20px; background: var(--warning-bg); color: var(--warning-text);
  box-shadow: var(--shadow-lg); font-size: var(--text-sm);
}
#blazor-error-ui .reload { font-weight: 700; text-decoration: underline; margin-inline-start: 8px; }
#blazor-error-ui .dismiss { position: absolute; inset-inline-end: 16px; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* While the full-screen mobile map is shown, the page behind it must not scroll. */
html:has(.map-app) { overflow: hidden; }
