/* Wildlogic. Two colours only, taken from the company card: paper and ink.
   All other colour on the site comes from the work itself. */
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque-latin-standard-normal.woff2") format("woff2"); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque-latin-ext-standard-normal.woff2") format("woff2"); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; unicode-range: U+0100-02AF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113; }

:root {
  --paper: #f4f3ef;
  --paper-2: #e9e7e0;
  --ink: #222222;
  --ink-2: #2e2e2e;
  --muted-on-paper: #5a5852;
  --muted-on-ink: #b8b5ad;

  --bg: var(--paper); --fg: var(--ink); --soft: var(--muted-on-paper); --panel: var(--paper-2);

  --face: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-mega: clamp(3rem, 1rem + 8.4vw, 9rem);

  --m: clamp(16px, 2.2vw, 32px);           /* the one pair of page margins */
  --gap: clamp(96px, 13vw, 200px);         /* between sections */
  --out: cubic-bezier(.22, 1, .36, 1);     /* entrances, things arriving */
  --io: cubic-bezier(.65, 0, .35, 1);      /* things moving on screen */
  color-scheme: light;
}
.on-ink { --bg: var(--ink); --fg: var(--paper); --soft: var(--muted-on-ink); --panel: var(--ink-2); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--step-body)/1.5 var(--face); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: .08em; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.04em; line-height: .92; text-wrap: balance; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
::selection { background: var(--ink); color: var(--paper); }
.on-ink ::selection, .hero ::selection { background: var(--paper); color: var(--ink); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: var(--m); top: -80px; z-index: 100; background: var(--paper); color: var(--ink); padding: 12px 16px; }
.skip:focus { top: var(--m); }

.field { background: var(--bg); color: var(--fg); padding: var(--gap) var(--m); }

/* buttons: square, one fill, decided once */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; background: var(--fg); color: var(--bg); font: 500 var(--step-body)/1 var(--face); text-decoration: none; cursor: pointer; border: 0; transition: transform 160ms var(--out), background-color 160ms var(--out); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(.97); transition-duration: 80ms; }

/* ---------- nav ---------- */
.nav { position: absolute; inset: 0 0 auto 0; z-index: 30; display: flex; justify-content: flex-end; gap: clamp(16px, 3vw, 40px); padding: var(--m); color: var(--paper); font-size: var(--step-small); font-weight: 500; }
.nav a { position: relative; text-decoration: none; padding: 10px 0; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: 0 50%; transition: transform 240ms var(--out); }
.nav a:hover::after, .nav a[aria-current]::after { transform: scaleX(1); }
.nav .home::after { display: none; }
.nav.dark { color: var(--ink); justify-content: space-between; align-items: center; position: static; }
.nav .home { display: block; width: 74px; padding: 0; }
.nav .links { display: flex; gap: clamp(16px, 3vw, 40px); }

/* ---------- hero: the name split to two corners over the live picture ---------- */
.hero { position: relative; height: 230svh; background: var(--ink); color: var(--paper); }
.hero-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; isolation: isolate; }
.hero-stage > * { z-index: 1; }
.hero-stage > video, .hero-stage > canvas { z-index: 0; }
.hero-stage video, .hero-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-stage video { filter: brightness(.7); }
.hero-stage canvas { opacity: 0; transition: opacity 600ms var(--out); }
.hero-stage.gl canvas { opacity: 1; }
.hero-stage.gl video { visibility: hidden; }
.hero h1 { font-size: clamp(1.75rem, 1.2rem + 1.5vw, 2.5rem); line-height: 1; }
.word { position: absolute; margin: 0; display: block; }
.word svg { width: 100%; height: auto; }
.word-wild { left: var(--m); top: calc(var(--m) + 44px); width: min(47vw, 92svh); }
.word-logic { right: var(--m); bottom: var(--m); width: min(52vw, 100svh); }
.hero-say { position: absolute; left: var(--m); bottom: var(--m); width: min(36ch, 40vw); display: grid; gap: 16px; justify-items: start; background: rgb(34 34 34 / .94); padding: 28px 28px 0; } /* not fully opaque on purpose: some renderers cull the canvas under an opaque box and leave a black patch */
.hero-say .btn { margin-top: 8px !important; }
.hero-say .btn { margin: 0 -28px; width: calc(100% + 56px); }
.hero-say p { font-size: var(--step-body); line-height: 1.4; text-wrap: pretty; }
.hero .btn { --fg: rgb(244 243 239 / .97); --bg: var(--ink); }
.hero-turn { position: absolute; right: var(--m); top: calc(var(--m) + 64px); width: min(22ch, 30vw); text-align: right; font-size: var(--step-lead); line-height: 1.2; font-weight: 500; letter-spacing: -0.01em; opacity: 0; }
@media (max-width: 760px) {
  .hero-say { padding: 20px 20px 0; } .hero-say .btn { margin: 0 -20px; width: calc(100% + 40px); }
  .word-wild { width: 78vw; top: calc(var(--m) + 56px); }
  .word-logic { width: 84vw; bottom: auto; top: calc(var(--m) + 56px + 33vw); right: auto; left: calc(100vw - 84vw - var(--m)); }
  .hero-say { width: calc(100vw - 2 * var(--m)); }
  .hero-turn { top: auto; bottom: calc(var(--m) + 230px); right: var(--m); width: 60vw; }
}

/* ---------- showcase: one frame, three distances ---------- */
.show { position: relative; height: 300svh; background: var(--ink); color: var(--paper); }
.show-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; place-items: center; padding: var(--m); }
.show-frame { position: relative; width: min(30vw, 56svh); min-width: 240px; aspect-ratio: 4 / 5; overflow: hidden; background: #000; }
.show-frame img { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 50%; transition: transform 900ms var(--io); will-change: transform; }
.show[data-stage="1"] .show-frame img { transform: scale(1.9); transform-origin: 30% 62%; }
.show[data-stage="2"] .show-frame img { transform: scale(3.1); transform-origin: 68% 48%; }
.show-h { margin: 0; font-size: var(--step-mega); }
.show-h span { position: absolute; z-index: 2; left: 0; right: 0; text-align: center; display: block; pointer-events: none; }
.show-h .a { top: calc(50% - min(30vw, 56svh) * .625 - .98em); }
.show-h .b { top: calc(50% + min(30vw, 56svh) * .625 - .32em); opacity: 0; transform: translateY(.3em); transition: opacity 500ms var(--out), transform 700ms var(--out); }
.show:not([data-stage="0"]) .show-h .b { opacity: 1; transform: none; }
.show-side { position: absolute; top: 50%; width: min(28ch, 26vw); transform: translateY(-50%); display: grid; gap: 20px; justify-items: start; }
.show-facts { left: var(--m); margin: 0; padding: 0; list-style: none; opacity: 0; transition: opacity 500ms var(--out); }
.show-facts b { display: block; font-size: var(--step-head); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.show-facts span { color: var(--muted-on-ink); }
.show-cap { right: var(--m); opacity: 0; transition: opacity 500ms var(--out); }
.show-cap .btn { --fg: var(--paper); --bg: var(--ink); }
.show:not([data-stage="0"]) .show-facts, .show[data-stage="2"] .show-cap { opacity: 1; }
.show[data-stage="0"] .show-cap, .show[data-stage="1"] .show-cap { visibility: hidden; }
@media (max-width: 760px) {
  .show-stage { display: block; }
  .show-frame { position: absolute; left: 19vw; top: 19svh; width: 62vw; min-width: 0; }
  .show-h { font-size: 12.5vw; }
  .show-h .a { top: calc(19svh - 1.08em); }
  .show-h .b { top: calc(19svh + 77.5vw - .3em); }
  .show-facts { display: flex; gap: 20px; top: calc(19svh + 77.5vw + 12.5vw + 12px); left: var(--m); right: var(--m); width: auto; transform: none; justify-content: space-between; }
  .show-facts span { font-size: .9375rem; line-height: 1.3; display: block; }
  .show-facts b { font-size: 1.75rem; }
  .show-cap { top: auto; bottom: var(--m); left: var(--m); right: var(--m); width: auto; transform: none; gap: 12px; }
  .show-cap p { font-size: 1rem; }
  .show[data-stage="2"] .show-facts { opacity: 0; }
}

/* ---------- work: names passing a held square ---------- */
.work { position: relative; padding-bottom: calc(var(--gap) * .6); }
.work-rail { position: absolute; inset: var(--gap) var(--m) calc(var(--gap) * .6); pointer-events: none; }
.work-hold { position: sticky; top: calc(50svh - min(31vw, 450px) / 2); height: min(31vw, 450px); }
.work-sq { position: relative; width: min(31vw, 450px); aspect-ratio: 1; margin: 0 auto; background: var(--paper-2); }
.work-sq .pics { position: absolute; inset: 0; overflow: hidden; }
.work-sq img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 220ms linear; }
.work-sq img.on { opacity: .55; }
.work-sq .tile { position: absolute; inset: 0; background: var(--ink); color: var(--paper); display: grid; place-items: center; opacity: 0; transition: opacity 220ms linear; padding: 18%; }
.work-sq .tile.on { opacity: .2; }
.work-fact { position: absolute; top: 50%; transform: translateY(-50%); font-size: var(--step-body); font-weight: 500; white-space: nowrap; }
.work-fact.l { left: 0; }
.work-fact.r { right: 0; }
.work-list { position: relative; z-index: 1; margin: 0; padding: 0; list-style: none; text-align: center; }
.work-list li, .work h2 { font-size: clamp(2.6rem, 9.6vw, 9.5rem); font-weight: 600; letter-spacing: -0.045em; line-height: .98; padding: .12em 0; }
.work h2 { position: relative; z-index: 1; text-align: center; color: var(--muted-on-paper); }
.work-list a { text-decoration: none; display: inline-block; color: var(--muted-on-paper); transition: color 200ms linear; }
.work-list li.on a, .work-list a:hover, .work-list a:focus-visible { color: var(--ink); }
.work-list li { padding-bottom: 22svh; }
.work-list li:last-child { padding-bottom: 26svh; }
@media (max-width: 760px) {
  .work-hold { top: calc(50svh - 30vw); height: 60vw; }
  .work-sq { width: 60vw; }
  .work-fact { top: calc(100% + 12px); transform: none; font-size: 1rem; }
  .work-list li, .work h2 { font-size: 13vw; }
}

/* ---------- plugins: sticky picture, active list ---------- */
.plug { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--m); align-items: start; }
.plug-pic { grid-column: 1 / span 6; position: sticky; top: 12vh; aspect-ratio: 1280 / 880; background: var(--paper); overflow: hidden; }
.plug-pic > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 0 0; opacity: 0; transition: opacity 300ms linear; }
.plug-pic > .on { opacity: 1; }
.plug-body { grid-column: 8 / span 5; }
.plug-body h2 { font-size: var(--step-head); margin-bottom: 20px; }
.plug-body > p { color: var(--muted-on-ink); margin-bottom: 48px; max-width: 40ch; }
.plug-list { margin: 0; padding: 0; list-style: none; }
.plug-list button { all: unset; box-sizing: border-box; display: flex; width: 100%; justify-content: space-between; align-items: baseline; gap: 16px; min-height: 58px; padding: 12px 0; cursor: pointer; font-size: var(--step-lead); font-weight: 500; letter-spacing: -0.02em; color: var(--muted-on-ink); transition: color 200ms linear, transform 200ms var(--out); }
.plug-list button small { font-size: var(--step-small); font-weight: 400; letter-spacing: 0; }
.plug-list button:hover { transform: translateX(6px); }
.plug-list button:focus-visible { outline: 3px solid var(--paper); }
.plug-list li.on button { color: var(--paper); }
.plug-desc { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 360ms var(--out); }
.plug-desc > div { overflow: hidden; }
.plug-desc p { max-width: 38ch; padding: 0 0 20px; color: var(--paper); font-size: var(--step-body); }
.plug-list li.on .plug-desc { grid-template-rows: 1fr; }
/* interface fragment drawn for Domain Access (no screenshot exists yet) */
.ui { background: #fff; color: #1d2125; font: 400 14px/1.4 system-ui, sans-serif; padding: 6% 7%; display: grid; align-content: start; gap: 14px; }
.ui .ui-h { margin: 0 0 4px; font: 600 22px/1.2 system-ui, sans-serif; }
.ui table { width: 100%; border-collapse: collapse; }
.ui th, .ui td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #dee2e6; }
.ui .tag { display: inline-block; padding: 2px 8px; border-radius: 3px; color: #fff; font-size: 12px; font-weight: 600; }
.ui .ok { background: #357a32; } .ui .no { background: #ca3120; } .ui .tmp { background: #a6670e; } .ui .wait { background: #6a737b; }
.tile-wl { background: var(--paper); color: var(--ink); display: grid; place-items: center; padding: 16%; }
@media (max-width: 860px) {
  .plug { display: block; }
  .plug-pic { top: 0; margin: 0 calc(-1 * var(--m)) 32px; z-index: 2; }
  .ui { font-size: 11px; gap: 6px; } .ui .ui-h { font-size: 15px; } .ui th, .ui td { padding: 5px 4px; }
}

/* ---------- studio ---------- */
.studio { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--m); row-gap: 48px; align-items: end; }
.studio h2 { grid-column: 1 / -1; font-size: var(--step-mega); }
.studio-mark { grid-column: 1 / span 6; }
.studio-text { grid-column: 8 / span 5; display: grid; gap: 28px; }
.studio-text > p:first-child { font-size: var(--step-lead); line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; }
.facts { width: 100%; border-collapse: collapse; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 12px 0; font-weight: 400; border-top: 2px solid var(--ink); }
.facts th { width: 9.5rem; color: var(--muted-on-paper); }
@media (max-width: 860px) { .studio-mark, .studio-text { grid-column: 1 / -1; } .studio-mark { width: 70%; } .facts th { width: 7rem; } }

/* ---------- contact: visit card on a picture ---------- */
.contact { position: relative; min-height: 100svh; padding: 60px; display: flex; justify-content: flex-end; align-items: flex-start; isolation: isolate; overflow: hidden; background: var(--ink); }
.contact > img { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; object-position: 28% 50%; z-index: -1; will-change: transform; }
.card { background: var(--paper); color: var(--ink); width: min(420px, 100%); padding: 32px 32px 0; display: grid; gap: 18px; }
.card h2 { font-size: 1.75rem; font-weight: 400; letter-spacing: -0.03em; line-height: 1.05; }
.card .mail { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.card dl { margin: 0; display: grid; gap: 6px; }
.card dl div { display: flex; justify-content: space-between; gap: 16px; }
.card dt { color: var(--muted-on-paper); } .card dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.card .btn { margin: 10px -32px 0; }
@media (max-width: 760px) { .contact { padding: 46svh var(--m) var(--m); min-height: 0; } }

/* ---------- footer: a single quiet line ---------- */
.foot { padding: 30svh var(--m) 30px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: baseline; font-size: var(--step-small); color: var(--muted-on-paper); }
.foot nav { display: flex; gap: 24px; }
.foot a { color: var(--ink); }
.foot > :last-child { text-align: right; }
.foot.short { padding-top: var(--gap); }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr; gap: 8px; padding-top: 20svh; } .foot > :last-child { text-align: left; } .foot nav { flex-wrap: wrap; gap: 8px 20px; } }

/* ---------- entrances (only when script runs and motion is welcome) ---------- */
.js.motion [data-in] { opacity: 0; transform: translateY(24px); }

/* ---------- game page ---------- */
.g-hero { position: relative; min-height: 100svh; display: grid; align-items: end; isolation: isolate; overflow: hidden; background: var(--ink); color: var(--paper); padding: var(--m); }
.g-hero > img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; z-index: -2; }
.g-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(20, 20, 20, .38); }
.g-hero .logo { width: min(760px, 92vw); margin-left: -1.5%; }
.g-hero p { font-size: var(--step-lead); line-height: 1.25; font-weight: 500; max-width: 34ch; margin: 8px 0 24px; }
.g-hero .row { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
.g.hero .btn { --fg: rgb(244 243 239 / .97); --bg: var(--ink); }
.g-h2 { font-size: var(--step-mega); margin-bottom: 48px; }
.shots { display: grid; grid-auto-flow: column; grid-auto-columns: min(82vw, 1040px); gap: var(--m); overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--m)); padding: 0 var(--m) 16px; scroll-padding: 0 var(--m); overscroll-behavior-x: contain; }
.shots figure { margin: 0; scroll-snap-align: start; }
.shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.shots figcaption { padding-top: 12px; color: var(--soft); }
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px var(--m); }
.cols h3 { font-size: var(--step-lead); letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 16px; }
.cols ul { margin: 0; padding-left: 1.1em; display: grid; gap: 10px; }
.lede { font-size: var(--step-lead); line-height: 1.3; font-weight: 500; max-width: 38ch; margin-bottom: 64px; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }

/* ---------- documents ---------- */
.doc { padding: clamp(48px, 8vw, 112px) var(--m) 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--m); }
.doc h1 { grid-column: 1 / -1; font-size: var(--step-mega); margin-bottom: 48px; }
.doc .tldr { grid-column: 1 / span 5; font-size: var(--step-lead); line-height: 1.3; font-weight: 500; align-self: start; position: sticky; top: 32px; }
.doc .tldr small { display: block; margin-top: 20px; font-size: var(--step-small); font-weight: 400; color: var(--muted-on-paper); }
.doc .body { grid-column: 7 / span 6; display: grid; gap: 16px; }
.doc h2 { font-size: var(--step-lead); letter-spacing: -0.02em; line-height: 1.1; margin-top: 32px; }
.doc h2:first-child { margin-top: 0; }
.doc ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }
@media (max-width: 860px) { .doc .tldr, .doc .body { grid-column: 1 / -1; position: static; } .doc .tldr { margin-bottom: 48px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}
