/* ============================================================
   Resonans — Base element defaults + brand utilities
   ============================================================ */

*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--rz-font-sans);
  font-size: var(--rz-text-base);
  font-weight: var(--rz-w-regular);
  line-height: var(--rz-leading-normal);
  color: var(--rz-text);
  background: var(--rz-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Persian / Farsi content */
[dir="rtl"],
.rz-fa { font-family: var(--rz-font-fa); }

/* Heading scale matched 1:1 to legacy resonans.academy (Peyda/Manrope Bold,
   h4 SemiBold; negative tracking on the large Latin sizes, zeroed for Persian). */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--rz-font-display);
  color: var(--rz-text);
}
h1 { font-size: var(--rz-h1); line-height: var(--rz-h1-lh); letter-spacing: var(--rz-h1-track); font-weight: var(--rz-w-bold); }
h2 { font-size: var(--rz-h2); line-height: var(--rz-h2-lh); letter-spacing: var(--rz-h2-track); font-weight: var(--rz-w-bold); }
h3 { font-size: var(--rz-h3); line-height: var(--rz-h3-lh); letter-spacing: var(--rz-h3-track); font-weight: var(--rz-w-bold); }
h4 { font-size: var(--rz-h4); line-height: var(--rz-h4-lh); letter-spacing: var(--rz-h4-track); font-weight: var(--rz-w-semibold); }
h5 { font-size: var(--rz-h5); line-height: var(--rz-h5-lh); font-weight: var(--rz-w-semibold); }
h6 { font-size: var(--rz-h6); line-height: var(--rz-h6-lh); font-weight: var(--rz-w-semibold); }

/* Persian doesn't letter-space */
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3,
[dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6 { letter-spacing: normal; }

/* Legacy responsive step-down (mobile): h1 → 32/40, h2 → 24/32 */
@media (max-width: 760px) {
  h1 { font-size: var(--rz-h2); line-height: var(--rz-h2-lh); letter-spacing: var(--rz-h2-track); }
  h2 { font-size: var(--rz-h3); line-height: var(--rz-h3-lh); letter-spacing: var(--rz-h3-track); }
}

p { margin: 0; }

a {
  color: var(--rz-accent);
  text-decoration: none;
  transition: color var(--rz-dur) var(--rz-ease), opacity var(--rz-dur) var(--rz-ease);
}
a:hover { color: var(--rz-accent-hover); }

img, svg { display: block; max-width: 100%; }

::selection { background: var(--rz-red); color: #fff; }

/* ---- Brand micro-label (used at page corners & eyebrows) ---- */
.rz-label {
  font-family: var(--rz-font-sans);
  font-size: var(--rz-text-label);
  font-weight: var(--rz-w-semibold);
  letter-spacing: var(--rz-tracking-label);
  text-transform: uppercase;
  color: var(--rz-text-muted);
}

/* ---- Container ---- */
.rz-container {
  width: 100%;
  max-width: var(--rz-container);
  margin-inline: auto;
  padding-inline: var(--rz-page-pad);
}

/* ---- Signature radial red glow backdrop ---- */
.rz-glow { background: var(--rz-glow-radial); }

/* ---- Focus ---- */
:focus-visible {
  outline: 2px solid var(--rz-accent);
  outline-offset: 2px;
}
