/* ============================================================
   Abdul Bari Jamia Niswan (Women's Institute), Muzaffarpur
   Shared stylesheet. Green + cream + gold.
   Logical properties are used throughout so the Urdu page,
   which runs right to left, mirrors without extra overrides.
   ============================================================ */

:root {
  --green-950: #062a1b;
  --green-900: #0a3a26;
  --green-800: #0d4a30;
  --green-700: #11603e;
  --green-600: #17754b;
  --green-500: #1f8b59;
  --green-200: #bfdccb;
  --green-100: #e4efe8;
  --green-050: #f1f7f3;
  --gold-600: #a97f25;
  --gold-500: #c19a35;
  --gold-200: #e9dcb2;
  --paper: #f8f6ef;
  --paper-2: #f2eedf;
  --white: #ffffff;
  --ink: #17281f;
  --ink-soft: #44594d;
  --line: rgba(17, 96, 62, 0.16);
  --line-strong: rgba(17, 96, 62, 0.32);
  --radius: 18px;
  --shadow: 0 20px 44px -28px rgba(6, 42, 27, 0.4);
  --font-display: 'Marcellus', 'Lora', Georgia, serif;
  --font-body: 'Lora', Georgia, 'Times New Roman', serif;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='132' height='132' viewBox='0 0 132 132'%3E%3Cg fill='none' stroke='%2311603e' stroke-opacity='.07'%3E%3Crect x='36' y='36' width='60' height='60'/%3E%3Crect x='36' y='36' width='60' height='60' transform='rotate(45 66 66)'/%3E%3Ccircle cx='66' cy='66' r='3'/%3E%3C/g%3E%3C/svg%3E");
  --pattern-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='132' height='132' viewBox='0 0 132 132'%3E%3Cg fill='none' stroke='%23e4efe8' stroke-opacity='.06'%3E%3Crect x='36' y='36' width='60' height='60'/%3E%3Crect x='36' y='36' width='60' height='60' transform='rotate(45 66 66)'/%3E%3Ccircle cx='66' cy='66' r='3'/%3E%3C/g%3E%3C/svg%3E");
}

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

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }
p { margin: 0 0 1.1em; }
ul { margin: 0; padding: 0; }

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

::selection { background: var(--green-200); color: var(--green-950); }

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

.container { width: min(1120px, 92vw); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip {
  position: absolute; inset-inline-start: 12px; inset-block-start: -60px;
  z-index: 100; background: var(--green-800); color: #fff;
  padding: 10px 16px; border-radius: 0 0 10px 10px;
  text-decoration: none; transition: inset-block-start 0.2s ease;
}
.skip:focus { inset-block-start: 0; }

section { scroll-margin-top: 92px; }

/* ---------------------------------------------------------- type */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.16;
  color: var(--green-900);
  margin: 0 0 0.45em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.35rem, 5.2vw, 3.8rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.55rem); }
h3 { font-size: 1.24rem; }
h4 { font-size: 0.95rem; letter-spacing: 0.1em; text-transform: uppercase; }

.lede { font-size: 1.07rem; color: var(--ink-soft); max-width: 62ch; }

.story {
  max-width: 78ch; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: clamp(26px, 4vw, 42px);
}
.story p:last-child { margin-block-end: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.7em;
  font-family: var(--font-display); font-size: 0.8rem;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-600); margin: 0 0 16px;
}
.eyebrow::before { content: ""; inline-size: 34px; block-size: 1px; background: var(--gold-500); flex: none; }

/* ---------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 27px; border-radius: 999px;
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 600;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
  transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-solid { background: var(--green-700); color: #fff; }
.btn-solid:hover { background: var(--green-800); }
.btn-ghost { border-color: var(--green-700); color: var(--green-800); }
.btn-ghost:hover { background: var(--green-100); }

/* ---------------------------------------------------------- header */

.site-header {
  position: sticky; inset-block-start: 0; z-index: 50;
  background: rgba(248, 246, 239, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-block-end: 1px solid var(--line);
}
.site-header.scrolled { box-shadow: 0 12px 32px -22px rgba(6, 42, 27, 0.45); }

.site-header .bar { display: flex; align-items: center; gap: 18px; padding-block: 12px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; }
.brand img { width: 46px; height: 46px; flex: none; }
.brand .name {
  font-family: var(--font-display); font-size: 1.02rem;
  line-height: 1.25; color: var(--green-900);
}
.brand .sub {
  display: block; font-family: var(--font-body); font-size: 0.7rem;
  letter-spacing: 0.09em; color: var(--ink-soft);
}

nav.main { margin-inline-start: auto; }
nav.main ul { display: flex; gap: 4px; list-style: none; }
nav.main a {
  display: inline-block; padding: 9px 13px; border-radius: 9px;
  font-size: 0.92rem; color: var(--green-900); text-decoration: none;
  transition: background-color 0.2s ease;
}
nav.main a:hover { background: var(--green-100); }

.lang-switch {
  display: flex; flex: none;
  border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden;
  font-size: 0.82rem; background: var(--white);
}
.lang-switch a { padding: 6px 15px; text-decoration: none; color: var(--green-800); line-height: 1.6; }
.lang-switch a.active { background: var(--green-700); color: #fff; }

.nav-toggle {
  display: none; flex: none;
  inline-size: 44px; block-size: 44px; padding: 0;
  align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line-strong); border-radius: 11px; cursor: pointer;
}
.nav-toggle .bars { display: grid; gap: 4px; }
.nav-toggle .bars span { display: block; inline-size: 18px; block-size: 2px; background: var(--green-800); border-radius: 2px; }

/* ---------------------------------------------------------- hero */

.hero { position: relative; overflow: hidden; background: var(--paper) var(--pattern); }
.hero::after {
  content: ""; position: absolute; z-index: 0;
  inset-inline-end: -160px; inset-block-start: 34%;
  inline-size: 560px; block-size: 560px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(17, 96, 62, 0.1), transparent 72%);
  pointer-events: none;
}
.hero .container {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.06fr 0.94fr;
  gap: clamp(30px, 5vw, 76px); align-items: center;
  padding-block: clamp(46px, 6.5vw, 88px) clamp(40px, 5.5vw, 72px);
}
.hero h1 { margin-bottom: 0.3em; }
.hero h1 .line2 {
  display: block; margin-block-start: 0.42em;
  font-size: 0.4em; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--green-700);
}
.hero .lede { margin-block: 16px 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.seal-wrap { display: flex; justify-content: center; }
.seal { position: relative; inline-size: min(420px, 74vw); aspect-ratio: 1; }
.seal .glow {
  position: absolute; inset: 5%; border-radius: 50%;
  background: radial-gradient(closest-side, #fff 62%, rgba(255, 255, 255, 0) 100%);
  box-shadow: 0 30px 60px -40px rgba(6, 42, 27, 0.55);
}
.seal img {
  position: absolute; inset: 9%; inline-size: 82%; block-size: 82%;
  filter: drop-shadow(0 22px 34px rgba(6, 42, 27, 0.2));
  animation: seal-float 9s ease-in-out infinite alternate;
}
.seal::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--line-strong); }
.seal::after {
  content: ""; position: absolute; inset: -6%; border-radius: 50%;
  border: 1px dashed var(--line); animation: seal-spin 160s linear infinite;
}
@keyframes seal-spin { to { transform: rotate(1turn); } }
@keyframes seal-float { from { transform: translateY(-7px); } to { transform: translateY(7px); } }

/* ---------------------------------------------------------- stats */

.stats { border-block: 1px solid var(--line); background: var(--white); }
.stats ul { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; }
.stats li { padding: 26px 28px; border-inline-start: 1px solid var(--line); }
.stats li:first-child { border-inline-start: 0; }
.stats .v {
  display: block; font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.5vw, 2.05rem); line-height: 1.15; color: var(--green-800);
}
.stats .k { display: block; font-size: 0.86rem; color: var(--ink-soft); margin-block-start: 7px; }

/* ---------------------------------------------------------- sections */

.section { padding-block: clamp(58px, 8vw, 104px); }
.sec-head { max-width: 64ch; margin-block-end: clamp(28px, 4vw, 46px); }

.split { display: grid; grid-template-columns: 1.12fr 0.88fr; gap: clamp(26px, 4vw, 60px); align-items: start; }

.facts {
  margin: 0; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 10px 28px;
}
.facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; padding-block: 15px; border-block-end: 1px dashed var(--line); }
.facts > div:last-child { border-block-end: 0; }
.facts dt { font-size: 0.86rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.facts dd { margin: 0; font-family: var(--font-display); font-size: 1.05rem; color: var(--green-800); text-align: end; }

/* ---------------------------------------------------------- cards */

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card {
  position: relative; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 30px 30px 26px;
}
.card .ic {
  inline-size: 54px; block-size: 54px; border-radius: 15px;
  background: var(--green-050); border: 1px solid var(--line);
  display: grid; place-items: center; margin-block-end: 18px;
}
.card .ic svg { inline-size: 26px; block-size: 26px; stroke: var(--green-700); }
.card h3 { margin-block-end: 10px; }
.card p { font-size: 0.97rem; color: var(--ink-soft); margin-block-end: 0.6em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 14px; }
.chip {
  font-family: var(--font-body); font-size: 0.78rem;
  padding: 4px 12px; border: 1px solid var(--line-strong);
  border-radius: 999px; color: var(--green-700); background: var(--green-050);
}

/* ---------------------------------------------------------- support band */

.support {
  background: var(--green-900) var(--pattern-dark);
  color: #dcebe0;
}
.support h2 { color: #fff; }
.support p { color: #cfe2d6; }
.support .eyebrow { color: var(--gold-200); }
.support .eyebrow::before { background: var(--gold-200); }
.support blockquote {
  margin: 0 0 28px; padding: 24px 28px;
  border-inline-start: 3px solid var(--gold-500);
  background: rgba(255, 255, 255, 0.055);
  border-radius: 14px;
  font-size: clamp(1.15rem, 2.1vw, 1.42rem);
  line-height: 1.65; font-style: italic; color: #fff;
}
.support .bless {
  font-family: var(--font-display); font-style: normal;
  color: var(--gold-200); font-size: 1.06rem; letter-spacing: 0.02em;
  margin-block-start: 26px;
}
.support .panel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: var(--radius); padding: 28px 28px 24px;
}
.support .panel h3 { color: #fff; }
.support .panel .rows { list-style: none; }
.support .panel .rows li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding-block: 13px; border-block-end: 1px dashed rgba(255, 255, 255, 0.18);
  font-size: 0.95rem;
}
.support .panel .rows li:last-child { border-block-end: 0; }
.support .panel .lbl { color: #a8c8b4; flex: none; }
.support .panel .val { text-align: end; color: #eef6f0; }
.support .panel .fine { font-size: 0.86rem; color: #a8c8b4; margin: 14px 0 0; }

.pending { color: var(--gold-200); font-style: italic; }

/* ---------------------------------------------------------- contact */

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.contact-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px;
}
.contact-rows { list-style: none; }
.contact-rows li {
  display: flex; gap: 16px; align-items: baseline;
  padding-block: 13px; border-block-end: 1px dashed var(--line);
  font-size: 0.97rem;
}
.contact-rows li:last-child { border-block-end: 0; }
.contact-rows .lbl { min-inline-size: 84px; flex: none; font-size: 0.82rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-soft); }
.contact-card p:last-child { margin-block-end: 0; }

/* ---------------------------------------------------------- footer */

.site-footer { background: var(--green-950); color: #cfe2d6; }
.site-footer .container { padding-block: 46px 26px; }
.foot-grid { display: grid; grid-template-columns: 1.35fr 0.8fr 0.85fr; gap: 30px; }
.foot-grid img { width: 52px; height: 52px; margin-block-end: 14px; }
.fbrand { font-family: var(--font-display); color: #fff; font-size: 1.02rem; line-height: 1.4; margin: 0; }
.fbrand span { display: block; font-family: var(--font-body); font-size: 0.8rem; color: #9fbfa9; margin-block-start: 6px; }
.site-footer h4 { color: #fff; font-size: 0.82rem; margin-block-end: 14px; }
.site-footer ul { list-style: none; display: grid; gap: 9px; }
.site-footer ul a { color: #cfe2d6; text-decoration: none; font-size: 0.93rem; }
.site-footer ul a:hover { color: #fff; text-decoration: underline; }
.site-footer .fine {
  border-block-start: 1px solid rgba(255, 255, 255, 0.12);
  margin-block: 34px 0; padding-block-start: 18px;
  font-size: 0.8rem; color: #9fbfa9;
  display: flex; justify-content: space-between; gap: 10px 26px; flex-wrap: wrap;
}

/* ---------------------------------------------------------- reveal */

[data-reveal] {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].in { opacity: 1; transform: none; }

/* ---------------------------------------------------------- Urdu (RTL) adjustments */

html[lang="ur"] {
  --font-display: 'Marcellus', 'Noto Nastaliq Urdu', serif;
  --font-body: 'Lora', 'Noto Nastaliq Urdu', serif;
}
html[lang="ur"] body { font-size: 1.02rem; line-height: 2.15; }
html[lang="ur"] h1 { line-height: 2.05; font-size: clamp(2rem, 4.4vw, 3.1rem); }
html[lang="ur"] h2 { line-height: 2.05; }
html[lang="ur"] h3 { line-height: 2.05; }
html[lang="ur"] h4 { letter-spacing: 0; text-transform: none; }
html[lang="ur"] .eyebrow { letter-spacing: 0; text-transform: none; font-size: 0.95rem; }
html[lang="ur"] .eyebrow::before { inline-size: 28px; }
html[lang="ur"] .hero h1 .line2 { letter-spacing: 0; text-transform: none; font-size: 0.62em; }
html[lang="ur"] .stats .v { line-height: 1.85; font-size: clamp(1.2rem, 2.1vw, 1.65rem); }
html[lang="ur"] nav.main a { font-size: 0.98rem; line-height: 1.9; }
html[lang="ur"] .brand .name { font-size: 1.02rem; line-height: 1.9; }
html[lang="ur"] .brand .sub { letter-spacing: 0; font-size: 0.78rem; }
html[lang="ur"] .btn { font-size: 0.98rem; }
html[lang="ur"] .facts dt { text-transform: none; letter-spacing: 0; }
html[lang="ur"] .contact-rows .lbl { text-transform: none; letter-spacing: 0; }
html[lang="ur"] .support blockquote { font-style: normal; }
html[lang="ur"] .lang-switch { font-size: 0.95rem; }

/* ---------------------------------------------------------- responsive */

@media (max-width: 1020px) {
  .hero .container { grid-template-columns: 1fr; }
  .seal-wrap { order: -1; }
  .seal { inline-size: min(340px, 66vw); }
  .hero .lede { max-width: 58ch; }
}

@media (max-width: 1024px) {
  .nav-toggle { display: inline-flex; }
  nav.main {
    display: none; position: absolute; inset-inline: 0; inset-block-start: 100%;
    background: var(--paper); border-block-end: 1px solid var(--line);
    padding: 10px 4vw 18px; box-shadow: 0 26px 40px -30px rgba(6, 42, 27, 0.5);
  }
  body.nav-open nav.main { display: block; }
  nav.main ul { display: block; }
  nav.main a { display: block; padding: 12px 14px; font-size: 1rem; }
}

@media (max-width: 900px) {
  .brand .name { font-size: 0.95rem; }
  .split, .cards, .contact-grid, .foot-grid { grid-template-columns: 1fr; }
  .stats ul { grid-template-columns: 1fr 1fr; }
  .stats li { border-inline-start: 0; border-block-start: 1px solid var(--line); padding: 20px 22px; }
  .stats li:nth-child(-n+2) { border-block-start: 0; }
  .stats li:nth-child(even) { border-inline-start: 1px solid var(--line); }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .brand img { width: 40px; height: 40px; }
  .brand .name { font-size: 0.88rem; }
  .brand .sub { font-size: 0.62rem; }
  .lang-switch a { padding: 5px 11px; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .stats li { padding: 16px 16px; }
  .card { padding: 24px 22px 22px; }
  .support .panel { padding: 24px 20px 20px; }
}

/* ---------------------------------------------------------- reduced motion */

@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;
  }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .seal img, .seal::after { animation: none; }
}
