/* ==========================================================================
   Nandam OEN Foundation — stylesheet
   Identity aligned to Polymatech: master red #E60021, near-black, neutrals.
   Self-hosted Poppins for display; system sans for body copy.
   No external requests, no trackers, no cookies.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonts (self-hosted, subset to Latin, WOFF2)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Chakra Petch";
  src: url("/fonts/chakra-petch-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Chakra Petch";
  src: url("/fonts/chakra-petch-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Chakra Petch";
  src: url("/fonts/chakra-petch-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

/* --------------------------------------------------------------------------
   2. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Polymatech master red and its working variants */
  --red-600: #E60021;   /* master red — brand, buttons, rules */
  --red-700: #C2001C;   /* red text on tinted backgrounds, hover */
  --red-300: #FF5468;   /* red on dark backgrounds only */
  --red-050: #FFF2F4;   /* tint */

  /* Ink and neutrals */
  --ink-900: #0E1113;
  --ink-800: #171B1F;
  --ink-700: #232830;
  --charcoal: #2A2F34;
  --charcoal-soft: #4A5157;
  --grey: #6B7176;
  --grey-light: #C9CDD1;
  --neutral-050: #FAFAF9;
  --neutral-100: #F4F3F1;
  --neutral-200: #ECEAE7;
  --line: #E1DFDB;
  --line-dark: rgba(255, 255, 255, 0.14);
  --white: #FFFFFF;

  /* Type */
  --font-display: "Chakra Petch", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.3rem;
  --step-3: 1.6rem;
  --step-4: 2rem;
  --step-5: 2.6rem;

  --sp-1: 0.5rem;
  --sp-2: 0.875rem;
  --sp-3: 1.25rem;
  --sp-4: 2rem;
  --sp-5: 3rem;
  --sp-6: 4.5rem;
  --sp-7: 6rem;

  --wrap: 1180px;
  --wrap-narrow: 760px;
  --radius: 3px;
  --shadow-1: 0 1px 2px rgba(14, 17, 19, 0.05);
  --shadow-2: 0 12px 32px rgba(14, 17, 19, 0.10);
  --header-h: 76px;
}

/* --------------------------------------------------------------------------
   3. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--white);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink-900);
  font-weight: 600;
  line-height: 1.18;
  margin: 0 0 var(--sp-3);
  letter-spacing: -0.015em;
}
h1 { font-size: var(--step-5); line-height: 1.1; }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); font-weight: 500; }
h4 { font-size: var(--step-1); font-weight: 500; }

p { margin: 0 0 var(--sp-3); }
p:last-child { margin-bottom: 0; }

a { color: var(--red-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink-900); }

ul, ol { margin: 0 0 var(--sp-3); padding-left: 1.25rem; }
li { margin-bottom: 0.4rem; }

hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-5) 0; }

:focus-visible { outline: 3px solid var(--red-600); outline-offset: 3px; border-radius: 2px; }
.hero :focus-visible, .site-footer :focus-visible { outline-color: var(--white); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink-900); color: var(--white);
  padding: 0.75rem 1.25rem; z-index: 999;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--sp-3); }
.wrap--narrow { max-width: var(--wrap-narrow); }

.section { padding: var(--sp-6) 0; }
.section--tight { padding: var(--sp-5) 0; }
.section--neutral { background: var(--neutral-100); }
.section--soft { background: var(--neutral-050); }
.section--dark { background: var(--ink-900); color: var(--grey-light); }
.section--dark h2, .section--dark h3 { color: var(--white); }

.section-head { max-width: 46rem; margin-bottom: var(--sp-5); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }

.eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red-700);
  font-weight: 500;
  margin-bottom: var(--sp-2);
}
.eyebrow--light { color: var(--red-300); }

.lead { font-size: var(--step-1); color: var(--charcoal-soft); }
.prose { max-width: 44rem; }
.prose h2 { margin-top: var(--sp-5); }
.prose h3 { margin-top: var(--sp-4); }
.prose > *:first-child { margin-top: 0; }

.grid { display: grid; gap: var(--sp-3); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--split { grid-template-columns: 1.05fr 0.95fr; gap: var(--sp-5); align-items: start; }

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.92rem; font-weight: 500; letter-spacing: 0.01em;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn--primary { background: var(--red-600); color: var(--white); }
.btn--primary:hover { background: var(--red-700); color: var(--white); }
.btn--outline { border-color: var(--ink-900); color: var(--ink-900); background: transparent; }
.btn--outline:hover { background: var(--ink-900); color: var(--white); }
.btn--light { border-color: rgba(255,255,255,0.6); color: var(--white); background: transparent; }
.btn--light:hover { background: var(--white); color: var(--ink-900); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* --------------------------------------------------------------------------
   6. Header and navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(140%) blur(6px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); min-height: var(--header-h);
}

/* Wordmark — an SVG asset; replace the file to replace the identity. */
.wordmark { display: inline-flex; align-items: center; text-decoration: none; }
.wordmark img { height: 30px; width: auto; max-width: 62vw; }

.nav { display: flex; align-items: center; gap: 0.15rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; padding: 0.6rem 0.7rem;
  font-family: var(--font-display);
  font-size: 0.88rem; font-weight: 400;
  color: var(--ink-800); text-decoration: none; border-radius: var(--radius);
}
.nav a:hover { color: var(--red-700); background: var(--neutral-100); }
.nav a[aria-current="page"] { color: var(--red-700); box-shadow: inset 0 -2px 0 var(--red-600); }

.nav__item { position: relative; }
.nav__toggle {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-family: var(--font-display); font-size: 0.88rem; font-weight: 400;
  color: var(--ink-800); background: none; border: 0;
  padding: 0.6rem 0.7rem; border-radius: var(--radius); cursor: pointer;
}
.nav__toggle:hover { color: var(--red-700); background: var(--neutral-100); }
.nav__toggle--active { color: var(--red-700); box-shadow: inset 0 -2px 0 var(--red-600); }
.nav__toggle svg { width: 10px; height: 10px; transition: transform 0.2s ease; }
.nav__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.dropdown {
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 250px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-2); padding: 0.4rem; margin: 0; list-style: none; display: none;
}
.dropdown li { margin: 0; }
.dropdown a { padding: 0.6rem 0.75rem; font-size: 0.88rem; }
.nav__item--open .dropdown { display: block; }

.nav-toggle {
  display: none; align-items: center; gap: 0.5rem;
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.55rem 0.8rem;
  font-family: var(--font-display); font-size: 0.85rem; font-weight: 500;
  color: var(--ink-900); cursor: pointer;
}
.nav-toggle__bars { display: block; width: 18px; height: 10px; position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after, .nav-toggle__bars span {
  content: ""; position: absolute; left: 0; width: 100%; height: 2px; background: var(--ink-900);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars span { top: 4px; }
.nav-toggle__bars::after { top: 8px; }

/* --------------------------------------------------------------------------
   7. Hero and page headers
   -------------------------------------------------------------------------- */
.hero {
  position: relative; background: var(--ink-900); color: var(--grey-light);
  padding: var(--sp-7) 0 var(--sp-6); overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 4px; background: var(--red-600);
}
.hero__inner { max-width: 47rem; position: relative; z-index: 1; }
.hero h1 { color: var(--white); font-size: clamp(2.1rem, 5vw, 3.4rem); margin-bottom: var(--sp-3); }
.hero p { color: #D5D9DD; font-size: var(--step-1); max-width: 40rem; }
.hero .btn-row { margin-top: var(--sp-4); }

.page-hero {
  background: var(--neutral-100);
  border-bottom: 1px solid var(--line);
  padding: var(--sp-5) 0;
}
.page-hero h1 { font-size: clamp(1.85rem, 4vw, 2.7rem); }
.page-hero p { color: var(--charcoal-soft); max-width: 44rem; font-size: var(--step-1); }

.breadcrumbs { font-size: 0.82rem; margin-bottom: var(--sp-3); color: var(--charcoal-soft); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; }
.breadcrumbs li { margin: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 0.4rem; color: var(--grey-light); }
.breadcrumbs a { color: var(--charcoal-soft); text-decoration: none; }
.breadcrumbs a:hover { color: var(--red-700); text-decoration: underline; }

/* --------------------------------------------------------------------------
   8. Cards and lists
   -------------------------------------------------------------------------- */
.card {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--sp-4) var(--sp-3);
  box-shadow: var(--shadow-1);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: #D3D0CB; }
.card h3 { margin-bottom: var(--sp-2); font-size: var(--step-2); }
.card p { color: var(--charcoal-soft); font-size: 0.97rem; }
.card__icon { width: 42px; height: 42px; margin-bottom: var(--sp-3); color: var(--red-600); }
.card__icon svg { width: 100%; height: 100%; }
.card__link {
  margin-top: auto; padding-top: var(--sp-3);
  font-family: var(--font-display); font-size: 0.88rem; font-weight: 500;
  text-decoration: none; color: var(--red-700);
}
.card__link::after { content: " \2192"; }
.card__link:hover { text-decoration: underline; }
.card--plain:hover { transform: none; box-shadow: var(--shadow-1); }
.card--flat { background: var(--neutral-050); box-shadow: none; }

.value-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.value-list li { position: relative; padding-left: 1.5rem; margin: 0; color: var(--charcoal-soft); }
.value-list li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 7px; height: 7px; background: var(--red-600);
}

/* --------------------------------------------------------------------------
   9. Panels, notices, quotes, statistic
   -------------------------------------------------------------------------- */
.panel {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--sp-4);
}
.panel--neutral { background: var(--neutral-050); }
.panel--dark { background: var(--ink-900); color: var(--grey-light); border-color: var(--ink-700); }
.panel--dark h2, .panel--dark h3 { color: var(--white); }

.notice {
  border-left: 3px solid var(--red-600);
  background: var(--red-050);
  padding: var(--sp-3);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
  color: var(--charcoal);
}

.quote {
  font-family: var(--font-display); font-weight: 400;
  font-size: var(--step-2); line-height: 1.5; color: var(--ink-900);
  border-left: 3px solid var(--red-600); padding-left: var(--sp-3); margin: 0;
}

.stat-band { background: var(--ink-900); color: var(--grey-light); padding: var(--sp-5) 0; }
.stat__value {
  display: block;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2rem, 4.6vw, 2.9rem);
  color: var(--white); line-height: 1.1;
}
.stat__rule { display: block; width: 56px; height: 4px; background: var(--red-600); margin: var(--sp-3) 0; }
.stat__label { color: #D5D9DD; font-size: 0.98rem; }
.stat-band p { color: #C9CDD1; }

.definition { display: grid; gap: 0; border-top: 1px solid var(--line); }
.definition__row {
  display: grid; grid-template-columns: 260px 1fr; gap: var(--sp-3);
  padding: var(--sp-3) 0; border-bottom: 1px solid var(--line);
}
.definition__term { font-family: var(--font-display); font-weight: 500; color: var(--ink-900); }
.definition__value { color: var(--charcoal-soft); }
.definition__value strong { color: var(--ink-900); }

/* --------------------------------------------------------------------------
   10. Pending states
   -------------------------------------------------------------------------- */
.statement {
  border: 1px solid var(--line);
  background: var(--neutral-050);
  border-radius: var(--radius);
  padding: var(--sp-5) var(--sp-4);
  text-align: center;
  color: var(--charcoal-soft);
}
.statement h3 { margin-bottom: var(--sp-2); }
.statement p { max-width: 38rem; margin-left: auto; margin-right: auto; }

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--ink-900); color: var(--grey-light); padding: var(--sp-6) 0 var(--sp-3); }
.site-footer h2 {
  color: var(--white); font-size: 0.78rem; letter-spacing: 0.16em;
  text-transform: uppercase; font-family: var(--font-display); font-weight: 500;
  margin-bottom: var(--sp-3);
}
.site-footer a { color: #C9CDD1; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: var(--sp-4); }
.footer-list { list-style: none; padding: 0; margin: 0; font-size: 0.92rem; }
.footer-list li { margin-bottom: 0.55rem; }
.footer-brand img { height: 30px; width: auto; margin-bottom: var(--sp-3); }
.footer-brand p { font-size: 0.92rem; max-width: 26rem; }
.footer-address { font-size: 0.9rem; font-style: normal; color: #C9CDD1; margin-top: var(--sp-3); }
.footer-bottom {
  border-top: 1px solid var(--line-dark); margin-top: var(--sp-5); padding-top: var(--sp-3);
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3);
  justify-content: space-between; font-size: 0.85rem;
}
.footer-legal { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); list-style: none; margin: 0; padding: 0; }
.footer-legal li { margin: 0 0.75rem 0 0; }

/* --------------------------------------------------------------------------
   12. Utilities
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.text-center { text-align: center; }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.stack > * + * { margin-top: var(--sp-3); }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   13. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .definition__row { grid-template-columns: 210px 1fr; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--split { grid-template-columns: 1fr; gap: var(--sp-4); }

  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-top: 1px solid var(--line);
    padding: var(--sp-3) var(--sp-3) var(--sp-5); overflow-y: auto;
  }
  .nav.is-open { display: flex; }
  .nav a, .nav__toggle {
    padding: 0.95rem 0.5rem; font-size: 1rem; width: 100%;
    text-align: left; border-bottom: 1px solid var(--neutral-200); border-radius: 0;
  }
  .nav__toggle { justify-content: space-between; }
  .nav__item { width: 100%; }
  .dropdown {
    position: static; box-shadow: none; border: 0;
    padding: 0 0 0 var(--sp-3); min-width: 0; background: transparent;
  }
}

@media (max-width: 640px) {
  :root { --step-4: 1.7rem; --step-5: 2.05rem; --sp-6: 3rem; --sp-7: 3.75rem; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-4); }
  .definition__row { grid-template-columns: 1fr; gap: 0.25rem; padding: var(--sp-2) 0; }
  .btn { width: 100%; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .hero { padding: var(--sp-6) 0 var(--sp-5); }
  .wordmark img { height: 26px; }
}

@media (max-width: 360px) {
  .wordmark img { height: 22px; }
  .nav-toggle { padding: 0.5rem 0.6rem; }
}

/* --------------------------------------------------------------------------
   14. Motion preference
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   15. Print — Governance and Impact in particular
   -------------------------------------------------------------------------- */
@media print {
  :root { --sp-5: 1.5rem; --sp-6: 1.5rem; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-header, .site-footer, .nav-toggle, .btn, .skip-link { display: none !important; }
  .page-hero, .hero, .stat-band, .panel--dark, .section--dark {
    background: #fff !important; color: #000 !important; padding: 0 0 1rem;
  }
  .hero h1, .stat__value, .panel--dark h2, .section--dark h2 { color: #000 !important; }
  .hero p, .stat-band p, .stat__label { color: #000 !important; }
  .section { padding: 0.75rem 0; }
  .card, .panel { border: 1px solid #999; box-shadow: none; break-inside: avoid; }
  a { color: #000; text-decoration: underline; }
  .definition__row { break-inside: avoid; }
}
