/* Shared layout for every page: base type, header, sections, the fluid grid, blocks,
   footer, mobile menu, cookie dialog and reveal motion. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--purple);
  font-family: var(--body-font-font-family);
  font-weight: var(--body-font-font-weight);
  font-size: var(--fs-normal);
  line-height: var(--body-font-line-height);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
:root {
  --logo-h: 68px;
  --header-pad-y: 2.3vw;
  --header-pad-x: max(4vw, calc((100vw - var(--maxPageWidth)) / 2));
  --header-h: calc(var(--logo-h) + 2 * var(--header-pad-y));
}
@media (max-width: 1023px) {
  :root {
    --logo-h: min(84px, calc(66vw / 5.9524));
    --header-pad-y: 6vw;
    --header-pad-x: 6vw;
  }
}
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
  background: var(--purple);
  color: var(--white);
  padding: var(--header-pad-y) var(--header-pad-x);
  transition: background-color .4s cubic-bezier(.4, 0, .2, 1);
}
.skip-link {
  position: absolute; left: -9999px; top: 21px;
  background: var(--accent); color: var(--white);
  font-family: var(--header-button-font-font-family); font-weight: 500; font-size: var(--fs-normal);
  padding: 6.4px 16px; border-radius: 300px;
}
.skip-link:focus { left: 16px; }
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--logo-h);
}
.header-nav { display: flex; align-items: center; gap: 1.2em; font-size: var(--fs-normal); }
.nav-link {
  color: var(--white);
  text-decoration: none;
  line-height: 1.6;
  padding: .1em 0;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 calc(100% - .1em) / 0 1px;
  transition: background-size .25s cubic-bezier(.2, .6, .3, 1);
}
.nav-link:hover, .nav-link[aria-current="page"] { background-size: 100% 1px; }
.header-logo { display: block; height: var(--logo-h); }
.header-logo img { height: 100%; width: auto; }
.header-actions { display: flex; justify-content: flex-end; align-items: center; }
.header-social { display: block; width: 20px; height: 20px; color: var(--white); }
.header-social svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.burger { display: none; }

@media (max-width: 1023px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .header-nav, .header-actions { display: none; }
  /* --logo-h already caps the logo at 75% of the header width */
  .header-logo img { height: var(--logo-h); max-width: none; }
  .burger {
    display: block;
    grid-column: 2;
    background: none; border: 0; cursor: pointer;
    padding: 1px 6px;
    color: var(--white);
  }
  .burger-box { position: relative; display: block; width: 35px; height: 35px; }
  .bun {
    position: absolute; left: 0; width: 100%; height: 1px;
    background: currentColor;
    transition: transform .25s ease, top .25s ease;
  }
  .bun--top { top: 12px; }
  .bun--bottom { top: 23px; }
}

/* ---------- sections and the fluid grid ---------- */
main, footer { display: block; }
.sec {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--min-h, auto);
  color: var(--text);
}
.sec--small { --min-h: 33vh; }
.sec--medium { --min-h: 66vh; }
.sec--top { justify-content: flex-start; }
.sec--first { padding-top: var(--header-h); }
.sec--small.sec--middle { --pad-t: 3.3vmax; --pad-b: 3.3vmax; }
.sec--small.sec--top { --pad-t: var(--pagePadding); --pad-b: 6.6vmax; }
.sec--medium.sec--middle { --pad-t: 6.6vmax; --pad-b: 6.6vmax; }
.sec-content { position: relative; width: 100%; padding: var(--pad-t, 0) 0 var(--pad-b, 0); }
.sec-bg { position: absolute; inset: 0; overflow: hidden; background: var(--bg); }
.sec-bg img { width: 100%; height: 100%; object-fit: cover; }
.sec-overlay { position: absolute; inset: 0; background: var(--overlay, var(--bg)); }

.theme-white, .theme-white-bold { --bg: var(--white); --text: var(--purple); --heading: var(--purple); --link: var(--black); }
.theme-light { --bg: var(--white); --text: var(--black); --heading: var(--black); --link: var(--black); }
.theme-light-bold { --bg: var(--light-bold-bg); --overlay: var(--white); --text: var(--black); --heading: var(--black); --link: var(--black); }
.theme-dark { --bg: var(--purple); --text: var(--white); --heading: var(--white); --link: var(--white); }

.fe {
  --gutter: calc(var(--sqs-mobile-site-gutter) - var(--fe-gap));
  --cell: calc((var(--maxPageWidth) - var(--fe-gap) * 7) / 8);
  display: grid;
  grid-template-columns: minmax(var(--gutter), 1fr) repeat(8, minmax(0, var(--cell))) minmax(var(--gutter), 1fr);
  grid-template-rows: repeat(var(--rows-m), minmax(24px, auto));
  gap: var(--fe-gap);
  overflow-x: hidden;
  overflow-x: clip;
}
@media (min-width: 768px) {
  .fe {
    --gutter: calc(var(--pagePadding) - var(--fe-gap));
    --cell: calc((var(--maxPageWidth) - var(--fe-gap) * 23) / 24);
    --container: min(var(--maxPageWidth), calc(100vw - var(--pagePadding) * 2));
    grid-template-columns: minmax(var(--gutter), 1fr) repeat(24, minmax(0, var(--cell))) minmax(var(--gutter), 1fr);
    grid-template-rows: repeat(var(--rows-d), minmax(calc(var(--container) * .0215), auto));
  }
}
.fe--gap12 { --fe-gap: 12px; row-gap: 12px; }

/* ---------- blocks ---------- */
.blk {
  grid-area: var(--m);
  z-index: var(--z, 0);
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
@media (min-width: 768px) { .blk { grid-area: var(--d); } }
.blk--center { justify-content: center; }
@media (min-width: 768px) { .blk--center-d { justify-content: center; } }

/* rich text */
.rte { color: var(--text); }
.rte > :first-child { margin-top: 0; }
.rte > :last-child { margin-bottom: 0; }
.rte p { margin: 1rem 0; font-size: var(--fs-normal); line-height: 1.6; white-space: pre-wrap; }
.rte h1, .rte h2, .rte h3, .rte h4 {
  margin: 2rem 0;
  font-family: var(--heading-font-font-family);
  font-weight: var(--heading-font-font-weight);
  color: var(--heading);
  white-space: pre-wrap;
}
.rte h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); }
.rte h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
.rte h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); }
.rte h4 { font-size: var(--fs-h4); line-height: var(--lh-h4); }
.rte .large { font-size: var(--fs-large); }
.rte .small { font-size: var(--fs-small); }
.rte strong { font-weight: 700; }
.rte a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; }
.center { text-align: center; }

/* text on a dark box */
.blk--box {
  background: var(--purple);
  --text: var(--accent);
  --heading: var(--white);
}
.blk--box .rte { padding: var(--box-pad, 7% 10%); }

/* images */
.blk--img { overflow: hidden; }
.blk--img .reveal-box { position: absolute; inset: 0; }
.blk--img img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focal, 50% 50%); }
.blk--contain img { object-fit: contain; }

/* circular portraits: a square that fits the block, centred */
.blk--shape { container-type: size; align-items: center; justify-content: center; }
.shape {
  width: min(100cqw, 100cqh);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}
.shape img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focal, 50% 50%); }

/* button */
.blk--btn .reveal-box { display: flex; flex: 1; }
.btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 0 16px;
  border-radius: 300px;
  background: var(--accent);
  color: var(--white);
  font-size: 1rem; font-weight: 400; letter-spacing: .02em; line-height: 1.2;
  text-decoration: none;
  transition: background-color .17s ease-in-out, opacity .17s ease-in-out;
}
.btn:hover { opacity: .8; }

/* accordion */
.acc { list-style: none; margin: 0; padding: 0; color: var(--purple); --icon-t: 1px; }
.acc-divider { height: 1px; background: var(--purple); }
.acc-title-wrap { margin: 0; font-size: var(--fs-large); line-height: 1.6; }
.acc-btn {
  width: 100%;
  display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center;
  padding: 30px 0;
  background: transparent; border: 0; cursor: pointer; text-align: left;
  font-size: inherit; line-height: normal; color: var(--purple);
}
.acc-title { flex: 1; padding-left: 14px; }
.acc-icon { position: relative; flex: none; width: 14px; height: 14px; color: var(--accent); }
.acc-arrow-box {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  transition: transform .2s;
}
.acc-arrow {
  width: 70.71067%; height: 70.71067%;
  border: solid currentColor; border-width: 0 var(--icon-t) var(--icon-t) 0;
  transform: translateY(-25%) rotate(45deg);
}
.acc-item.is-open .acc-arrow-box { transform: rotate(-180deg); }
.acc-panel[hidden] { display: none; }
.acc-desc { width: 90%; padding-bottom: 30px; color: var(--purple); }
.acc-desc p { margin: 1rem 0; font-size: var(--fs-normal); line-height: 1.6; white-space: pre-wrap; }
.acc-desc p:first-child { margin-top: 0; }
.acc-desc p:last-child { margin-bottom: 0; }
.acc-desc strong { font-weight: 700; }
.acc-desc a { color: var(--black); text-decoration: underline; text-decoration-thickness: 1px; }

/* scaled single-line text: font size follows the block width like Squarespace's scaled text */
.blk--scaled { container-type: inline-size; }
.rte p.scaled { margin: 0; white-space: nowrap; font-size: calc(100cqw / 24.55); }

/* social icon */
.social-icon { display: block; width: 28px; height: 28px; color: var(--black); }
.social-icon svg { display: block; width: 100%; height: 100%; }
.social-icon rect { fill: currentColor; transition: fill .17s ease-in-out; }

/* ---------- footer ---------- */
.footer-logo img { object-position: left center; }

/* ---------- mobile menu ---------- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 15;
  background: var(--white);
  color: var(--black);
  opacity: 0; visibility: hidden;
  transition: opacity .4s cubic-bezier(.4, 0, .2, 1), visibility .4s;
}
/* links are centred in the space between the header and the social row */
.mobile-menu-nav {
  position: absolute; left: 0; right: 0; top: var(--header-h); bottom: 69px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.mobile-menu-nav a {
  display: inline-flex;
  margin: 3vw 5vw;
  color: var(--black);
  text-decoration: none;
  font-size: 8.5vmin;
  line-height: 1;
  transition: opacity .25s cubic-bezier(.4, 0, .2, 1);
}
.mobile-menu-nav a:hover { opacity: .9; }
.mobile-menu-actions { position: absolute; left: 0; right: 0; bottom: 38px; display: flex; justify-content: center; }
.mobile-menu-actions .header-social { width: 26px; height: 26px; color: var(--black); }
body.menu-open { overflow: hidden; }
body.menu-open .mobile-menu { opacity: 1; visibility: visible; }
body.menu-open .site-header { background: transparent; }
body.menu-open .burger { color: var(--black); }
body.menu-open .bun { left: 4px; width: 27px; }
body.menu-open .bun--top { top: 17px; transform: rotate(45deg); }
body.menu-open .bun--bottom { top: 17px; transform: rotate(-45deg); }
@media (min-width: 1024px) { .mobile-menu { display: none; } }

/* ---------- cookie preferences ---------- */
/* like the original, the pill sits at the end of the page, not fixed to the viewport */
.cookie-manager { position: relative; }
.cookie-bar {
  position: absolute; left: 0; bottom: 0; z-index: 30;
  margin: 0 60px;
  padding: 7px 10px;
  border: 0; border-radius: 0;
  background: var(--white); color: var(--black);
  font-size: 12px; line-height: 1.3;
  cursor: pointer;
}
.cookie-modal { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; }
.cookie-modal[hidden] { display: none; }
.cookie-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .8); }
.cookie-panel {
  position: relative;
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 40px;
  background: var(--white);
  color: var(--black);
}
.cookie-close {
  position: absolute; top: 28px; right: 32px;
  width: 16px; height: 16px; padding: 0;
  border: 0; background: none; cursor: pointer;
}
.cookie-close svg { display: block; width: 100%; height: 100%; }
.cookie-title { margin: 3px 0 32px; font-weight: 300; font-size: 24px; line-height: 1.2; color: var(--purple); }
.cookie-row { padding: 0 0 20px; }
.cookie-row + .cookie-row { border-top: 2px solid #c9c9c9; padding-top: 20px; }
.cookie-row-head { display: flex; justify-content: space-between; align-items: center; min-height: 24px; }
.cookie-row-name { font-weight: 300; font-size: 16px; color: var(--purple); }
.cookie-row-state { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.cookie-row p { margin: 14px 0 0; max-width: 490px; font-size: 12px; line-height: 1.35; }
.switch {
  position: relative; width: 28px; height: 16px; padding: 0;
  border: 2px solid var(--black); border-radius: 16px;
  background: var(--black); cursor: pointer;
}
.switch::after {
  content: ""; position: absolute; top: 1px; left: 13px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--white);
  transition: left .15s ease;
}
.switch[aria-checked="false"] { background: var(--white); }
.switch[aria-checked="false"]::after { left: 1px; background: var(--black); }
.cookie-actions { display: flex; justify-content: flex-end; padding-top: 14px; }
.cookie-save {
  padding: 8.5px 16px; border: 0; border-radius: 300px;
  background: var(--accent); color: var(--white);
  font-size: 12px; font-weight: 500; letter-spacing: .02em; cursor: pointer;
}

/* ---------- reveal motion ---------- */
[data-reveal] { transition-timing-function: var(--motion-ease); transition-duration: var(--motion-duration); }
[data-reveal="fade"] { opacity: 0; transition-property: opacity; }
[data-reveal="slide"] { opacity: 0; transform: translate(0, 30%); transition-property: transform, opacity; }
[data-reveal].in { opacity: 1; transform: translate(0, 0); }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

.footer-rights .rte p { color: var(--black); }

