/* ==========================================================================
   Dignity and Rights Foundation
   --------------------------------------------------------------------------
   EDIT THE TOKENS BELOW TO RESTYLE THE WHOLE SITE.
   Everything downstream references these variables — change a value here and
   it updates on every page. Colours are drawn from the homepage photograph.
   ========================================================================== */

:root {
	/* --- Brand colours -------------------------------------------------- */
	--navy:        #0B1640;   /* Structural surface: header, footer, dark bands */
	--navy-deep:   #070E2B;   /* Deeper navy for layering inside dark sections  */
	--navy-soft:   #1B2A5E;   /* Hairlines and borders on dark backgrounds      */

	--paper:       #FBF6EF;   /* Warm page background                           */
	--paper-tint:  #F4EADC;   /* Alternating band / card fill on light sections */
	--white:       #FFFFFF;

	--saffron:     #F0832E;   /* Primary accent — the dupatta orange            */
	--vermilion:   #E8431C;   /* Emphasis only. Use sparingly.                  */
	--marigold:    #F8B02A;   /* Highlights, underlines                         */
	--teal:        #0E7C74;   /* Cool counterpoint                              */

	--ink:         #23242E;   /* Body text on light backgrounds                 */
	--ink-muted:   #5A5B69;   /* Secondary text on light backgrounds            */
	--on-navy:     #EDEFF7;   /* Body text on navy                              */
	--on-navy-dim: #A9B0CC;   /* Secondary text on navy                         */

	/* --- Typography ------------------------------------------------------ */
	--font-display: "Newsreader", Georgia, "Times New Roman", serif;
	--font-body:    "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

	--step--1: clamp(0.83rem, 0.80rem + 0.15vw, 0.92rem);
	--step-0:  clamp(1.00rem, 0.96rem + 0.20vw, 1.13rem);
	--step-1:  clamp(1.25rem, 1.16rem + 0.44vw, 1.55rem);
	--step-2:  clamp(1.56rem, 1.39rem + 0.85vw, 2.13rem);
	--step-3:  clamp(1.95rem, 1.65rem + 1.50vw, 2.91rem);
	--step-4:  clamp(2.44rem, 1.93rem + 2.55vw, 3.98rem);

	/* --- Layout ---------------------------------------------------------- */
	--measure: 68ch;          /* Max line length for readable prose            */
	--wrap:    1180px;        /* Max content width                             */
	--wrap-narrow: 760px;
	--gutter:  clamp(1.25rem, 4vw, 3rem);
	--section-y: clamp(3.5rem, 8vw, 7rem);
	--radius:  4px;           /* Restrained. Raise for a softer look.          */
	--header-h: 84px;

	--shadow: 0 1px 2px rgba(11, 22, 64, .06), 0 8px 24px rgba(11, 22, 64, .07);
	--ease: cubic-bezier(.22, .61, .36, 1);
}

/* ==========================================================================
   1. Reset & base
   ========================================================================== */

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

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

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

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

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 500;
	line-height: 1.12;
	letter-spacing: -0.015em;
	text-wrap: balance;
	margin: 0 0 .6em;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }

p { margin: 0 0 1.15em; max-width: var(--measure); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }

ul, ol { padding-left: 1.15em; }
li { margin-bottom: .45em; }

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

/* Screen-reader-only, and the skip link that becomes visible on focus */
.sr-only {
	position: absolute; width: 1px; height: 1px;
	padding: 0; margin: -1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
	position: absolute; top: 0; left: 50%;
	transform: translate(-50%, -120%);
	z-index: 200;
	background: var(--saffron); color: var(--navy);
	padding: .7rem 1.25rem; font-weight: 700;
	border-radius: 0 0 var(--radius) var(--radius);
	transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ==========================================================================
   2. Layout primitives
   ========================================================================== */

.wrap { width: min(100% - (var(--gutter) * 2), var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - (var(--gutter) * 2), var(--wrap-narrow)); margin-inline: auto; }

.section { padding-block: var(--section-y); }
.section--tint { background: var(--paper-tint); }
.section--navy { background: var(--navy); color: var(--on-navy); }
.section--navy h1, .section--navy h2, .section--navy h3 { color: var(--white); }
.section--navy p { color: var(--on-navy); }

.grid { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(265px, 1fr)); }

/* Eyebrow label — signals section type, always paired with a heading */
.eyebrow {
	font-family: var(--font-body);
	font-size: var(--step--1);
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--saffron);
	margin: 0 0 .9rem;
	display: flex; align-items: center; gap: .7rem;
}
.eyebrow::after {
	content: ""; flex: 1; height: 1px;
	background: currentColor; opacity: .3; max-width: 90px;
}
.section--navy .eyebrow { color: var(--marigold); }

.lead {
	font-size: var(--step-1);
	line-height: 1.5;
	color: var(--ink-muted);
	max-width: 58ch;
}
.section--navy .lead { color: var(--on-navy-dim); }

/* ==========================================================================
   3. Buttons
   ========================================================================== */

.btn {
	display: inline-flex; align-items: center; gap: .55rem;
	font-family: var(--font-body);
	font-size: var(--step--1);
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	text-decoration: none;
	padding: .85rem 1.5rem;
	border: 1.5px solid transparent;
	border-radius: var(--radius);
	cursor: pointer;
	transition: background-color .18s var(--ease), color .18s var(--ease),
	            border-color .18s var(--ease), transform .18s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--saffron); color: var(--navy); }
.btn--primary:hover { background: var(--marigold); }

.btn--ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn--ghost:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.section--navy .btn--ghost:hover,
.site-header .btn--ghost:hover { background: var(--white); color: var(--navy); border-color: var(--white); }

.btn--solid-light { background: var(--white); color: var(--navy); }
.btn--solid-light:hover { background: var(--marigold); }

.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

/* Inline text link with a marigold underline that grows on hover */
.link-arrow {
	display: inline-flex; align-items: center; gap: .4rem;
	font-weight: 700; font-size: var(--step--1);
	text-transform: uppercase; letter-spacing: .08em;
	text-decoration: none;
	color: var(--navy);
	border-bottom: 2px solid var(--marigold);
	padding-bottom: 3px;
	transition: gap .18s var(--ease), border-color .18s var(--ease);
}
.link-arrow:hover { gap: .75rem; border-color: var(--saffron); }
.section--navy .link-arrow { color: var(--white); }

/* ==========================================================================
   4. Header & navigation
   ========================================================================== */

.site-header {
	position: sticky; top: 0; z-index: 100;
	background: var(--navy);
	color: var(--white);
	border-bottom: 1px solid var(--navy-soft);
}

.site-header__inner {
	display: flex; align-items: center; justify-content: space-between;
	gap: 1.5rem;
	min-height: var(--header-h);
	padding-block: .75rem;
}

.site-logo { display: block; flex-shrink: 0; line-height: 0; }
.site-logo img { max-height: 64px; width: auto; }

.nav-toggle {
	display: none;
	background: none; border: 1.5px solid var(--navy-soft);
	color: var(--white); border-radius: var(--radius);
	padding: .55rem .8rem; cursor: pointer;
	font-family: var(--font-body); font-size: var(--step--1);
	font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}

.site-nav ul {
	display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem);
	list-style: none; margin: 0; padding: 0;
}
.site-nav li { margin: 0; }

.site-nav a {
	font-size: var(--step--1);
	font-weight: 600;
	letter-spacing: .07em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--white);
	padding-block: .4rem;
	border-bottom: 2px solid transparent;
	transition: border-color .18s var(--ease), color .18s var(--ease);
	white-space: nowrap;
}
.site-nav a:hover { border-bottom-color: var(--saffron); }

/* Current page marker — set aria-current="page" in the HTML */
.site-nav a[aria-current="page"] { border-bottom-color: var(--marigold); color: var(--marigold); }

.site-nav .btn { text-transform: uppercase; }
.site-nav .btn:hover { border-bottom-color: transparent; }

@media (max-width: 900px) {
	.nav-toggle { display: block; }
	.site-nav {
		display: none;
		position: absolute; left: 0; right: 0; top: 100%;
		background: var(--navy-deep);
		border-bottom: 1px solid var(--navy-soft);
		padding: 1rem var(--gutter) 1.75rem;
	}
	.site-nav[data-open="true"] { display: block; }
	.site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
	.site-nav li { border-bottom: 1px solid var(--navy-soft); }
	.site-nav li:last-child { border-bottom: 0; padding-top: 1rem; }
	.site-nav a { display: block; padding: .95rem 0; border-bottom: 0; }
	.site-nav a:hover { color: var(--saffron); }
	.site-nav .btn { width: 100%; justify-content: center; }
}

/* ==========================================================================
   5. Hero — split panel, photo bleeds right
   ========================================================================== */

.hero { background: var(--navy); color: var(--white); overflow: hidden; }

.hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
	align-items: stretch;
	gap: 0;
}

.hero__copy {
	padding: clamp(3rem, 7vw, 6rem) clamp(1.5rem, 4vw, 4rem)
	         clamp(3rem, 7vw, 6rem) var(--gutter);
	display: flex; flex-direction: column; justify-content: center;
	max-width: 640px;
	margin-left: auto;
	width: 100%;
}

.hero__title {
	font-size: var(--step-4);
	font-weight: 400;
	line-height: 1.03;
	margin-bottom: 1.25rem;
	color: var(--white);
}
/* Second line takes the accent — the "Rights" half of the promise */
.hero__title em { font-style: normal; color: var(--marigold); display: block; }

.hero__text { color: var(--on-navy-dim); font-size: var(--step-1); line-height: 1.5; max-width: 46ch; }

.hero__media { position: relative; min-height: 320px; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 35%; }
/* Feathered join so the photo meets the navy panel without a hard seam */
.hero__media::before {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(90deg, var(--navy) 0%, rgba(11, 22, 64, 0) 22%);
	pointer-events: none;
}

@media (max-width: 860px) {
	.hero__inner { grid-template-columns: 1fr; }
	.hero__copy { max-width: none; margin-left: 0; padding-inline: var(--gutter); order: 2; }
	.hero__media { order: 1; aspect-ratio: 3 / 2; min-height: 0; }
	.hero__media::before { background: linear-gradient(180deg, rgba(11,22,64,0) 60%, var(--navy) 100%); }
}

/* ==========================================================================
   6. Statement band — the mission in one sentence
   ========================================================================== */

.statement { background: var(--paper-tint); padding-block: clamp(3rem, 7vw, 5.5rem); }
.statement p {
	font-family: var(--font-display);
	font-size: var(--step-2);
	line-height: 1.35;
	color: var(--navy);
	max-width: 30ch;
	margin: 0 auto;
	text-align: center;
	text-wrap: balance;
}
.statement strong { font-weight: 600; color: var(--vermilion); }

/* ==========================================================================
   7. Constitution rail — the signature element
   --------------------------------------------------------------------------
   Real article numbers from the Constitution of Pakistan. The numerals are
   information, not decoration: each card names a guarantee that already
   exists in law, which is the whole basis of the Foundation's argument.
   ========================================================================== */

.rail { background: var(--navy); color: var(--on-navy); padding-block: var(--section-y); }

.rail__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.rail__head h2 { color: var(--white); margin: 0; max-width: 18ch; }

.rail__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; }

.article-card {
	border-left: 1px solid var(--navy-soft);
	padding: 1.75rem clamp(1.25rem, 2vw, 2rem) 1.5rem;
	position: relative;
	transition: background-color .25s var(--ease);
}
.article-card:last-child { border-right: 1px solid var(--navy-soft); }
.article-card:hover { background: var(--navy-deep); }

.article-card__num {
	font-family: var(--font-display);
	font-size: clamp(2.75rem, 6vw, 4rem);
	font-weight: 300;
	line-height: 1;
	color: var(--saffron);
	display: block;
	margin-bottom: .1em;
}
.article-card__num span { font-size: .3em; display: block; letter-spacing: .16em; text-transform: uppercase; color: var(--on-navy-dim); font-family: var(--font-body); font-weight: 700; margin-bottom: .5em; }

.article-card h3 { font-size: var(--step-0); color: var(--white); margin-bottom: .5rem; letter-spacing: 0; }
.article-card p { font-size: var(--step--1); color: var(--on-navy-dim); margin: 0; }

.rail__note {
	margin-top: clamp(2rem, 4vw, 3rem);
	padding-top: 1.75rem;
	border-top: 1px solid var(--navy-soft);
	font-size: var(--step-0);
	color: var(--on-navy-dim);
	max-width: 62ch;
}
.rail__note strong { color: var(--marigold); font-weight: 600; }

@media (max-width: 640px) {
	.article-card { border-left: 0; border-top: 1px solid var(--navy-soft); }
	.article-card:last-child { border-right: 0; border-bottom: 1px solid var(--navy-soft); }
}

/* ==========================================================================
   8. Cards
   ========================================================================== */

.card {
	background: var(--white);
	border: 1px solid rgba(11, 22, 64, .09);
	border-radius: var(--radius);
	padding: clamp(1.5rem, 3vw, 2.25rem);
	display: flex; flex-direction: column;
	transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: .6rem; }
.card p { font-size: var(--step-0); color: var(--ink-muted); }
.card .link-arrow { margin-top: auto; padding-top: 1.5rem; align-self: flex-start; }

/* Programme card — accent rule keyed by position, drawn from the photo */
.card--programme { border-top: 4px solid var(--saffron); }
.card--programme:nth-child(2) { border-top-color: var(--teal); }
.card--programme:nth-child(3) { border-top-color: var(--marigold); }
.card--programme:nth-child(4) { border-top-color: var(--vermilion); }

.card--flat { background: var(--paper-tint); border-color: transparent; }
.card--flat:hover { transform: none; box-shadow: none; }

/* Alert card — for the "report a case" call, needs to feel urgent but calm */
.card--action {
	background: var(--navy); color: var(--on-navy);
	border-color: var(--navy);
}
.card--action h3 { color: var(--white); }
.card--action p { color: var(--on-navy-dim); }

/* ==========================================================================
   9. Split feature (image + text, alternating)
   ========================================================================== */

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split + .split { margin-top: clamp(3rem, 6vw, 5rem); }
.split__media img { border-radius: var(--radius); width: 100%; }
.split--flip .split__media { order: 2; }

@media (max-width: 700px) {
	.split--flip .split__media { order: 0; }
}

/* ==========================================================================
   10. Team
   ========================================================================== */

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: clamp(1.5rem, 3vw, 2.25rem); }

.person { background: var(--white); border: 1px solid rgba(11,22,64,.09); border-radius: var(--radius); overflow: hidden; }
.person__photo { aspect-ratio: 4 / 5; background: var(--paper-tint) center/cover no-repeat; display: grid; place-items: center; color: var(--ink-muted); font-size: var(--step--1); }
.person__body { padding: 1.25rem 1.35rem 1.5rem; }
.person__body h3 { font-size: var(--step-0); margin-bottom: .2rem; }
.person__role { font-size: var(--step--1); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--saffron); margin: 0 0 .75rem; }
.person__body p { font-size: var(--step--1); color: var(--ink-muted); margin: 0; }

/* ==========================================================================
   11. Page header (interior pages)
   ========================================================================== */

.page-head { background: var(--navy); color: var(--white); padding-block: clamp(3rem, 7vw, 5.5rem); }
.page-head h1 { color: var(--white); margin-bottom: 1rem; max-width: 20ch; }
.page-head p { color: var(--on-navy-dim); font-size: var(--step-1); max-width: 56ch; margin: 0; }

.breadcrumb { font-size: var(--step--1); color: var(--on-navy-dim); margin-bottom: 1.25rem; letter-spacing: .06em; text-transform: uppercase; }
.breadcrumb a { color: var(--marigold); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ==========================================================================
   12. Prose blocks & callouts
   ========================================================================== */

.prose h2 { margin-top: 2.5em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.9em; }

.callout {
	border-left: 4px solid var(--saffron);
	background: var(--paper-tint);
	padding: 1.5rem 1.75rem;
	border-radius: 0 var(--radius) var(--radius) 0;
	margin: 2rem 0;
}
.callout p { margin: 0; }
.callout p + p { margin-top: .9em; }

/* ==========================================================================
   13. Forms
   ========================================================================== */

.form { display: grid; gap: 1.25rem; max-width: 620px; }
.field { display: grid; gap: .45rem; }
.field label { font-size: var(--step--1); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.field input, .field select, .field textarea {
	font-family: var(--font-body); font-size: var(--step-0);
	padding: .8rem .9rem;
	border: 1.5px solid rgba(11,22,64,.2);
	border-radius: var(--radius);
	background: var(--white); color: var(--ink);
	width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--saffron); outline: none; box-shadow: 0 0 0 3px rgba(240,131,46,.22); }
.field textarea { min-height: 160px; resize: vertical; }
.field__hint { font-size: var(--step--1); color: var(--ink-muted); }

/* ==========================================================================
   14. Footer
   ========================================================================== */

.site-footer { background: var(--navy-deep); color: var(--on-navy-dim); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; font-size: var(--step--1); }
.site-footer a { color: var(--on-navy-dim); text-decoration: none; }
.site-footer a:hover { color: var(--marigold); text-decoration: underline; }

.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2.5rem; }
.footer-brand img { max-height: 56px; width: auto; margin-bottom: 1.25rem; }
.footer-brand p { max-width: 34ch; }

.site-footer h2 { font-family: var(--font-body); font-size: var(--step--1); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--white); margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .55rem; }

.footer-bottom {
	margin-top: 3rem; padding-top: 1.5rem;
	border-top: 1px solid var(--navy-soft);
	display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
	font-size: var(--step--1);
}

/* ==========================================================================
   15. Utilities
   ========================================================================== */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.stack > * + * { margin-top: 1.15em; }
.center-measure { margin-inline: auto; }

/* ==========================================================================
   16. Motion — subtle reveal, fully disabled when the user asks for less
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
	.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
	.reveal.is-visible { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
}

/* ==========================================================================
   17. Print
   ========================================================================== */

@media print {
	.site-header, .site-footer, .nav-toggle, .btn { display: none !important; }
	body { background: #fff; color: #000; }
	.section--navy, .rail, .hero, .page-head { background: #fff !important; color: #000 !important; }
	.section--navy h1, .section--navy h2, .page-head h1 { color: #000 !important; }
}
