/* NGUVU Consults — site styles
   Palette: adire indigo. Type: Archivo (wide for display, normal for text). */

:root {
  --indigo: #1B2452;
  --adire: #3A5BA8;
  --wash: #E4E9F4;
  --paper: #F8F9FB;
  --white: #FFFFFF;
  --text: #1A1D29;
  --muted: #545A6E;
  --rule: #CDD3E2;
  --harmattan: #E3AC2A;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Type scale (perfect fourth, 1.333) */
  --fs-small: 0.875rem;
  --fs-body: 1.0625rem;
  --fs-lead: 1.25rem;
  --fs-h3: 1.4rem;
  --fs-h2: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  --fs-h1: clamp(2.25rem, 1.3rem + 3.6vw, 4rem);

  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --space: clamp(4rem, 8vw, 7rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
[id] { scroll-margin-top: 96px; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  font-variation-settings: "wdth" 100;
}

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

a { color: var(--adire); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--indigo); text-decoration-thickness: 2px; }

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

h1, h2, h3 {
  font-family: var(--font);
  font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  color: var(--indigo);
}
h1 { font-size: var(--fs-h1); max-width: 18ch; }
h2 { font-size: var(--fs-h2); max-width: 24ch; }
h3 { font-size: var(--fs-h3); font-weight: 700; line-height: 1.2; }

p { margin: 0 0 1em; max-width: 68ch; }
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--muted); max-width: 60ch; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: -9999px; top: 0.5rem;
  background: var(--harmattan); color: var(--indigo); padding: 0.6rem 1rem; z-index: 100;
  font-weight: 700;
}
.skip-link:focus { left: 0.5rem; }

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px; gap: 1.5rem;
}

.brand {
  display: flex; align-items: center; gap: 0.65rem;
  text-decoration: none; color: var(--indigo);
}
.brand:hover { color: var(--indigo); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-name {
  font-stretch: 125%; font-variation-settings: "wdth" 125;
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; line-height: 1;
}
.brand-name span { font-weight: 400; }

.nav-toggle {
  display: none;
  font: inherit; font-weight: 600; font-size: var(--fs-small);
  background: none; border: 1px solid var(--rule); color: var(--indigo);
  padding: 0.5rem 0.9rem; border-radius: 2px; cursor: pointer;
}

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; align-items: center; }
.site-nav a {
  display: block; padding: 0.5rem 0.85rem;
  text-decoration: none; color: var(--text); font-weight: 500; font-size: 0.97rem;
}
.site-nav a:hover { color: var(--adire); }
.site-nav a[aria-current="page"] {
  color: var(--indigo); font-weight: 700;
  box-shadow: inset 0 -3px 0 var(--harmattan);
}
.site-nav .nav-cta a {
  background: var(--indigo); color: var(--white); border-radius: 2px; margin-left: 0.5rem;
}
.site-nav .nav-cta a:hover { background: var(--adire); color: var(--white); }
.site-nav .nav-cta a[aria-current="page"] { box-shadow: none; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--white); border-bottom: 1px solid var(--rule);
    padding: 0.5rem var(--gutter) 1.25rem;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .site-nav a { padding: 0.8rem 0; border-bottom: 1px solid var(--wash); }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--harmattan); padding-left: 0.75rem; }
  .site-nav .nav-cta a { margin: 0.75rem 0 0; text-align: center; padding: 0.8rem; border: 0; }
}

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

.btn {
  display: inline-block;
  font: inherit; font-weight: 700; font-size: 1rem;
  padding: 0.85rem 1.4rem; border-radius: 2px;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--harmattan); color: var(--indigo); }
.btn-primary:hover { background: #F0BE45; color: var(--indigo); text-decoration: none; }
.btn-ghost { border-color: currentColor; color: var(--white); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.btn-dark { background: var(--indigo); color: var(--white); }
.btn-dark:hover { background: var(--adire); color: var(--white); }
.actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2rem; }

/* ---------- Hero (the one bold element) ---------- */

.hero {
  position: relative; overflow: hidden;
  background: var(--indigo); color: var(--white);
}
.hero .wrap {
  position: relative; z-index: 1;
  padding-top: clamp(4rem, 9vw, 7.5rem);
  padding-bottom: clamp(4rem, 9vw, 7.5rem);
}
.hero h1 { color: var(--white); }
.hero .lead { color: #C9D2EA; }
.hero-pattern {
  position: absolute; inset: 0 0 0 auto; width: min(52%, 640px); height: 100%;
  color: #6F8BCB; opacity: 0.55;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 45%);
          mask-image: linear-gradient(to right, transparent, #000 45%);
}
.hero-status {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: var(--fs-small); font-weight: 600; color: var(--white);
  margin-bottom: 1.75rem;
}
.hero-status::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--harmattan); flex: none;
}
@media (max-width: 860px) {
  .hero-pattern { width: 100%; opacity: 0.18; -webkit-mask-image: none; mask-image: none; }
}

/* Page header for inner pages: a smaller version of the hero */
.page-head { background: var(--indigo); color: var(--white); position: relative; overflow: hidden; }
.page-head .wrap { position: relative; z-index: 1; padding-top: clamp(3rem, 6vw, 4.5rem); padding-bottom: clamp(3rem, 6vw, 4.5rem); }
.page-head h1 { color: var(--white); font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); }
.page-head p { color: #C9D2EA; font-size: var(--fs-lead); line-height: 1.5; max-width: 58ch; margin: 0; }
.page-head .hero-pattern { width: min(40%, 460px); opacity: 0.4; }

/* ---------- Funders strip ---------- */

.funders { border-bottom: 1px solid var(--rule); background: var(--paper); }
.funders .wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 2.25rem; padding-top: 1.5rem; padding-bottom: 1.5rem; }
.funders p { margin: 0; color: var(--muted); font-size: var(--fs-small); }
.funders ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }
.funders li {
  font-stretch: 112%; font-variation-settings: "wdth" 112;
  font-weight: 700; color: var(--indigo); font-size: 1.05rem;
}

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

.section { padding: var(--space) 0; }
.section-tint { background: var(--paper); }
.section-rule { border-top: 1px solid var(--rule); }
.section-head { margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--muted); font-size: var(--fs-lead); line-height: 1.5; max-width: 58ch; }

/* Services: a two-column definition list rather than cards */
.service-list { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(2rem, 5vw, 4.5rem); }
.service-list > div { border-top: 2px solid var(--indigo); padding: 1.5rem 0 2.25rem; }
.service-list dt { font-weight: 700; font-size: var(--fs-h3); color: var(--indigo); line-height: 1.25; margin-bottom: 0.6rem; }
.service-list dd { margin: 0; color: var(--muted); }
.service-list dd a { font-weight: 600; }
@media (max-width: 720px) { .service-list { grid-template-columns: 1fr; } }

/* ---------- Portfolio table ---------- */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.portfolio {
  width: 100%; border-collapse: collapse; min-width: 720px;
  font-size: 0.98rem;
}
.portfolio caption { text-align: left; color: var(--muted); font-size: var(--fs-small); padding-bottom: 0.75rem; caption-side: bottom; padding-top: 1rem; }
.portfolio th, .portfolio td { text-align: left; vertical-align: top; padding: 1.1rem 1.25rem 1.1rem 0; }
.portfolio thead th {
  font-size: var(--fs-small); font-weight: 600; color: var(--muted);
  border-bottom: 2px solid var(--indigo); padding-top: 0;
}
.portfolio tbody tr { border-bottom: 1px solid var(--rule); }
.portfolio tbody th { font-weight: 700; color: var(--indigo); width: 30%; }
.portfolio tbody th small { display: block; font-weight: 400; color: var(--muted); font-size: var(--fs-small); margin-top: 0.2rem; }
.portfolio .result { font-weight: 700; color: var(--text); white-space: nowrap; }
.status {
  display: inline-flex; align-items: center; gap: 0.45rem; white-space: nowrap;
  font-size: var(--fs-small); font-weight: 600;
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rule); }
.status-active::before { background: var(--harmattan); }
.status-done::before { background: var(--adire); }

/* ---------- Approach (a real sequence, so it is numbered) ---------- */

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.5rem; }
.steps li { counter-increment: step; position: relative; padding-top: 3.25rem; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--indigo); color: var(--white); font-weight: 700; font-size: 0.95rem;
}
.steps li::after {
  content: ""; position: absolute; top: 1.125rem; left: 2.75rem; right: -1rem;
  border-top: 2px dotted var(--adire);
}
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 1.1rem; font-stretch: 100%; font-variation-settings: "wdth" 100; margin-bottom: 0.4rem; }
.steps p { color: var(--muted); font-size: 0.97rem; margin: 0; }
@media (max-width: 960px) {
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li { padding: 0 0 1.75rem 3.5rem; }
  .steps li::after { top: 2.6rem; left: 1.1rem; right: auto; bottom: 0.4rem; border-top: 0; border-left: 2px dotted var(--adire); }
}

/* ---------- Split layout (text + aside) ---------- */

.split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.facts { margin: 0; border-top: 2px solid var(--indigo); }
.facts > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--rule); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; color: var(--indigo); text-align: right; }

.person { display: flex; gap: 1.25rem; align-items: center; margin-top: 2rem; }
.person .initials {
  width: 64px; height: 64px; border-radius: 50%; flex: none;
  background: var(--wash); color: var(--indigo);
  display: grid; place-items: center; font-weight: 800; font-size: 1.2rem;
  font-stretch: 125%; font-variation-settings: "wdth" 125;
}
.person p { margin: 0; }
.person strong { display: block; color: var(--indigo); font-size: 1.1rem; }

.values { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.values li { background: var(--wash); color: var(--indigo); font-weight: 600; padding: 0.4rem 0.85rem; border-radius: 2px; font-size: 0.95rem; }

/* ---------- Project fact sheets ---------- */

.project { padding: clamp(2.5rem, 5vw, 3.5rem) 0; border-top: 1px solid var(--rule); }
.project:first-child { border-top: 0; padding-top: 0; }
.project-meta { margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }
.project-meta div { display: flex; gap: 0.5rem; }
.project-meta dt { color: var(--muted); }
.project-meta dd { margin: 0; font-weight: 600; color: var(--text); }
.results { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--indigo); }
.results li { padding: 0.85rem 0; border-bottom: 1px solid var(--rule); }
.results strong { color: var(--indigo); }
.project h2 { max-width: 30ch; font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); }
.project .code { color: var(--adire); font-weight: 700; display: block; margin-bottom: 0.4rem; font-size: 1rem; font-stretch: 100%; font-variation-settings: "wdth" 100; letter-spacing: 0; }

/* ---------- Service detail ---------- */

.service-detail { padding: clamp(2.5rem, 5vw, 3.5rem) 0; border-top: 1px solid var(--rule); }
.service-detail:first-child { border-top: 0; padding-top: 0; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding: 0.6rem 0 0.6rem 1.75rem; border-bottom: 1px solid var(--rule); }
.ticks li::before {
  content: ""; position: absolute; left: 0.2rem; top: 1.05rem;
  width: 0.55rem; height: 0.3rem; border-left: 2px solid var(--adire); border-bottom: 2px solid var(--adire);
  transform: rotate(-45deg);
}
.aside-title { font-weight: 700; color: var(--indigo); margin-bottom: 0.5rem; }

/* ---------- CTA band ---------- */

.cta-band { background: var(--wash); }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; padding-top: clamp(3rem, 6vw, 4.5rem); padding-bottom: clamp(3rem, 6vw, 4.5rem); }
.cta-band h2 { margin-bottom: 0.35rem; }
.cta-band p { margin: 0; color: var(--muted); }
.cta-band .actions { margin-top: 0; }

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

.contact-list { margin: 0; border-top: 2px solid var(--indigo); }
.contact-list > div { padding: 1.25rem 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; }
.contact-list dt { color: var(--muted); }
.contact-list dd { margin: 0; font-size: 1.15rem; font-weight: 600; }
.contact-list dd a { color: var(--indigo); }
@media (max-width: 520px) { .contact-list > div { grid-template-columns: 1fr; gap: 0.25rem; } }

.brief-list { padding-left: 1.2rem; margin: 0; }
.brief-list li { margin-bottom: 0.5rem; }

/* ---------- Footer ---------- */

.site-footer { background: var(--indigo); color: #C9D2EA; font-size: 0.95rem; }
.site-footer .wrap { padding-top: 3.5rem; padding-bottom: 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255,255,255,0.15); }
.site-footer .brand { color: var(--white); margin-bottom: 1rem; }
.site-footer .brand svg { color: var(--adire); }
.site-footer p { max-width: 42ch; }
.site-footer h2 { color: var(--white); font-size: 1rem; font-stretch: 100%; font-variation-settings: "wdth" 100; font-weight: 700; margin-bottom: 0.75rem; letter-spacing: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: var(--white); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; font-size: var(--fs-small); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- 404 ---------- */
.notfound { min-height: 50vh; display: flex; align-items: center; }

/* ---------- Print: programme officers print fact sheets ---------- */
@media print {
  .site-header, .site-footer, .cta-band, .hero-pattern, .nav-toggle { display: none !important; }
  .hero, .page-head { background: none; color: var(--text); }
  .hero h1, .page-head h1 { color: var(--indigo); }
  .hero .lead, .page-head p { color: var(--muted); }
  .section { padding: 1.5rem 0; }
  a { color: var(--text); }
}
