/* ===========================================================================
   Reset, font face, and element-level defaults.
   =========================================================================== */

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

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

html {
  /* clip, not hidden: `hidden` would make this a scroll container, which
     breaks scroll anchoring and position:sticky. `clip` just cuts the
     overflow, which is all the bleeding ornaments need. */
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  width: 100%;
  overflow-x: clip;
  background-color: var(--c-bg);
  color: var(--c-brown);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 400;              /* the face has one weight; never synthesise */
  line-height: var(--lh-display);
  color: var(--c-gold);
  text-wrap: balance;
}

h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin: 0; }

img { max-width: 100%; }

ol, ul { margin: 0; padding: 0; list-style: none; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
