/* vmbut: static rebuild of the Squarespace site.
   Type scale, colours and grid maths follow the original theme so the
   per-page fluid-engine placements (inline <style> in each page) line up. */

:root {
  --sqs-site-gutter: 4vw;
  --sqs-mobile-site-gutter: 6vw;
  --sqs-site-max-width: 1500px;
  --maxPageWidth: 1500px;

  --accent: hsl(226.36 15.28% 28.24%);      /* slate: headings, links */
  --light-accent: hsl(0 0% 92.16%);         /* #ebebeb page background */
  --red: hsl(0 96.23% 31.18%);              /* home page headings */
  --red-xl: hsl(5 100% 35%);

  --font: "Roboto", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --meta-font: "Poppins", var(--font);

  /* Squarespace's fluid type: (size - 1) * 1.2vw + 1rem, capped at the max page width */
  --fs-h1: min(calc(3 * 1.2vw + 1rem), max(calc(3 * 0.012 * var(--maxPageWidth) + 1rem), 4rem));
  --fs-h2: min(calc(1.8 * 1.2vw + 1rem), max(calc(1.8 * 0.012 * var(--maxPageWidth) + 1rem), 2.8rem));
  --fs-h3: min(calc(1.2 * 1.2vw + 1rem), max(calc(1.2 * 0.012 * var(--maxPageWidth) + 1rem), 2.2rem));
  --fs-h4: min(calc(0.6 * 1.2vw + 1rem), max(calc(0.6 * 0.012 * var(--maxPageWidth) + 1rem), 1.6rem));
  --fs-large: min(calc(0.5 * 1.2vw + 1rem), max(calc(0.5 * 0.012 * var(--maxPageWidth) + 1rem), 1.5rem));
  --fs-body: min(calc(0.1 * 1.2vw + 1rem), max(calc(0.1 * 0.012 * var(--maxPageWidth) + 1rem), 1.1rem));
  --fs-small: min(calc(0.6 * 1.2vw + 1rem), max(calc(0.6 * 0.012 * var(--maxPageWidth) + 1rem), 1.6rem));
  --fs-title: min(calc(1 * 1.2vw + 1rem), max(calc(1 * 0.012 * var(--maxPageWidth) + 1rem), 2rem));
}

/* Section themes, as configured on the original site */
[data-theme="white"] {
  --bg: #fff; --title: #000; --nav: #000; --text: #000; --link: var(--accent);
  --h1: var(--red-xl); --h2: #000; --h3: var(--red); --h4: #000;
}
[data-theme="light-bold"] {
  --bg: var(--light-accent); --title: var(--accent); --nav: #000; --text: #000; --link: var(--accent);
  --h1: var(--accent); --h2: var(--accent); --h3: var(--accent); --h4: var(--accent);
}
[data-theme="bright-inverse"] {
  --bg: hsl(60 7.69% 94.9%); --title: var(--accent); --nav: var(--accent); --text: var(--accent); --link: var(--accent);
  --h1: var(--accent); --h2: var(--accent); --h3: var(--accent); --h4: var(--accent);
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 12px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 300;
  font-size: var(--fs-body);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.1vw var(--sqs-site-gutter);
}
.site-title {
  font-weight: 500;
  font-size: var(--fs-title);
  line-height: 1.4;
  color: var(--title);
  text-decoration: none;
}

/* Sections */
.page-section { position: relative; background: var(--bg); }
.page-section[data-theme] { background: var(--bg); color: var(--text); }
.section-height--small { min-height: 33vh; }
.section-height--medium { min-height: 66vh; }
.page-section > .content-wrapper { padding: var(--pad-top, 3.3vmax) 0 var(--pad-bottom, 3.3vmax); }
.section-height--medium > .content-wrapper { padding-top: var(--pad-top, 6.6vmax); padding-bottom: var(--pad-bottom, 6.6vmax); }
/* top-aligned sections start at the site gutter and push the slack to the bottom (2x) */
.vertical-alignment--top > .content-wrapper { padding-top: var(--pad-top, var(--sqs-site-gutter)); }
.section-height--small.vertical-alignment--top > .content-wrapper { padding-bottom: var(--pad-bottom, 6.6vmax); }
.section-height--medium.vertical-alignment--top > .content-wrapper { padding-bottom: var(--pad-bottom, 13.2vmax); }
.section-height--custom { min-height: 1vh; }
.section-height--custom > .content-wrapper { padding-top: var(--pad-top, 0); padding-bottom: var(--pad-bottom, 0); }

/* Fluid-engine blocks (placements come from each page's inline styles) */
.fluid-engine { width: 100%; }
.fe-block { position: relative; min-width: 0; }
.fe-block .sqs-block { height: 100%; width: 100%; display: flex; flex-direction: column; }
.fe-block .sqs-block-alignment-wrapper { display: flex; flex-direction: column; height: 100%; width: 100%; }
.fe-block .sqs-block > .sqs-html-content { width: 100%; }
.sqs-block.image .sqs-block-alignment-wrapper { position: relative; flex: 1; container-type: size; }
.sqs-block.image a { position: absolute; inset: 0; display: block; }
.sqs-block.image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* Contained images: box shrinks to the picture's own ratio, centred in the cell */
.sqs-block.image .contain {
  position: absolute;
  inset: auto;
  top: 50%;
  left: 50%;
  width: min(100cqw, 100cqh * (var(--ar)));
  height: auto;
  aspect-ratio: var(--ar);
  transform: translate(-50%, -50%);
}
.sqs-block.image a.contain img { position: static; }
.sqs-block.image a { transition: opacity .2s; }
.sqs-block.image a:hover { opacity: .7; }

/* Text */
.sqs-html-content > :first-child { margin-top: 0; }
.sqs-html-content > :last-child { margin-bottom: 0; }
.sqs-html-content p, .sqs-html-content h1, .sqs-html-content h2,
.sqs-html-content h3, .sqs-html-content h4 { white-space: pre-wrap; overflow-wrap: break-word; }
.sqs-html-content p { margin: 1rem 0; line-height: 1.8; }
.sqs-html-content p:empty::before { content: "\200b"; }
h1, h2, h3, h4 { font-weight: 500; margin: 2rem 0; }
h1 { font-size: var(--fs-h1); color: var(--h1); line-height: calc(1.4 * (1 + (1 - 4) / 25)); }
h2 { font-size: var(--fs-h2); color: var(--h2); line-height: calc(1.4 * (1 + (1 - 2.8) / 25)); }
h3 { font-size: var(--fs-h3); color: var(--h3); line-height: calc(1.4 * (1 + (1 - 2.2) / 25)); }
h4 { font-size: var(--fs-h4); color: var(--h4); line-height: calc(1.4 * (1 + (1 - 1.6) / 25)); }
.sqsrte-large { font-size: var(--fs-large); }
.sqsrte-small { font-size: var(--fs-small); }
.ta-center { text-align: center; }
.ta-right { text-align: right; }
.sqs-html-content a { color: var(--link); text-underline-offset: .2em; }
.sqs-html-content a:hover { opacity: .7; }
/* Text that stretches to its block's width (site.js sets the size) */
.sqsrte-scaled-text-container { width: 100%; }
.sqsrte-scaled-text { display: inline-block; white-space: nowrap; }
.sqsrte-scaled-text > * { margin: 0; line-height: 1; font-size: inherit; }

/* Video players: poster + play button until clicked (see site.js) */
.player {
  position: relative;
  width: 100%;
  max-height: 100%;
  overflow: hidden;
}
.player[data-youtube] { height: 100%; background: #000; }
.player .poster, .player video, .player iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  border: 0;
  display: block;
}
.player .poster { object-fit: cover; }
.player[data-autoplay] .poster { object-fit: contain; }
.player.is-playing:not([data-autoplay]) { background: #000; }
.player .play {
  position: absolute;
  top: 50%; left: 50%;
  width: clamp(36px, 18%, 64px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: rgba(40, 40, 40, .72);
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.player .play::after {
  content: "";
  position: absolute;
  top: 50%; left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: .45em 0 .45em .75em;
  border-color: transparent transparent transparent #fff;
  font-size: clamp(14px, 1.3vw, 22px);
}
.player:hover .play { background: rgba(20, 20, 20, .88); transform: translate(-50%, -50%) scale(1.06); }
.player.is-playing .play, .player.is-playing .poster { display: none; }
.player[data-autoplay] .play { display: none; }
.player.is-error::after {
  content: "Video unavailable";
  position: absolute; inset: auto 0 0 0;
  padding: .6em;
  color: #fff;
  font-size: 12px;
  text-align: center;
  background: rgba(0, 0, 0, .6);
}

/* Photo reels: full-bleed horizontal strips */
.reel { position: relative; }
.reel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.reel-track::-webkit-scrollbar { display: none; }
.reel-track img {
  height: var(--reel-h, 75vh);
  width: auto;
  max-width: none;
  flex: none;
  scroll-snap-align: start;
  object-fit: contain;
  display: block;
  background: rgba(0, 0, 0, .04);
}
.reel-btn {
  position: absolute;
  top: 50%;
  width: 44px; height: 44px;
  margin-top: -22px;
  border: 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, .72);
  cursor: pointer;
  z-index: 2;
  transition: background .2s;
}
.reel-btn:hover { background: rgba(255, 255, 255, .95); }
.reel-btn.prev { left: 15px; }
.reel-btn.next { right: 15px; }
.reel-btn::before {
  content: "";
  position: absolute; inset: 0;
  background: #000;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cpath d='M32 22H13m7-7-7 7 7 7' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") center / 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cpath d='M32 22H13m7-7-7 7 7 7' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.reel-btn.next::before { transform: scaleX(-1); }

/* Scroll-in animation, as on the original site: fade + slide up over 0.6s */
.js .fe-block > .sqs-block { opacity: 0; transform: translateY(40px); }
.js .fe-block > .sqs-block.in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 767px) {
  /* On phones the original scales type with the screen height instead of its width */
  :root {
    --fs-h1: calc(3 * .012 * min(100vh, 900px) + 1rem);
    --fs-h2: calc(1.8 * .012 * min(100vh, 900px) + 1rem);
    --fs-h3: calc(1.2 * .012 * min(100vh, 900px) + 1rem);
    --fs-h4: calc(.6 * .012 * min(100vh, 900px) + 1rem);
    --fs-large: calc(.5 * .012 * min(100vh, 900px) + 1rem);
    --fs-body: calc(.1 * .012 * min(100vh, 900px) + 1rem);
    --fs-small: calc(.6 * .012 * min(100vh, 900px) + 1rem);
    --fs-title: calc(1 * .012 * min(100vh, 900px) + 1rem);
  }
  .site-header { padding: 0 var(--sqs-mobile-site-gutter); min-height: calc(var(--sqs-mobile-site-gutter) * 2 + 37.2px); }
  .reel-btn { width: 36px; height: 36px; margin-top: -18px; }
  .reel-btn.prev { left: 8px; }
  .reel-btn.next { right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .js .fe-block > .sqs-block { opacity: 1; transform: none; }
}
