/* NFOWD — National Forum of Organizations Working with the Disabled
   Design system: warm cream paper, deep governance green, Bangladesh red accent. */

:root {
  --green-900: #0b3a25;
  --green-800: #0f5132;
  --green-700: #14663f;
  --green-100: #e3ece3;
  /* Secondary brand colour, sampled from the NFOWD logo. The palette is
     deliberately rationed: green carries structure (bands, cards, the footer),
     blue identifies the organisation (logo, active nav, section labels), red is
     reserved for actions and national days. */
  --blue: #2b3684;
  /* Warm stone tint rather than a pale blue: a cool blue wash next to the cream
     header read as lavender. The pill is still keyed to the logo blue because
     its text and weight are blue. */
  --blue-100: #e9e6e1;
  --red: #a81c2b;
  --red-soft: #e8b6b3;
  --gold: #b8862f;
  --cream: #f8f4ec;
  --paper: #fffdf8;
  --sand: #ece2d2;
  --line: #d9cfbe;
  --ink: #1a211d;
  --ink-soft: #49544d;
  --shadow: 0 1px 2px rgba(11, 58, 37, .06), 0 12px 32px -12px rgba(11, 58, 37, .18);
  --radius: 14px;
  --wrap: 1160px;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --serif: "Fraunces", "Georgia", "Times New Roman", serif;
}

html[data-textsize="lg"] { font-size: 112.5%; }
html[data-textsize="xl"] { font-size: 125%; }

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--green-700); text-underline-offset: 3px; }
a:hover { color: var(--red); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.015em;
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.9rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.4rem); }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--green-800); color: #fff;
  padding: .75rem 1.25rem; z-index: 100; border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip:focus { left: 0; }

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

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 244, 236, .94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex; align-items: center; gap: 1.5rem;
  padding-block: .8rem;
}

.brand {
  display: flex; align-items: center; gap: .7rem;
  text-decoration: none; color: var(--ink); flex: 1 1 auto;
}
.brand img {
  width: auto; height: 52px; flex: none;
  /* The logo ships on a near-white ground (#f7f7f7), so it is given a real white
     tile in both header and footer rather than a blend mode — the ground then
     reads as part of the mark, and the same treatment works on the dark footer. */
  background: #fff; border-radius: 8px; padding: 3px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text span {
  font-size: .8rem; color: var(--ink-soft); letter-spacing: .02em;
  max-width: 34ch;
}

.nav ul {
  display: flex; align-items: center; gap: .15rem;
  list-style: none; margin: 0; padding: 0;
}
.nav a {
  display: inline-block; padding: .55rem .8rem; border-radius: 8px;
  text-decoration: none; font-size: .93rem; font-weight: 500; color: var(--ink-soft);
}
.nav a:hover { background: var(--blue-100); color: var(--blue); }
.nav a[aria-current="page"] { color: var(--blue); background: var(--blue-100); font-weight: 600; }

.tools { display: flex; align-items: center; gap: .5rem; }
.tool-group { display: flex; align-items: center; gap: .5rem; }
.tool-label {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .09em;
  color: var(--ink-soft);
}
.text-size { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--paper); }
.text-size button {
  font-family: var(--sans); font-size: .8rem; font-weight: 600;
  padding: .35rem .55rem; border: 0; background: transparent; color: var(--ink-soft);
  cursor: pointer; min-width: 34px; min-height: 34px;
}
.text-size button + button { border-left: 1px solid var(--line); }
.text-size button:hover { background: var(--green-100); color: var(--green-900); }
.text-size button[aria-pressed="true"] { background: var(--green-800); color: #fff; }

.nav-toggle {
  display: none; font: inherit; font-size: .85rem; font-weight: 600;
  padding: .5rem .8rem; border: 1px solid var(--line); border-radius: 8px;
  background: var(--paper); color: var(--ink); min-height: 40px; cursor: pointer;
}

@media (max-width: 980px) {
  .header-inner { flex-wrap: wrap; gap: .6rem 1rem; padding-block: .55rem; }
  .brand-text span { display: none; }
  .nav-toggle { display: inline-block; }
  .brand img { height: 48px; }
  /* The controls wrap as one unit so the language switch never strands itself
     on a third row on narrow phones. */
  .tools { margin-left: auto; }
  .nav {
    order: 3; flex-basis: 100%; display: none;
    border-top: 1px solid var(--line); padding-top: .5rem;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; }
  .nav a { padding: .7rem .6rem; font-size: 1rem; }
  .tool-label { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative; isolation: isolate;
  min-height: 62vh; display: grid; align-items: end;
  background: var(--green-900);
  color: #fff;
  padding-block: clamp(4rem, 12vh, 8rem) clamp(2.5rem, 6vh, 4rem);
}
.hero img.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 32%;
  z-index: -2; opacity: .55;
  filter: saturate(.85);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to right, rgba(9, 42, 27, .96) 0%, rgba(9, 42, 27, .9) 52%, rgba(9, 42, 27, .55) 100%),
    linear-gradient(to top, rgba(9, 42, 27, .92), transparent 60%);
}
/* On narrow screens the headline and lede span the full width, so the photo
   needs an even veil rather than a left-to-right fade. */
@media (max-width: 860px) {
  .hero::after {
    /* Dark enough for white copy over the top of the photo, light enough that
       the photo is still perceptible on a phone — at .96/.88 it vanished. */
    background: linear-gradient(to top, rgba(9, 42, 27, .93) 0%, rgba(9, 42, 27, .82) 100%);
  }
}
.hero .eyebrow { color: var(--red-soft); }
.hero h1 { color: #fff; max-width: 22ch; }
.hero .lede { font-size: clamp(1.02rem, 1.5vw, 1.18rem); color: #dfe7e0; max-width: 56ch; }
.hero-bn {
  font-family: var(--sans); font-size: .95rem; color: #cfdccf;
  display: block; margin-bottom: .75rem; letter-spacing: .01em;
}

.eyebrow {
  display: inline-block; font-family: var(--sans);
  font-size: .73rem; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--blue);
  margin-bottom: .9rem;
}

.btn-row { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.7rem; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.35rem; border-radius: 999px;
  font-size: .95rem; font-weight: 600; text-decoration: none;
  border: 1.5px solid transparent; min-height: 46px;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: #8f1623; color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.btn-outline { border-color: var(--green-800); color: var(--green-800); background: transparent; }
.btn-outline:hover { background: var(--green-800); color: #fff; }

/* ---------- Stats strip ---------- */

.stats {
  background: var(--green-900); color: #fff;
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: rgba(255, 255, 255, .14);
}
.stat { background: var(--green-900); padding: 1.6rem 1.2rem; }
.stat b {
  display: block; font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1; color: #fff;
}
.stat span {
  display: block; margin-top: .45rem; font-size: .8rem;
  letter-spacing: .04em; color: #b9cbbc; text-transform: uppercase;
}
@media (max-width: 720px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat { padding: 1.2rem 1rem; }
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-tight { padding-block: clamp(2rem, 4vw, 3rem); }
.section-paper { background: var(--paper); }
.section-sand { background: var(--sand); }
.section-green { background: var(--green-900); color: #e6ede6; }
/* Cards and tables keep their own paper surface, so they need their own text
   colour — otherwise dark ink list items inherit the section's pale green. */
.section-green .table-wrap { color: var(--ink); }
.section-green h2, .section-green h3 { color: #fff; }
.section-green .eyebrow { color: var(--red-soft); }

.section-head { max-width: 62ch; margin-bottom: 2.4rem; }
/* :not(.eyebrow) keeps the label's own colour from being flattened by the
   paragraph rule — the eyebrow is a label, not body copy. */
.section-head p:not(.eyebrow) { color: var(--ink-soft); font-size: 1.04rem; }
.section-green .section-head p:not(.eyebrow) { color: #c3d2c4; }

/* Two column: text + image */
.split {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.split img {
  border-radius: var(--radius); box-shadow: var(--shadow);
  width: 100%; height: 100%; max-height: 480px; object-fit: cover;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Cards */
.cards {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: .6rem;
}
.card h3 { margin-bottom: .1rem; }
.card p { color: var(--ink-soft); font-size: .96rem; }
.card .num {
  font-family: var(--serif); font-size: .95rem; font-weight: 600;
  color: var(--red); letter-spacing: .08em;
}
.section-green .card {
  background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .16);
  box-shadow: none;
}
.section-green .card p { color: #c3d2c4; }

/* Pillars (vision / mission / values) */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
@media (max-width: 900px) { .pillars { grid-template-columns: 1fr; } }
.pillar {
  border-top: 3px solid var(--green-800);
  background: var(--paper); padding: 1.5rem 1.4rem 1.7rem;
  border-radius: 0 0 var(--radius) var(--radius);
}
.pillar:nth-child(2) { border-top-color: var(--red); }
.pillar:nth-child(3) { border-top-color: var(--gold); }
.pillar h3 { font-size: 1.15rem; }
.pillar p { font-size: .96rem; color: var(--ink-soft); }

/* Thematic group chips */
.chips { display: flex; flex-wrap: wrap; gap: .55rem; list-style: none; padding: 0; margin: 1.6rem 0 0; }
.chips li {
  background: var(--paper); border: 1px solid var(--line); color: var(--ink);
  padding: .45rem .85rem; border-radius: 999px; font-size: .86rem; font-weight: 500;
}
.section-green .chips li { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .2); color: #e6ede6; }

/* Achievement / timeline list */
.entry-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.entry {
  display: grid; grid-template-columns: 5.5rem 1fr; gap: 1.4rem;
  padding: 1.35rem 0; border-top: 1px solid var(--line);
}
.entry:last-child { border-bottom: 1px solid var(--line); }
.entry .year {
  font-family: var(--serif); font-size: 1.15rem; font-weight: 600;
  color: var(--red); letter-spacing: .01em;
}
.entry h3 { font-size: 1.08rem; margin-bottom: .25rem; }
.entry p { font-size: .95rem; color: var(--ink-soft); }
@media (max-width: 620px) {
  .entry { grid-template-columns: 1fr; gap: .3rem; }
}

/* Plain list blocks */
.list-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; }
.tick { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.tick li { position: relative; padding-left: 1.7rem; font-size: .96rem; color: var(--ink-soft); }
.tick li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: .55rem; height: .55rem; border-radius: 50%;
  background: var(--green-700);
}
.section-green .tick li { color: #c3d2c4; }
.section-green .tick li::before { background: var(--red-soft); }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
caption { text-align: left; padding: 1rem 1.2rem .4rem; font-weight: 600; color: var(--ink-soft); font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; }
th, td { text-align: left; padding: .75rem 1.2rem; border-top: 1px solid var(--line); }
th { font-weight: 600; color: var(--green-900); background: #f1ece1; }
td:last-child { text-align: right; font-variant-numeric: tabular-nums; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery figure { margin: 0; }
.gallery img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.gallery figcaption {
  font-size: .84rem; color: var(--ink-soft); margin-top: .5rem;
  line-height: 1.45;
}
.gallery .wide { grid-column: span 2; }
.gallery .wide img { aspect-ratio: 16 / 9; }
@media (max-width: 900px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery .wide { grid-column: span 2; }
}
@media (max-width: 560px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery .wide { grid-column: auto; }
}

/* Feature panel with photo */
.feature-band {
  display: grid; grid-template-columns: 1fr 1fr;
  border-radius: var(--radius); overflow: hidden;
  background: var(--green-900); color: #e6ede6;
  box-shadow: var(--shadow);
}
.feature-band img { width: 100%; height: 100%; object-fit: cover; min-height: 340px; }
.feature-band .feature-body { padding: clamp(1.8rem, 4vw, 3rem); }
.feature-band h2 { color: #fff; }
.feature-band p { color: #c3d2c4; }
.feature-band .eyebrow { color: var(--red-soft); }
@media (max-width: 820px) {
  .feature-band { grid-template-columns: 1fr; }
  .feature-band img { min-height: 220px; }
}

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow);
}
.contact-card dt {
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft); margin-top: 1.1rem;
}
.contact-card dt:first-child { margin-top: 0; }
.contact-card dd { margin: .25rem 0 0; font-size: 1rem; line-height: 1.5; }
.contact-card dd a { font-weight: 600; }

/* CTA band */
.cta {
  background: var(--red); color: #fff; border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3.2rem);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.cta h2 { color: #fff; margin: 0; max-width: 24ch; font-size: clamp(1.4rem, 2.6vw, 2rem); }
.cta p { color: #f6dedc; margin: .5rem 0 0; max-width: 46ch; }
.cta .btn-primary { background: #fff; color: var(--red); }
.cta .btn-primary:hover { background: #fbe9e7; color: var(--red); }

/* Page header */
.page-head {
  background: var(--green-900); color: #fff;
  padding-block: clamp(3rem, 7vw, 5rem) clamp(2.2rem, 5vw, 3.4rem);
}
.page-head h1 { color: #fff; max-width: 26ch; }
.page-head p { color: #becfbf; max-width: 60ch; font-size: 1.05rem; }
.page-head .eyebrow { color: var(--red-soft); }

/* Footer */
.site-footer {
  background: #082e1e; color: #b9cbbc;
  padding-block: 3rem 1.6rem; margin-top: 0;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.2rem; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; } }
.site-footer h3 {
  color: #fff; font-family: var(--sans); font-size: .74rem;
  letter-spacing: .14em; text-transform: uppercase; margin-bottom: .9rem;
}
.site-footer a { color: #d7e3d8; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; font-size: .93rem; }
.footer-brand { display: flex; gap: .8rem; align-items: flex-start; }
.footer-brand img {
  width: auto; height: 60px; flex: none;
  background: #fff; border-radius: 10px; padding: 5px;
}
.footer-brand p { font-size: .88rem; max-width: 36ch; margin-top: .4rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .14);
  margin-top: 2.2rem; padding-top: 1.2rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem;
  font-size: .8rem; color: #93a895;
}

/* Utility */
.lede { font-size: 1.05rem; color: var(--ink-soft); }
.mt-2 { margin-top: 2rem; }
.text-center { text-align: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .btn:hover { transform: none; }
}

/* ---------- Language switch ---------- */

.lang-switch {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 34px; padding: .35rem .7rem;
  border: 1px solid var(--line); border-radius: 8px; background: var(--paper);
  font-family: var(--sans); font-size: .8rem; font-weight: 600; letter-spacing: 0;
  color: var(--green-900); text-decoration: none; white-space: nowrap;
}
.lang-switch:hover { background: var(--green-100); color: var(--green-900); }

/* ---------- Bangla typography ----------
   Bengali script needs a taller line box and no negative tracking; its
   uppercase is a no-op, so small-caps labels are set in sentence case. */

html[lang="bn"] {
  --sans: "Noto Sans Bengali", "Nirmala UI", "Vrinda", "Segoe UI", sans-serif;
  --serif: "Noto Serif Bengali", "Nirmala UI", "Vrinda", Georgia, serif;
}
html[lang="bn"] body { line-height: 1.9; }
html[lang="bn"] h1,
html[lang="bn"] h2,
html[lang="bn"] h3,
html[lang="bn"] h4 { line-height: 1.45; letter-spacing: 0; }
html[lang="bn"] h1 { font-size: clamp(1.85rem, 4.2vw, 3.05rem); }
html[lang="bn"] h2 { font-size: clamp(1.5rem, 2.7vw, 2.15rem); }
html[lang="bn"] .eyebrow,
html[lang="bn"] .site-footer h3,
html[lang="bn"] .contact-card dt {
  text-transform: none; letter-spacing: .04em; font-size: .82rem;
}
html[lang="bn"] .hero h1 { max-width: 32ch; }
html[lang="bn"] .hero .lede,
html[lang="bn"] .page-head p { max-width: 54ch; }
html[lang="bn"] .brand-text span { max-width: 30ch; }

/* ---------- Director profile & contact form ---------- */

.profile-card {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(1.2rem, 3vw, 2.2rem);
  align-items: start;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(1.4rem, 3.5vw, 2.2rem); box-shadow: var(--shadow);
}
@media (max-width: 640px) { .profile-card { grid-template-columns: 1fr; } }
.profile-card h3 { margin: 0; }
.profile-card .profile-role {
  margin: .35rem 0 .9rem; font-size: .95rem; color: var(--blue); font-weight: 600;
}

/* Portrait of the Director, 4:5 like the source photograph. */
/* height:auto is required — the img's height attribute would otherwise win
   over aspect-ratio and squash the portrait. */
.profile-photo {
  display: block; width: 132px; height: auto; aspect-ratio: 4 / 5; flex: none;
  object-fit: cover; object-position: center top;
  border-radius: 12px; border: 1px solid var(--line); background: #fff;
}
.profile-photo-lg { width: 100%; max-width: 300px; }
@media (max-width: 640px) { .profile-photo-lg { max-width: 220px; } }

.contact-form-panel {
  display: grid; gap: 1.1rem;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(1.3rem, 3.5vw, 2.2rem); box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: .4rem; }
.field label { font-size: .87rem; font-weight: 600; color: var(--green-900); }
.label-hint { font-weight: 400; color: var(--ink-soft); }
.field input,
.field select,
.field textarea {
  font: inherit; font-size: .95rem; width: 100%; min-height: 44px;
  padding: .65rem .8rem; color: var(--ink);
  background: #fff; border: 1px solid #cfd8cf; border-radius: 8px;
}
.field textarea { min-height: 8.5rem; resize: vertical; line-height: 1.6; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--blue); outline-offset: 2px; border-color: var(--blue);
}
.form-note { font-size: .86rem; color: var(--ink-soft); margin: 0; }
.form-status {
  margin: 0; padding: .75rem .95rem; border-radius: 8px;
  background: var(--green-100); color: var(--green-900); font-size: .9rem;
}
