/* Bola Motion portfolio (/motion/) | content from the Squarespace /play page (2026-10-27), Plenty Media look.
   Shared reset and reveal rules live in /assets/base.css. */

/* Self-hosted Google Sans Flex (OFL, fonts/OFL-GoogleSansFlex.txt): the site's latin subset, plus a 4 KB file with
   the few glyphs the subset lacks (é in L'Oréal, the lightbox ×; the arrows are inline SVG). The ?v= stamp matches the one
   tools/cache_bust.mjs writes on the preload link, so the preloaded file is the one used. */
@font-face {
  font-family: 'Google Sans Flex';
  src: url('fonts/gsf-var-latin.woff2?v=db6ee3c2') format('woff2-variations'),
       url('fonts/gsf-var-latin.woff2?v=db6ee3c2') format('woff2');
  font-weight: 400 700;
  font-stretch: 100% 120%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0, U+00A9, U+00B7, U+2018-2019, U+201C-201D, U+2022, U+2026, U+2122;
}
@font-face {
  font-family: 'Google Sans Flex';
  src: url('fonts/gsf-extra-glyphs.woff2') format('woff2');
  font-weight: 400 700;
  font-stretch: 100% 120%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+00D7, U+00E9;
}

:root {
  --white: #ffffff;
  --ink: #000000;
  --muted: #56676a;
  --light-1: #f5f6f6;
  --light-2: #d0dbdb;
  --gold: #ce9444;
  --night: #050606;
  --container: 1320px;
  --pad: 20px;
  --gap: 8px;
  --header-h: 64px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font: 'Google Sans Flex', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --contact-accent: #ce9444;
}
@media (min-width: 640px) {
  :root { --pad: 32px; --gap: 10px; --header-h: 76px; }
}

html { scroll-padding-top: calc(var(--header-h) + 12px); background: var(--night); }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
}
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--pad));
  margin-inline: auto;
  padding-inline: var(--pad);
}
.wide { font-stretch: 120%; font-variation-settings: 'wdth' 120; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.3s var(--ease-out), translate 0.3s var(--ease-out);
}
.btn--sm { min-height: 44px; padding: 11px 20px; font-size: 15px; }
.btn--accent { background: var(--ink); color: var(--white); }
.btn--accent:hover { background: var(--gold); color: var(--ink); translate: 0 -2px; box-shadow: 0 12px 26px -14px rgba(0, 0, 0, 0.55); }
html.js .btn--accent[data-reveal] {
  transition: opacity 0.8s var(--ease-out) var(--delay, 0ms), transform 0.9s var(--ease-out) var(--delay, 0ms),
    background-color 0.25s ease, color 0.25s ease, box-shadow 0.3s var(--ease-out), translate 0.3s var(--ease-out);
}

/* ---------- header ---------- */
.mhead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.mhead.is-scrolled { border-bottom-color: #e3e8e8; }
.mhead__inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.mhead__brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; margin-right: auto; }
.mhead__mark { width: 26px; height: 26px; }
.mhead__name { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.mhead__nav { display: none; gap: 28px; }
.mhead__nav a { text-decoration: none; font-weight: 500; color: var(--muted); transition: color 0.2s ease; }
.mhead__nav a:hover { color: var(--ink); }
@media (min-width: 900px) { .mhead__nav { display: flex; } }

/* ---------- hero ---------- */
.hero { padding-block: clamp(56px, 11vw, 132px) clamp(28px, 4vw, 44px); text-align: center; }
.hero__title {
  max-width: 15ch;
  margin-inline: auto;
  font-size: clamp(40px, 7.4vw, 104px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.hero__sub {
  max-width: 34ch;
  margin: clamp(18px, 2.4vw, 28px) auto 0;
  font-size: clamp(18px, 2vw, 22px);
  color: var(--muted);
  text-wrap: balance;
}

/* ---------- client marquee ---------- */
/* Capped below one row (3764 px at desktop size), so even a 5K screen or a zoomed-out view never sees the end
   of the line (critic brand round 4, 2026-11-04). */
.clients {
  max-width: 3600px;
  margin-inline: auto;
  overflow: hidden;
  padding-block: 22px clamp(40px, 6vw, 72px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
/* 4 sets per row, 2 rows, slide by one row: 128s keeps the old speed of 32s per set. */
.clients__track { display: flex; width: max-content; animation: marquee 128s linear infinite; }
.clients__row,
.clients__set { display: flex; align-items: center; flex-shrink: 0; }
.clients__name { padding-inline: clamp(18px, 2.6vw, 34px); font-size: clamp(20px, 2.4vw, 30px); font-weight: 600; white-space: nowrap; }
.clients__dot { color: var(--gold); font-size: 26px; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .clients__track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
  .clients__row + .clients__row,
  .clients__set + .clients__set { display: none; }
  .clients__row,
  .clients__set { flex-wrap: wrap; justify-content: center; flex-shrink: 1; }
  .clients { -webkit-mask-image: none; mask-image: none; }
  .clients__set .clients__dot:last-child { display: none; }
}

/* ---------- showreels ---------- */
.reels { position: relative; overflow: hidden; background: var(--night); color: var(--white); isolation: isolate; }
.reels__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.reels::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(5, 6, 6, 0.2), rgba(5, 6, 6, 0.85) 70%);
}
.reels__inner { padding-block: clamp(56px, 8vw, 104px); }
.reels__title {
  text-align: center;
  font-size: clamp(38px, 6.2vw, 84px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.reels__grid { display: grid; gap: 20px; margin-top: clamp(28px, 4vw, 48px); }
@media (min-width: 900px) { .reels__grid { grid-template-columns: 1fr 1fr; gap: 24px; } }
.reel__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: var(--night);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
}
.reel__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Vimeo loads only after a tap: a thumbnail link stands in, page.js swaps it for the player. */
.reel__play { position: absolute; inset: 0; display: block; color: var(--white); }
.reel__play img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.reel__icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  transition: background 0.25s ease, transform 0.25s ease;
}
.reel__icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -11px 0 0 -6px;
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent var(--ink);
}
@media (hover: hover) {
  .reel__play:hover img { transform: scale(1.025); }
  .reel__play:hover .reel__icon { background: var(--gold); transform: scale(1.06); }
}
.reel__play:focus-visible { outline-offset: -4px; }
/* The ring goes around the frame, on the dark section, where white keeps >= 5:1 (critic brand round 2). */
@supports selector(:has(*)) {
  .reel__play:focus-visible { outline: none; }
  .reel__frame:has(.reel__play:focus-visible) { outline: 2px solid var(--white); outline-offset: 3px; }
}
.lightbox__btn svg { width: 22px; height: 22px; display: block; margin: auto; }
.reel figcaption { margin-top: 12px; font-weight: 600; color: var(--light-2); }

/* ---------- work (masonry) ---------- */
.work { padding-block: clamp(40px, 6vw, 80px); }
.masonry { display: grid; grid-template-columns: 1fr; gap: var(--gap); margin: 0; padding: 0; list-style: none; }
@media (min-width: 600px) { .masonry { grid-template-columns: 1fr 1fr; } }
.tile { aspect-ratio: var(--ratio); }
/* With JS, page.js positions each tile in the shortest column; DOM order stays the source order. */
.masonry.is-laid { display: block; position: relative; }
.masonry.is-laid .tile { position: absolute; aspect-ratio: auto; }
/* base.css shortens every transition under reduced motion instead of removing it; the tile translate then starts
   from the grid top, and the lazy loader saw all 39 tiles as on screen (critic perf round 2, 2026-11-04). */
@media (prefers-reduced-motion: reduce) { .masonry.is-laid .tile { transition: none !important; } }
.tile__btn {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--light-1);
  cursor: zoom-in;
}
.tile__btn video,
.tile__btn img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
@media (hover: hover) { .tile__btn:hover video, .tile__btn:hover img { transform: scale(1.025); } }
.tile__btn:focus-visible { outline-offset: 2px; }

/* ---------- closing CTA ---------- */
.cta { padding-block: clamp(56px, 9vw, 120px); text-align: center; }
.cta__title { font-size: clamp(30px, 5vw, 64px); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; }
.cta__sub { margin: 14px auto 28px; font-size: clamp(17px, 1.8vw, 20px); color: var(--muted); }
.social { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 40px; }
.social a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; font-weight: 500; }
.social a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- lightbox ---------- */
.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(5, 6, 6, 0.94);
  color: var(--white);
}
.lightbox::backdrop { background: rgba(5, 6, 6, 0.6); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox__stage { display: grid; place-items: center; width: min(92vw, 1400px); height: 80dvh; }
.lightbox__stage video,
.lightbox__stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lightbox__count { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); font-size: 14px; color: #c0cccc; }
.lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-size: 22px;
  line-height: 1;
}
.lightbox__btn:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.lightbox__btn:focus-visible { outline-color: var(--white); }
.lightbox__close { top: 16px; right: 16px; font-size: 28px; }
.lightbox__prev { left: 16px; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 16px; top: 50%; translate: 0 -50%; }
@media (max-width: 599px) {
  .lightbox__prev, .lightbox__next { top: auto; bottom: 8px; translate: none; }
}
