@font-face {
  font-family: Oswald;
  src: url("./studio-oswald.woff2") format("woff2");
  font-weight: 200 700;
  font-display: swap;
}

:root {
  --red: #b91023;
  --ink: #171517;
  --line: #d6d3d2;
  color: var(--ink);
  background: #fff;
  font-family: Oswald, Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
body, h1, h2, h3, p, figure, h4 { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .2em; }
a:focus-visible { outline: 3px solid #234fa6; outline-offset: 5px; }
.wrap { width: min(100% - 2.5rem, 76rem); margin-inline: auto; }

.site-header { border-bottom: 4px solid var(--red); }
.header-content {
  min-height: 4.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem 2rem;
}
.brand { display: flex; align-items: center; gap: .6rem 1rem; text-decoration: none; font-weight: 700; }
.brand img { width: clamp(9.5rem, 22vw, 15.5rem); height: auto; }
nav { display: flex; gap: clamp(.9rem, 3vw, 2.3rem); }
nav a { padding: .65rem 0; font-weight: 700; }
nav a:hover, footer a:hover { color: var(--red); }

.games { padding-block: clamp(2rem, 5vw, 4.4rem) clamp(2.4rem, 6vw, 5.5rem); }
h1 { margin-bottom: clamp(1rem, 2.5vw, 2rem); }
h1 .folio { width: clamp(12rem, 37vw, 28rem); }
.folio { width: 100%; height: auto; }
.selection {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 3px solid var(--red);
}
.selection button {
  padding: .62rem clamp(.68rem, 2vw, 1.3rem);
  border: 1px solid #ded8d6;
  border-bottom: 0;
  background: white;
  color: var(--ink);
  font: 600 1rem/1.25 Oswald, sans-serif;
  cursor: pointer;
}
.selection button span { opacity: .72; margin-right: .35rem; }
.selection button[aria-pressed="true"] { background: var(--red); color: white; border-color: var(--red); }
.selection button:focus-visible, .stamp-trigger:focus-visible { outline: 3px solid #407ce4; outline-offset: -4px; }

.game { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
.game[hidden] { display: none; }
.preview {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 23rem;
  background: #30261d;
}
.preview img { position: absolute; image-rendering: pixelated; }
.office { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.clerk {
  bottom: -6%;
  left: 9%;
  width: clamp(8rem, 34%, 15rem);
  height: auto;
  filter: drop-shadow(4px 4px #22171b);
}
.idle { animation: idle 4.4s steps(1, end) infinite; }
.stamping { opacity: 0; animation: pose 4.4s steps(1, end) infinite; }
.stamp {
  position: absolute;
  right: 7%;
  bottom: 13%;
  padding: .25rem .55rem;
  border: 4px solid #962236;
  color: #962236;
  background: #f2d9ac;
  font: 900 clamp(.85rem, 3vw, 1.4rem)/1 Arial, sans-serif;
  text-transform: uppercase;
  transform: rotate(-8deg);
  opacity: 0;
  animation: mark 4.4s steps(1, end) infinite;
}
@keyframes idle { 0%, 49%, 65% { opacity: 1; } 50%, 64% { opacity: 0; } }
@keyframes pose { 0%, 49%, 65% { opacity: 0; } 50%, 64% { opacity: 1; } }
@keyframes mark { 0%, 57%, 88% { opacity: 0; } 58%, 87% { opacity: 1; } }

.game-copy {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: clamp(.75rem, 2vw, 1.35rem);
  padding: clamp(1.25rem, 4vw, 3.4rem);
  background: var(--red);
  color: white;
}
.eyebrow { font-size: .76rem; font-weight: 800; line-height: 1.35; letter-spacing: .09em; text-transform: uppercase; }
.game h2 { width: min(100%, 32rem); }
.game-copy > p:not(.eyebrow) { max-width: 32ch; line-height: 1.4; font-size: clamp(.97rem, 1.7vw, 1.2rem); }
.play {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.7rem;
  min-height: 3.1rem;
  margin-top: .3rem;
  padding: .6rem .85rem;
  background: #fff;
  color: #8d1020;
  font-weight: 800;
  text-decoration: none;
}
.play:hover { background: var(--ink); color: #fff; }
.play:focus-visible { outline-color: #fff; }
.next-work {
  min-height: 23rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: repeating-linear-gradient(0deg, #1b1819 0 12px, #242021 12px 13px);
  color: #ffede0;
}
.next-work span {
  font-size: clamp(8rem, 28vw, 19rem);
  font-weight: 700;
  line-height: 1;
  text-shadow: 6px 6px var(--red), 12px 12px #722143;
  animation: signal 2.8s steps(2, end) infinite;
}
@keyframes signal { 0%, 92%, 100% { transform: none; } 94% { transform: translate(-5px, 3px) skewX(-5deg); } 97% { transform: translate(4px, -2px); } }

.stamp-trigger {
  position: absolute;
  z-index: 2;
  right: .85rem;
  top: .85rem;
  padding: .45rem .7rem;
  border: 2px solid #fff5dc;
  box-shadow: 3px 3px #201718;
  background: #281d26;
  color: #fff5dc;
  font: 600 .9rem Oswald, sans-serif;
  text-transform: uppercase;
  cursor: pointer;
}
.stamp-trigger:hover { background: var(--red); }
.preview.stamped .idle { animation: manual-idle .8s steps(1) both; }
.preview.stamped .stamping { animation: manual-pose .8s steps(1) both; }
.preview.stamped .stamp { animation: manual-mark .8s steps(1) both; }
@keyframes manual-idle { 0%, 46% { opacity: 0; } 47%, 100% { opacity: 1; } }
@keyframes manual-pose { 0%, 46% { opacity: 1; } 47%, 100% { opacity: 0; } }
@keyframes manual-mark { 0%, 9% { opacity: 0; } 10% { opacity: 1; transform: rotate(-12deg) scale(1.22); } 24%, 100% { opacity: 1; transform: rotate(-8deg); } }

/* The manifesto is an illustrated poster in the page flow. */
.studio { display: grid; gap: clamp(2.2rem, 6vw, 6rem); padding-bottom: clamp(2.2rem, 6vw, 6rem); }
.studio-cover {
  --pass: .5;
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  min-height: clamp(25rem, 47vw, 41rem);
  overflow: hidden;
  background: #15101a;
  color: #fff;
}

.studio-art { position: absolute; inset: 0; z-index: -1; }
.studio-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  image-rendering: pixelated;
  transform: translateY(calc((var(--pass) - .5) * 9%)) scale(1.11);
}
.studio-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #110e19e6 0%, #15101ac2 31%, #15101a10 70%),
    linear-gradient(0deg, #110e19a6, transparent 46%);
}

.studio-opening {
  width: min(62%, 44rem);
  padding: clamp(1.3rem, 4vw, 4rem);
  transform: translateY(calc((var(--pass) - .5) * -1.55rem));
}
.studio-opening .eyebrow {
  color: #ffddd7;
  margin-bottom: clamp(1rem, 2vw, 1.6rem);
  padding-left: .7rem;
  border-left: 3px solid #ec4a58;
}
.studio-opening h2 { margin-bottom: clamp(.9rem, 2vw, 1.45rem); }
.studio-opening h2 .folio { filter: drop-shadow(4px 5px 0 #130c19); }
.studio-opening > p:last-child {
  max-width: 33ch;
  color: #fff5e8;
  line-height: 1.43;
  font-size: clamp(1.05rem, 2.05vw, 1.48rem);
  text-wrap: pretty;
}

/* The props are controls, with the team sprites arranged as a second layer. */
.atelier {
  --pass: .5;
  display: grid;
  grid-template-columns: minmax(15rem, .72fr) minmax(0, 1.35fr);
  grid-template-areas: "body art" "notes art";
  grid-template-rows: auto 1fr;
  align-items: start;
  column-gap: clamp(1.7rem, 4vw, 4rem);
  row-gap: 1.25rem;
  padding-block: 1.45rem;
  border-block: 1px solid var(--line);
}
.atelier-body { grid-area: body; align-self: end; padding-top: .4rem; }
.atelier-body h3 {
  font-size: clamp(2.6rem, 5.3vw, 5.35rem);
  letter-spacing: -.045em;
  line-height: .95;
  margin-bottom: .85rem;
}
.atelier-body p, .work-notes p, .team-intro { max-width: 41ch; line-height: 1.5; font-size: clamp(1rem, 1.62vw, 1.2rem); }
.work-notes { grid-area: notes; border-left: 4px solid var(--red); padding: .15rem 0 .2rem .9rem; }
.work-notes h4 { margin-bottom: .3rem; font-size: 1.3rem; line-height: 1.2; }

.workbench {
  grid-area: art;
  isolation: isolate;
  display: grid;
  position: relative;
  align-content: end;
  min-width: 0;
  min-height: clamp(21rem, 33vw, 30rem);
  overflow: clip;
  padding: clamp(.65rem, 1.7vw, 1.4rem);
  background: radial-gradient(ellipse at 48% 15%, #a64c57 0%, transparent 66%),
    linear-gradient(155deg, #741a30, #28141f 90%);
  color: #fff;
}
.workbench::before {
  content: "";
  position: absolute;
  inset: -16%;
  z-index: -1;
  background: repeating-linear-gradient(0deg, #ff9f9821 0 1px, transparent 1px 24px),
    repeating-linear-gradient(90deg, #ff9f9821 0 1px, transparent 1px 24px);
  mask-image: radial-gradient(ellipse, #000, transparent 68%);
  transform: translateX(calc((var(--pass) - .5) * 5%)) rotate(-8deg) scale(1.13);
}
.workbench-team { position: relative; min-height: clamp(12rem, 23vw, 21rem); margin-bottom: .65rem; }
.workbench-team::after {
  content: "";
  position: absolute;
  inset: auto 5% 0;
  height: 11%;
  border-top: 1px solid #f9ae9f65;
  background: #2c0e1c6e;
  transform: skewX(-28deg);
  z-index: -1;
}
.mini {
  --x: 0%;
  --y: 0%;
  position: absolute;
  width: auto;
  height: 84%;
  image-rendering: pixelated;
  bottom: 5%;
  filter: drop-shadow(5px 6px 0 #270b18);
  transform: translate(var(--x), var(--y));
}
.mini-gisela { left: 17%; --x: calc((var(--pass) - .5) * -82%); --y: calc((var(--pass) - .5) * 18%); }
.mini-rainer { left: 43%; height: 92%; --y: calc((var(--pass) - .5) * -23%); }
.mini-vera { right: 13%; --x: calc((var(--pass) - .5) * 82%); --y: calc((var(--pass) - .5) * 13%); }
.workbench-props { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.25rem, 1vw, .75rem); }
.prop {
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  align-content: end;
  gap: .4rem;
  min-width: 0;
  padding: .45rem .15rem;
  border: 1px solid #b15d6c;
  background: #22101cbf;
  color: #fff8ec;
  font: 600 clamp(.76rem, 1.5vw, 1.05rem)/1.25 Oswald, sans-serif;
  cursor: pointer;
}
.prop img { width: auto; height: clamp(1.8rem, 5vw, 3.5rem); max-width: 85%; object-fit: contain; image-rendering: pixelated; transition: transform 220ms ease-out; }
.prop[aria-pressed="true"] { border-color: #ffe4bd; background: #632231; box-shadow: inset 0 -3px #ffc4a9; }
.prop:hover img, .prop:focus-visible img { transform: translateY(-4px) rotate(-5deg); }
.prop:focus-visible { outline: 3px solid #ffe4bd; outline-offset: 2px; }

.team { padding-block: clamp(1rem, 3vw, 2.5rem) clamp(2rem, 5vw, 4.5rem); }
.team h2 { margin-bottom: 1.25rem; width: min(100%, 32rem); }
.people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.8vw, 2.5rem); }
.people img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: #262326; }
.people h3 { margin-top: .75rem; font-size: clamp(1.15rem, 2.35vw, 1.9rem); line-height: 1.05; letter-spacing: -.045em; }
.job { margin-top: .35rem; color: #a80b1d; font-weight: 700; }
.team-intro { margin: 0 0 1.65rem; color: #4e4949; }
.person-bio { margin-top: .7rem; max-width: 32ch; color: #423e3e; line-height: 1.5; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .65rem 1.5rem; padding-block: 1rem 1.5rem; border-top: 1px solid var(--line); font-size: .88rem; }

@media (max-width: 42rem) {
  .wrap { width: calc(100% - 2rem); }
  .header-content { flex-wrap: wrap; gap: .15rem 1rem; padding-top: .85rem; }
  nav a { font-size: .9rem; }
  .game { grid-template-columns: minmax(0, 1fr); }
  .studio-cover { min-height: clamp(24rem, 94vw, 33rem); }
  .studio-opening { width: 100%; }
  .studio-art img { object-position: 73% 58%; }
  .studio-art::after { background: linear-gradient(0deg, #110e19fa 0%, #110e19e8 28%, #110e1955 61%, transparent 100%); }
  .atelier { grid-template-columns: minmax(0, 1fr); grid-template-areas: "body" "art" "notes"; grid-template-rows: auto; }
  .workbench { min-height: 16.5rem; }
  .work-notes { min-height: 6.3rem; }
  .game h2 { width: min(100%, 19rem); }
  .next-work { min-height: 12rem; }
  .preview { min-height: clamp(10.75rem, 55vw, 19rem); }
  .people { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .people img { width: min(100%, 29rem); aspect-ratio: 5 / 4; object-position: center 12%; }
}

@media (prefers-reduced-motion: reduce) {
  .idle, .stamping, .stamp, .next-work span, .preview.stamped .idle, .preview.stamped .stamping, .preview.stamped .stamp { animation: none; }
  .preview.stamped .stamp { opacity: 1; }
  .studio-art img { transform: scale(1.05); }
  .studio-opening, .mini { transform: none; }
  .workbench::before { transform: rotate(-8deg) scale(1.13); }
  .prop img, .people article::before { transition: none; }
}

.people article { position: relative; }
.people article::before {
  content: "";
  position: absolute;
  top: .55rem;
  left: -.35rem;
  width: 2.8rem;
  height: .35rem;
  background: var(--red);
  transform: translateX(-.65rem) scaleX(.3);
  transform-origin: left;
  transition: transform 600ms cubic-bezier(.18,.8,.2,1);
}
.people article[data-seen]::before { transform: none; }

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .people img {
      animation: profile-arrival linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 80%;
    }
    @keyframes profile-arrival {
      from { clip-path: inset(0 0 24% 0); filter: contrast(1.25) brightness(.78); }
      to { clip-path: inset(0); filter: none; }
    }
  }
}

.game-downloads { width: 100%; margin-top: 1.25rem; }
.game-downloads h3 { font-size: 1rem; font-weight: 600; margin-bottom: .5rem; }
.game-downloads ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.game-downloads a {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 3.2rem;
  height: 100%;
  padding: .3rem .45rem;
  border: 1px solid #ded8d6;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.15;
  text-decoration: none;
}
.game-downloads a:hover { border-color: var(--red); color: var(--red); }
.game-downloads a:focus-visible { outline-offset: 1px; }
.game-downloads img { flex: none; image-rendering: pixelated; }
.game-downloads small { display: block; margin-top: .15rem; font-size: .72rem; font-weight: 400; }
