/*
Theme Name: Eman Welfare Society
Theme URI: https://emanwelfaresociety.org
Author: Ijaz
Description: Original theme for Eman Welfare Society (EWS), Swabi — an editorial, print-inspired identity: ivory paper, Indus navy, saffron accents, and a Nastaliq signature.
Version: 2.0
Text Domain: eman-welfare-society
*/

/* =========================================================
   Identity — "Faith & Thread"
   paper (ivory)   #faf7ef   background
   paper-2         #f3edde   alternate sections
   ink             #182338   text
   navy (Indus)    #142744   bands, panels
   navy-deep       #0d1a30   footer
   saffron         #ef6f21   large accents, buttons
   saffron-deep    #b45110   small accent text (readable on paper)
   Fonts: Bricolage Grotesque (display) · Public Sans (body) · Gulzar (Urdu Nastaliq)
   ========================================================= */

:root {
  --paper: #faf7ef;
  --paper-2: #f3edde;
  --ink: #182338;
  --navy: #142744;
  --navy-deep: #0d1a30;
  --saffron: #ef6f21;
  --saffron-deep: #b45110;
  --muted: #55617a;
  --rule: rgba(24, 35, 56, .16);
  --rule-light: rgba(255, 255, 255, .16);

  --font-display: 'Bricolage Grotesque', 'Arial Black', sans-serif;
  --font-body: 'Public Sans', Arial, sans-serif;
  --font-urdu: 'Gulzar', 'Noto Nastaliq Urdu', serif;

  --r: 8px;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

::selection {
  background: rgba(239, 111, 33, .25);
}

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

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

button,
input {
  font: inherit;
}

:where(a, button):focus-visible {
  outline: 3px solid var(--saffron);
  outline-offset: 2px;
}

.container {
  width: min(100% - 40px, var(--max));
  margin-inline: auto;
}

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

/* ---------- Type ---------- */

h1,
h2,
h3,
.brand-name,
.footer-wordmark {
  font-family: var(--font-display);
  margin: 0;
  line-height: 1.04;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2.7rem, 6.4vw, 4.8rem);
  font-weight: 750;
}

h1 .accent {
  color: var(--saffron-deep);
}

h2 {
  font-size: clamp(1.9rem, 3.8vw, 3rem);
  font-weight: 700;
}

h3 {
  font-size: 1.28rem;
  font-weight: 650;
  line-height: 1.2;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.kicker {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--saffron-deep);
  margin-bottom: 14px;
}

.kicker-light {
  color: #f4a260;
}

.lede {
  font-size: 1.08rem;
  max-width: 56ch;
  margin-top: 22px;
}

.sub {
  max-width: 62ch;
  margin-top: 14px;
}

.urdu-mark,
.urdu-watermark {
  font-family: var(--font-urdu);
  font-weight: 400;
  line-height: 1.7;
}

/* ---------- Buttons ---------- */

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: var(--r);
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 rgba(24, 35, 56, .18);
}

.btn-navy {
  background: var(--navy);
  color: #fff;
}

.btn-saffron {
  background: var(--saffron);
  color: var(--navy-deep);
}

.btn-line {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-line-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .5);
}

.btn-line-light:hover {
  box-shadow: 5px 5px 0 rgba(0, 0, 0, .35);
}

.btn-wide {
  width: 100%;
}

/* ---------- Utility bar ---------- */

.site-top {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, .78);
  font-size: .78rem;
  font-weight: 500;
}

.site-top-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
}

.site-top i {
  color: var(--saffron);
  margin-right: 6px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  height: 100px;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-logo {
  width: 95px;
  height: 95px;
  object-fit: contain;
}

.brand-logo-t {
  width: 150px;
  height: 95px;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.06rem;
  font-weight: 700;
}

.brand-sub {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.menu {
  display: flex;
  align-items: center;
  gap: 30px;
}

.menu a {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}

.menu a:hover {
  color: var(--saffron-deep);
  border-bottom-color: var(--saffron);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--paper);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  margin: 4px auto;
}

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

.hero {
  padding: 84px 0 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 56px;
  align-items: center;
}

.hero-art {
  position: relative;
  padding: 44px 0 0 24px;
}

.urdu-mark {
  position: absolute;
  top: -52px;
  left: -14px;
  z-index: 2;
  font-size: clamp(5.2rem, 9vw, 8rem);
  color: var(--saffron);
  pointer-events: none;
}

.frame {
  position: relative;
  z-index: 0;
  margin: 0;
}

.frame img {
  width: 100%;
  aspect-ratio: 4 / 4.6;
  object-fit: cover;
  border-radius: var(--r);
}

.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translate(16px, 16px);
  border: 2px solid var(--navy);
  border-radius: var(--r);
  z-index: -1;
}

.frame-saffron::after {
  border-color: var(--saffron);
}

.frame figcaption {
  margin-top: 26px;
  margin-left: 30px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Ledger strip */

.ledger-strip {
  margin-top: 72px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.ledger-item {
  padding: 22px 18px;
  border-left: 1px solid var(--rule);
}

.ledger-item:first-child {
  border-left: 0;
  padding-left: 0;
}

.ledger-item b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.ledger-item span {
  display: block;
  margin-top: 4px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
}

/* ---------- Ticker ---------- */

.ticker {
  margin-top: 64px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-2);
  overflow: hidden;
  padding: 13px 0;
}

.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  width: max-content;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.ticker-track i {
  font-style: normal;
  color: var(--saffron);
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

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

.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.section-head {
  max-width: 720px;
  margin-bottom: 48px;
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 56px;
  align-items: start;
}

.about-body>p:first-child {
  font-size: 1.04rem;
  margin-bottom: 8px;
}

.point {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.point h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

/* ---------- Worklist (01–07) ---------- */

.worklist {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: work;
}

.counter {
  font-size: 2.88rem;
}

.workrow {
  display: grid;
  grid-template-columns: 96px 340px 1fr;
  gap: 26px;
  align-items: start;
  padding: 30px 12px;
  border-top: 1px solid var(--rule);
  transition: background .2s ease;
}

.workrow:last-child {
  border-bottom: 1px solid var(--rule);
}

.workrow:hover {
  background: rgba(239, 111, 33, .06);
}

.workrow .num {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 750;
  line-height: 1;
  color: rgba(24, 35, 56, .28);
  transition: color .2s ease;
}

.workrow:hover .num {
  color: var(--saffron);
}

.workrow p {
  font-size: .96rem;
}

/* ---------- Impact band ---------- */

.band {
  background: var(--navy);
  color: #fff;
  padding: 76px 0;
}

.band-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 10px;
}

.band-item {
  padding: 10px 26px;
  border-left: 1px solid var(--rule-light);
}

.band-item:first-child {
  border-left: 0;
  padding-left: 0;
}

.band-item b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 750;
  color: var(--saffron);
  letter-spacing: -0.01em;
}

.band-item span {
  display: block;
  margin-top: 8px;
  font-weight: 500;
  color: rgba(255, 255, 255, .78);
  line-height: 1.5;
}

/* ---------- Program rows ---------- */

.program-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 56px 0;
  border-top: 1px solid var(--rule);
}

.program-row:first-of-type {
  border-top: 0;
  padding-top: 8px;
}

.program-row .frame img {
  aspect-ratio: 16 / 11;
}

.program-row.flip .frame {
  order: 2;
}

.program-copy h3 {
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  margin-bottom: 14px;
}

.program-copy p:last-child {
  max-width: 52ch;
}

/* ---------- Donate ---------- */

.donate-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 56px;
  align-items: center;
}

.donate-copy p {
  max-width: 56ch;
  margin-top: 6px;
}

.donate-note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-size: .92rem;
}

.donate-panel {
  background: var(--navy);
  color: #fff;
  border-radius: var(--r);
  padding: 34px;
}

.donate-panel h3 {
  color: #fff;
  margin-bottom: 20px;
}

.amounts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.amounts button {
  padding: 13px 8px;
  border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, .35);
  background: transparent;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.amounts button:hover,
.amounts button.active {
  background: var(--saffron);
  border-color: var(--saffron);
  color: var(--navy-deep);
}

.panel-note {
  margin: 14px 0 20px;
  font-size: .85rem;
  color: rgba(255, 255, 255, .72);
}

/* ---------- Values strip ---------- */

.values-strip {
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 20px 0;
}

.values-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.values-inner i {
  font-style: normal;
  color: var(--saffron);
}

.values-label {
  color: var(--muted);
  letter-spacing: .18em;
}

/* ---------- Governance ---------- */

.gov-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.gov-col {
  padding: 6px 30px;
  border-left: 1px solid var(--rule);
}

.gov-col:first-child {
  border-left: 0;
  padding-left: 0;
}

.gov-col .kicker {
  margin-bottom: 10px;
}

.gov-col h3 {
  margin-bottom: 10px;
}

.gov-col p {
  font-size: .95rem;
}

.partners-line {
  margin-top: 64px;
  padding-top: 26px;
  border-top: 1px solid var(--ink);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
}

.partners-label {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chips span {
  padding: 9px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink);
  transition: border-color .2s ease, color .2s ease;
}

.chips span:hover {
  border-color: var(--saffron);
  color: var(--saffron-deep);
}

/* ---------- Field notes ---------- */

.notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.note {
  border-top: 2px solid var(--ink);
  padding-top: 20px;
}

.note h3 {
  font-size: 1.12rem;
  margin-bottom: 10px;
}

.note p:last-child {
  font-size: .95rem;
}

/* ---------- Closing / Contact ---------- */

.closing {
  position: relative;
  background: var(--navy);
  color: #fff;
  padding: 104px 0;
  overflow: hidden;
}

.urdu-watermark {
  position: absolute;
  right: -3%;
  bottom: -26%;
  font-size: clamp(11rem, 26vw, 20rem);
  color: rgba(239, 111, 33, .09);
  pointer-events: none;
  user-select: none;
}

.closing-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 56px;
  align-items: start;
}

.closing h2 {
  color: #fff;
  margin-bottom: 16px;
}

.closing-copy>p {
  color: rgba(255, 255, 255, .8);
  max-width: 54ch;
}

.signup {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.signup input {
  flex: 1 1 240px;
  padding: 14px 16px;
  border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, .35);
  background: transparent;
  color: #fff;
  outline: none;
}

.signup input::placeholder {
  color: rgba(255, 255, 255, .6);
}

.signup input:focus {
  border-color: var(--saffron);
}

.signup button {
  padding: 14px 22px;
  border: 0;
  border-radius: var(--r);
  background: var(--saffron);
  color: var(--navy-deep);
  font-weight: 700;
  cursor: pointer;
}

.closing-contact {
  border-left: 1px solid var(--rule-light);
  padding-left: 40px;
}

.closing-contact h3 {
  color: #fff;
  margin-bottom: 14px;
}

.closing-contact p {
  color: rgba(255, 255, 255, .8);
}

.contact-line {
  margin-top: 10px;
}

.contact-line i {
  color: var(--saffron);
  width: 20px;
}

/* ---------- Stitch divider + footer ---------- */

.stitch {
  height: 3px;
  background-image: repeating-linear-gradient(90deg,
      var(--saffron) 0 14px,
      transparent 14px 26px);
  background-color: var(--navy-deep);
}

.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, .75);
  padding: 60px 0 24px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule-light);
}

.footer-wordmark {
  font-size: 1.5rem;
  font-weight: 750;
  color: #fff;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule-light);
  border-radius: var(--r);
  color: #fff;
  transition: border-color .2s ease, color .2s ease;
}

.footer-social a:hover {
  border-color: var(--saffron);
  color: var(--saffron);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr .7fr 1fr;
  gap: 32px;
  padding: 34px 0;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 14px;
}

.footer-col p,
.footer-col a {
  color: rgba(255, 255, 255, .72);
  font-size: .93rem;
  line-height: 1.9;
}

.footer-col a:hover {
  color: var(--saffron);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--rule-light);
  font-size: .84rem;
  color: rgba(255, 255, 255, .55);
}

/* ---------- Reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .ticker-track {
    animation: none;
    flex-wrap: wrap;
    white-space: normal;
  }

  .btn,
  .btn:hover {
    transform: none;
    box-shadow: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {

  .hero-grid,
  .about-grid,
  .donate-grid,
  .closing-inner {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero-art {
    max-width: 560px;
  }

  .workrow {
    grid-template-columns: 72px 1fr;
  }

  .workrow p {
    grid-column: 2;
  }

  .ledger-strip,
  .band-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .band-item:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }

  .band-item {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .ledger-item:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }

  .ledger-item {
    border-top: 1px solid var(--rule);
  }

  .ledger-item:nth-child(-n+2) {
    border-top: 0;
  }

  .gov-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .gov-col {
    border-left: 0;
    padding: 0 0 26px;
    border-bottom: 1px solid var(--rule);
  }

  .gov-col:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .notes {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .closing-contact {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--rule-light);
    padding-top: 36px;
  }
}

@media (max-width: 760px) {
  .site-top-right {
    display: none;
  }

  .menu {
    display: none;
    position: absolute;
    top: 100%;
    left: -20px;
    right: -20px;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 16px;
  }

  .menu.open {
    display: flex;
  }

  .menu a {
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
  }

  .menu a:last-child {
    border-bottom: 0;
  }

  .menu-toggle {
    display: inline-block;
  }

  .hero {
    padding-top: 56px;
  }

  .hero-art {
    padding: 36px 0 0 12px;
  }

  .urdu-mark {
    top: -40px;
    left: 0;
  }

  .frame::after {
    transform: translate(10px, 10px);
  }

  .ledger-strip {
    grid-template-columns: 1fr;
    margin-top: 56px;
  }

  .ledger-item {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--rule);
  }

  .ledger-item:first-child {
    border-top: 0;
  }

  .section {
    padding: 72px 0;
  }

  .workrow {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 26px 8px;
  }

  .workrow p {
    grid-column: 1;
  }

  .band-grid {
    grid-template-columns: 1fr;
  }

  .band-item {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--rule-light);
  }

  .band-item:first-child {
    border-top: 0;
  }

  .program-row {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 44px 0;
  }

  .program-row.flip .frame {
    order: 0;
  }

  .closing {
    padding: 80px 0;
  }

  .urdu-watermark {
    bottom: -10%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 6px;
  }
}

/* =========================================================
   PRESS ROOM — newswire ticker, filter tabs, lead, grid,
   single + archive templates
   ========================================================= */

/* ---- Newswire (live press ticker) ---- */

.newswire {
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--navy);
  color: #fff;
  margin-top: 64px;
}

.newswire-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 14px 22px;
  background: var(--saffron);
  color: var(--navy-deep);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
}

.newswire-viewport {
  position: relative;
  overflow: hidden;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.newswire-track {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  width: max-content;
  white-space: nowrap;
  padding-left: 20px;
  animation: newswire 42s linear infinite;
}

.newswire:hover .newswire-track {
  animation-play-state: paused;
}

.newswire-item {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  font-size: .9rem;
  transition: color .2s ease;
}

.newswire-item time {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--saffron);
  flex: 0 0 auto;
}

.newswire-item span {
  color: rgba(255, 255, 255, .9);
  font-weight: 500;
}

.newswire-item:hover span {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.newswire-sep {
  font-style: normal;
  color: rgba(239, 111, 33, .7);
}

@keyframes newswire {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* ---- Press Room header ---- */

.press-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 40px;
}

.press-head .kicker {
  margin-bottom: 10px;
}

.press-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--saffron-deep);
  white-space: nowrap;
  transition: gap .2s ease;
}

.press-all:hover {
  gap: 14px;
}

/* ---- Dateline + term chip (shared) ---- */

.dateline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.dateline time {
  color: var(--muted);
}

.term-chip {
  padding: 4px 10px;
  background: var(--navy);
  color: #fff;
  border-radius: 999px;
  letter-spacing: .12em;
}

/* ---- Lead release ---- */

.press-lead {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding-bottom: 44px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
}

.press-lead .frame img {
  aspect-ratio: 16 / 11;
}

.frame-empty {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 11;
  background: var(--paper-2);
  border-radius: var(--r);
  color: rgba(24, 35, 56, .3);
  font-size: 2.4rem;
}

.press-lead-copy h3 {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  margin-bottom: 14px;
}

.press-lead-copy>p:not(.dateline) {
  max-width: 48ch;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--saffron-deep);
  transition: gap .2s ease;
}

.press-lead:hover .read-more,
.press-card:hover .read-more {
  gap: 14px;
}

/* ---- Filter tabs ---- */

.press-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 36px 0 28px;
}

.press-tab {
  padding: 9px 18px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.press-tab:hover {
  border-color: var(--saffron);
  color: var(--saffron-deep);
}

.press-tab.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* ---- Press grid ---- */

.press-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  overflow: hidden;
}

.press-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--paper);
  color: var(--ink);
  transition: background .2s ease, transform .2s ease;
}

.press-card:hover {
  background: #fff;
}

.press-card h3 {
  font-size: 1.12rem;
  margin-bottom: 12px;
}

.press-card-ex {
  font-size: .92rem;
  flex: 1 1 auto;
}

.press-card .read-more {
  margin-top: 20px;
}

.press-card.is-hidden {
  display: none;
}

.press-empty {
  grid-column: 1 / -1;
  padding: 40px;
  text-align: center;
  background: var(--paper);
  color: var(--muted);
}

/* ---- Single release ---- */

.pr-single-inner {
  max-width: 760px;
  margin-inline: auto;
}

.pr-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 30px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--saffron-deep);
}

.pr-dateline {
  margin-bottom: 18px;
}

.pr-title {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  margin-bottom: 30px;
}

.pr-hero {
  margin: 0 0 36px;
}

.pr-hero img {
  aspect-ratio: 16 / 9;
}

.pr-body {
  font-size: 1.06rem;
  line-height: 1.85;
  color: var(--ink);
}

.pr-body p {
  color: var(--ink);
  margin-bottom: 20px;
}

.pr-body h2,
.pr-body h3 {
  margin: 32px 0 14px;
}

.pr-body a {
  color: var(--saffron-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pr-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--ink);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- Archive pagination ---- */

.pr-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 44px;
}

.pr-pagination .page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  font-weight: 700;
  color: var(--ink);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.pr-pagination .page-numbers:hover,
.pr-pagination .page-numbers.current {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

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

@media (max-width: 1024px) {
  .press-lead {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .press-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .newswire-tag {
    padding: 12px 16px;
    font-size: .72rem;
  }

  .press-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .press-grid {
    grid-template-columns: 1fr;
  }

  .pr-foot {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---- Newsroom page intro ---- */

.newsroom-intro {
  padding-bottom: 40px;
}

.newsroom-intro h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  margin: 12px 0 16px;
}

.newsroom-intro .sub {
  margin-top: 0;
}

/* On the newsroom page the press room sits right under the intro */
.newsroom-intro+#press {
  padding-top: 56px;
}

/* ---- Demo / sample placeholders (shown until real releases exist) ---- */

.press-card.is-demo,
.press-lead.is-demo {
  cursor: default;
}

.sample-chip {
  padding: 4px 10px;
  border: 1px dashed var(--saffron);
  border-radius: 999px;
  color: var(--saffron-deep);
  letter-spacing: .12em;
}

.press-card.is-demo:hover {
  background: var(--paper);
  /* no hover cue since it isn't clickable */
}

/* =========================================================
   RESPONSIVE OPTIMISATION LAYER
   Appended last so it refines the base rules above without
   disturbing them. Covers large tablets, small tablets,
   phones, small phones, landscape phones, and touch input.
   ========================================================= */

/* Never let anything cause sideways scroll on small screens */
@media (max-width: 1024px) {

  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  img {
    height: auto;
  }
}

/* ---------- Large tablets / small laptops (max 1024px) ---------- */
@media (max-width: 1024px) {
  .container {
    width: min(100% - 48px, var(--max));
  }

  .section {
    padding: 84px 0;
  }

  /* Newswire: let the bar wrap its tag above the ticker if cramped */
  .newswire-tag {
    padding: 13px 18px;
  }

  /* Press grid to two columns on tablets */
  .press-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Lead release stacks a touch earlier for breathing room */
  .press-lead {
    gap: 36px;
  }

  /* Program rows keep two-up but tighten the gap */
  .program-row {
    gap: 40px;
  }
}

/* ---------- Portrait tablets (max 900px) ---------- */
@media (max-width: 900px) {

  .program-row,
  .program-row.flip {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 40px 0;
  }

  .program-row.flip .frame {
    order: 0;
  }

  .program-row .frame img {
    aspect-ratio: 16 / 10;
  }

  .press-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .values-inner {
    font-size: .78rem;
    gap: 10px 14px;
  }
}

/* ---------- Phones & small tablets (max 760px) ---------- */
@media (max-width: 760px) {
  .container {
    width: min(100% - 36px, var(--max));
  }

  /* Sticky header shorter; give sections room under it */
  .header-inner {
    height: 78px;
  }

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

  /* Utility bar wraps gracefully instead of clipping */
  .site-top-inner {
    font-size: .72rem;
    padding: 8px 0;
  }

  /* Brand text can shrink so the logo + Donate always fit */
  .brand-logo {
    width: 46px;
    height: 46px;
  }

  .brand-logo-t {
    width: 140px;
    height: 40px;
    padding: 0px;
    margin: 0px;
  }

  .brand {
    gap: 1px;
  }


  .brand-name {
    font-size: .98rem;
  }

  .brand-sub {
    font-size: .66rem;
  }

  /* Buttons: full-width-friendly rows, comfortable tap size */
  .btn {
    padding: 14px 20px;
  }

  .btn-row .btn {
    flex: 1 1 auto;
  }

  /* Newswire: stack the tag on top of the moving ticker */
  .newswire {
    flex-direction: column;
    align-items: stretch;
  }

  .newswire-tag {
    justify-content: center;
    padding: 11px 16px;
    font-size: .72rem;
  }

  .newswire-viewport {
    padding: 4px 0;
  }

  .newswire-track {
    animation-duration: 26s;
  }

  /* Press room */
  .press-grid {
    grid-template-columns: 1fr;
  }

  .press-lead {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .press-lead .frame img {
    aspect-ratio: 16 / 10;
  }

  .press-tabs {
    gap: 8px;
  }

  .press-tab {
    padding: 8px 15px;
  }

  /* Single release: comfortable reading measure */
  .pr-title {
    font-size: clamp(1.8rem, 8vw, 2.6rem);
  }

  .pr-body {
    font-size: 1rem;
  }

  .pr-hero img {
    aspect-ratio: 16 / 10;
  }

  /* Newsroom intro */
  .newsroom-intro {
    padding-bottom: 24px;
  }

  .newsroom-intro+#press {
    padding-top: 40px;
  }

  /* Chips / partners wrap cleanly */
  .partners-line {
    margin-top: 44px;
  }

  .chips {
    gap: 8px;
  }

  /* Frames: reduce the offset so the shadow border never overflows */
  .frame::after {
    transform: translate(8px, 8px);
  }

  .hero-art {
    padding-left: 8px;
  }

  /* Contact form + closing */
  .signup input,
  .signup button {
    width: 100%;
    flex: 1 1 100%;
  }
}

/* ---------- Small phones (max 480px) ---------- */
@media (max-width: 480px) {
  .container {
    width: min(100% - 28px, var(--max));
  }

  .section {
    padding: 60px 0;
  }

  h1 {
    font-size: clamp(2.1rem, 12vw, 3rem);
  }

  h2 {
    font-size: clamp(1.7rem, 8vw, 2.2rem);
  }

  .lede {
    font-size: 1rem;
  }

  /* Hero art: keep the Nastaliq mark inside the viewport */
  .urdu-mark {
    font-size: clamp(4rem, 20vw, 6rem);
    top: -32px;
    left: 0;
  }

  .frame img {
    aspect-ratio: 4 / 4;
  }

  .frame::after {
    transform: translate(6px, 6px);
  }

  /* Ledger numbers scale down */
  .ledger-item b {
    font-size: 1.6rem;
  }

  /* Impact band values fit one line */
  .band-item b {
    font-size: clamp(2rem, 11vw, 2.6rem);
  }

  /* Work rows: number sits inline above the heading */
  .workrow {
    padding: 22px 4px;
  }

  .workrow .num {
    font-size: 1.7rem;
  }

  /* Donate panel padding */
  .donate-panel {
    padding: 26px;
  }

  .amounts {
    gap: 8px;
  }

  .amounts button {
    padding: 12px 4px;
    font-size: .9rem;
  }

  /* Press cards a bit tighter */
  .press-card {
    padding: 22px;
  }

  .press-lead-copy h3 {
    font-size: clamp(1.3rem, 6vw, 1.7rem);
  }

  /* Dateline wraps instead of squeezing */
  .dateline {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Footer wordmark scales */
  .footer-wordmark {
    font-size: 1.3rem;
  }

  .footer-top {
    gap: 16px;
  }

  /* Closing watermark stays subtle and contained */
  .urdu-watermark {
    font-size: clamp(8rem, 40vw, 12rem);
    right: -6%;
    bottom: -6%;
  }

  /* Pagination wraps */
  .pr-pagination {
    flex-wrap: wrap;
  }
}

/* ---------- Very small phones (max 360px) ---------- */
@media (max-width: 360px) {
  .brand-sub {
    display: none;
  }

  /* keep header on one line */
  .btn {
    padding: 13px 16px;
    font-size: .9rem;
  }

  .newswire-item {
    font-size: .84rem;
  }

  .term-chip {
    padding: 3px 8px;
  }
}

/* ---------- Landscape phones (short viewports) ---------- */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 40px 0;
  }

  .hero-grid {
    padding: 24px 0 40px;
  }

  .closing {
    padding: 56px 0;
  }

  .section {
    padding: 48px 0;
  }
}

/* ---------- Touch devices: bigger, comfier tap targets ---------- */
@media (hover: none) and (pointer: coarse) {
  .menu a {
    padding: 16px 0;
  }

  .press-tab {
    padding: 11px 18px;
  }

  .amounts button {
    padding: 15px 8px;
  }

  .footer-social a {
    width: 46px;
    height: 46px;
  }

  .btn {
    min-height: 48px;
  }

  /* Remove hover-only lift so tapping doesn't leave a stuck transform */
  .btn:hover,
  .feature-card:hover,
  .news-card:hover,
  .press-card:hover {
    transform: none;
    box-shadow: none;
  }

  /* Pause-on-hover doesn't apply on touch, so keep tickers moving */
  .newswire:hover .newswire-track {
    animation-play-state: running;
  }
}