/* The next trynewthings.fail (sketch). */

:root {
  --bg: #000;
  --ink: #fff;
  --dim: rgba(255, 255, 255, 0.62);
  --line: rgba(255, 255, 255, 0.13);
  --lime: #cafe03;
  --pad: 60px;
}
@media screen and (max-width: 800px) {
  :root { --pad: 20px; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Alegreya", Georgia, serif;
  font-size: 20px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--lime); color: #000; }

/* --------------------------------------------------------------- kinds */

/* The things we make, as tick boxes above the mosaic. All ticked to begin
   with; an unticked one steps back. Small, and sitting right on the mosaic's
   top edge with a lime line under it, so it reads as the mosaic's own control. */
.kinds { display: flex; flex-wrap: wrap; align-items: center; gap: .35em 1.15em;
  margin-top: clamp(40px, 8vh, 96px);
  padding: 0 var(--pad) 11px;
  border-bottom: 2px solid var(--lime);
  font-size: clamp(16px, 1.35vw, 21px); }
.kinds__lead { color: var(--dim); font-style: italic; margin-right: -.3em; }
/* On a narrow page the words stay on one line that scrolls sideways, fading
   out at the right edge, instead of wrapping into a jumble. */
@media screen and (max-width: 800px) {
  .kinds { flex-wrap: nowrap; overflow-x: auto; gap: 0 1em; padding-right: var(--pad); scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); }
  .kinds::-webkit-scrollbar { display: none; }
  .kinds__lead, .kinds__item { flex: none; white-space: nowrap; padding: 6px 0; }
}
.kinds__item { display: inline-flex; align-items: center; gap: .32em; cursor: pointer; font-weight: 800; line-height: 1.1;
  letter-spacing: -.02em; color: rgba(255, 255, 255, .38); transition: color .15s ease; user-select: none; }
.kinds__item:has(input:checked) { color: var(--ink); }
.kinds__item:hover { color: var(--lime); }
.kinds__item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kinds__box { flex: none; display: grid; place-items: center; width: .78em; height: .78em; margin-top: .06em;
  border: 2px solid var(--lime); transition: background-color .15s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.kinds__box::after { content: ""; width: 58%; height: 30%; margin-top: -12%; border: solid #000; border-width: 0 0 2px 2px;
  transform: rotate(-45deg) scale(0); transition: transform .2s ease; }
.kinds__item input:checked + .kinds__box { background: var(--lime); transform: rotate(-4deg); }
.kinds__item input:checked + .kinds__box::after { transform: rotate(-45deg) scale(1); }
.kinds__item input:focus-visible + .kinds__box { outline: 2px solid var(--ink); outline-offset: 3px; }

/* -------------------------------------------------------------- mosaic */

/* From the very top of the page, edge to edge, nothing between the tiles. */
.mosaic { display: flex; flex-direction: column; overflow: hidden; aspect-ratio: var(--ar, auto); }

/* A row is as wide as the page; its height follows from the formats in it
   (--sum is the sum of their aspect ratios). Tiles share the width in
   proportion to their own ratio, so each one keeps its format. */
.mosaic__row { display: flex; flex: var(--h, 1) 1 0%; min-height: 0; transition: flex-grow .9s cubic-bezier(.34, 1.2, .64, 1); }
/* The row you point in takes more of the height, so its tiles are bigger. */
@media (hover: hover) { .mosaic__row:hover { flex-grow: calc(var(--h, 1) * 1.5); } }

.tile {
  position: relative;
  flex: var(--r) 1 0%;
  order: var(--o, 0);
  min-width: 0;
  display: block;
  overflow: hidden;
  background: #0b0b0b;
  color: var(--ink);
  text-decoration: none;
  transition: opacity .25s ease, flex-grow .5s cubic-bezier(.34, 1.3, .64, 1);
}
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; visibility: hidden;
  transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.tile video.on { visibility: visible; }

.tile__cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 40px 14px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, .78), rgba(0, 0, 0, 0));
  pointer-events: none;
  z-index: 2;
}
.tile__client { display: block; color: var(--lime); font-size: 15px; font-style: italic; line-height: 1.2; }
.tile__title { display: block; font-size: clamp(18px, 1.7vw, 26px); font-weight: 800; line-height: 1.05; letter-spacing: -.01em; }

/* The tile you point at holds its clip and takes more of the row, pushing its
   neighbours aside; the rest step back a little. */
.tile:hover, .tile:focus-visible { outline: 2px solid var(--lime); outline-offset: -2px; }
@media (hover: hover) {
  .tile:hover { flex-grow: calc(var(--r) * 1.45); }
  .tile:hover video { transform: scale(1.05); }
  .mosaic:has(.tile:hover) .tile:not(:hover) { opacity: .7; }
}

/* The tiles are shuffled into place like a deck of cards (mosaic.js): when the
   mosaic first comes into view, and again every time a tick box changes what
   it shows. Until then they are not there. */
.mosaic.is-waiting .tile { opacity: 0; }

/* Nothing to point with: the names are always there. */
@media (hover: none) {
  .tile__cap { padding: 28px 8px 7px; }
  .tile__client { font-size: 12px; }
  .tile__title { font-size: 15px; }
}

.mosaic-list { padding: 60px var(--pad); list-style: none; font-size: 28px; font-weight: 800; }
.mosaic-list a { color: var(--ink); }

/* ------------------------------------------- the smiley and the manifesto */

/* Without the script (or with reduced motion) this is a plain black screen
   with the manifesto on it. With it (.is-live) the section is tall and the
   stage stays put while you scroll: the smiley fills the screen at first and
   shrinks into the mark above the manifesto, then the words fill in. */
.act { background: var(--bg); }
.act__stage { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; overflow: hidden; }
.act__smile { display: none; }
/* The room behind the manifesto (depth.js): a depth map and a few drawn edges,
   only there when WebGL is. */
.act__depth, .act__lines { display: none; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.act.has-depth .act__depth, .act.has-depth .act__lines { display: block; }
.act.has-depth .manifesto { text-shadow: 0 2px 24px #000, 0 0 4px #000; }
.act.has-depth .manifesto p:last-child.is-done { text-shadow: none; }

/* Tall enough that the smiley takes about a screen of scrolling to land. The
   last screen of it is shared with what comes after: the filters and the
   mosaic slide up over the stage as soon as the lines have left, so there is
   no empty black screen between them. */
.act.is-live { height: 400vh; margin-bottom: -115vh; margin-bottom: -115svh; }
.act.is-live ~ .kinds, .act.is-live ~ .mosaic, .act.is-live ~ .all-cases { position: relative; z-index: 2; }
.act.is-live .act__stage { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 0; }
/* page.js moves and scales the wrapper; the smiley inside turns once every ten
   seconds, as it always has on the homepage. */
.act.is-live .act__smile { display: block; position: absolute; top: 50%; left: 50%; line-height: 0;
  transform: translate(-50%, -50%); will-change: transform;
  /* Always above the manifesto: big, it covers the words, never the other way. */
  z-index: 3;
  /* Covering the screen from the first paint; page.js sets the exact size. */
  width: 160vmax; width: calc(hypot(100vw, 100svh) * 1.08); }
.act__smile img { display: block; width: 100%; height: auto; animation: actSmileTurn 10s linear infinite; }
@keyframes actSmileTurn { to { transform: rotate(360deg); } }

/* Sized by the screen, both ways, so all four sentences fit on one. */
.manifesto {
  position: relative;
  width: min(1240px, 100% - 2 * var(--pad));
  color: var(--ink);
  font-size: clamp(25px, min(5vw, 7.4vh), 88px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -.02em;
}
/* Where the smiley lands. */
.manifesto__mark { display: none; }
.act.is-live .manifesto__mark { display: block; width: 1.5em; height: 1.5em; margin-bottom: .45em; }
.manifesto p + p { margin-top: .38em; }
/* The words come up softly and faint once the smiley has landed (.is-lit,
   page.js), the scroll fills them in one by one, and they leave line by line
   to the left when the scroll goes on to the mosaic. */
.act.is-live .manifesto { opacity: 0; transition: opacity .12s ease; }
/* Up softly once the smiley has landed, gone at once when it grows again. */
.act.is-live.is-lit .manifesto { opacity: 1; transition: opacity 1.4s ease .25s; }
.act.is-live .manifesto .w { display: inline-block; will-change: transform; color: rgba(255, 255, 255, .16); transition: color .25s ease; }
.act.is-live .manifesto .w.on { color: var(--ink); }
.act.is-live .manifesto .flip.w { color: rgba(202, 254, 3, .3); }
.act.is-live .manifesto .flip.w.on { color: var(--lime); }
.act.is-live .manifesto p:last-child.is-done .w { color: #000; }

/* The last line is stamped in lime once every word is there. */
.manifesto p:last-child { display: inline-block; padding: .04em .16em .1em; margin-left: -.16em;
  transition: background-color .2s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.manifesto p:last-child.is-done { background: var(--lime); transform: rotate(-1.5deg); }
.manifesto p:last-child.is-done { color: #000; }

/* The word that flips between the things we design: in lime, rolling like a
   counter, the old word up and out and the new one in from below. Its width
   is set by page.js to its longest form. */
.flip { display: inline-block; cursor: pointer; text-decoration: none; white-space: nowrap; vertical-align: bottom; overflow: hidden; color: var(--lime);
  padding-bottom: .12em; margin-bottom: -.12em; }
.flip__word { display: inline-block; transition: transform .24s cubic-bezier(.3, .7, .2, 1), opacity .24s ease; }
.flip__word.is-out { transform: translateY(-80%); opacity: 0; }
.flip__word.is-in { transform: translateY(80%); opacity: 0; transition: none; }

.act__hint { display: none; }
.act.is-live .act__hint { display: block; position: absolute; z-index: 4; left: 0; right: 0; bottom: 28px; text-align: center;
  color: #000; font-size: 18px; font-style: italic; font-weight: 600; pointer-events: none; }

/* ----------------------------------------------------------- all cases */

.all-cases { padding: clamp(36px, 6vh, 64px) var(--pad) clamp(48px, 8vh, 90px); }
/* On a case page: the headline, then the filters and the mosaic. */
.all-cases--head { padding-bottom: 0; }
.kinds--case { margin-top: clamp(18px, 3vh, 30px); }
.all-cases summary { list-style: none; cursor: pointer; display: inline-block; }
.all-cases summary::-webkit-details-marker { display: none; }
.all-cases summary:focus-visible { outline: 2px solid var(--lime); outline-offset: 6px; }
.all-cases__button { display: inline-flex; align-items: baseline; gap: .4em; padding: .12em .5em .2em;
  border: 2px solid var(--lime); color: var(--lime);
  font-size: clamp(26px, 3vw, 44px); font-weight: 800; line-height: 1.1; letter-spacing: -.01em;
  transition: background-color .2s ease, color .2s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.all-cases__button::after { content: "+"; font-weight: 400; }
.all-cases[open] .all-cases__button::after { content: "–"; }
.all-cases__count { font-size: .5em; font-weight: 500; font-style: italic; }
.all-cases summary:hover .all-cases__button, .all-cases[open] .all-cases__button { background: var(--lime); color: #000; }
.all-cases summary:hover .all-cases__button { transform: rotate(-2deg); }

.all-cases ul { list-style: none; margin-top: clamp(24px, 4vh, 44px); border-top: 1px solid var(--line); }
.all-cases li { border-bottom: 1px solid var(--line); }
.all-cases a { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 2fr); gap: 4px 24px;
  align-items: baseline; padding: 14px 0; color: var(--ink); text-decoration: none; transition: color .15s ease, padding .2s ease; }
.all-cases a:hover, .all-cases a:focus-visible { color: var(--lime); padding-left: 10px; outline: none; }
.all-cases__title { font-size: clamp(22px, 2.2vw, 32px); font-weight: 800; line-height: 1.1; letter-spacing: -.01em; }
.all-cases__client { color: var(--dim); }
.all-cases__offering { color: var(--lime); font-style: italic; text-align: right; }
@media screen and (max-width: 800px) {
  .all-cases a { grid-template-columns: 1fr auto; }
  .all-cases__client { grid-row: 2; grid-column: 1; font-size: 17px; }
  .all-cases__offering { grid-row: 1; grid-column: 2; font-size: 16px; }
}

/* On a case page the list is simply there, under a headline. */
.all-cases--open { padding-top: clamp(56px, 10vh, 110px); }
.all-cases__headline { font-size: clamp(30px, 3.6vw, 56px); font-weight: 800; line-height: 1; letter-spacing: -.02em; }

/* ----------------------------------------------------------- a case page */

/* The film or the picture, edge to edge at the top. */
.case__media { background: #0b0b0b; line-height: 0; }
.case__media video, .case__media img { display: block; width: 100%; height: min(78vh, 56.25vw); object-fit: cover; }

.case { padding: clamp(28px, 5vh, 56px) var(--pad) clamp(64px, 11vh, 130px); max-width: 1240px; }
.case__back { color: var(--dim); text-decoration: none; font-size: 18px; font-style: italic; }
.case__back:hover, .case__back:focus-visible { color: var(--lime); outline: none; }
.case__meta { margin-top: clamp(28px, 5vh, 56px); color: var(--lime); font-size: 22px; font-style: italic; }
.case h1 { margin-top: 6px; font-size: clamp(44px, 7vw, 116px); line-height: .95; font-weight: 800; letter-spacing: -.02em; }
.case__text { margin-top: clamp(20px, 3.4vh, 36px); max-width: 32em; font-size: clamp(21px, 2vw, 30px); line-height: 1.32; font-weight: 500; }
.case__text a { color: var(--lime); }
.case__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.case__tags li { border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; padding: 2px 14px 4px; font-size: 17px; color: var(--dim); }
.case__more { display: inline-block; margin-top: 34px; padding: .1em .5em .18em; background: var(--lime); color: #000;
  font-size: clamp(24px, 2.6vw, 38px); font-weight: 800; letter-spacing: -.01em; text-decoration: none;
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.case__more:hover, .case__more:focus-visible { transform: rotate(-2deg); outline: none; }

/* How we got there: what used to be the offering page, on lime. */
.case-how { background: var(--lime); color: #000; padding: clamp(56px, 10vh, 120px) var(--pad); }
.case-how__label { font-size: 20px; font-style: italic; }
.case-how h2 { margin-top: 6px; font-size: clamp(40px, 6vw, 100px); line-height: .98; font-weight: 800; letter-spacing: -.02em; }
.case-how__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px clamp(32px, 6vw, 96px);
  margin-top: clamp(28px, 5vh, 56px); max-width: 1240px; font-size: clamp(20px, 1.7vw, 25px); line-height: 1.38; font-weight: 500; }
@media screen and (max-width: 800px) { .case-how__cols { grid-template-columns: 1fr; } }
.case-how a { color: #000; font-weight: 800; }
.case-how .nowrap { white-space: nowrap; }
.case-how .reasons { list-style: none; margin: .5em 0 1.1em; }
.case-how .reasons li::before { content: "– "; }

/* ------------------------------------------------------ drop by, say hi */

.meet-us { background: var(--lime); padding: clamp(48px, 9vh, 96px) var(--pad); }
.meet-us-headline { color: #000; font-size: clamp(38px, 5.4vw, 92px); font-weight: 800; line-height: 1; letter-spacing: -.02em;
  margin-bottom: clamp(24px, 4vh, 44px); }
.meet-us-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media screen and (max-width: 800px) { .meet-us-grid { grid-template-columns: 1fr; } }
.meet-card { display: flex; flex-direction: column; min-height: 230px; padding: 28px; background: #000; text-decoration: none;
  transition: background-color .25s ease, transform .25s ease; }
a.meet-card:hover { background: #1a1a1a; transform: translateY(-2px); }
.meet-card__kind { color: var(--lime); font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.meet-card h3 { color: #fff; font-size: 28px; font-weight: 700; line-height: 1.1; margin-bottom: 12px; }
.meet-card p { color: #e8ffba; font-size: 17px; line-height: 1.45; margin-bottom: auto; }
.meet-card__cta { color: var(--lime); font-size: 15px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; margin-top: 24px; }

/* ------------------------------------------------ playing at our place */

.playing { display: none; position: fixed; z-index: 50; padding: 10px; background: #00000060;
  backdrop-filter: blur(45px); -webkit-backdrop-filter: blur(45px); border: 1px solid #ffffff33; }
.playing h3 { position: absolute; top: 10px; left: 68px; line-height: 1; }
.playing h3 a { font-size: 12px; font-weight: 500; color: #ffffff85; text-transform: uppercase; text-decoration: none; }
.playing .track { display: flex; align-items: center; overflow: hidden; gap: 10px; }
.playing .track img { width: 48px; height: 48px; border-radius: 100%; object-fit: contain; }
.playing .text-container { position: relative; margin-top: 16px; white-space: nowrap; overflow: hidden; width: 100%;
  transform: translateX(-20px); padding-left: 20px;
  -webkit-mask-image: linear-gradient(to right, transparent 6%, black 12%, black 95%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 6%, black 12%, black 95%, transparent 100%); }
.playing .text-container a { display: inline-block; font-size: 18px; font-weight: 400; line-height: 24.2px;
  letter-spacing: -.005em; color: #fff; padding-right: 10px; text-decoration: none; }
.playing .animate { position: relative; animation: leftright 3s infinite alternate ease-in-out; }
@keyframes leftright {
  0%, 20% { transform: translateX(0%); left: 0%; }
  80%, 100% { transform: translateX(-100%); left: 100%; }
}
@media screen and (max-width: 800px) {
  .playing { width: 100%; left: 0; bottom: 0; border-width: 1px 0 0; }
  .playing .track { max-width: calc(100% - 50px); }
}
@media screen and (min-width: 801px) {
  .playing { bottom: 10px; right: 10px; width: 300px; }
  .playing .track { max-width: 260px; }
}
