/* ==========================================================================
   Base: reset, typography, Urdu, accessibility
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink-2);
	font-family: var(--font-body);
	font-size: var(--fs-body);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

/* Subtle paper grain over the whole page */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	opacity: .35;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.3 0 0 0 0 0.2 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

img, svg, video { display: block; max-width: 100%; height: auto; }
.icon { width: 1.25em; height: 1.25em; flex: none; }

h1, h2, h3, h4, h5 {
	font-family: var(--font-display);
	font-variation-settings: "SOFT" 50, "opsz" 72;
	color: var(--ink);
	line-height: 1.12;
	letter-spacing: -.015em;
	margin: 0 0 .5em;
	font-weight: 640;
	text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.25; }
p { margin: 0 0 1em; text-wrap: pretty; }

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

::selection { background: var(--gold-soft); color: var(--ink); }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

/* Urdu: Nastaliq needs generous line-height (W3C urdu-lreq), no italics/letter-spacing */
.ur, [lang="ur"] {
	font-family: var(--font-urdu);
	font-style: normal;
	letter-spacing: 0;
	line-height: 2;
	font-weight: 400;
}
.ur { direction: rtl; unicode-bidi: isolate; }

/* Urdu lines paired under English headings align with the heading (left edge) */
.hero__ur, .section-title-ur, .page-hero__ur, .entry-ur,
.card__ur, .case-card__ur, .law-card__ur, .issue-card__ur, .row-card__ur, .flip__ur, .area-tile__ur, .cta-band .ur { text-align: left; }

.mono { font-family: var(--font-mono); font-size: .86em; letter-spacing: -.01em; }

.screen-reader-text, .sr-only {
	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: fixed !important;
	top: 10px; left: 10px;
	z-index: 1000;
	padding: 10px 16px;
	background: var(--ink);
	color: #fff;
	border-radius: var(--r-pill);
}
/* Visually hidden until focused (keyboard users) */
.skip-link:not(:focus) {
	width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus { color: #fff; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--ink); }
