/* Paddington Hub — static site styles
   Breakpoints (same as the previous site): tablet <=1024px, mobile <=767px, widescreen >=2400px.
   Between 1025px and ~1440px (laptops) sizes are fluid: see --gap-xl, --h1 and the clamp() values. */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Bomstad Display";
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/BomstadDisplay-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "Bomstad Display";
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/BomstadDisplay-ExtraBold.woff2") format("woff2");
}
@font-face {
  font-family: "Rubik";
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/rubik-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Rubik";
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
  src: url("../fonts/rubik-latin-italic.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --primary: #424a92;
  /* Darker shade of the brand purple, for hover states and dark grounds */
  --primary-dark: #262b5e;
  --cream: #fcfaf9;
  --text: #565656;
  --accent: #20ffaf;
  --periwinkle: #7785ff;
  --lilac: #d0d5ff;
  --card: #f3f3f3;
  --white: #fff;
  --display: "Bomstad Display", sans-serif;
  --body: "Rubik", sans-serif;
  --max: 1500px;
  /* Side margin that frames the content of every section: 60px desktop, 40px tablet, 20-30px mobile */
  --gutter: 60px;
  /* Space between the two columns of a section: shrinks on laptops so the columns keep a readable width */
  --gap-xl: clamp(50px, 7vw, 100px);
  --h1: clamp(46px, 3.6vw, 52px);
  --h3: 26px;
  --h3-lh: 30px;
  --lead: 20px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 22px;
  font-weight: 400;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, figure { margin: 0; }
img { max-width: 100%; height: auto; border: 0; vertical-align: middle; }
a { color: inherit; text-decoration: none; font-weight: 700; }
main { display: block; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 10000; background: var(--white); color: var(--primary); padding: 12px 20px; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--periwinkle); outline-offset: 2px; }
[id] { scroll-margin-top: 0; }

.h-xl { font-family: var(--display); font-weight: 800; font-size: 62px; line-height: 1; color: var(--white); text-wrap: balance; }
.h-lg { font-family: var(--display); font-weight: 800; font-size: var(--h1); line-height: 1; color: var(--primary); }
.h-md { font-family: var(--display); font-weight: 700; font-size: var(--h3); line-height: var(--h3-lh); color: var(--text); }
.eyebrow { font-size: 18px; line-height: 1; font-weight: 400; }
.icon { width: 1em; height: 1em; fill: currentColor; flex: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 15px 30px; border-radius: 10px;
  background: var(--accent); color: var(--primary);
  font: 400 16px/22px var(--body); text-align: center;
  transition: background-color .3s, color .3s;
}
.btn:hover, .btn:focus-visible { background: var(--periwinkle); color: var(--white); }
.btn--primary { background: var(--primary); color: var(--cream); }
.btn--primary:hover, .btn--primary:focus-visible { background: var(--periwinkle); color: var(--accent); }
.btn--square { border-radius: 0; }
.btn--square:hover, .btn--square:focus-visible { background: var(--primary); color: var(--accent); }

/* ---------- Scroll-in animations ---------- */
.js [data-anim] { opacity: 0; }
.js [data-anim].is-in { animation: fadeIn 1.25s both; animation-delay: var(--d, 0ms); }
.js [data-anim="up"].is-in { animation-name: fadeInUp; }
.js [data-anim="down"].is-in { animation-name: fadeInDown; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translate3d(0, 100%, 0); } to { opacity: 1; transform: none; } }
@keyframes fadeInDown { from { opacity: 0; transform: translate3d(0, -100%, 0); } to { opacity: 1; transform: none; } }
@media (max-width: 1024px) {
  .js [data-anim="up"].is-in, .js [data-anim="down"].is-in { animation-name: fadeIn; }
}

/* ---------- Film (home page) ----------
   One screen: the project film as large as the window allows and never cropped, with the logo, title and button around it.
   Landscape windows: logo, title and button share one row under the film, aligned with its edges.
   Portrait windows and phones: everything stacked and centred. */
.film {
  --vh: 100vh;
  --pad-y: clamp(20px, 4.5vh, 48px);
  --gap-y: clamp(16px, 3.4vh, 30px);
  /* Height kept free for everything that is not the film: both paddings, the gap and the row under the film */
  --chrome: calc(2 * var(--pad-y) + var(--gap-y) + 100px);
  display: flex; justify-content: center; align-items: center;
  min-height: var(--vh); padding: var(--pad-y) var(--gutter);
  background: var(--primary);
}
@supports (height: 100svh) {
  .film { --vh: 100svh; }
}
.film__inner {
  /* As wide as the side margins allow, or as wide as the film can be while its height still fits the screen */
  width: min(100%, max((var(--vh) - var(--chrome)) * 16 / 9, 440px), 1920px);
  container-type: inline-size;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "frame frame frame" "logo title more";
  align-items: center; gap: var(--gap-y) clamp(16px, 2vw, 30px);
}
.film__frame {
  grid-area: frame; position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: 10px; overflow: hidden; background: var(--primary-dark);
  box-shadow: 0 24px 60px rgba(20, 23, 61, .45);
}
/* Layers, bottom to top: the video (its poster is a still from the opening), the loading spinner, a clear layer that
   plays or pauses on a click or tap, and our own buttons. Without JavaScript the browser's own controls show instead. */
.film__frame video, .film__shield { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.film__frame video { object-fit: cover; }
.film__shield { cursor: pointer; }
.film__loader {
  position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border: 3px solid rgba(255, 255, 255, .35); border-top-color: var(--white); border-radius: 50%;
  opacity: 0; transition: opacity .3s; animation: spin .9s linear infinite;
}
.film__frame.is-loading .film__loader { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.film__controls {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 10px; padding: clamp(10px, 2.2cqw, 20px);
  pointer-events: none; transition: opacity .4s;
}
.film__controls[hidden] { display: none; }
.film__ctrl {
  pointer-events: auto; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(66, 74, 146, .8); color: var(--white); font-size: 20px; cursor: pointer;
  transition: background-color .3s, color .3s, opacity .3s;
}
.film__ctrl:hover, .film__ctrl:focus-visible { background: var(--accent); color: var(--primary); }
.film__ctrl[hidden] { display: none; }
/* Progress bar: fills the space between the buttons; drag it or click anywhere on it to jump to that point */
.film__seek {
  pointer-events: auto; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 18px;
  border-radius: 22px; background: rgba(66, 74, 146, .8); color: var(--white); transition: opacity .3s;
}
.film__seek:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.film__time { flex: none; font-size: 14px; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
@container (max-width: 560px) {
  .film__time { display: none; }
  .film__seek { padding: 0 14px; }
}
.film__range {
  --p: 0%;
  flex: 1 1 auto; min-width: 0; height: 44px; margin: 0; padding: 0; background: none; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.film__range:focus { outline: none; }
.film__range::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--accent) var(--p), rgba(255, 255, 255, .35) var(--p));
}
.film__range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 14px; height: 14px; margin-top: -5px; border: 0; border-radius: 50%;
  background: var(--accent); transition: transform .2s;
}
.film__range:hover::-webkit-slider-thumb, .film__range:active::-webkit-slider-thumb { transform: scale(1.25); }
.film__range::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .35); }
.film__range::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
.film__range::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--accent); }
/* While the film plays, the controls hide after a few seconds without the pointer moving (so they never sit over the words
   on the film) and come back when the pointer moves, the film is tapped or a control gets keyboard focus */
.film__frame.is-playing.is-idle .film__controls { opacity: 0; }
.film__frame.is-playing.is-idle .film__ctrl, .film__frame.is-playing.is-idle .film__seek { pointer-events: none; }
.film__frame.is-playing.is-idle .film__shield { cursor: none; }
.film__frame.is-playing.is-idle:has(:focus-visible) .film__controls { opacity: 1; }
/* Full screen: the frame fills the screen and the film keeps its proportions inside it */
.film__frame:fullscreen { border-radius: 0; background: #000; }
.film__frame:fullscreen video { object-fit: contain; }
/* Sizes follow the width of the film, so the row under it always fits */
.film__logo { grid-area: logo; width: clamp(56px, 8.5cqw, 110px); }
.film__title {
  grid-area: title; font-family: var(--display); font-weight: 800; font-size: clamp(18px, 3.5cqw, 44px); line-height: 1.05;
  color: var(--white); text-wrap: balance;
}
.film__more { grid-area: more; gap: 10px; padding: 16px 32px; font-size: 18px; white-space: nowrap; }
.film__more .icon { transition: transform .3s; }
.film__more:hover .icon, .film__more:focus-visible .icon { transform: translateX(4px); }
/* Short or narrow landscape screens (phones on their side): a tighter row so the film keeps its size */
@media (max-height: 520px), (max-width: 767px) {
  .film { --chrome: calc(2 * var(--pad-y) + var(--gap-y) + 70px); }
  .film__more { padding: 12px 20px; font-size: 16px; }
}
/* Portrait screens (phones and tablets held upright) */
@media (max-aspect-ratio: 1/1) {
  .film {
    --gap-y: clamp(24px, 4vh, 40px);
    /* logo + title + button, plus the three gaps between the four blocks */
    --chrome: calc(2 * var(--pad-y) + 3 * var(--gap-y) + 290px);
  }
  .film__inner { grid-template-columns: minmax(0, 1fr); grid-template-areas: "logo" "frame" "title" "more"; justify-items: center; }
  .film__logo { width: clamp(100px, 19cqw, 130px); }
  .film__title { font-size: clamp(28px, 6.7cqw, 46px); line-height: 1.1; text-align: center; }
  .film__more { padding: 16px 32px; font-size: 18px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  min-height: calc(100vh + 95px); padding: 40px 0;
  background: var(--primary); overflow: hidden;
}
.hero__media { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero__media::after { content: ""; position: absolute; inset: 0; background: var(--primary); opacity: .81; }
.hero__media img, .hero__media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
/* The video sits over the poster (its first frame) and fades in once it is actually playing */
.hero__media video { opacity: 0; transition: opacity 1s; }
.hero__media video.is-playing { opacity: 1; }
.hero__content {
  position: relative; z-index: 1; width: 100%;
  display: flex; flex-direction: column; align-items: center;
  margin-bottom: 100px; text-align: center;
}
/* Nothing in the hero gets closer to the screen edge than the gutter */
.hero__content > * { max-width: calc(100% - 2 * var(--gutter)); }
.hero__logo { width: 160px; margin-bottom: 60px; }
/* 60% of the screen, but never so narrow that the title needs more than two lines */
.hero__title { width: max(60%, min(100% - 2 * var(--gutter), 860px)); margin-bottom: 60px; }
.hero__lead { width: max(60%, min(100% - 2 * var(--gutter), 800px)); margin-bottom: 60px; font-size: 24px; line-height: 1.3; color: var(--white); }
.hero__explore { display: none; margin-bottom: 30px; font-size: 18px; line-height: 1.4; font-weight: 700; color: var(--white); }
.hero__nav { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 20px; width: 100%; }
/* When the buttons no longer fit in one row they split evenly instead of leaving one on its own:
   four buttons go 2 + 2, five buttons go 3 + 2, six (with the parked "Support Application" one back in) go 3 + 3,
   and on phones they stack one per row */
@media (max-width: 1079px) {
  .hero__nav { width: 500px; }
}
@media (max-width: 1319px) {
  .hero__nav:has(> .btn:nth-of-type(5)) { width: 760px; }
}
@media (max-width: 1599px) {
  .hero__nav:has(> .btn:nth-of-type(6)) { width: 760px; }
}
@media (max-width: 767px) {
  .hero__nav:has(> .btn:nth-of-type(5)) { flex-direction: column; }
}

/* Support page hero + fixed back button */
.topbar { position: fixed; top: 0; left: 0; width: 100%; z-index: 99; display: flex; justify-content: flex-end; padding: 20px var(--gutter); pointer-events: none; }
.topbar .btn { pointer-events: auto; gap: 15px; border-radius: 5px; font-size: 22px; box-shadow: 0 0 10px rgba(0, 0, 0, .35); }
.hero--page { min-height: calc(70vh + 72px); padding-bottom: 23px; }
.hero--page .hero__content { max-width: min(1000px, 100% - 2 * var(--gutter)); margin-bottom: 0; }
.hero--page .hero__content > * { max-width: 100%; }
.hero--page .hero__logo { width: 150px; }
.hero--page .hero__title { width: auto; }
.hero--page .hero__lead { width: 100%; margin-bottom: 30px; }
.hero__arrow { font-size: 30px; color: var(--white); margin-bottom: 6px; }

/* ---------- Intro ---------- */
.intro { position: relative; z-index: 2; display: flex; min-height: 70vh; background: var(--cream); }
/* Text column: about 39% of the screen, but always wide enough for 355px of text; the image takes the rest */
.intro__text {
  --pad: clamp(60px, 6.9vw, 100px);
  flex: 0 0 max(38.7%, calc(355px + 2 * var(--pad)));
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: var(--pad);
}
.intro__text p { margin-bottom: 60px; font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 32px; }
.intro__image {
  flex: 1 1 0; display: flex; justify-content: flex-end; align-items: flex-end; padding: 30px;
  background: #fff center / cover no-repeat;
  background-image: url("../img/cgi-entrance-1600.webp");
}
.tag { display: inline-block; padding: 10px; background: rgba(66, 74, 146, .83); color: var(--white); font-size: 16px; line-height: 22px; font-weight: 400; }

/* ---------- Vision / Development (horizontal scroll on desktop) ---------- */
.story { position: relative; background: var(--white); }
.story__panel { display: flex; gap: 60px; }
.story__figure { flex: none; }
.story__figure a { display: block; cursor: zoom-in; }
.story__figure img { display: block; height: 600px; width: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.story__figure figcaption, .caption { margin-top: 10px; font-size: 14px; line-height: 1.4; font-style: italic; color: var(--primary); }
.story__text { width: 450px; flex: none; display: flex; flex-direction: column; gap: 20px; }
.story__text p + p { margin-top: 22px; }
.story__text--tight p + p { margin-top: 0; }
.story__basin {
  display: flex; align-items: flex-start; justify-content: flex-start; padding: 60px;
  background: 0 0 / cover no-repeat; background-image: url("../img/cgi-basin-1500.webp");
}
.story__progress { display: none; }

@media (min-width: 1025px) {
  .story { padding-top: 60px; height: calc(100vh + var(--story-x, 0px)); }
  .story__sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }
  .story__track { display: flex; width: max-content; height: 100%; will-change: transform; }
  /* Vertical sizes follow the screen height, so the image and its caption are never cut off on short laptop screens */
  .story__panel { --top: clamp(60px, 16.7vh, 150px); flex: none; min-height: 100vh; padding: var(--top) 100px clamp(40px, 11vh, 100px); }
  .story__figure img { height: min(600px, calc(100vh - var(--top) - 130px)); }
  .story__panel--offset .story__text { margin-top: clamp(40px, 22.2vh, 200px); }
  .story__panel--basin { padding: 0; }
  .story__basin { width: 1000px; min-height: 1100px; }
  .story__progress {
    display: block; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px;
    background: #ff0; transform-origin: left; transform: scaleX(var(--story-p, 0));
    opacity: 0; transition: transform .1s linear;
  }
  .story.is-pinned .story__progress { opacity: 1; }
}

/* ---------- Proposals ---------- */
.proposals { position: relative; z-index: 2; padding: 0 var(--gutter); background: var(--primary); }
.proposals__inner { max-width: var(--max); margin: 0 auto; padding: 150px 0; display: flex; flex-direction: column; align-items: center; gap: 100px; }
.section-head { width: 100%; display: flex; flex-direction: column; gap: 20px; text-align: center; color: var(--white); }
.section-head .h-lg { color: inherit; }
/* Bento grid: 2 wide cards over 3 narrow ones; rows stretch so there are no holes */
.cards { width: 100%; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 30px; }
.card {
  grid-column: span 4; container-type: inline-size;
  display: flex; flex-direction: column; gap: 15px; padding: 30px; border-radius: 10px; background: var(--cream);
}
.card--a { grid-column: span 5; }
.card--b { grid-column: span 7; }
.card__head { display: flex; align-items: center; gap: 20px; }
.card__icon { flex: none; }
.card__icon img { width: 100px; }
/* Each card adapts to its own width, whatever the screen */
@container (min-width: 520px) {
  .card__icon img { width: 130px; }
}
@container (max-width: 339px) {
  .card__head { flex-direction: column; align-items: flex-start; }
  .card__icon img { width: 110px; }
}
@media (max-width: 1399px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card, .card--a, .card--b { grid-column: auto; }
  .card--c { grid-column: 1 / -1; }
}
.card p + p { margin-top: 22px; }

/* ---------- Two-column sections (support / archive) ---------- */
.split { position: relative; z-index: 2; padding: 0 var(--gutter); }
.split__inner { max-width: var(--max); margin: 0 auto; display: flex; gap: var(--gap-xl); padding: 100px 0; }
.split__intro .h-lg { margin-bottom: 30px; }
.support { background: var(--lilac); }
.support .split__intro { flex: 0 1 60%; }
.support__actions { flex: 0 1 100%; display: flex; flex-direction: column; gap: 60px; }
.support__action { display: flex; flex-direction: column; align-items: flex-start; }
.support__action .h-md { margin-bottom: 30px; }
.support__action .btn { margin-top: 30px; }

.aerial {
  position: sticky; top: 0; z-index: 0;
  display: flex; justify-content: flex-end; align-items: flex-start;
  min-height: 700px; padding: var(--gutter);
  background: center / cover no-repeat; background-image: url("../img/cgi-aerial-1600.webp");
}

.archive { background: var(--cream); }
.archive .split__inner { padding-bottom: 50px; }
.archive .split__intro { flex: 0 1 45%; color: var(--primary); }
.archive__list { flex: 0 1 60%; display: flex; gap: 30px; }

.tile {
  flex: 1 1 0; display: flex; flex-direction: column; gap: 20px; padding: 30px;
  border-radius: 10px; background: var(--card); color: var(--primary); font-weight: 400;
  transition: transform .4s;
}
.tile:hover, .tile:focus-visible { transform: scale(1.03); }
.tile img { width: 100%; border-radius: 10px; }
.tile .h-md { color: var(--primary); }
.tile__title { font-size: var(--lead); line-height: 1.4; font-weight: 700; }

/* ---------- Key documents ---------- */
.docs { position: relative; z-index: 2; padding: 100px var(--gutter) 0; background: var(--white); color: var(--primary); }
.docs__inner { max-width: var(--max); margin: 0 auto; }
.docs__head { display: flex; align-items: center; gap: 40px; }
.docs__head > * { flex: 1 1 50%; }
.docs__head .h-lg { margin-bottom: 30px; }
/* Always full rows: 4 across on desktop, 2 x 2 on tablet, 1 per row on mobile */
.docs__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; padding: 100px 0; }

/* Laptops: tighter tiles so four documents (and both board tiles) fit comfortably */
@media (min-width: 1025px) and (max-width: 1439px) {
  .archive__list, .docs__list { gap: clamp(16px, 2vw, 30px); }
  .archive__list .tile, .docs__list .tile { padding: clamp(18px, 2vw, 30px); gap: 16px; }
  .tile .h-md { font-size: clamp(20px, 1.8vw, 26px); line-height: 1.15; }
}

/* ---------- Support page ---------- */
.email { display: flex; justify-content: center; background: var(--lilac); }
.email__inner { width: max(60%, min(100% - 2 * var(--gutter), 900px)); display: flex; gap: var(--gap-xl); padding: 100px 0; }
/* Never narrower than its longest word ("Westminster") */
.email__title { flex: 0 1 45%; min-width: min-content; }
.email__title .h-lg { color: var(--text); }
.email__body { flex: 0 1 60%; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; }
.email__body .btn { margin-top: 30px; }
.reasons-head { padding: 100px var(--gutter) 0; align-items: center; color: var(--primary); background: var(--white); }
.reasons-head .h-lg { width: 40%; }
.reasons { padding: 0 var(--gutter); }
/* 65% of the screen, kept between a comfortable minimum and a readable maximum line length */
.reasons__inner { max-width: clamp(min(100%, 860px), 65%, 1200px); margin: 0 auto; padding: 100px 0; display: flex; flex-direction: column; gap: 60px; }
.reason { display: flex; align-items: center; gap: 40px; min-height: 170px; }
.reason__icon img { width: 215px; max-width: 100%; }
.reason__text { flex: 0 1 100%; display: flex; flex-direction: column; gap: 20px; font-size: 18px; line-height: 1.4; }
.reason__text h3 { font-size: var(--lead); line-height: 1.4; font-weight: 700; }

/* ---------- Footer ---------- */
.footer {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  min-height: 150px; padding: 30px var(--gutter); background: var(--primary); color: var(--cream);
}
.footer__brand { flex: 0 1 30%; }
.footer__brand img { width: 100px; }
.footer__meta { flex: 0 1 35%; display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; }
.footer__credit { font-size: 14px; line-height: 1.5; color: var(--white); }
.footer__credit a { color: var(--accent); }
/* Phone and email stacked: one column pushed to the right edge, rows left-aligned so the icons line up */
.footer__contact { flex: 0 1 30%; display: grid; justify-content: end; justify-items: start; gap: 12px; }
.footer__contact a { display: flex; align-items: center; gap: 15px; font-weight: 400; text-align: left; transition: color .3s; }
.footer__contact a:hover { color: var(--accent); }

/* ---------- Dialogs: announcement + lightbox ---------- */
.modal {
  position: fixed; inset: 0; z-index: 9999; display: flex; justify-content: center; align-items: center;
  background: rgba(0, 0, 0, .8); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal__box {
  position: relative; width: 640px; max-width: 100%; max-height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding: 60px 40px 40px;
  background: var(--cream); box-shadow: 2px 8px 23px 3px rgba(0, 0, 0, .2);
}
.modal.is-open .modal__box { animation: fadeIn 1.25s both; }
.modal__close {
  position: absolute; top: 20px; right: 20px; display: flex; padding: 2px; border: 2px solid #1f2124;
  background: var(--white); color: #1f2124; font-size: 15px; cursor: pointer; margin: -4px;
}
.modal .h-lg { color: var(--text); }
.modal .h-md { color: var(--primary); }
.modal .btn { border-radius: 5px; }
.badge { padding: 6px 15px 5px; border-radius: 5px; background: var(--accent); font-size: 18px; line-height: 1.4; font-weight: 400; }

.lightbox { background: rgba(0, 0, 0, .8); cursor: zoom-out; padding: 40px; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 0 30px rgba(0, 0, 0, .3); }
.lightbox .modal__close { top: 24px; right: 24px; border: 0; background: none; color: var(--white); font-size: 26px; }

/* ---------- Cookie notice ---------- */
.cookies {
  position: fixed; left: 40px; bottom: 40px; z-index: 9998; width: 440px; max-width: calc(100% - 32px);
  padding: 20px 27px 21px; background: var(--white); color: #212121; border: 1px solid #f4f4f4;
  box-shadow: 0 -1px 10px rgba(172, 171, 171, .3); border-radius: 6px; font-size: 14px; line-height: 24px;
}
.cookies[hidden] { display: none; }
.cookies h2 { margin-bottom: 12px; font-size: 18px; line-height: 24px; font-weight: 700; }
.cookies__actions { display: flex; gap: 8px; margin-top: 16px; }
.cookies button {
  flex: 1; padding: 8px; border: 2px solid var(--primary); border-radius: 2px; background: none; color: var(--primary);
  font: 500 14px/24px var(--body); cursor: pointer; transition: border-color .3s, background-color .3s, color .3s;
}
.cookies button[data-consent="granted"] { background: var(--primary); color: var(--white); }
/* Hover: the darker shade of the brand purple */
.cookies button:hover, .cookies button:focus-visible { border-color: var(--primary-dark); color: var(--primary-dark); }
.cookies button[data-consent="granted"]:hover, .cookies button[data-consent="granted"]:focus-visible { background: var(--primary-dark); color: var(--white); }

/* ---------- Widescreen ---------- */
@media (min-width: 2400px) {
  :root { --max: 1600px; }
  .intro__text { --pad: 150px; }
  /* The two ways to support sit side by side, so the section fills its width */
  .support .split__intro { flex-basis: 45%; }
  .support__actions { flex-direction: row; }
  .support__action { flex: 1 1 0; }
  .archive__list { flex-basis: 45%; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  :root { --gutter: 40px; --h1: 46px; --lead: 18px; }
  .h-xl { font-size: 46px; line-height: 1.1; }
  .h-lg { line-height: 1.1; }
  .section-head .h-lg, .split__intro .h-lg, .docs__head .h-lg { line-height: 1; }

  .hero { min-height: 80vh; padding: 60px 0; }
  .hero__content { margin-bottom: 0; }
  .hero__logo, .hero--page .hero__logo { width: 130px; }
  .hero__title, .hero__lead { width: 100%; }
  .hero--page .hero__title { width: auto; }
  .hero--page .hero__lead { width: 90%; }
  .hero__explore { display: block; }
  .hero__nav { gap: 15px; }
  .hero--page { min-height: calc(70vh + 72px); }

  .intro { flex-wrap: wrap; }
  .intro__text, .intro__image { flex-basis: 100%; }
  .intro__text { padding: 40px var(--gutter); }
  .intro__text p { margin-bottom: 40px; }
  .intro__image { min-height: 400px; }

  .story { display: flex; flex-direction: column; gap: 60px; padding: 60px var(--gutter); }
  .story__sticky, .story__track { display: contents; }
  .story__panel { flex-direction: column; gap: 15px; }
  .story__text { order: -1; width: 100%; margin-bottom: 30px; }
  .story__figure { text-align: center; }
  .story__figure img { height: 400px; display: inline-block; max-width: 100%; }
  .story__figure figcaption { text-align: left; }
  .story__basin { min-height: 600px; padding: 30px; background-position: center; background-image: url("../img/cgi-basin-800.webp"); }

  .proposals__inner { padding: 60px 0; gap: 60px; }

  .split { padding: 0; }
  .split__inner { flex-wrap: wrap; gap: 0; padding: 0; }
  .support .split__intro, .archive .split__intro { flex-basis: 100%; padding: 60px var(--gutter) 0; }
  .support__actions { gap: 0; }
  .support__action { padding: 30px var(--gutter); }
  .archive .split__inner { padding-bottom: 0; }
  .archive .split__intro { padding-bottom: 60px; }
  .archive__list { flex-basis: 100%; padding: 0 var(--gutter) 60px; }

  .docs { padding-top: 0; }
  .docs__head { flex-direction: column; align-items: stretch; gap: 0; padding: 60px 0; }
  .docs__list { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 0 60px; }

  .email__inner { width: 100%; flex-wrap: wrap; gap: 0; padding: 0; }
  .email__title, .email__body { flex-basis: 100%; padding: 60px var(--gutter); }
  .reasons-head { padding-top: 60px; }
  .reasons-head .h-lg { width: 80%; }
  .reasons__inner { max-width: none; padding: 60px 0; gap: 10px; }
  .reason { min-height: 150px; }

  .footer { flex-direction: column; padding: 50px var(--gutter) 30px; }
  .footer__brand { display: none; }
  .footer__meta, .footer__contact { flex-basis: auto; width: 100%; justify-content: center; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  :root { --gutter: clamp(20px, 6.4vw, 30px); --h1: 30px; --h3: 20px; --h3-lh: 1.14; }
  .h-xl { font-size: 28px; }

  .hero { min-height: 90vh; justify-content: flex-end; padding: 30px 0; }
  .hero__content { margin-bottom: 30px; }
  .hero__logo, .hero--page .hero__logo { width: 100px; margin-bottom: 30px; }
  .hero__title { margin-bottom: 30px; }
  .hero__lead, .hero--page .hero__lead { width: 100%; margin-bottom: 30px; font-size: 18px; }
  .hero__explore { margin-bottom: 20px; }
  .hero__nav { gap: 15px; }
  .hero--page { min-height: calc(100vh - 0px); padding-bottom: 30px; }
  .hero--page .hero__content { margin-bottom: 60px; }
  .topbar { padding: 10px var(--gutter) 15px; }
  .topbar .btn { padding: 15px; font-size: 16px; }

  .intro__text { padding: 40px var(--gutter); }
  .intro__text p { margin-bottom: 30px; font-size: 20px; line-height: 1.14; }
  .intro__image { min-height: 300px; padding: var(--gutter); }
  .tag { padding: 10px 20px; text-align: left; }

  .story { gap: 30px; padding: 40px var(--gutter); }
  .story__panel { gap: 30px; }
  .story__text { margin-bottom: 0; }
  .story__figure img { width: 100%; height: 250px; }
  .story__panel--offset { gap: 15px; }
  .story__panel--offset .story__text { margin-bottom: 30px; }
  .story__panel:first-child .story__figure { margin-bottom: 15px; }
  .story__basin { min-height: 500px; padding: 15px; }

  .proposals__inner { padding: 40px 0; gap: 30px; }
  .section-head { text-align: left; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card, .card--c { grid-column: auto; padding: 25px; gap: 0; }
  .card__head { flex-direction: column; align-items: flex-start; margin-bottom: 20px; }
  .card__icon img { width: 130px; }

  .support .split__intro, .archive .split__intro { padding: 40px var(--gutter) 0; }
  .support__action { padding: 30px var(--gutter) 20px; }
  .support__action + .support__action { padding: 20px var(--gutter) 40px; }
  .support__action .h-md { margin-bottom: 20px; }
  .aerial { min-height: 300px; align-items: flex-end; }
  .archive__list { flex-direction: column; padding: 40px var(--gutter); }
  .tile { padding: 20px; }

  .docs { padding: 0 var(--gutter) 60px; }
  .docs__head { padding: 40px 0 30px; }
  .docs__list { grid-template-columns: minmax(0, 1fr); padding: 0; }

  .email__title { padding: 40px var(--gutter) 0; }
  .email__body { padding: 40px var(--gutter); }
  .reasons-head { padding: 40px var(--gutter) 0; align-items: flex-start; }
  .reasons-head .h-lg { width: 100%; }
  .reasons__inner { padding: 30px 0; gap: 30px; }
  .reason { flex-direction: column; align-items: flex-start; gap: 0; }
  .reason__icon img { width: 130px; }

  .footer { padding: 40px var(--gutter) 24px; }
  .footer__contact { display: none; }

  .modal__box { padding: 56px var(--gutter) var(--gutter); gap: 16px; }
  .lightbox { padding: 16px; }
  .cookies { left: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .js [data-anim] { opacity: 1; animation: none !important; }
  .tile, .btn, .film__more .icon, .cookies button, .film__ctrl, .film__controls, .film__range::-webkit-slider-thumb { transition: none; }
  .film__loader { animation-duration: 2.5s; }
  .modal.is-open .modal__box { animation: none; }
}
