/* ===================================================================
   NEHA — North East Hazard Action
   Stylesheet
=================================================================== */
:root {
  /* Brand palette derived from the NEHA logo: royal blue + white + blast red */
  --navy: #123268;        /* deep royal blue (dark sections, headings) */
  --navy-2: #0d2550;
  --blue: #1c50a0;        /* primary brand blue */
  --blue-light: #5a90da;
  --gold: #c8202f;        /* accent = logo blast red (var name kept for cascade) */
  --gold-dark: #a2161f;
  --ink: #16212e;
  --muted: #5b6b74;
  --line: #e2e8f0;
  --sand: #f5f8fc;
  --tint: #e9f1fb;
  --white: #ffffff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 40px -22px rgba(13, 47, 66, .35);
  --shadow-sm: 0 8px 22px -14px rgba(13, 47, 66, .4);
  --container: 1160px;
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --display: 'Sora', var(--font);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.ic { width: 16px; height: 16px; fill: currentColor; flex: none; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--navy-2);
  color: #cfe0ea;
  font-size: .82rem;
}
.topbar__inner { display: flex; justify-content: space-between; align-items: center; min-height: 40px; gap: 16px; flex-wrap: wrap; }
.topbar a, .topbar span { display: inline-flex; align-items: center; gap: 7px; color: #cfe0ea; }
.topbar__contact { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar a:hover { color: var(--gold); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s;
}
.header.is-scrolled { box-shadow: 0 6px 24px -16px rgba(13,47,66,.5); }
.header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 74px; gap: 20px; }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__mark { display: grid; place-items: center; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__text strong { font-family: var(--display); font-size: 1.35rem; letter-spacing: .04em; color: var(--navy); }
.brand__text small { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a { padding: 9px 14px; border-radius: 8px; font-weight: 500; font-size: .95rem; color: var(--ink); transition: .2s; }
.nav a:hover { background: var(--tint); color: var(--blue); }
.nav__cta { background: var(--navy); color: #fff !important; padding: 10px 20px; }
.nav__cta:hover { background: var(--blue); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 2.5px; background: var(--navy); border-radius: 2px; transition: .3s; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px; font-weight: 600; font-size: .96rem;
  cursor: pointer; border: 2px solid transparent; transition: .22s; font-family: var(--font);
}
.btn--primary { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn--primary:hover { background: var(--gold-dark); border-color: var(--gold-dark); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn--ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn--gold { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn--gold:hover { background: #fff; color: var(--navy); border-color: #fff; transform: translateY(-2px); }
.btn--full { width: 100%; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 120% at 85% 10%, rgba(28,80,160,.55), transparent 55%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, #08132e 100%);
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(200,32,47,.15), transparent 40%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M0 59h60M59 0v60' stroke='%23ffffff' stroke-opacity='.05' stroke-width='1'/%3E%3C/svg%3E");
}
.hero__inner { position: relative; padding: 96px 24px 104px; max-width: 900px; }
.hero__eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .74rem; font-weight: 600; color: var(--gold); margin-bottom: 22px; }
.hero__title { font-family: var(--display); font-weight: 800; font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.05; letter-spacing: -.01em; }
.hero__title span { color: var(--gold); }
.hero__lead { margin: 26px 0 34px; font-size: clamp(1.02rem, 2vw, 1.2rem); color: #d5e3ec; max-width: 640px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__principles { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 46px; }
.hero__principles li {
  font-size: .82rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  padding: 8px 16px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; color: #cfe0ea;
}

/* ---------- Impact strip ---------- */
.impact { background: var(--navy); border-top: 3px solid var(--gold); }
.impact__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.impact__item { padding: 30px 20px; text-align: center; color: #fff; border-right: 1px solid rgba(255,255,255,.08); }
.impact__item:last-child { border-right: 0; }
.impact__num { display: block; font-family: var(--display); font-weight: 800; font-size: 2.1rem; color: var(--gold); }
.impact__label { font-size: .86rem; color: #b9cdd8; letter-spacing: .02em; }

/* ---------- Sections ---------- */
.section { padding: 92px 0; }
.section--tint { background: var(--tint); }
.section--dark { background: linear-gradient(160deg, var(--navy), var(--navy-2)); color: #fff; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .76rem; font-weight: 700; color: var(--blue); margin-bottom: 12px; }
.eyebrow--light { color: var(--gold); }
.section__title { font-family: var(--display); font-weight: 700; font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.15; letter-spacing: -.01em; color: inherit; }
.section__head { max-width: 720px; margin: 0 auto 54px; text-align: center; }
.section__sub { color: var(--muted); font-size: 1.05rem; margin-top: 16px; }
.section__sub--light { color: #c3d4de; }
.section--dark .section__title { color: #fff; }

/* ---------- About ---------- */
.about__intro { max-width: 820px; margin-bottom: 56px; }
.about__intro h2 { margin-bottom: 20px; }
.about__intro p { color: var(--muted); font-size: 1.06rem; margin-bottom: 16px; }
.vmv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.vmv__card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px; box-shadow: var(--shadow); transition: transform .25s; }
.vmv__card:hover { transform: translateY(-5px); }
.vmv__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: linear-gradient(135deg, var(--blue), var(--navy)); margin-bottom: 18px; }
.vmv__icon svg { width: 26px; height: 26px; fill: #fff; }
.vmv__card h3 { font-family: var(--display); font-size: 1.28rem; margin-bottom: 12px; color: var(--navy); }
.vmv__card p { color: var(--muted); }
.values { display: flex; flex-wrap: wrap; gap: 8px; }
.values li { font-size: .82rem; font-weight: 600; color: var(--blue); background: var(--tint); padding: 6px 12px; border-radius: 999px; }

/* ---------- Programmes ---------- */
.prog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.prog { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; transition: .25s; position: relative; overflow: hidden; }
.prog::before { content: ""; position: absolute; left: 0; top: 0; height: 100%; width: 4px; background: var(--gold); transform: scaleY(0); transform-origin: top; transition: transform .28s; }
.prog:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.prog:hover::before { transform: scaleY(1); }
.prog__ic { font-size: 1.9rem; display: block; margin-bottom: 14px; }
.prog h3 { font-family: var(--display); font-size: 1.12rem; color: var(--navy); margin-bottom: 8px; }
.prog p { color: var(--muted); font-size: .96rem; }

/* ---------- Objectives ---------- */
.obj-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.obj { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 26px 22px; text-align: center; box-shadow: var(--shadow-sm); }
.obj span { display: block; font-family: var(--display); font-weight: 800; font-size: 1.7rem; color: var(--gold); margin-bottom: 12px; }
.obj p { font-weight: 500; color: var(--ink); font-size: .96rem; }

/* ---------- Capacity + Org chart ---------- */
.capacity { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.cap-list { margin-top: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; }
.cap-list li { position: relative; padding-left: 28px; color: #dbe7ef; font-weight: 500; }
.cap-list li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px;
  background: var(--gold); border-radius: 50%;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2l-3.5-3.5L4 14.2 9 19.2 20 8.2l-1.5-1.5z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2l-3.5-3.5L4 14.2 9 19.2 20 8.2l-1.5-1.5z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.orgchart { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 30px 26px; }
.orgchart__title { font-family: var(--display); text-align: center; color: var(--gold); margin-bottom: 22px; font-size: 1.05rem; letter-spacing: .04em; text-transform: uppercase; }
.org { display: flex; flex-direction: column; align-items: center; }
.org__node { background: #fff; color: var(--navy); font-weight: 600; font-size: .9rem; padding: 11px 18px; border-radius: 8px; text-align: center; box-shadow: var(--shadow-sm); }
.org__node--top { background: var(--gold); color: var(--navy); }
.org__node--lead { background: var(--blue-light); color: var(--navy); }
.org__connector { width: 2px; height: 22px; background: rgba(255,255,255,.3); }
.org__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; width: 100%; margin-top: 4px; position: relative; }
.org__row::before { content: ""; position: absolute; top: -12px; left: 16%; right: 16%; height: 2px; background: rgba(255,255,255,.3); }
.org__branch { display: flex; flex-direction: column; gap: 8px; align-items: stretch; position: relative; padding-top: 12px; }
.org__branch::before { content: ""; position: absolute; top: -12px; left: 50%; width: 2px; height: 12px; background: rgba(255,255,255,.3); }
.org__sub { background: rgba(255,255,255,.1); color: #dbe7ef; font-size: .78rem; padding: 8px 12px; border-radius: 7px; text-align: center; }

/* ---------- Why partner ---------- */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.why { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; border-top: 3px solid var(--blue); transition: .25s; }
.why:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-top-color: var(--gold); }
.why h3 { font-family: var(--display); font-size: 1.12rem; color: var(--navy); margin-bottom: 8px; }
.why p { color: var(--muted); font-size: .96rem; }

.policies { margin-top: 44px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 32px; text-align: center; box-shadow: var(--shadow-sm); }
.policies h3 { font-family: var(--display); color: var(--navy); font-size: 1.2rem; margin-bottom: 20px; }
.policy-tags { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.policy-tags li { font-size: .84rem; font-weight: 500; color: var(--navy); background: var(--tint); border: 1px solid var(--line); padding: 8px 15px; border-radius: 999px; }

/* ---------- CTA ---------- */
.cta { background: linear-gradient(135deg, var(--blue), var(--navy)); color: #fff; padding: 80px 0; text-align: center; }
.cta__inner { max-width: 760px; margin: 0 auto; }
.cta h2 { font-family: var(--display); font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 18px; }
.cta p { color: #d5e3ec; font-size: 1.06rem; margin-bottom: 30px; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; }
.contact__list { margin-top: 30px; display: grid; gap: 20px; }
.contact__list li { display: flex; gap: 16px; align-items: flex-start; }
.contact__ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--tint); flex: none; }
.contact__ic svg { width: 22px; height: 22px; fill: var(--blue); }
.contact__list strong { display: block; font-family: var(--display); color: var(--navy); font-size: 1rem; }
.contact__list p { color: var(--muted); }
.contact__list a:hover { color: var(--blue); }

.contact__form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }
.contact__form h3 { font-family: var(--display); color: var(--navy); font-size: 1.3rem; margin-bottom: 22px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .88rem; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.field label span { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px;
  font-family: var(--font); font-size: .96rem; background: var(--sand); transition: .2s; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(27,108,168,.1); }
.form-note { margin-top: 14px; padding: 12px 16px; border-radius: 10px; background: #e7f6ec; color: #1c6b3a; font-size: .92rem; font-weight: 500; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-2); color: #b9cdd8; padding: 62px 0 26px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.brand--footer .brand__text strong { color: #fff; }
.brand--footer .brand__text small { color: var(--gold); }
.footer__brand p { margin-top: 16px; max-width: 300px; font-size: .95rem; }
.footer__col h4 { font-family: var(--display); color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer__col a, .footer__col span { display: block; font-size: .92rem; color: #b9cdd8; padding: 5px 0; }
.footer__col a:hover { color: var(--gold); }
.footer__bottom { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 44px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); font-size: .84rem; }

/* ---------- Reveal animation (only when JS is present) ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .capacity, .contact { grid-template-columns: 1fr; gap: 40px; }
  .vmv, .prog-grid, .why-grid { grid-template-columns: repeat(2, 1fr); }
  .obj-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav {
    position: fixed; inset: 74px 0 auto 0; flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--line); padding: 14px 24px 22px; gap: 4px;
    transform: translateY(-140%); transition: transform .3s; box-shadow: var(--shadow);
  }
  .nav.is-open { transform: none; }
  .nav a { padding: 13px 14px; }
  .nav__cta { text-align: center; margin-top: 6px; }
  .nav-toggle { display: flex; }
  .impact__grid { grid-template-columns: repeat(2, 1fr); }
  .impact__item:nth-child(2) { border-right: 0; }
  .impact__item:nth-child(1), .impact__item:nth-child(2) { border-bottom: 1px solid rgba(255,255,255,.08); }
  .topbar__meta { display: none; }
}
@media (max-width: 520px) {
  .vmv, .prog-grid, .why-grid, .obj-grid, .footer__grid { grid-template-columns: 1fr; }
  .org__row { grid-template-columns: 1fr; }
  .org__row::before { display: none; }
  .org__branch::before { display: none; }
  .section { padding: 64px 0; }
  .hero__inner { padding: 70px 24px 80px; }
}

/* ===================================================================
   Additions for the PHP multi-page site & components
=================================================================== */

/* Flash messages */
.flash { padding: 13px 0; font-weight: 600; font-size: .95rem; }
.flash .container { padding-left: 24px; padding-right: 24px; }
.flash--success { background: #e7f6ec; color: #1c6b3a; }
.flash--error { background: #fdecec; color: #b3261e; }

/* Interior page hero */
.page-hero {
  position: relative; color: #fff; padding: 74px 0 66px;
  background: radial-gradient(120% 130% at 85% 0%, rgba(27,108,168,.5), transparent 55%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 70%, #071c27 100%);
}
.page-hero h1 { font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.08; margin-bottom: 14px; }
.page-hero p { color: #d5e3ec; max-width: 640px; font-size: 1.06rem; }
.page-hero .hero__eyebrow { margin-bottom: 16px; }

/* Programme cards as links */
a.prog { color: inherit; display: flex; flex-direction: column; }
.prog__more { margin-top: auto; padding-top: 12px; color: var(--blue); font-weight: 600; font-size: .9rem; }
a.prog:hover .prog__more { color: var(--gold-dark); }

/* News cards */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; color: inherit; display: flex; flex-direction: column; transition: .25s; }
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.news-card time { font-size: .82rem; font-weight: 600; color: var(--gold-dark); letter-spacing: .03em; }
.news-card h3 { font-family: var(--display); font-size: 1.16rem; color: var(--navy); margin: 8px 0 10px; }
.news-card p { color: var(--muted); font-size: .96rem; }

/* Article + aside layout (programme detail) */
.article-layout { display: grid; grid-template-columns: 1.6fr .9fr; gap: 44px; align-items: start; }
.article-narrow { max-width: 760px; }
.article { font-size: 1.06rem; color: #33434c; }
.article p { margin-bottom: 18px; }
.article-aside { background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: sticky; top: 92px; }
.article-aside h4 { font-family: var(--display); color: var(--navy); margin-bottom: 14px; }
.aside-list li { margin-bottom: 4px; }
.aside-list a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; font-weight: 500; font-size: .93rem; color: var(--ink); transition: .18s; }
.aside-list a:hover { background: #fff; color: var(--blue); }
.aside-list a.is-active { background: var(--navy); color: #fff; }

/* Policy cards */
.policy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.policy-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; border-top: 3px solid var(--blue); transition: .25s; }
.policy-card:hover { box-shadow: var(--shadow); border-top-color: var(--gold); }
.policy-card__cat { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--blue); }
.policy-card h3 { font-family: var(--display); color: var(--navy); font-size: 1.14rem; margin: 8px 0 10px; }
.policy-card p { color: var(--muted); font-size: .95rem; }
.policy-card details { margin-top: 12px; }
.policy-card summary { cursor: pointer; font-weight: 600; color: var(--blue); font-size: .9rem; }
.policy-card__body { margin-top: 12px; color: var(--muted); font-size: .93rem; }
.policy-card__body p { margin-bottom: 10px; }

.muted-note { color: var(--muted); text-align: center; padding: 40px 0; }
.btn--dark { color: var(--navy) !important; border-color: var(--navy) !important; }
.btn--dark:hover { background: var(--navy); color: #fff !important; }

@media (max-width: 960px) {
  .news-grid, .policy-grid { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: 1fr; }
  .article-aside { position: static; }
}
@media (max-width: 620px) {
  .news-grid, .policy-grid { grid-template-columns: 1fr; }
}

/* ---- Logo image treatment ---- */
.brand__mark img { display: block; object-fit: contain; }
.brand__mark--chip img { background: #fff; border-radius: 9px; padding: 3px; }
.pill--cat { background: var(--tint); color: var(--blue); }
