/* CSDIL website styles
   Colours follow the logo: black base, red accent, grey support. */

:root {
  --ink: #151515;
  --text: #3a3a3a;
  --muted: #555555;
  --red: #d7262e;
  --red-dark: #b3202a;
  --red-light: #f0545b;
  --grey-bg: #f3f3f3;
  --line: #e2e2e2;
  --white: #ffffff;
  --radius: 12px;
  --container: 1160px;
  --font-head: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--red-dark); }
a:hover { color: var(--ink); }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.05; }
h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.12; }
h3 { font-size: 21px; line-height: 1.25; }
p { margin: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 8px; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-decoration: none;
  color: var(--ink);
  padding: 10px 0;
}
.brand img { height: 34px; width: auto; }
.brand span { font-size: 12px; color: var(--muted); line-height: 1.3; }

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.main-nav a:hover { background: var(--grey-bg); }
.main-nav a[aria-current="page"] { background: var(--ink); color: var(--white); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 1020px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; padding: 8px 16px 16px; }
  .main-nav a { width: 100%; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); color: var(--white); }
.btn-dark { background: var(--ink); color: var(--white); border: 0; }
.btn-dark:hover { background: #000; color: var(--white); }
.btn-ghost { border-color: var(--white); color: var(--white); background: transparent; }
.btn-ghost:hover { background: var(--white); color: var(--ink); }
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  color: var(--red-dark);
  text-underline-offset: 4px;
}

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-sm { padding: 72px 0; }
.bg-grey { background: var(--grey-bg); }
.bg-dark { background: var(--ink); color: var(--white); }
.bg-dark h2 { color: var(--white); }

.lead { margin-top: 20px; max-width: 640px; font-size: 20px; line-height: 1.55; color: var(--text); }
.body-text { font-size: 18px; line-height: 1.65; color: var(--text); }
.small-text { font-size: 16px; line-height: 1.55; color: var(--text); }
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 48px;
  align-items: start;
}
.stack { display: flex; flex-direction: column; gap: 18px; }

.page-hero { background: var(--grey-bg); padding: 72px 0 56px; }

/* ---------- Home hero ---------- */
.hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ink);
}
.hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 12, 0.58);
}
.hero .container { position: relative; z-index: 1; width: 100%; padding-top: 120px; padding-bottom: 72px; }
.hero h1 { max-width: 820px; font-size: clamp(40px, 6.4vw, 76px); line-height: 1.02; color: var(--white); }
.hero p { margin-top: 24px; max-width: 640px; font-size: clamp(18px, 2vw, 21px); line-height: 1.55; color: #f1f1f1; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---------- Step strip and cards ---------- */
.step-strip {
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.step-strip li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
}
.num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 36px;
}
.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}
.card img { width: 100%; height: 200px; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 10px; padding: 20px; flex-grow: 1; }
.card-body .text-link { margin-top: auto; }

/* ---------- About ---------- */
.about-hero { background: var(--grey-bg); padding: 72px 0 0; }
.about-hero .split { align-items: end; gap: 40px; }
.about-hero .split > div { padding-bottom: 56px; }
.about-hero img { width: 100%; height: 420px; object-fit: cover; object-position: center 40%; border-radius: var(--radius) var(--radius) 0 0; }

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 36px;
}
.toc-grid > div {
  padding: 24px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.toc-word { font-family: var(--font-head); font-weight: 700; font-size: 30px; color: var(--red-light); }
.toc-text { margin-top: 10px; font-size: 18px; line-height: 1.55; color: var(--white); }
.bg-dark .note { margin-top: 32px; max-width: 760px; font-size: 18px; line-height: 1.6; color: #dadada; }

.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 36px;
}
.tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--grey-bg);
}

/* ---------- Approach ---------- */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.steps img { width: 100%; height: 160px; object-fit: cover; }
.loop-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding: 18px 20px;
  border: 1px dashed var(--red-dark);
  border-radius: 10px;
  color: var(--red-dark);
  font-size: 17px;
  font-weight: 600;
}
.loop-note svg { width: 28px; height: 28px; flex-shrink: 0; }

/* ---------- Services ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.service {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.service h2 { font-size: 23px; line-height: 1.25; }
.service .tagline { font-size: 17px; font-weight: 600; color: var(--red-dark); }
.service ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 16px; line-height: 1.5; color: var(--text); }
.service .from-work {
  margin-top: auto;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--grey-bg);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}
.service .from-work strong { color: var(--ink); }

/* ---------- Themes ---------- */
.theme-list { display: flex; flex-direction: column; gap: 56px; }
.theme {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 36px;
  align-items: center;
}
.theme img { width: 100%; height: 340px; object-fit: cover; border-radius: var(--radius); }
.theme .stack { gap: 16px; }
.bg-dark .split p { font-size: 18px; line-height: 1.6; color: #dadada; }

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}
.person {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.person h2 { font-size: 24px; line-height: 1.25; }
.person .role { margin-top: 4px; font-size: 15px; color: var(--muted); }
.person .focus { font-size: 16px; font-weight: 600; color: var(--red-dark); }
.person .edu { padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.5; color: var(--text); }
.person .edu strong { color: var(--ink); }

/* ---------- Partner and contact ---------- */
.partner-list { list-style: none; padding: 0; margin: 28px 0 0; }
.partner-list li { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; line-height: 1.5; color: var(--text); }
.partner-list strong { color: var(--ink); }
.engage-grid {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 28px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.contact-form label { font-size: 15px; font-weight: 700; margin-top: 10px; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #8f8f8f;
  border-radius: 8px;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--white);
}
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form .btn { align-self: flex-start; margin-top: 18px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { padding: 12px 14px; border-radius: 8px; font-size: 16px; margin-bottom: 8px; }
.form-msg.ok { background: var(--grey-bg); border-left: 0; color: var(--ink); border: 1px solid var(--line); }
.form-msg.err { background: #fdecec; color: #8a1a20; border: 1px solid #f3c2c4; }
.field-err { font-size: 14px; color: #a3161d; }

/* ---------- CTA band ---------- */
.cta-band { padding: 72px 0; background: var(--grey-bg); }
.cta-band .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band h2 { max-width: 640px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #d6d6d6; padding: 56px 0 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}
.site-footer img { height: 34px; width: auto; }
.site-footer p { font-size: 15px; line-height: 1.5; }
.footer-nav { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.footer-nav a { display: inline-flex; min-height: 36px; align-items: center; color: #d6d6d6; text-decoration: none; font-size: 15px; }
.footer-nav a:hover { color: var(--white); text-decoration: underline; }
.site-footer .mail { color: var(--white); }
.copyright { margin-top: 16px; font-size: 13px; color: #a6a6a6; }

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .hero { min-height: 520px; }
  .about-hero img, .theme img { height: 260px; }
  .brand span { display: none; }
}
