/* Reset + typography + RTL base */

@font-face {
	font-family: 'Vazirmatn';
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('../fonts/Vazirmatn-Variable.woff2') format('woff2-variations'),
	     url('../fonts/Vazirmatn-Variable.woff2') format('woff2');
	unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFC, U+200C-200E;
}
@font-face {
	font-family: 'Vazirmatn';
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('../fonts/Vazirmatn-Variable-latin.woff2') format('woff2-variations'),
	     url('../fonts/Vazirmatn-Variable-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0300-03FF;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

body {
	margin: 0;
	background: var(--c-bg);
	color: var(--c-text);
	font-family: var(--font-fa);
	font-size: var(--fs-body);
	line-height: var(--lh-normal);
	direction: rtl;
	text-align: right;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; line-height: var(--lh-tight); font-family: var(--font-display); }

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

::selection { background: var(--c-accent); color: #fff; }

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

/* Numerals stay Persian across the site */
.num-fa { font-variant-numeric: normal; }

.container {
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--container-pad);
}
.container--narrow { max-width: 860px; }
.container--wide { max-width: 1440px; }

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

.skip-link {
	position: absolute;
	top: -100px;
	right: var(--sp-4);
	z-index: 999;
	background: var(--c-charcoal);
	color: #fff;
	padding: var(--sp-3) var(--sp-5);
	border-radius: var(--radius-sm);
	transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: var(--sp-4); }

/* Scroll-reveal base (JS adds .is-visible) */
[data-reveal] {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
	will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal="fade"] { transform: none; }
[data-reveal="right"] { transform: translateX(36px); }
[data-reveal="left"] { transform: translateX(-36px); }
[data-reveal="right"].is-visible,
[data-reveal="left"].is-visible { transform: none; }

@media (prefers-reduced-motion: reduce) {
	[data-reveal] { opacity: 1; transform: none; transition: none; }
}
