/* KBTB — site styles. No framework; tokens first, then layout, blocks, header, footer. */

@font-face { font-family: Poppins; font-weight: 400; font-display: swap; src: url(/assets/fonts/poppins-400.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-weight: 500; font-display: swap; src: url(/assets/fonts/poppins-500.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-weight: 600; font-display: swap; src: url(/assets/fonts/poppins-600.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-weight: 700; font-display: swap; src: url(/assets/fonts/poppins-700.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-weight: 800; font-display: swap; src: url(/assets/fonts/poppins-800.woff2) format("woff2"); }
@font-face { font-family: "Roboto Slab"; font-weight: 500; font-display: swap; src: url(/assets/fonts/roboto-slab-500.woff2) format("woff2"); }

:root {
  --red: #c10e1a;
  --red-dark: #9d0b15;
  --red-light: #e52f4b;
  --yellow: #f8dc28;
  --light: #eef0f4;
  --ink: #000;
  --heading: #222529;
  --text: #777;
  --muted: #999;
  --white: #fff;

  --font: Poppins, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-accent: "Roboto Slab", Georgia, serif;

  --container: 1240px;
  --gutter: 20px;
  --block-pad: clamp(3rem, 6vw, 5rem);
  --angle: clamp(18px, 3vw, 46px);
  --radius: 4px;
  --shadow: 0 25px 60px -15px rgb(0 0 0 / .18);
}

/* ---------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6rem; }
body {
  margin: 0;
  font: 400 0.9375rem/1.85 var(--font);
  color: var(--text);
  background: var(--white);
  overflow-x: clip;
}
img, svg, video { max-width: 100%; height: auto; }
picture { display: contents; }
a { color: var(--red); }
a:hover { color: var(--red-dark); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
h1, h2, h3, h4, h5, h6 { color: var(--heading); font-weight: 700; line-height: 1.25; margin: 0 0 .75em; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: var(--white); padding: .6rem 1rem; border-radius: var(--radius); }
.skip-link:focus { top: 1rem; }

/* ---------------------------------------------------------------- typography helpers */

.eyebrow {
  display: flex; align-items: center; gap: 1.25rem;
  margin: 0 0 .4rem;
  font: 500 .8125rem/1.4 var(--font-accent);
  text-transform: uppercase;
  color: var(--yellow);
}
.eyebrow::before { content: ""; flex: 0 0 50px; height: 2px; background: currentColor; }

.block-title {
  margin: 0 0 1.4rem;
  font-size: clamp(1.6rem, 1.15rem + 1.3vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.04em;
  color: var(--ink);
}
h3.block-title, h4.block-title { font-size: clamp(1.2rem, 1rem + .6vw, 1.45rem); font-weight: 700; letter-spacing: -.02em; }

.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose table { margin: 0 0 1.25em; }
.prose strong { color: #555; font-weight: 600; }
.prose h2, .prose h3, .prose h4 { color: var(--ink); margin: 1.6em 0 .6em; }
.prose h2 { font-size: 1.4rem; font-weight: 800; letter-spacing: -.03em; }
.prose h3 { font-size: 1.15rem; }
.prose h4 { font-size: 1rem; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .2em 0; }
.prose li::marker { color: var(--red); }
.prose blockquote { border-left: 3px solid var(--yellow); padding-left: 1.2em; font-style: italic; }
.prose img { border-radius: var(--radius); }
.prose table { border-collapse: collapse; width: 100%; font-size: .875rem; }
.prose th, .prose td { border-bottom: 1px solid #e5e7eb; padding: .5em .75em; text-align: left; }
.prose iframe { max-width: 100%; border: 0; }
.prose--checks ul { list-style: none; padding-left: 0; }
.prose--checks li { position: relative; padding-left: 1.8em; }
.prose--checks li::before {
  content: ""; position: absolute; left: 0; top: .45em;
  width: 1em; height: 1em; background: var(--yellow);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round' d='M4 12.5l5 5L20 6.5'/%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 fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round' d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.buttons { display: flex; flex-wrap: wrap; gap: .8rem; margin: 2rem 0 0; }
.btn {
  display: inline-block;
  padding: 1.15em 2.6em;
  border: 2px solid var(--red);
  border-radius: 3px;
  background: var(--red);
  color: var(--white);
  font: 600 .75rem/1.3 var(--font);
  text-transform: uppercase;
  letter-spacing: .02em;
  text-decoration: none;
  transition: background-color .2s, border-color .2s, color .2s;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: var(--white); }
.btn--secondary { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.btn--secondary:hover { background: #e9cc14; border-color: #e9cc14; color: var(--ink); }
.btn--dark { background: var(--ink); border-color: var(--ink); }
.btn--dark:hover { background: #333; border-color: #333; }
.btn--outline { background: transparent; color: var(--red); }
.btn--outline:hover { background: var(--red); color: var(--white); }

.frame { margin: 0; padding: clamp(8px, 1vw, 14px); background: var(--white); box-shadow: var(--shadow); }
.frame img { display: block; width: 100%; }
figure { margin: 0; }
figcaption { margin-top: .6rem; font-size: .8125rem; color: var(--muted); }

/* ---------------------------------------------------------------- blocks */

.block { position: relative; padding-block: var(--block-pad); }
/* Consecutive white blocks share their spacing */
.block:not([class*="bg-"]) + .block:not([class*="bg-"]) { padding-top: 0; }
.block-head { margin-bottom: 2.5rem; }
.block-head .block-title { margin-bottom: 0; }

/* Coloured sections get the angled edges of the KBTB design */
.bg-light, .bg-yellow, .bg-red {
  padding-block: calc(var(--block-pad) + var(--angle));
  clip-path: polygon(0 var(--angle), 100% 0, 100% calc(100% - var(--angle)), 0 100%);
}
:is(.bg-light, .bg-yellow, .bg-red) + :is(.bg-light, .bg-yellow, .bg-red) { margin-top: calc(-1 * var(--angle)); }
.bg-light { background: var(--light); }
.bg-yellow { background: var(--yellow); color: #4d4413; }
.bg-yellow .eyebrow { color: var(--red); }
.bg-yellow .prose strong { color: var(--ink); }
.bg-yellow .prose--checks li::before { background: var(--red); }
.bg-red { background: var(--red); color: rgb(255 255 255 / .88); }
.bg-red .block-title, .bg-red .prose h2, .bg-red .prose h3, .bg-red .prose strong { color: var(--white); }
.bg-red a:not(.btn) { color: var(--white); }
.bg-red .btn { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }

/* Text */
.text-block__inner { max-width: 54rem; }
.text-block--center .text-block__inner { margin-inline: auto; text-align: center; }
.text-block--center .eyebrow { justify-content: center; }
.text-block--center .buttons { justify-content: center; }

/* Text + image */
.media-text__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6.5rem); align-items: center; }
.media-text--right .media-text__media { order: 2; }
.media-text__grid > .media-text__body:only-child { grid-column: 1 / -1; max-width: 54rem; }
.article .media-text__grid { align-items: start; }
@media (min-width: 992px) { .article .media-text__media { position: sticky; top: 2rem; } }
.media-text__media img { display: block; width: 100%; }
.media-text--angled .media-text__media img {
  aspect-ratio: 3 / 2; object-fit: cover;
  clip-path: polygon(0 5%, 100% 0, 100% 100%, 0 95%);
}
/* Stacked angled items (news on the homepage) sit close together, like the original */
.media-text--angled:not([class*="bg-"]) + .media-text--angled:not([class*="bg-"]) { margin-top: calc(var(--block-pad) * -.65); }
.media-text--angled:not([class*="bg-"]) + .block:not(.media-text--angled):not([class*="bg-"]) { padding-top: var(--block-pad); }

/* News & podcasts (lists of text + photo rows) */
.feed-head { padding-bottom: 0; }
.feed-head[class*="bg-"] { padding-bottom: var(--angle); }
.feed-item__title a { color: inherit; text-decoration: none; }
.feed-item__title a:hover { color: var(--red); }
.feed-item .buttons { margin-top: 1.5rem; }
.feed-item .media-text__grid { align-items: start; }
.media-text__media > a { display: block; }

/* Columns */
.columns-block__grid { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: clamp(2rem, 4vw, 4rem); }
.columns-block__item.bg-red, .columns-block__item.bg-yellow, .columns-block__item.bg-light { clip-path: none; padding: 2rem; }
.columns-block__img { display: block; width: 100%; margin-bottom: 1.5rem; border-radius: var(--radius); }

/* Team grid */
.people__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 2.5rem clamp(1.5rem, 3vw, 2.8rem); text-align: center; }
.person a { display: block; color: inherit; text-decoration: none; }
.person__photo { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; object-position: top; border-radius: var(--radius); background: var(--light); }
.person__name { display: block; margin-top: 1.1rem; font-weight: 700; font-size: 1.05rem; line-height: 1.3; letter-spacing: -.02em; color: var(--ink); }
.person__subtitle { display: block; margin-top: .3rem; font-size: .8125rem; line-height: 1.5; }
.person a:hover .person__name { color: var(--red); }
.people__note { margin: 2rem 0 0; text-align: center; font-size: .8125rem; font-style: italic; }

/* Cards */
.cards__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 2.5rem clamp(1.5rem, 3vw, 2.5rem); text-align: center; }
.card__img { display: block; width: 100%; aspect-ratio: 2.35; object-fit: cover; border-radius: var(--radius); }
.card__title { margin: 1.2rem 0 .3rem; font-size: 1.25rem; font-weight: 700; letter-spacing: -.03em; color: var(--ink); }
.card__title a { color: inherit; text-decoration: none; }
.card__title a:hover { color: var(--red); }
.card__text a { text-decoration: none; }
.card__text a:hover { text-decoration: underline; }

/* Partner logos */
.logos__grid { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: space-around; align-items: center; gap: 2rem 3rem; }
.logos__grid li { flex: 0 1 220px; display: flex; justify-content: center; }
.logos__grid img { display: block; width: auto; max-width: 100%; max-height: 140px; object-fit: contain; transition: transform .2s; }
.logos__grid a:hover img { transform: scale(1.04); }

/* Single image */
.image-block__figure img { display: block; width: 100%; border-radius: var(--radius); }
.image-block__figure.frame img { border-radius: 0; }

/* 404 */
.not-found__code { margin: 0; font-size: clamp(5rem, 15vw, 9rem); font-weight: 800; line-height: 1; letter-spacing: -.06em; color: var(--light); }
.not-found__text { font-size: 1.1rem; color: var(--heading); }

/* ---------------------------------------------------------------- page header */

.page-header {
  padding-block: calc(2.6rem + var(--angle));
  background: var(--light);
  clip-path: polygon(0 var(--angle), 100% 0, 100% calc(100% - var(--angle)), 0 100%);
}
.page-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 2rem; }
.page-header__title { margin: 0; font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.4rem); font-weight: 800; letter-spacing: -.05em; color: var(--yellow); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 0; font-size: .6875rem; text-transform: uppercase; letter-spacing: .02em; }
.breadcrumbs li + li::before { content: "›"; margin: 0 .7em; color: var(--muted); }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs [aria-current] { color: var(--text); }
.page-header + .block:not([class*="bg-"]) { padding-top: calc(var(--block-pad) * .7); }
/* Pages without a title bar (home) start right below the menu */
main > h1.sr-only:first-child + .block:not([class*="bg-"]) { padding-top: 1rem; }

/* ---------------------------------------------------------------- header */

.site-header { position: relative; z-index: 20; background: var(--white); }
.site-header__top .container { display: flex; justify-content: flex-end; padding-top: .6rem; height: 0; overflow: visible; }
.header-badge img { display: block; width: 40px; height: 40px; border-radius: 50%; }
.site-header__main { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-block: 1.6rem 1rem; }
.site-logo { flex: none; display: block; }
.site-logo img { display: block; width: 250px; height: auto; }

/* Sticky header: after scrolling past the header it slides in compact at the top (site.js) */
.site-header.is-sticky { position: fixed; inset: 0 0 auto; border-top: 1px solid var(--heading); box-shadow: 0 4px 24px rgb(0 0 0 / .08); animation: header-in .25s ease-out; }
.site-header.is-sticky .site-header__top { display: none; }
.site-header.is-sticky .site-header__main { padding-block: .45rem; }
.site-header.is-sticky .site-logo img { width: 110px; }
@keyframes header-in { from { transform: translateY(-100%); } }

.nav-toggle { display: none; }
.menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem); }
.menu__item { position: relative; display: flex; align-items: center; }
.menu__item > a { display: block; padding: .8rem 0; font-weight: 700; font-size: .8125rem; line-height: 1.3; letter-spacing: -.01em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.menu__item > a:hover, .menu__item.is-active > a { color: var(--red); }
.submenu-toggle { display: none; }
.submenu {
  position: absolute; left: -1rem; top: 100%;
  min-width: 210px; margin: 0; padding: .6rem 0;
  list-style: none; background: var(--white);
  border-top: 3px solid var(--red);
  box-shadow: 0 15px 40px rgb(0 0 0 / .12);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.has-sub:hover > .submenu, .has-sub:focus-within > .submenu { opacity: 1; visibility: visible; transform: none; }
.submenu a { display: block; padding: .5rem 1.25rem; font-size: .8125rem; font-weight: 500; color: var(--text); text-decoration: none; }
.submenu a:hover, .submenu [aria-current] { background: #f4f4f4; color: var(--red); }
.lang-switch .submenu { left: auto; right: -1rem; min-width: 90px; }
.flag { display: inline-block; width: 18px; height: 12px; margin-right: .45rem; vertical-align: -1px; background: linear-gradient(90deg, #000 33.4%, #fdda24 33.4% 66.6%, #ef3340 66.6%); }

@media (max-width: 991.98px) {
  .site-header__main { padding-block: 1.4rem .8rem; }
  .site-logo img { width: 150px; }
  .site-header__top .container { padding-right: 4.5rem; padding-top: 1.75rem; }
  .nav-toggle {
    display: grid; place-items: center;
    width: 46px; height: 46px; padding: 0;
    border: 0; border-radius: var(--radius);
    background: var(--red); color: var(--white); font-size: 1.4rem; cursor: pointer;
  }
  .nav-toggle .icon--close, .nav-open .nav-toggle .icon--open { display: none; }
  .nav-open .nav-toggle .icon--close { display: block; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    display: none; max-height: calc(100vh - 100%); overflow-y: auto;
    background: var(--white); border-top: 1px solid var(--light);
    box-shadow: 0 20px 40px rgb(0 0 0 / .12);
  }
  .nav-open .site-nav { display: block; }
  .menu { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem var(--gutter) 1rem; }
  .menu__item { flex-wrap: wrap; border-bottom: 1px solid var(--light); }
  .menu__item > a { flex: 1; padding: .9rem 0; font-size: .9375rem; }
  .submenu-toggle {
    display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
    border: 0; background: none; color: var(--ink); font-size: 1.1rem; cursor: pointer;
  }
  .submenu-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .submenu, .lang-switch .submenu {
    position: static; flex-basis: 100%; display: none;
    min-width: 0; padding: 0 0 .6rem; border: 0; box-shadow: none;
    opacity: 1; visibility: visible; transform: none;
  }
  .has-sub:hover > .submenu, .has-sub:focus-within > .submenu { display: none; }
  .has-sub.is-open > .submenu { display: block; }
  .submenu a { padding: .45rem 1rem; font-size: .875rem; }
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  margin-top: var(--block-pad);
  padding-top: calc(4rem + var(--angle));
  background: var(--light);
  clip-path: polygon(0 var(--angle), 100% 0, 100% 100%, 0 100%);
  font-size: .8125rem;
}
main:has(> :last-child[class*="bg-"]) + .site-footer { margin-top: calc(-1 * var(--angle)); }
.site-footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 2.5rem; }
.footer-col__title { margin: 0 0 1.1rem; font-size: 1.0625rem; font-weight: 600; letter-spacing: -.02em; color: var(--red); }
.social { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 1.2rem; padding: 0; }
.social a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--white); color: var(--heading); font-size: .95rem; transition: background-color .2s; }
.social a:hover { background: var(--yellow); color: var(--ink); }
.footer-col__lines { list-style: none; margin: 0; padding: 0; line-height: 2.1; color: var(--red); }
.footer-col__lines a { text-decoration: none; }
.footer-col__lines a:hover { text-decoration: underline; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; margin-top: 4rem; padding-block: 2rem; font-size: .75rem; }
.site-footer__bottom p { margin: 0; }
.site-footer__bottom a { color: inherit; }

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

@media (max-width: 991.98px) {
  .media-text__grid { grid-template-columns: 1fr; }
  .media-text--right .media-text__media { order: 0; }
}
@media (max-width: 767.98px) {
  .columns-block__grid { grid-template-columns: 1fr; }
  .logos__grid { gap: 1.5rem 2rem; }
  .logos__grid li { flex-basis: calc(50% - 1rem); }
  .logos__grid img { max-height: 90px; }
  .page-header__inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 991.98px) {
  .site-header.is-sticky .site-logo img { width: 90px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header nav, .nav-toggle, .site-footer .social { display: none; }
  .bg-light, .bg-yellow, .bg-red, .page-header, .site-footer { clip-path: none; background: none; }
}
