/* ==========================================================================
   Base reset + typography + layout primitives
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; max-width: 100vw; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	max-width: 100vw;
	background: var(--c-bg-page);
	color: var(--c-text-on-light);
	font-family: var(--font-base);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	direction: rtl;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img, svg, video { max-width: 100%; display: block; height: auto; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, h5, h6 {
	margin: 0;
	font-weight: var(--fw-black);
	line-height: var(--lh-tight);
	text-wrap: balance;
}

p { margin: 0; }

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

button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

/* Visible focus state everywhere — accessibility requirement */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid var(--c-cta-secondary);
	outline-offset: 2px;
	border-radius: var(--radius-sm);
}

.screen-reader-text {
	position: absolute;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.screen-reader-text:focus {
	position: fixed;
	top: var(--space-3); inset-inline-start: var(--space-3);
	width: auto; height: auto;
	z-index: var(--z-modal);
	padding: var(--space-3) var(--space-5);
	background: var(--c-navy-950);
	color: var(--c-white);
	border-radius: var(--radius-sm);
	clip: auto;
}

.ns-container {
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--container-pad);
}

.ns-section {
	padding-block: var(--space-9);
}
@media (max-width: 782px) {
	.ns-section { padding-block: var(--space-7); }
}

.ns-section--light { background: var(--c-bg-section-light); color: var(--c-text-on-light); }
.ns-section--page { background: var(--c-bg-page); color: var(--c-text-on-light); }
.ns-section--dark { background: var(--c-bg-section-dark); color: var(--c-text-on-dark); }
.ns-section--dark .ns-eyebrow { color: var(--c-amber-500); }
.ns-section--dark p { color: var(--c-ink-muted-on-dark); }

.ns-section-head { margin-bottom: var(--space-7); max-width: 56ch; }
.ns-section-head--center { margin-inline: auto; text-align: center; }
.ns-eyebrow {
	display: block;
	font-size: var(--fs-eyebrow);
	font-weight: var(--fw-bold);
	letter-spacing: 0.08em;
	color: var(--c-amber-600);
	margin-bottom: var(--space-2);
}
.ns-section-title { font-size: var(--fs-h2); }

/* Gradient seam used at dark/light section boundaries instead of a hard cut */
.ns-seam-to-dark { background: linear-gradient(to bottom, transparent, rgba(20,27,32,0.65)); height: 96px; margin-bottom: calc(-1 * 96px); position: relative; z-index: 1; pointer-events: none; }

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

/* ---- Generic page/article content (page.php, single.php, archive.php) ---- */
.ns-page__inner, .ns-single__inner { max-width: 820px; margin-inline: auto; }
.ns-page__title { font-size: var(--fs-h1); margin-bottom: var(--space-6); }
.ns-single__meta { color: var(--c-ink-muted); font-size: var(--fs-small); margin-top: var(--space-2); }
.ns-single__thumb { border-radius: var(--radius-md); overflow: hidden; margin-block: var(--space-6); }
.ns-page__content { line-height: var(--lh-body); }
.ns-page__content p { margin-bottom: var(--space-5); }
.ns-page__content h2 { font-size: var(--fs-h2); margin-block: var(--space-7) var(--space-4); }
.ns-page__content h3 { font-size: var(--fs-h3); margin-block: var(--space-6) var(--space-3); }
.ns-page__content ul, .ns-page__content ol { margin-bottom: var(--space-5); padding-inline-start: var(--space-6); list-style: initial; }
.ns-page__content a { color: var(--c-teal-600); text-decoration: underline; text-underline-offset: 3px; }
.ns-page__content img { border-radius: var(--radius-md); margin-block: var(--space-5); }
