/**
 * PGS Learning — reset, typography, layout utilities.
 * Mobile-first: base styles target 360px, media queries add up.
 * Everything reads colours from tokens.css: light by default, .pgs-dark sections redefine the tokens.
 */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 96px; /* sticky header */
	/* Page scrollbar (2026-10-29, client): slim, navy handle on a light track (Chrome, Edge, Firefox). */
	scrollbar-width: thin;
	scrollbar-color: var(--pgs-navy) #e6ebf3;
}

/* Safari (no scrollbar-color yet): the same slim navy bar, green while pointed at. */
@supports not (scrollbar-color: auto) {
	::-webkit-scrollbar {
		width: 10px;
		height: 10px;
	}

	::-webkit-scrollbar-track {
		background: #e6ebf3;
	}

	::-webkit-scrollbar-thumb {
		border: 2px solid #e6ebf3;
		border-radius: 10px;
		background: var(--pgs-navy);
	}

	::-webkit-scrollbar-thumb:hover {
		background: var(--pgs-green);
	}
}

/* Very large screens (decision 2026-10-22 — undo: delete this block): all rem-based type and
   spacing 10% larger, so the page does not look tiny on 2400px+ monitors. */
@media (min-width: 2200px) {
	html {
		font-size: 110%;
	}
}

body {
	margin: 0;
	background: var(--pgs-bg);
	color: var(--pgs-text-body);
	font-family: var(--pgs-font-body);
	font-size: var(--pgs-fs-body);
	font-weight: 400;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6,
p, figure, blockquote, ul, ol, dl {
	margin: 0;
}

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

img,
video {
	height: auto;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6,
.pgs-h1, .pgs-h2, .pgs-h3 {
	color: var(--pgs-text);
	font-family: var(--pgs-font-head);
	line-height: 1.2;
	text-wrap: balance;
}

h1, .pgs-h1 {
	font-size: var(--pgs-fs-h1);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.02em;
}

h2, .pgs-h2 {
	font-size: var(--pgs-fs-h2);
	font-weight: 800;
	letter-spacing: -0.015em;
}

h3, .pgs-h3 {
	font-size: var(--pgs-fs-h3);
	font-weight: 700;
}

h4 {
	font-size: var(--pgs-fs-body);
	font-weight: 700;
}

p + p {
	margin-top: 1em;
}

a {
	color: var(--pgs-link);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color var(--pgs-duration) var(--pgs-ease);
}

a:hover {
	color: var(--pgs-text);
}

strong, b {
	color: var(--pgs-text);
	font-weight: 600;
}

small,
.pgs-small {
	font-size: var(--pgs-fs-small);
	font-weight: 500;
}

.pgs-lead {
	color: var(--pgs-text-body);
	font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
	line-height: 1.65;
}

.pgs-muted {
	color: var(--pgs-text-muted);
}

/* One highlighted word per heading: green → lime gradient text (solid lime where unsupported). */
.pgs-hl {
	color: var(--pgs-accent);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
	.pgs-hl {
		background: var(--pgs-grad-text);
		-webkit-background-clip: text;
		background-clip: text;
		color: transparent;
		-webkit-text-fill-color: transparent;
	}
}

@media (forced-colors: active) {
	.pgs-hl {
		background: none;
		color: LinkText;
		-webkit-text-fill-color: currentColor;
	}
}

.pgs-urdu,
[lang="ur"] {
	font-family: var(--pgs-font-urdu);
	line-height: 2;
	direction: rtl;
}

/* ---------- Focus & selection ---------- */
:focus-visible {
	outline: 3px solid var(--pgs-focus);
	outline-offset: 3px;
	border-radius: 4px;
}

::selection {
	background: var(--pgs-lime);
	color: var(--pgs-navy-deep);
}

/* ---------- Layout ---------- */
.pgs-container {
	width: 100%;
	max-width: calc(var(--pgs-container) + var(--pgs-gutter) * 2);
	margin-inline: auto;
	padding-inline: 16px;
}

@media (min-width: 768px) {
	.pgs-container {
		padding-inline: var(--pgs-gutter);
	}
}

.pgs-section {
	position: relative;
	padding-block: var(--pgs-section-y);
}

/* Dark navy section (hero, why-us, instructors, footer): tokens switch in tokens.css. */
.pgs-dark,
.pgs-section--hero,
.pgs-section--cta {
	color: var(--pgs-text-body);
}

.pgs-dark {
	background: var(--pgs-bg);
}

/* Section variants: light and dark sections alternate (60 / 30 / 10). */
.pgs-section--alt    { background: var(--pgs-bg-alt); }
.pgs-section--accent { background: linear-gradient(180deg, var(--pgs-bg-alt) 0%, var(--pgs-mint) 100%); }
.pgs-dark.pgs-section--accent { background: linear-gradient(180deg, var(--pgs-bg) 0%, rgba(96, 184, 2, .10) 100%); }
.pgs-section--hero   { background: var(--pgs-grad-hero); }
.pgs-section--cta    { background: var(--pgs-grad-cta); }

/* Faint grid fading out from the top — gives hero sections depth. */
.pgs-pattern {
	isolation: isolate;
}

.pgs-pattern::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image:
		linear-gradient(var(--pgs-border) 1px, transparent 1px),
		linear-gradient(90deg, var(--pgs-border) 1px, transparent 1px);
	background-size: 56px 56px;
	-webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
	mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
	opacity: .55;
	pointer-events: none;
}

.pgs-grid {
	display: grid;
	gap: var(--pgs-gutter);
}

@media (min-width: 640px) {
	.pgs-grid--2,
	.pgs-grid--3,
	.pgs-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
	.pgs-grid--3 { grid-template-columns: repeat(3, 1fr); }
	.pgs-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.pgs-text-center { text-align: center; }

.pgs-stack > * + * { margin-top: 1rem; }

/* Frosted-glass surface (sticky header, floating pills). */
.pgs-glass {
	background: var(--pgs-glass-bg);
	border: 1px solid var(--pgs-border);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	backdrop-filter: blur(14px) saturate(140%);
}

/* ---------- Light "paper" panel ----------
   White panel that keeps the light palette even inside a dark section (enroll / price card).
   Its tokens are set in tokens.css together with :root. */
.pgs-paper {
	background: var(--pgs-paper);
	color: var(--pgs-text-body);
}


/* ---------- Accessibility helpers ---------- */
.screen-reader-text,
.pgs-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;
}

.pgs-skip-link {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 1000;
	padding: 10px 18px;
	border-radius: var(--pgs-radius-pill);
	background: var(--pgs-lime);
	color: var(--pgs-navy-deep);
	font-weight: 600;
	text-decoration: none;
	transform: translateY(-200%);
}

.pgs-skip-link:focus {
	transform: none;
}

/* ---------- Icons ---------- */
.pgs-icon {
	display: inline-block; /* sits inline with text; the reset makes svg display:block */
	vertical-align: -0.2em;
	flex-shrink: 0;
	width: 1.25em;
	height: 1.25em;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.75;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.pgs-icon--sm { width: 1em; height: 1em; }
.pgs-icon--lg { width: 1.75em; height: 1.75em; }

/* ---------- Motion: data-reveal (JS adds .is-visible) ---------- */
.pgs-js [data-reveal] {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity .6s var(--pgs-ease), transform .6s var(--pgs-ease);
}

.pgs-js [data-reveal].is-visible {
	opacity: 1;
	transform: none;
}

/* Stagger siblings: style="--pgs-delay: 120ms" */
.pgs-js [data-reveal] {
	transition-delay: var(--pgs-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}

	.pgs-js [data-reveal] {
		opacity: 1;
		transform: none;
	}
}
