/**
 * E²IMPART: Cassiopeia child template styles.
 *
 * Loaded by Cassiopeia as the "template.user" asset, after its own CSS.
 * Nothing is fetched from another host. The fonts are a separate, selectable stylesheet
 * (css/global/fonts-local_source.css), chosen in the template style under Advanced > Font.
 *
 * Layout: the home page runs like a magazine feature: a photographic cover, then full-width
 * bands that alternate in pace (statement, why millets, who is involved, the film).
 * Inner pages are long reads: photographs, a narrow column, real captions. Colour comes
 * from the E²IMPART logo (blue, navy, saffron) and is kept quiet so the photographs carry it.
 * The field photographs are 1000px wide, so nothing displays them wider than that.
 */

/* ---------- Tokens ---------- */
:root {
  --e2-paper: #ffffff;
  --e2-mist: #f3f5f7;     /* footer ground, a cool grey leaning to the logo blue */
  --e2-ink: #17263c;      /* body text: the logo navy, softened */
  --e2-muted: #4d5b6e;    /* captions and secondary text */
  --e2-blue: #00629e;     /* links: the logo blue, darkened for contrast on white */
  --e2-navy: #0c2f57;
  --e2-saffron: #f2a548;  /* the logo's figures; used only for the active menu mark */
  --e2-rule: #d8dee6;

  /* fonts come from the template style's Font setting; with "None" they fall back to
     Cassiopeia's own default stack, as the rest of the template does */
  --e2-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --e2-serif: var(--cassiopeia-font-family-headings, var(--e2-system));
  --e2-sans: var(--cassiopeia-font-family-body, var(--e2-system));

  --e2-text: 40rem;       /* reading column */
  --e2-wrap: 72rem;
  --e2-gutter: max(16px, env(safe-area-inset-left, 0px));

  /* Cassiopeia and Bootstrap variables, pointed at the tokens above */
  --cassiopeia-color-primary: var(--e2-navy);
  --cassiopeia-color-hover: var(--e2-navy);
  --cassiopeia-color-link: var(--e2-blue);
  --link-color: #00629e;
  --link-color-rgb: 0, 98, 158;
  --link-hover-color: #0c2f57;
  --link-hover-color-rgb: 12, 47, 87;
  --cassiopeia-scroll-margin-top: 7rem;
  --body-bg: var(--e2-paper);
  --body-color: var(--e2-ink);
  --body-font-size: 1.125rem;
  --body-line-height: 1.6;
  --border-color: var(--e2-rule);
}
@media (min-width: 720px) {
  :root { --e2-gutter: max(32px, env(safe-area-inset-left, 0px)); }
}

/* ---------- Base ---------- */
body {
  overflow-x: clip;
  background: var(--e2-paper);
  color: var(--e2-ink);
}
h1, .h1, h2, .h2, h3, .h3 {
  color: var(--e2-navy);
  line-height: 1.15;
  text-wrap: balance;
}
h1, .h1 { font-size: clamp(2.1rem, 3.4vw, 2.9rem); letter-spacing: -.01em; }
h2, .h2 { font-size: clamp(1.5rem, 2.2vw, 1.85rem); }
h3, .h3 { font-size: 1.3rem; }
a { color: var(--e2-blue); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--e2-navy); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--e2-navy); outline-offset: 3px; }
figure { margin: 0; }
figcaption {
  margin-top: .6rem;
  font-size: .95rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--e2-muted);
}
figcaption a { font-style: normal; }
img { height: auto; }

/* ---------- Header (Cassiopeia .container-header) ---------- */
.container-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 2rem;
  padding-left: max(var(--e2-gutter), calc((100% - var(--e2-wrap)) / 2 + var(--e2-gutter)));
  padding-right: max(var(--e2-gutter), calc((100% - var(--e2-wrap)) / 2 + var(--e2-gutter)));
  color: var(--e2-ink);
  background: var(--e2-paper);
  background-image: none;
  border-bottom: 1px solid var(--e2-rule);
  box-shadow: none;
}
.container-header.sticky-top { top: env(safe-area-inset-top, 0px); }
.container-header > .grid-child {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 1rem 0;
}
.container-header > .grid-child:has(.navbar-brand) { flex: 0 0 auto; }
.container-header .navbar-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0;
  padding: 0;
  font-size: 1rem;
  color: var(--e2-navy);
}
.container-header .brand-logo img {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
}
.container-header .site-description {
  max-width: 21rem;
  font: 600 1.05rem/1.3 var(--e2-serif);
  color: var(--e2-navy);
}
.container-header .container-nav {
  flex: 1 1 0;
  min-width: 0;
  justify-content: flex-end;
  align-self: stretch;
  padding-block: 0;
}
.container-header nav { margin-top: 0; }
.container-header .navbar { padding: 0; }

/*
 * Main menu. These rules target what every core Menu layout shares
 * (ul.mod-menu > li > a), so the header looks the same whichever layout
 * the module uses: Default, Dropdown (metismenu) or Collapsible (metismenu).
 * Cassiopeia's own underline pseudo-elements are switched off and replaced by one.
 */
.container-header .container-nav .mod-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0 1.75rem;
  margin: 0;
  padding: 0;
  color: var(--e2-ink);
  list-style: none;
}
.container-header .container-nav .mod-menu > li,
.container-header .container-nav .mod-menu > li + li { display: flex; margin: 0; padding: 0; }
.container-header .container-nav .mod-menu > li::after,
.container-header .container-nav .mod-menu > li > a::after,
.container-header .container-nav .mod-menu > li > button::before { content: none; }
.container-header .container-nav .mod-menu > li > a,
.container-header .container-nav .mod-menu > li > span {
  display: flex;
  align-items: center;
  padding: 0;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--e2-ink);
  text-decoration: none;
}
.container-header .container-nav .mod-menu > li > a:hover { color: var(--e2-blue); text-decoration: none; }
.container-header .container-nav .mod-menu > li.active > a,
.container-header .container-nav .mod-menu > li > a[aria-current="page"] { font-weight: 650; color: var(--e2-navy); }

@media (min-width: 992px) {
  /* the menu fills the header's height; the active page gets a bar on the header's bottom edge */
  .container-header .container-nav > nav,
  .container-header .navbar-collapse,
  .container-header .container-nav .mod-menu,
  .container-header .container-nav .mod-menu > li,
  .container-header .container-nav .mod-menu > li > a { height: 100%; }
  .container-header .container-nav .mod-menu { flex-wrap: nowrap; }
  .container-header .container-nav .mod-menu > li.active > a,
  .container-header .container-nav .mod-menu > li > a[aria-current="page"] { text-decoration: none; box-shadow: inset 0 -4px 0 var(--e2-saffron); }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  .container-header { column-gap: 1.25rem; }
  .container-header .site-description { max-width: 16rem; font-size: .95rem; }
  .container-header .container-nav .mod-menu { column-gap: 1.1rem; }
  .container-header .container-nav .mod-menu > li > a { font-size: 1rem; }
}
.container-header .navbar-toggler {
  padding: .45rem .65rem;
  color: var(--e2-navy);
  border: 1px solid var(--e2-rule);
  border-radius: 4px;
}
.container-header .navbar-toggler:focus { box-shadow: none; }

@media (max-width: 991.98px) {
  .container-header { flex-wrap: wrap; }
  .container-header > .grid-child { padding: .75rem 0; }
  .container-header .brand-logo img { width: 3.25rem; height: 3.25rem; }
  .container-header .site-description { max-width: 15rem; font-size: .9rem; }

  /* Collapsible layout: a toggle button opens a full-width panel */
  .container-header:has(.navbar-toggler) { flex-wrap: nowrap; }
  .container-header .container-nav:has(.navbar-toggler) { align-self: center; }
  .container-header .container-nav .navbar { position: static; justify-content: flex-end; }
  .container-header .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 0 max(16px, env(safe-area-inset-right, 0px)) .5rem max(16px, env(safe-area-inset-left, 0px));
    background: var(--e2-paper);
    border-bottom: 1px solid var(--e2-rule);
  }
  .container-header .navbar-collapse.show { display: block !important; }
  /* Core "Collapsible Default" expands from 768px (navbar-expand-md); keep its button
     until 992px like Cassiopeia's version, since the full menu doesn't fit beside the title */
  .container-header .navbar-expand-md .navbar-toggler { display: block; }
  .container-header .navbar-expand-md .navbar-collapse:not(.show):not(.collapsing) { display: none !important; }
  .container-header .navbar-collapse .mod-menu { display: block; }
  .container-header .navbar-collapse .mod-menu > li { border-top: 1px solid var(--e2-rule); }
  .container-header .navbar-collapse .mod-menu > li > a { width: 100%; padding: .8rem 0; }

  /* Default and Dropdown layouts: the links wrap on a row under the logo */
  .container-header .container-nav:not(:has(.navbar-toggler)) {
    flex-basis: 100%;
    justify-content: flex-start;
    padding: .7rem 0 .8rem;
    border-top: 1px solid var(--e2-rule);
  }
  .container-header .container-nav:not(:has(.navbar-toggler)) .mod-menu { justify-content: flex-start; gap: .35rem 1.25rem; }
  .container-header .container-nav:not(:has(.navbar-toggler)) .mod-menu > li > a { font-size: 1rem; }

  .container-header .container-nav .mod-menu > li.active > a,
  .container-header .container-nav .mod-menu > li > a[aria-current="page"] {
    text-decoration: underline;
    text-decoration-color: var(--e2-saffron);
    text-decoration-thickness: 3px;
    text-underline-offset: .35em;
  }
}
@media (max-width: 420px) {
  .container-header .site-description { max-width: 14rem; font-size: .8rem; }
}

/* ---------- Page grid: the same width as the header ---------- */
body.wrapper-static .site-grid,
body.wrapper-fluid .site-grid {
  grid-template-columns:
    [full-start] minmax(var(--e2-gutter), 1fr)
    [main-start] repeat(4, minmax(0, calc((var(--e2-wrap) - 2 * var(--e2-gutter)) / 4)))
    [main-end] minmax(var(--e2-gutter), 1fr) [full-end];
  column-gap: 0;
}
.site-grid { padding-block: 2rem clamp(3rem, 7vw, 6rem); }
.container-component > main { min-width: 0; }

.mod-breadcrumbs__wrapper .breadcrumb {
  padding: 0;
  margin: 0 0 1.75rem;
  font-size: .95rem;
  background: none;
}
/* the module adds Bootstrap's px-3 py-2 utilities, which are !important */
.mod-breadcrumbs__wrapper .breadcrumb.px-3 { padding: 0 !important; }
.mod-breadcrumbs__wrapper .mod-breadcrumbs__divider { display: none; }
.mod-breadcrumbs__wrapper .breadcrumb a { color: var(--e2-muted); }
.mod-breadcrumbs__wrapper .breadcrumb-item.active { color: var(--e2-muted); }

/* ---------- Articles ---------- */
.com-content-article .page-header { margin-bottom: 1.5rem; }
.com-content-article .page-header h1 { margin: 0; max-width: 24ch; font-size: clamp(2.3rem, 4.2vw, 3.4rem); }
.com-content-article__body > * { max-width: var(--e2-text); }
.com-content-article__body > h2 { margin: 3.5rem 0 1rem; }
.com-content-article__body > h2:first-child { margin-top: 0; }
.com-content-article__body > p { margin-bottom: 1.1rem; }
.com-content-article__body ul { padding-left: 1.2rem; }
.com-content-article__body li { margin-bottom: .45rem; }
.com-content-article__body li::marker { color: var(--e2-blue); }
.com-content-article__body .e2-arms,
.com-content-article__body .e2-partners,
.com-content-article__body .e2-pathway,
.com-content-article__body .e2-team { padding-left: 0; }

.e2-lede {
  font: 400 clamp(1.3rem, 2vw, 1.55rem)/1.45 var(--e2-serif);
  color: var(--e2-navy);
}
.com-content-article__body > .e2-lede { max-width: 46rem; margin-bottom: 2.5rem; }

/* Wide figures: banner photographs, diagrams, photo sets */
.com-content-article__body > .e2-wide,
.com-content-article__body > .e2-photos,
.com-content-article__body > .e2-pathway,
.com-content-article__body > .e2-arms,
.com-content-article__body > .e2-contacts { max-width: none; }
.e2-wide { margin: 2.5rem 0 3rem; }
.e2-wide img { display: block; width: 100%; }
.com-content-article__body > .e2-banner { max-width: 62.5rem; }
.e2-banner img { aspect-ratio: 21 / 9; object-fit: cover; }
.e2-banner--end { margin-top: 4rem; }
@media (max-width: 767.98px) {
  .e2-banner { margin-inline: calc(var(--e2-gutter) * -1); }
  .e2-banner img { aspect-ratio: 4 / 3; }
  .e2-banner figcaption { padding-inline: var(--e2-gutter); }
}

/* A photograph in the right-hand margin beside the text it belongs to */
.e2-aside { margin-bottom: 1.5rem; }
@media (min-width: 1100px) {
  .com-content-article__body > .e2-aside {
    float: right;
    clear: right;
    width: calc(100% - var(--e2-text) - 4rem);
    max-width: 26rem;
    margin: .4rem 0 1.5rem;
  }
}
.com-content-article__body > h2 { clear: both; }

/* Pull quotations within an article */
.e2-pull {
  position: relative;
  margin: 2.25rem 0;
  font-family: var(--e2-serif);
  color: var(--e2-navy);
}
.e2-pull p {
  margin: 0;
  font-size: clamp(1.4rem, 2.2vw, 1.75rem);
  line-height: 1.35;
}
.e2-pull::before {
  content: "\201C";
  position: absolute;
  top: -.15em;
  left: -.55em;
  font: 600 4.5rem/1 var(--e2-serif);
  color: var(--e2-saffron);
}
@media (max-width: 767.98px) {
  .e2-pull { padding-top: 2.25rem; }
  .e2-pull::before { top: -.1em; left: 0; font-size: 4rem; }
}

/* The three arms of the trial */
.e2-arms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem 2.5rem;
  margin: 1.75rem 0 1rem;
  padding: 0;
  list-style: none;
}
.com-content-article__body .e2-arms li {
  margin: 0;
  padding-top: 1.1rem;
  color: var(--e2-muted);
  border-top: 3px solid var(--e2-navy);
}
.e2-arms li:nth-child(2) { border-top-color: var(--e2-blue); }
.e2-arms li:nth-child(3) { border-top-color: var(--e2-rule); }
.e2-arms strong {
  display: block;
  margin-bottom: .35rem;
  font: 600 1.35rem/1.25 var(--e2-serif);
  color: var(--e2-navy);
}
@media (max-width: 767.98px) {
  .e2-arms { grid-template-columns: minmax(0, 1fr); }
}

/* The impact pathway, drawn with the diagram's own illustrations */
.e2-pathway-title { margin-top: 3rem; }
.e2-pathway {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.5rem 1.25rem;
  margin: 1.75rem 0 1.5rem;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
/* the line the stages sit on */
.e2-pathway::before {
  content: "";
  position: absolute;
  top: 3.5rem;
  left: 3.5rem;
  right: 3.5rem;
  height: 2px;
  background: var(--e2-rule);
}
.com-content-article__body .e2-pathway > li { position: relative; margin: 0; font-size: .95rem; line-height: 1.4; color: var(--e2-muted); }
.e2-pathway img {
  display: block;
  position: relative;
  width: 7rem;
  height: 7rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--e2-paper);
  box-shadow: 0 0 0 6px var(--e2-paper);
}
.e2-pathway strong {
  display: block;
  margin-bottom: .5rem;
  font: 600 1.1rem/1.25 var(--e2-serif);
  color: var(--e2-navy);
}
.com-content-article__body .e2-pathway ul { margin: 0; padding: 0; list-style: none; }
.com-content-article__body .e2-pathway ul li { margin: 0 0 .5rem; }
.e2-pathway-note { font-size: .95rem; color: var(--e2-muted); }
@media (max-width: 1099.98px) {
  .e2-pathway { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 1.5rem; }
  .e2-pathway::before { content: none; }
}
@media (max-width: 599.98px) {
  /* a vertical sequence on phones */
  .e2-pathway { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .e2-pathway::before { content: ""; top: 2.5rem; bottom: 2.5rem; left: 2.5rem; right: auto; width: 2px; height: auto; }
  .com-content-article__body .e2-pathway > li { display: grid; grid-template-columns: 5rem minmax(0, 1fr); column-gap: 1.25rem; }
  .e2-pathway img { grid-row: span 3; width: 5rem; height: 5rem; margin: 0; }
}

/* Photo sets: click to enlarge (user.js) */
.e2-photos {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 2.5rem 1.5rem;
  margin-top: 2.5rem;
}
.e2-photos > figure { grid-column: span 2; }
.e2-photos > figure:nth-child(1) { grid-column: span 4; }
.e2-photos img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.e2-photos > figure:nth-child(1) img,
.e2-photos > figure:nth-child(2) img { height: clamp(14rem, 30vw, 26rem); aspect-ratio: auto; }
.e2-photos .e2-zoom {
  display: block;
  width: 100%;
  padding: 0;
  cursor: zoom-in;
  background: none;
  border: 0;
}
@media (max-width: 767.98px) {
  .e2-photos { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .e2-photos > figure,
  .e2-photos > figure:nth-child(1) { grid-column: auto; }
  .e2-photos > figure:nth-child(1) img,
  .e2-photos > figure:nth-child(2) img { height: auto; aspect-ratio: 4 / 3; }
}

.e2-viewer {
  width: min(92vw, 70rem);
  max-height: 92vh;
  padding: 0;
  color: #fff;
  background: transparent;
  border: 0;
}
.e2-viewer::backdrop { background: rgb(8 20 38 / .92); }
.e2-viewer img { display: block; max-width: 100%; max-height: 78vh; margin: 0 auto; }
.e2-viewer p { margin: .9rem 0 0; font-size: 1rem; text-align: center; color: rgb(255 255 255 / .85); }
.e2-viewer__bar { display: flex; justify-content: center; gap: .75rem; margin-top: 1rem; }
.e2-viewer button {
  min-width: 2.75rem;
  padding: .5rem .9rem;
  font: 600 .95rem var(--e2-sans);
  color: #fff;
  cursor: pointer;
  background: transparent;
  border: 1px solid rgb(255 255 255 / .5);
  border-radius: 4px;
}
.e2-viewer button:hover,
.e2-viewer button:focus-visible { background: rgb(255 255 255 / .12); outline-color: #fff; }

.e2-more::after { content: " \2192"; }

/* ---------- Full-width pages (Home) ----------
 * Any article that contains <section class="e2-hero"> or <section class="e2-s"> runs the
 * full width of the window, and each section keeps its content to the page width.
 * No menu setting is needed; the Page Class "e2-home" does the same, for a page
 * that should be full width without those sections.
 */
:is(body.e2-home, body:has(.e2-hero, .e2-s)) .site-grid { padding-block: 0; }
:is(body.e2-home, body:has(.e2-hero, .e2-s)) .container-component > main { margin: 0; }
:is(body.e2-home, body:has(.e2-hero, .e2-s)) .site-grid > .container-component { grid-column-start: full-start; grid-column-end: full-end; }
:is(body.e2-home, body:has(.e2-hero, .e2-s)) .com-content-article__body > * { max-width: none; }
:is(body.e2-home, body:has(.e2-hero, .e2-s)) .com-content-article__body > p:empty { display: none; }
:is(body.e2-home, body:has(.e2-hero, .e2-s)) .footer { margin-top: 0; }
/* the cover holds the page's h1, so the article title and breadcrumbs step aside */
.com-content-article:has(.e2-hero) > .page-header { display: none; }
.container-component:has(.e2-hero) .mod-breadcrumbs__wrapper { display: none; }

.e2-s {
  padding-block: clamp(4rem, 8vw, 7rem);
  padding-left: max(var(--e2-gutter), calc((100% - var(--e2-wrap)) / 2 + var(--e2-gutter)));
  padding-right: max(var(--e2-gutter), calc((100% - var(--e2-wrap)) / 2 + var(--e2-gutter)));
}
.e2-s > :first-child { margin-top: 0; }
.e2-s > :last-child { margin-bottom: 0; }
.e2-s h2 { margin-bottom: 1.25rem; font-size: clamp(1.9rem, 3.2vw, 2.6rem); }

/*
 * Cover: one navy band across the window. The title sits on the left; the photograph
 * fills the right-hand side, flush with the band's top, bottom and right edge, and is
 * never shown wider than its file (the field photos are 1000px wide).
 */
.e2-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(62.5rem, 55%);
  align-items: center;
  padding-left: max(var(--e2-gutter), calc((100% - var(--e2-wrap)) / 2 + var(--e2-gutter)));
  color: #fff;
  background: var(--e2-navy);
}
.e2-hero__photo { grid-column: 2; grid-row: 1; align-self: stretch; margin: 0; }
.e2-hero__photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: clamp(24rem, 38vw, 36rem);
  object-fit: cover;
  object-position: 50% 62%;
}
.e2-hero__panel {
  grid-column: 1;
  grid-row: 1;
  padding: clamp(2.5rem, 5vw, 4.5rem) clamp(2rem, 4vw, 4rem) clamp(2.5rem, 5vw, 4.5rem) 0;
}
.e2-hero__panel h1 {
  max-width: 22ch;
  margin: 0 0 1.25rem;
  font-size: clamp(1.75rem, 2.6vw, 2.5rem);
  line-height: 1.14;
  color: #fff;
}
.e2-hero__panel p { max-width: 34rem; margin: 0; font-size: 1.15rem; color: rgb(255 255 255 / .85); }
@media (max-width: 899.98px) {
  .e2-hero { display: block; padding: 0; }
  .e2-hero__photo img { height: auto; min-height: 0; aspect-ratio: 4 / 3; }
  .e2-hero__panel { padding: 2rem var(--e2-gutter) 2.5rem; }
}

.e2-intro {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 2rem 4rem;
  align-items: start;
}
.e2-statement {
  margin: 0;
  font: 400 clamp(1.5rem, 2.6vw, 2.1rem)/1.32 var(--e2-serif);
  color: var(--e2-navy);
}
.e2-intro__detail { color: var(--e2-muted); }
.e2-intro__detail p:last-child { margin-bottom: 0; }
@media (max-width: 899.98px) { .e2-intro { grid-template-columns: minmax(0, 1fr); } }

/* Why millets: photograph to the left edge of the window, text beside it */
.e2-split {
  display: grid;
  grid-template-columns: min(62.5rem, 50%) minmax(0, 1fr);
  gap: 2rem 4rem;
  align-items: center;
  padding-left: 0;
  background: var(--e2-mist);
}
.e2-split__photo img { display: block; width: 100%; height: clamp(20rem, 40vw, 36rem); object-fit: cover; }
.e2-split__photo figcaption { padding-left: var(--e2-gutter); }
/* the text block sits at the end of its column, in line with the page's right edge; the text itself stays start-aligned */
.e2-split__text { justify-self: end; width: 100%; max-width: 36rem; }
@media (max-width: 899.98px) {
  .e2-split { grid-template-columns: minmax(0, 1fr); padding: 0 0 4rem; }
  .e2-split__photo img { height: auto; aspect-ratio: 3 / 2; }
  .e2-split__text { padding-inline: var(--e2-gutter); }
}

.e2-film {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 2.5rem 4rem;
  align-items: center;
  color: rgb(255 255 255 / .85);
  background: #08213f;
}
.e2-film h2 { color: #fff; }
.e2-film a { color: #9fcbee; }
.e2-film a:hover { color: #fff; }
.e2-film .e2-video { margin: 0; }
@media (max-width: 899.98px) { .e2-film { grid-template-columns: minmax(0, 1fr); } }

.e2-people-strip > p { max-width: 44rem; color: var(--e2-muted); }
.e2-partners {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: 1rem 2.5rem;
  margin: 2rem 0;
  padding: 0;
  list-style: none;
}
.com-content-article__body .e2-partners li {
  margin: 0;
  font: 600 1.15rem/1.35 var(--e2-serif);
  color: var(--e2-navy);
}

/* The video: a still with a play button; user.js swaps in the player on click */
.com-content-article__body > .e2-video { max-width: 46rem; margin-top: 1rem; }
.e2-video > a,
.e2-video iframe {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: var(--e2-navy);
}
.e2-video > a img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.e2-video > a::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5rem;
  height: 5rem;
  margin: -2.5rem 0 0 -2.5rem;
  background: var(--e2-navy);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgb(255 255 255 / .9);
  transition: background-color .15s;
}
.e2-video > a::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -.95rem 0 0 -.55rem;
  border-style: solid;
  border-width: .95rem 0 .95rem 1.6rem;
  border-color: transparent transparent transparent #fff;
}
.e2-video > a:hover::before,
.e2-video > a:focus-visible::before { background: var(--e2-blue); }
.e2-video > a::before,
.e2-video > a::after { pointer-events: none; }
/* once a player is in the figure (after the click, or embedded by an editor) the
   play button goes, so it never covers YouTube's own controls */
.e2-video:has(iframe, video) > a::before,
.e2-video:has(iframe, video) > a::after { content: none; }
.e2-video iframe,
.e2-video video { position: relative; z-index: 1; display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }

/* ---------- Team and contact ---------- */
.com-content-article__body > .e2-team { max-width: none; padding: 0; }
.e2-team {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 1.5rem 2.5rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}
.com-content-article__body .e2-team li { margin: 0; color: var(--e2-muted); line-height: 1.45; }
.e2-team strong {
  display: block;
  margin-bottom: .15rem;
  font: 600 1.25rem/1.3 var(--e2-serif);
  color: var(--e2-navy);
}

.e2-contacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 2.5rem 4rem;
  max-width: 52rem;
}
.e2-contacts > div > * { margin: 0 0 .6rem; }
.e2-contacts h2 { font-size: 1.6rem; }

/* ---------- Footer (Cassiopeia .container-footer) ---------- */
.container-footer.footer {
  margin-top: 0;
  color: var(--e2-ink);
  background: var(--e2-mist);
  background-image: none;
  border-top: 1px solid var(--e2-rule);
}
.container-footer .grid-child {
  display: block;
  max-width: var(--e2-wrap);
  padding: 2.5rem var(--e2-gutter) 2rem;
}
.container-footer.footer a:not(.btn) { color: var(--e2-blue); }
.container-footer.footer a:not(.btn):hover,
.container-footer.footer a:not(.btn):focus { color: var(--e2-navy); }
.e2-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .25rem 3rem;
  align-items: center;
  font-size: .95rem;
  color: var(--e2-muted);
}
.e2-footer p { margin: 0; }
.e2-footer__logos {
  grid-row: span 2;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  align-items: center;
}
.e2-footer__logos a { display: block; }
.e2-footer__logos img { display: block; width: auto; height: 3.75rem; }
@media (max-width: 767.98px) {
  .e2-footer { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .e2-footer__logos { grid-row: auto; margin-bottom: 1rem; }
  .e2-footer__logos img { height: 3.25rem; }
}
/*
 * Footer menu (Cookie settings, Privacy & Cookies, Accessibility, Sitemap…): any core Menu
 * module in the footer position, shown as one row under the logos. Works with every
 * core layout; a "Cookie settings" item rendered as a button is styled as a link too.
 */
.container-footer.footer .mod-menu {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: .5rem 1.75rem;
  margin: 1.75rem 0 0;
  padding: 1.25rem 0 0;
  font-size: .95rem;
  list-style: none;
  border-top: 1px solid var(--e2-rule);
}
.container-footer.footer .mod-menu > li { display: block; margin: 0; padding: 0; font-size: inherit; line-height: 1.5; }
.container-footer.footer .mod-menu > li::after,
.container-footer.footer .mod-menu > li > a::after { content: none; }
.container-footer.footer .mod-menu > li > span { color: var(--e2-muted); }
.container-footer.footer .mod-menu button {
  padding: 0;
  font: inherit;
  color: var(--e2-blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
  cursor: pointer;
  background: none;
  border: 0;
}
.container-footer.footer .mod-menu button:hover { color: var(--e2-navy); text-decoration-thickness: 2px; }
.container-footer .navbar { padding: 0; }
.container-footer .navbar-toggler { display: none; }
.container-footer .navbar-collapse { display: block !important; }
.back-to-top-link { color: #fff; background: var(--e2-navy); border-color: var(--e2-navy); }
.back-to-top-link:hover,
.back-to-top-link:focus { color: #fff; background: var(--e2-blue); border-color: var(--e2-blue); }

@media (prefers-reduced-motion: reduce) {
  .e2-video > a::before { transition: none; }
}
