/*
 * C-Accelerate+ public site (2026 redesign). One stylesheet, no framework.
 * Sizes scale between the mobile (390px) and desktop (1440px) designs of the Claude Design canvas.
 * Brand: orange #FF6801, browns #4C1F00 / #662900, tints #FFE0CC / #FFEFE5, Titillium Web.
 */

:root {
  --orange: #ff6801;
  --brown: #4c1f00;
  --brown-2: #662900;
  --peach: #ffe0cc;
  --cream: #ffefe5;
  --grey: #f2f2f2;
  --ink: #0d0500;
  --muted: #7a4a2a;
  --white: #fff;
  --radius: 8px;
  --content: 1296px;
  --gutter: clamp(20px, 5vw, 72px);
  /* Left/right inset that lines a full-bleed row up with the container. */
  --edge: max(var(--gutter), calc((100% - var(--content)) / 2));
  --header: 88px;
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font: 'Titillium Web', 'Segoe UI', system-ui, sans-serif;
}

@media (max-width: 991px) {
  :root {
    --header: 68px;
  }
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--brown);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
dl,
dd {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

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

img {
  height: auto;
}

a {
  color: inherit;
}

a:hover {
  color: var(--brown-2);
}

button {
  font: inherit;
  color: inherit;
}

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

.visually-hidden {
  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: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--brown);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
  color: var(--white);
}

.container {
  width: min(100% - 2 * var(--gutter), var(--content));
  margin-inline: auto;
}

.container--text {
  width: min(100% - 2 * var(--gutter), 800px);
}

/* ------------------------------------------------------------------ type */

.display,
.h2,
.event-title,
.page-title,
.card-title,
.h4 {
  font-weight: 700;
  text-transform: uppercase;
}

.display {
  font-size: clamp(46px, 31.9px + 3.62vw, 84px);
  line-height: 0.95;
  letter-spacing: -0.01em;
}

.h2 {
  font-size: clamp(38px, 29.8px + 2.1vw, 60px);
  line-height: 1;
  letter-spacing: -0.01em;
}

.event-title,
.page-title {
  font-size: clamp(40px, 28.1px + 3.05vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.card-title {
  font-size: clamp(24px, 22.5px + 0.38vw, 28px);
  line-height: 1.05;
}

.h4 {
  font-size: clamp(20px, 19.3px + 0.19vw, 22px);
  line-height: 1.1;
}

.lead {
  font-size: clamp(18px, 17.3px + 0.19vw, 20px);
  line-height: 1.5;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
}

.eyebrow p,
.label {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow p {
  font-size: 16px;
}

.label {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 767px) {
  .eyebrow {
    gap: 12px;
  }

  .eyebrow svg {
    width: 54px;
    height: 18px;
  }

  .eyebrow p {
    font-size: 14px;
  }
}

/* ------------------------------------------------------------------ buttons, chips, links */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border: 2px solid var(--brown);
  background: transparent;
  color: var(--brown);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.button svg {
  flex-shrink: 0;
}

.button--primary {
  background: var(--orange);
  border-color: var(--orange);
}

.button--primary:hover,
.button--outline:hover {
  background: var(--brown);
  border-color: var(--brown);
  color: var(--white);
}

.button--dark {
  background: var(--brown);
  color: var(--white);
}

.button--dark:hover {
  background: var(--brown-2);
  border-color: var(--brown-2);
  color: var(--white);
}

.button--block {
  width: 100%;
  padding: 0 20px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.chip--dark {
  background: var(--brown);
  color: var(--white);
}

.chip--light {
  background: var(--peach);
}

.chip--white {
  align-self: flex-start;
  background: var(--white);
  color: var(--brown);
}

.chip--now {
  background: var(--brown);
  color: var(--white);
}

.chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
}

.flag {
  display: inline-block;
  width: 18px;
  height: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.card-link,
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
}

.card-link svg {
  transition: transform 0.2s var(--ease-out);
}

.text-link {
  min-height: 48px;
  font-size: 18px;
}

.media-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--brown-2);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--peach);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header);
  padding: 0 var(--gutter);
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin: 0 auto;
}

.site-header__home {
  display: flex;
  align-items: center;
  height: 48px;
  flex-shrink: 0;
}

.site-header__wordmark {
  width: auto;
  height: 40px;
}

.site-header__name {
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.site-nav__link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
}

.site-nav__link:hover,
.site-nav__link[aria-current] {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

.site-nav__link[aria-current] {
  font-weight: 700;
}

.site-nav__funding {
  display: none;
}

.site-header__funding {
  width: auto;
  height: 40px;
  flex-shrink: 0;
}

.menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: var(--orange);
  color: var(--brown);
  cursor: pointer;
}

.menu-button__close,
.site-header.is-open .menu-button__open {
  display: none;
}

.site-header.is-open .menu-button__close {
  display: contents;
}

.menu-button__open {
  display: contents;
}

@media (max-width: 1199px) {
  .site-header__funding {
    display: none;
  }
}

@media (max-width: 991px) {
  .site-header__bar {
    padding: 0 12px 0 20px;
  }

  .site-header__wordmark {
    height: 30px;
  }

  .menu-button {
    display: inline-flex;
  }

  /* The menu as a full-height panel under the header. */
  .js .site-nav {
    position: fixed;
    inset: var(--header) 0 0;
    display: none;
    flex-direction: column;
    gap: 40px;
    padding: 16px 20px 40px;
    overflow-y: auto;
    background: var(--white);
  }

  .js .site-header.is-open .site-nav {
    display: flex;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__link {
    min-height: 64px;
    padding: 0;
    border-bottom: 1px solid var(--peach);
    font-size: 28px;
    font-weight: 700;
    text-transform: uppercase;
  }

  .site-nav__funding {
    display: block;
    width: 100%;
    max-width: 320px;
  }

  /* Without JavaScript the links wrap under the logo. */
  html:not(.js) .site-header__bar {
    flex-wrap: wrap;
    height: auto;
    padding-block: 10px;
  }

  html:not(.js) .site-nav {
    order: 3;
    width: 100%;
  }

  html:not(.js) .site-nav__list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0 20px;
  }

  html:not(.js) .site-nav__link {
    min-height: 44px;
    border: 0;
    font-size: 17px;
  }

  html:not(.js) .menu-button,
  html:not(.js) .site-nav__funding {
    display: none;
  }
}

html.menu-open {
  overflow: hidden;
}

/* ------------------------------------------------------------------ sections */

/* Old Webflow anchors (#projects, #about-us) kept working for existing links. */
.anchor-alias {
  display: block;
  height: 0;
}

.section {
  padding: 112px 0;
}

.section--cream {
  background: var(--cream);
}

.section--ruled {
  border-top: 1px solid var(--peach);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 760px;
  margin-bottom: 48px;
}

.section-head--row {
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
  gap: 48px;
  max-width: none;
}

.section-head--row > div {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
}

@media (max-width: 767px) {
  .section {
    padding: 64px 0 56px;
  }

  .section-head {
    gap: 12px;
    margin-bottom: 32px;
  }

  .section-head--row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .section-head--row > div {
    gap: 12px;
  }
}

/* ------------------------------------------------------------------ hero */

.hero {
  padding: 96px 0 112px;
}

.hero__head {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 72px;
}

.hero__title,
.hero__intro {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.film {
  position: relative;
  margin-top: 48px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink);
  /* Scroll effect (v2.js sets --film-scale): grows from half size to full width. */
  transform: scale(var(--film-scale, 1));
  transform-origin: 100% 0;
}

.film.is-tracking {
  transition: transform 0.5s var(--ease-out);
}

.film__poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
}

.film__play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 104px;
  height: 104px;
  padding: 0 0 0 6px;
  border: 0;
  border-radius: 50%;
  background: var(--orange);
  color: var(--brown);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), background-color 0.2s;
}

.film__play:hover {
  transform: translate(-50%, -50%) scale(1.06);
}

.film-dialog {
  width: min(1200px, 92vw);
  max-height: 90vh;
  padding: 0;
  border: 0;
  overflow: visible;
  aspect-ratio: 16 / 9;
  background: var(--ink);
}

.film-dialog::backdrop {
  background: rgba(13, 5, 0, 0.88);
}

.film-dialog__frame,
.film-dialog__frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.film-dialog__close {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--white);
  cursor: pointer;
}

.film-dialog__close:focus-visible {
  outline-color: var(--white);
}

@media (max-width: 767px) {
  .hero {
    padding: 40px 0 56px;
  }

  .hero__head {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .hero__title,
  .hero__intro {
    gap: 22px;
  }

  .hero__intro .button-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding-top: 4px;
  }

  .film {
    margin-top: 34px;
  }

  .film__play {
    width: 72px;
    height: 72px;
    padding-left: 4px;
  }

  .film__play svg {
    width: 28px;
    height: 28px;
  }
}

/* ------------------------------------------------------------------ open calls */

.call-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  list-style: none;
}

.call-card {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  height: 100%;
  min-height: 340px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--brown);
  text-decoration: none;
  transition: box-shadow 0.2s;
}

.call-card:hover {
  color: var(--brown);
  box-shadow: 0 12px 28px rgba(76, 31, 0, 0.14);
}

.call-card:hover .card-link svg,
.past-card:hover .card-link svg,
.quick-link:hover svg {
  transform: translateX(4px);
}

.call-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.call-card__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
}

.call-card__body > p {
  font-size: 16px;
  line-height: 1.5;
}

.call-card .card-link {
  margin-top: auto;
}

@media (max-width: 1099px) {
  .call-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .call-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .call-card__media {
    aspect-ratio: 16 / 9;
  }

  .call-card__media .media-fallback svg {
    width: 120px;
    height: 40px;
  }

  .call-card__body {
    gap: 12px;
    padding: 20px;
  }
}

/* Nothing open */

.nothing-open {
  padding: 96px 0;
}

.nothing-open__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: 64px;
}

.nothing-open .section-head {
  margin: 0;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
}

.quick-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  min-height: 168px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--brown);
  text-decoration: none;
  transition: box-shadow 0.2s;
}

.quick-link:hover {
  color: var(--brown);
  box-shadow: 0 12px 28px rgba(76, 31, 0, 0.14);
}

.quick-link__text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 16px;
  line-height: 1.4;
}

.quick-link__label {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}

.quick-link svg {
  margin-top: auto;
  transition: transform 0.2s var(--ease-out);
}

@media (max-width: 991px) {
  .nothing-open__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 767px) {
  .nothing-open {
    padding: 56px 0;
  }

  .quick-links {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .quick-link {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 76px;
    padding: 14px 18px;
  }

  .quick-link__text {
    gap: 0;
    font-size: 15px;
  }

  .quick-link__label {
    font-size: 18px;
  }

  .quick-link svg {
    margin-top: 0;
  }
}

/* ------------------------------------------------------------------ updates */

.update-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  list-style: none;
}

.update {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.update__image,
.update__video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  overflow: hidden;
}

.update__video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ------------------------------------------------------------------ network: partners + map */

.network {
  padding: 96px 0;
  background: var(--network-bg, var(--orange));
}

.network.is-tracking {
  transition: background-color 0.5s ease-out;
}

.network__head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: end;
  gap: 72px;
}

.network__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.network__intro p {
  font-size: 18px;
  line-height: 1.5;
}

.network__body {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: 'partners map';
  align-items: center;
  gap: 56px;
  margin-top: 56px;
}

.network__map {
  grid-area: map;
}

.partners {
  grid-area: partners;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.partners__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.partners__hint {
  font-size: 15px;
}

@media (hover: none) {
  .partners__hint {
    display: none;
  }
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
}

.partner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 116px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--brown);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--peach);
  transition: box-shadow 0.2s, transform 0.2s var(--ease-out);
}

.partner:hover,
.partner.is-active {
  color: var(--brown);
  box-shadow: inset 0 0 0 2px var(--brown), 0 10px 22px rgba(76, 31, 0, 0.2);
  transform: translateY(-3px);
}

.partner__logo {
  width: auto;
  max-width: 132px;
  max-height: 52px;
  min-height: 0;
  object-fit: contain;
  margin: auto 0;
}

.partner__country {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.partner__country .flag {
  width: 16px;
  height: 11px;
}

/* The map (src/site/map.ts). Colours, animation and hover states live here. */

.map {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
}

.map__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.map__borders {
  fill: none;
  stroke: var(--brown);
  stroke-opacity: 0.4;
  stroke-width: 0.6;
  stroke-linejoin: round;
}

.map__land {
  fill: var(--white);
}

.map__outline {
  fill: var(--brown);
  fill-opacity: 0;
  stroke: var(--brown);
  stroke-opacity: 0.5;
  stroke-width: 1.2;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 1;
  transition: fill-opacity 0.25s, stroke-opacity 0.25s;
}

.map__outline.is-lit {
  fill-opacity: 0.85;
  stroke-opacity: 1;
}

.map__line {
  fill: none;
  stroke: var(--brown);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 0 8;
  opacity: 0.7;
  animation: caFlow 0.6s linear infinite;
  transition: opacity 0.25s, stroke-width 0.25s;
}

.map.has-lit .map__line {
  opacity: 0.12;
}

.map.has-lit .map__line.is-lit {
  opacity: 1;
  stroke-width: 3;
}

.map__markers {
  position: absolute;
  inset: 0;
}

.marker {
  position: absolute;
  width: 0;
  height: 0;
}

.marker__pop {
  position: absolute;
  left: 0;
  top: 0;
  transition: transform 0.25s var(--ease-out);
}

.marker.is-lit .marker__pop {
  transform: scale(1.35);
}

.marker__pulse,
.marker__ring,
.marker__flag {
  position: absolute;
  border-radius: 50%;
}

.marker__pulse {
  left: -16px;
  top: -16px;
  width: 32px;
  height: 32px;
  background: var(--brown);
  opacity: 0.3;
}

.marker__ring {
  left: -12px;
  top: -12px;
  width: 24px;
  height: 24px;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(76, 31, 0, 0.3);
  transition: box-shadow 0.25s;
}

.marker.is-lit .marker__ring {
  box-shadow: 0 0 0 3px var(--brown);
}

.marker__flag {
  left: -10px;
  top: -10px;
  width: 20px;
  height: 20px;
  max-width: none;
  object-fit: cover;
}

.marker__label {
  position: absolute;
  left: 0;
  bottom: 18px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transform: translateX(-50%);
}

.marker.is-lit .marker__label {
  font-weight: 700;
}

/* Plays out once the section is in view (v2.js adds .is-played); without JS it just shows. */
.js .map:not(.is-played) .map__outline {
  stroke-dashoffset: 1;
}

.js .map:not(.is-played) .map__line-wrap,
.js .map:not(.is-played) .marker {
  opacity: 0;
}

.map.is-played .map__outline {
  animation: caDraw 1.5s var(--ease-out) both;
}

.map.is-played .map__line-wrap {
  animation: caFade 1s ease both;
  animation-delay: calc(0.5s + var(--i) * 0.1s);
}

.map.is-played .marker {
  animation: caPop 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: calc(0.8s + var(--i) * 0.1s);
}

.map.is-played .marker__label {
  animation: caFade 0.8s ease both;
  animation-delay: calc(1s + var(--i) * 0.1s);
}

.map.is-played .marker__pulse {
  animation: caPulse 2.5s ease-out infinite;
  animation-delay: var(--pulse-delay, 0s);
}

@keyframes caDraw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes caFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes caFlow {
  to {
    stroke-dashoffset: -16;
  }
}

@keyframes caPop {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.2);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes caPulse {
  from {
    transform: scale(1);
    opacity: 0.35;
  }
  to {
    transform: scale(1.8);
    opacity: 0;
  }
}

@media (max-width: 991px) {
  .network__head {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .network__body {
    grid-template-columns: 1fr;
    grid-template-areas: 'map' 'partners';
    gap: 24px;
    margin-top: 32px;
  }
}

@media (max-width: 767px) {
  .network {
    padding: 56px 0 64px;
  }

  .network__intro {
    align-items: stretch;
  }

  .network__intro p {
    font-size: 17px;
  }

  .partner-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .partner {
    height: 108px;
    padding: 12px;
  }

  .partner__logo {
    max-width: 130px;
    max-height: 50px;
  }

  .map__line {
    stroke-width: 3;
    stroke-dasharray: 0 12;
  }

  .marker__pulse {
    display: none;
  }

  .marker__ring {
    left: -10px;
    top: -10px;
    width: 20px;
    height: 20px;
  }

  .marker__flag {
    left: -8px;
    top: -8px;
    width: 16px;
    height: 16px;
  }

  .marker__label {
    bottom: 13px;
    font-size: 11px;
  }
}

/* ------------------------------------------------------------------ sliders (past events, news) */

.slider-track {
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0 var(--edge);
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--edge);
  scrollbar-width: none;
}

.slider-track::-webkit-scrollbar {
  display: none;
}

.slide {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.slider-buttons {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.slider-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  background: var(--brown-2);
  color: var(--white);
  cursor: pointer;
  transition: background-color 0.2s;
}

.slider-button:hover:not(:disabled) {
  background: var(--brown);
}

.slider-button:disabled {
  background: var(--peach);
  color: var(--brown-2);
  cursor: default;
}

.slider-status {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
}

.slider-status__count {
  display: none;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.progress {
  position: relative;
  display: block;
  flex-grow: 1;
  height: 4px;
  overflow: hidden;
  background: var(--peach);
}

.progress__bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar, 100%);
  background: var(--brown-2);
  transform: translateX(var(--bar-x, 0));
}

/* Everything fits: no buttons, no progress. */
[data-slider].is-static .slider-buttons,
[data-slider].is-static .slider-status {
  display: none;
}

.past-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 410px;
  height: 500px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
}

.past-card:hover {
  color: var(--white);
}

.past-card--plain {
  background: var(--brown-2);
}

.past-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  transition: opacity 0.3s, transform 0.6s var(--ease-out);
}

.past-card:hover .past-card__image {
  opacity: 0.6;
  transform: scale(1.03);
}

.past-card__mark {
  position: absolute;
  top: 40px;
  left: 28px;
  line-height: 0;
}

.past-card__body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
}

.past-card__summary {
  font-size: 16px;
  line-height: 1.5;
}

.post {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--brown);
  text-decoration: none;
}

.post__image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  transition: opacity 0.2s;
}

.post:hover .post__image {
  opacity: 0.85;
}

.post__date {
  font-size: 14px;
  font-weight: 600;
  color: var(--brown-2);
}

.post__caption {
  font-size: 17px;
  line-height: 1.4;
}

/* Desktop news: the latest four in a row. */
@media (min-width: 768px) {
  .news-track {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
  }

  .news-track .slide:nth-child(n + 5) {
    display: none;
  }

  .news__status {
    display: none;
  }
}

@media (max-width: 767px) {
  .slider-track {
    gap: 12px;
  }

  #past .slider-buttons {
    display: none;
  }

  .slider-status {
    margin-top: 28px;
  }

  .news__status .slider-status {
    margin-top: 24px;
  }

  .slider-status__count {
    display: block;
  }

  .past-card {
    width: 310px;
    height: 440px;
  }

  .past-card__body {
    gap: 10px;
    padding: 20px;
  }

  .past-card .card-link {
    display: none;
  }

  .news-track .slide {
    width: 290px;
  }

  .post {
    gap: 10px;
  }

  .post__caption {
    font-size: 16px;
  }
}

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

.site-footer {
  padding: 80px 0 48px;
  border-top: 1px solid var(--peach);
}

.site-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr);
  gap: 48px;
}

.site-footer__about {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.site-footer__logo {
  width: auto;
  height: 64px;
}

.site-footer__about p {
  max-width: 560px;
  font-size: 15px;
  line-height: 1.6;
}

.site-footer__links ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
}

.site-footer__links a {
  display: flex;
  align-items: center;
  min-height: 36px;
  font-size: 16px;
  text-decoration: none;
}

.site-footer__links a:hover {
  text-decoration: underline;
}

.socials {
  display: flex;
  gap: 4px;
  list-style: none;
}

.socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--peach);
}

.site-footer__legal {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
}

.site-footer__legal a {
  font-weight: 600;
}

.credit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}

.credit svg {
  flex-shrink: 0;
}

.credit:hover {
  color: var(--brown);
}

@media (max-width: 767px) {
  .site-footer {
    padding: 48px 0 40px;
  }

  .site-footer__top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .site-footer__logo {
    width: 100%;
    max-width: 320px;
    height: auto;
  }

  .site-footer__links ul {
    gap: 0;
  }

  .site-footer__links a {
    min-height: 44px;
    font-size: 17px;
  }

  .socials a {
    width: 48px;
    height: 48px;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-top: 32px;
    padding-top: 20px;
  }

  .site-footer__legal {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .site-footer__legal a,
  .credit {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .site-footer__legal a {
    font-size: 15px;
  }
}

/* ------------------------------------------------------------------ event page */

.event-hero {
  padding: 40px 0 88px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
}

.event-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: 72px;
  margin-top: 32px;
}

.event-hero__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
}

/* Each status: a word, a colour and (while it still leads somewhere) a dot. */
.status--open,
.status--upcoming {
  background: var(--orange);
}

.status--tba,
.status--closed {
  background: var(--peach);
}

.status--now {
  background: var(--brown);
  color: var(--white);
}

.status--past {
  background: var(--grey);
}

.status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brown);
}

.status--now .status__dot {
  background: var(--orange);
}

/* "Closes in 5 days": a small dark chip, so it reads the same inline or wrapped. */
.countdown {
  display: inline-flex;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--brown);
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
}

.event-facts {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.event-facts > div {
  display: flex;
  align-items: center;
  gap: 14px;
}

.event-facts dt {
  display: flex;
  align-items: center;
}

.event-facts dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  font-size: 20px;
  font-weight: 600;
}

.event-facts .flag {
  width: 22px;
  height: 15px;
}

.event-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding-top: 4px;
}

.event-cta .note {
  margin-top: -4px;
  font-size: 15px;
}

.event-cta__past {
  font-size: 18px;
}

.event-hero__media {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius);
}

.event-hero__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-body {
  padding: 96px 0 112px;
  border-top: 1px solid var(--peach);
}

.event-body__grid {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  align-items: start;
  gap: 72px;
}

.event-details {
  position: sticky;
  top: calc(var(--header) + 24px);
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 28px;
  border: 1px solid var(--peach);
  border-radius: var(--radius);
  background: var(--cream);
}

.event-details dl {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.event-details dt {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.event-details dd {
  margin-top: 2px;
  font-size: 18px;
}

.event-details__ended {
  font-size: 16px;
  font-weight: 600;
}

.event-details__buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 991px) {
  .event-hero__grid,
  .event-body__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .event-details {
    position: static;
  }
}

@media (max-width: 767px) {
  .event-hero {
    padding: 16px 0 40px;
  }

  .back-link {
    font-size: 16px;
  }

  .event-hero__grid {
    gap: 28px;
    margin-top: 20px;
  }

  .event-hero__text {
    align-items: stretch;
    gap: 20px;
  }

  .status {
    align-self: flex-start;
    font-size: 14px;
  }

  .event-facts dd {
    font-size: 18px;
  }

  .event-cta {
    align-items: stretch;
  }

  .event-cta .button-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .event-cta .button {
    width: 100%;
  }

  .event-cta .note {
    font-size: 14px;
  }

  .event-body {
    padding: 40px 0 48px;
  }

  .event-details {
    gap: 18px;
    padding: 24px;
  }

  .event-details dd {
    font-size: 17px;
  }
}

/* ------------------------------------------------------------------ rich text (events, pages) */

.rich-text {
  font-size: 18px;
  line-height: 1.65;
}

.rich-text > * + * {
  margin-top: 24px;
}

.rich-text h1,
.rich-text h2,
.rich-text h3 {
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.rich-text h1,
.rich-text h2 {
  font-size: 32px;
}

.rich-text h3 {
  font-size: 24px;
}

.rich-text h4 {
  font-size: 20px;
  line-height: 1.2;
}

.rich-text h5,
.rich-text h6 {
  font-size: 18px;
  line-height: 1.3;
}

.rich-text > :is(h1, h2, h3, h4, h5, h6):not(:first-child) {
  margin-top: 40px;
}

.rich-text :is(h1, h2, h3, h4, h5, h6) + * {
  margin-top: 16px;
}

.rich-text ul,
.rich-text ol {
  padding-left: 22px;
}

.rich-text li + li {
  margin-top: 12px;
}

.rich-text a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rich-text strong {
  font-weight: 700;
}

.rich-text blockquote {
  margin: 0;
  padding-left: 20px;
  border-left: 4px solid var(--orange);
  font-size: 20px;
}

.rich-text hr {
  border: 0;
  border-top: 1px solid var(--peach);
}

.rich-text figure img {
  display: block;
  border-radius: var(--radius);
}

.rich-text figcaption {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

.rich-text .w-richtext-align-center {
  margin-inline: auto;
  text-align: center;
}

.rich-text .w-richtext-align-center img {
  margin-inline: auto;
}

.rich-text .w-richtext-align-floatleft {
  float: left;
  max-width: 50%;
  margin: 8px 32px 16px 0;
}

.rich-text .w-richtext-align-floatright {
  float: right;
  max-width: 50%;
  margin: 8px 0 16px 32px;
}

.rich-text .w-richtext-align-fullwidth img {
  width: 100%;
}

.rich-text::after {
  content: '';
  display: table;
  clear: both;
}

/* The first paragraph of an event reads as its introduction. */
.event-article > p:first-child {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.45;
}

@media (max-width: 767px) {
  .rich-text {
    font-size: 17px;
  }

  .rich-text > * + * {
    margin-top: 20px;
  }

  .rich-text h1,
  .rich-text h2 {
    font-size: 26px;
  }

  .rich-text h3 {
    font-size: 22px;
  }

  .rich-text .w-richtext-align-floatleft,
  .rich-text .w-richtext-align-floatright {
    float: none;
    max-width: 100%;
    margin: 0;
  }

  .event-article > p:first-child {
    font-size: 20px;
  }
}

/* ------------------------------------------------------------------ text pages, 404 */

.page-hero {
  padding: 96px 0 48px;
}

.page-hero .lead {
  margin-top: 24px;
}

.page-body {
  padding-bottom: 112px;
}

.not-found__main {
  padding: 112px 0;
}

.not-found__main .page-title {
  margin: 24px 0;
}

.not-found__main .lead {
  margin-bottom: 32px;
}

@media (max-width: 767px) {
  .page-hero {
    padding: 48px 0 32px;
  }

  .page-body {
    padding-bottom: 64px;
  }

  .not-found__main {
    padding: 64px 0;
  }
}

/* ------------------------------------------------------------------ reduced motion */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
