@font-face {
  font-family: "Space Grotesk";
  src: url("assets/fonts/space-grotesk.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --page: #111419;
  --panel: #1a1f25;
  --line: #333942;
  --text: #f5f4ee;
  --muted: #b4b8be;
  --accent: #f1eedc;
  --amber: #ffd18b;
  --released: #d7ef93;
  --display: "Space Grotesk", system-ui, sans-serif;
  font-family: system-ui, sans-serif;
  background: var(--page);
  color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }
body, figure, h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { color: inherit; font: inherit; }
[hidden] { display: none !important; }

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

.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  position: absolute;
  z-index: 2;
  top: 1rem;
  left: 1rem;
  padding: .75rem 1rem;
  background: var(--page);
}

.shell {
  width: min(100% - 5rem, 78rem);
  margin-inline: auto;
}

.site-header, .site-footer { border-color: var(--line); }
.site-header { border-bottom: 1px solid var(--line); }

.footer-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-content {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
  min-height: 4.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1;
}

.brand img { flex: none; }

.header-content .brand { justify-self: start; }

.header-nav, .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 3vw, 2.25rem);
  margin-inline-start: auto;
  font-size: .9375rem;
  font-weight: 550;
}

.header-nav a, .footer-links a, .muted-link {
  text-decoration-color: transparent;
  text-underline-offset: .25em;
}

.header-nav a:hover, .footer-links a:hover, .muted-link:hover {
  text-decoration-color: currentColor;
}

.header-nav { align-items: center; }

.header-nav .language-link {
  display: inline-grid;
  min-width: 2.65rem;
  min-height: 2.5rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: .45rem;
  color: var(--muted);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 700;
}

.header-nav .language-link:hover { color: var(--text); background: var(--panel); }

.studio-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 5.5vw, 5rem);
  padding-block: clamp(2.25rem, 5vw, 4.25rem);
}

.studio-label {
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 650;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.studio-copy h1 {
  font: 700 clamp(3rem, 6.75vw, 6.35rem)/.94 var(--display);
  letter-spacing: -.085em;
}

.studio-summary {
  max-width: 46ch;
  margin-top: 1.35rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.65vw, 1.17rem);
  line-height: 1.65;
}

.studio-hero .button {
  min-height: 3.05rem;
  padding-inline: 1.1rem;
}

.studio-art {
  position: relative;
  display: grid;
  aspect-ratio: 1.26;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: .95rem;
  background: radial-gradient(ellipse at 50% 37%, #292a34, #17191f 62%, #12151a);
}

.studio-art::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(to right, #e7e4ee0a 1px, transparent 1px),
    linear-gradient(to bottom, #e7e4ee0a 1px, transparent 1px);
  background-position: center;
  background-size: 2.65rem 2.65rem;
  mask-image: radial-gradient(ellipse, black 15%, transparent 77%);
}

.studio-art img {
  width: 67%;
  height: auto;
  filter: drop-shadow(0 .85rem 1.65rem #090a10a6);
}

.portfolio {
  padding-block: 2.45rem 4.75rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: .8rem;
}

.portfolio > h2 {
  margin-bottom: 1.35rem;
  font: 700 clamp(2.15rem, 4vw, 3.35rem)/1.05 var(--display);
  letter-spacing: -.06em;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.portfolio-link {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .85rem;
  background: var(--panel);
  text-decoration: none;
}

.portfolio-link:hover {
  border-color: #92938a;
  background: #20262d;
}

.portfolio-link:hover h3 {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}

.portfolio-cover {
  position: relative;
  display: grid;
  aspect-ratio: 1.84;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.portfolio-cover--withu {
  display: flex;
  justify-content: center;
  gap: 4%;
  background: radial-gradient(ellipse at 50% 80%, #464070, #252036 70%);
}

.portfolio-cover--withu img {
  width: 28%;
  height: auto;
  border: 1px solid #676085;
  border-radius: .35rem;
  box-shadow: 0 .65rem 1.15rem #151027;
  transform: translateY(10%) rotate(-8deg);
}

.portfolio-cover--withu img + img { transform: translateY(14%) rotate(8deg); }

.portfolio-cover--poker {
  grid-template-rows: minmax(0, 1fr);
  padding: .7rem;
  background: radial-gradient(ellipse at 50% 80%, #355341, #1a2e25 70%);
}

.portfolio-cover--poker img {
  width: 100%;
  height: auto;
  max-height: 100%;
  min-height: 0;
  object-fit: contain;
  border: 1px solid #54745f;
  border-radius: .35rem;
  box-shadow: 0 .65rem 1.15rem #112118;
}

.portfolio-cover--nerve { background: #eee4de; }

.portfolio-cover--nerve img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.portfolio-copy { padding: 1.15rem 1.2rem 1.45rem; }

.portfolio-meta {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .35rem;
  color: #d4c2ff;
  font-size: .8125rem;
  font-weight: 650;
}

.portfolio-meta--released { color: var(--released); }
.portfolio-meta--construction { color: var(--amber); }
.portfolio-meta .cone { width: .75rem; height: .72rem; }

.portfolio-copy h3 {
  font: 700 clamp(1.65rem, 2.6vw, 2.4rem)/1.05 var(--display);
  letter-spacing: -.05em;
}

.portfolio-summary {
  margin-top: .6rem;
  color: var(--muted);
  line-height: 1.5;
}

.project-tabs {
  display: flex;
  justify-self: center;
  gap: .5rem;
}

.project-tab {
  display: flex;
  align-items: center;
  min-height: 3.25rem;
  gap: .65rem;
  padding: .5rem 1rem;
  border: 1px solid var(--line);
  border-radius: .55rem;
  background: var(--panel);
  color: var(--muted);
  text-decoration: none;
  font-size: .9375rem;
  font-weight: 650;
  white-space: nowrap;
}

.project-tab:hover { color: var(--text); background: #242a32; }

.project-tab[aria-current="page"] {
  color: var(--text);
  border-color: #777972;
  background: #292c2b;
}

.project-icon {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: .35rem;
  object-fit: cover;
}

.project-icon--construction {
  display: grid;
  place-items: center;
  color: var(--amber);
  background: #433626;
}

.cone {
  display: inline-block;
  flex: none;
  width: 1rem;
  height: .95rem;
  background: linear-gradient(to bottom, currentColor 0 46%, transparent 46% 60%, currentColor 60% 78%, transparent 78% 84%, currentColor 84%);
  clip-path: polygon(43% 0, 57% 0, 78% 84%, 100% 84%, 100% 100%, 0 100%, 0 84%, 22% 84%);
}

.project { padding-block: 1.4rem 4.15rem; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  align-items: stretch;
  gap: 1.25rem;
  padding: .85rem;
  min-height: 27rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: radial-gradient(ellipse at 46% 0%, #282d2c, transparent 58%), #1a1f25;
  overflow: hidden;
}

.hero-copy {
  align-self: center;
  padding: clamp(1.5rem, 3.5vw, 3rem);
}

.state {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.15rem;
  color: #d4c2ff;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .035em;
}

.state--construction {
  padding: .35rem .6rem;
  border: 1px solid #66513b;
  border-radius: .35rem;
  background: #3c3023;
  color: var(--amber);
}

.state--released { color: var(--released); }

.hero h1 {
  font: 700 clamp(3.15rem, 7.2vw, 7.1rem)/.94 var(--display);
  letter-spacing: -.085em;
}

.project--poker .hero h1 {
  font-size: clamp(2.75rem, 5.2vw, 5.35rem);
  letter-spacing: -.075em;
}

.hero-summary {
  max-width: 37ch;
  margin-top: 1.35rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.63;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  margin-top: 1.6rem;
  padding: .63rem .95rem;
  border-radius: .45rem;
  background: var(--accent);
  color: #1b2316;
  text-align: center;
  text-decoration: none;
  font-size: .9375rem;
  font-weight: 730;
}

.button:hover { background: #fffdef; }

.nerve-art, .withu-art, .poker-art {
  position: relative;
  display: grid;
  min-width: 0;
  place-items: center;
  border-radius: .65rem;
  overflow: hidden;
}

.nerve-art {
  align-content: center;
  grid-template-rows: 1fr auto;
  padding: 1.4rem 0 .7rem;
  background: #eee4de;
  color: #352b24;
}

.nerve-art img {
  width: 100%;
  height: auto;
  mask-image: linear-gradient(transparent, black 3%, black 97%, transparent);
}

.nerve-art figcaption {
  justify-self: end;
  margin-inline: 1rem;
  font-size: .8125rem;
  font-weight: 600;
}

.withu-art {
  grid-template-columns: 1fr 1fr;
  place-items: center end;
  padding: 1rem 14% 0 11%;
  isolation: isolate;
  background: radial-gradient(ellipse at 64% 74%, #504186, transparent 63%), #201a35;
}

.withu-art img {
  width: clamp(8rem, 17vw, 12.3rem);
  height: auto;
  border: 1px solid #6c5a9c;
  border-radius: .6rem;
  box-shadow: 0 1rem 2.5rem #0a061bbb;
}

.withu-art-side {
  grid-column: 2;
  grid-row: 1;
  justify-self: start;
  transform: translateX(-8%) rotate(10deg) translateY(1.5rem);
}

.withu-art-front {
  grid-column: 1;
  grid-row: 1;
  z-index: 1;
  transform: translateX(15%) rotate(-9deg) translateY(.6rem);
}

.poker-art {
  padding: 1.5rem;
  background: radial-gradient(ellipse at 56% 70%, #395345, #192f26 70%);
}

.poker-art img {
  width: 100%;
  height: auto;
  border: 1px solid #577a63;
  border-radius: .5rem;
  box-shadow: 0 1rem 2.5rem #071c14;
}

.details {
  margin-top: clamp(2.65rem, 5vw, 4.25rem);
  scroll-margin-top: 1.5rem;
}

.section-heading { margin-bottom: 1.35rem; }

.section-heading h2 {
  font: 700 clamp(1.95rem, 3.65vw, 3.15rem)/1.02 var(--display);
  letter-spacing: -.06em;
}

.section-heading p {
  margin-top: .6rem;
  color: var(--muted);
  line-height: 1.55;
}

.bestiary-grid, .capture-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.capture-grid--poker { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.creature-card, .capture-grid .gallery-image {
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: var(--panel);
}

.gallery-image {
  position: relative;
  display: block;
  border-radius: .7rem;
}

.creature-card .gallery-image { border-radius: .7rem .7rem 0 0; }

.gallery-image img {
  width: 100%;
  height: auto;
  border-radius: inherit;
}

.expand-icon {
  position: absolute;
  right: .45rem;
  bottom: .45rem;
  display: grid;
  width: 1.95rem;
  height: 1.95rem;
  place-items: center;
  border-radius: .35rem;
  background: #151a21ed;
  color: var(--text);
}

.expand-icon::before, .expand-icon::after {
  content: "";
  grid-area: 1 / 1;
  width: .8rem;
  height: .8rem;
  border: solid currentColor;
}

.expand-icon::before {
  border-width: 1.5px 1.5px 0 0;
  clip-path: polygon(50% 0, 100% 0, 100% 50%, 50% 50%);
}

.expand-icon::after {
  border-width: 0 0 1.5px 1.5px;
  clip-path: polygon(0 50%, 50% 50%, 50% 100%, 0 100%);
}

.gallery-image:hover .expand-icon {
  background: var(--accent);
  color: #1b2316;
}

.creature-card figcaption { padding: .9rem .95rem 1.15rem; }

.creature-card h3 {
  font: 650 1.17rem/1.2 var(--display);
  letter-spacing: -.025em;
}

.creature-card p {
  margin-top: .4rem;
  color: var(--muted);
  font-size: .9375rem;
  line-height: 1.5;
}

.muted-link {
  display: inline-block;
  margin-top: 1.25rem;
  color: var(--muted);
}

.site-footer { border-top: 1px solid var(--line); }
.footer-content { padding-block: 1.6rem; }
.footer-content .brand { font-size: 1.35rem; }
.footer-links { color: var(--muted); }

.lightbox {
  width: max-content;
  max-width: min(92vw, 74rem);
  max-height: 94dvh;
  padding: .85rem;
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: var(--panel);
  color: var(--text);
  overflow: auto;
}

.lightbox::backdrop { background: #090b10e8; }
body:has(.lightbox[open]) { overflow: hidden; }

.lightbox-header, .lightbox-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
}

.lightbox-header { margin-bottom: .65rem; }

.lightbox-header h2 {
  font: 700 1.25rem/1.2 var(--display);
}

.lightbox-image {
  max-width: min(100%, 68rem);
  max-height: 70dvh;
  margin: 0 auto;
  border-radius: .35rem;
  object-fit: contain;
}

.lightbox-controls { margin-top: .65rem; }

.lightbox button {
  min-height: 2.75rem;
  padding: .45rem .7rem;
  border: 1px solid var(--line);
  border-radius: .35rem;
  background: var(--page);
  cursor: pointer;
}

.lightbox button:hover { border-color: var(--accent); }
.lightbox-close { min-width: 2.75rem; font-size: 1.25rem; }
.lightbox-count { color: var(--muted); font-size: .875rem; }

@media (max-width: 56rem) {
  .shell { width: calc(100% - 3rem); }
  .hero { min-height: 24rem; }
  .bestiary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portfolio-grid { gap: .75rem; }
  .portfolio-copy { padding-inline: .85rem; }
}

@media (max-width: 50rem) {
  .header-content {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .65rem 1rem;
    padding-block: .55rem .85rem;
  }

  .header-nav { grid-area: 1 / 2; }
  .project-tabs { grid-area: 2 / 1 / 3 / -1; justify-self: start; }
}

@media (max-width: 46rem) {
  .portfolio-grid { grid-template-columns: minmax(0, 1fr); }
  .portfolio-link { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); }
  .portfolio-cover { aspect-ratio: auto; border-right: 1px solid var(--line); border-bottom: 0; }
  .portfolio-copy { align-self: center; }
}

@media (max-width: 42rem) {
  .shell { width: calc(100% - 2rem); }
  .studio-hero { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
  .studio-art { aspect-ratio: 1.85; }
  .studio-art img { width: min(58%, 17.5rem); }
  .hero { grid-template-columns: 1fr; gap: .75rem; padding: .6rem; }
  .hero-copy { padding: 1.35rem 1rem 1rem; }
  .hero-summary { margin-top: 1rem; }
  .state { margin-bottom: .8rem; }
  .nerve-art { padding-block: .35rem .55rem; }
  .nerve-art figcaption { margin-inline: .55rem; }
  .withu-art { min-height: 15.5rem; padding-top: 0; }
  .poker-art { padding: .75rem; }
  .capture-grid--withu, .capture-grid--poker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project { padding-block: 1rem 2.75rem; }
}

@media (max-width: 28rem) {
  .site-header .brand { font-size: 1.38rem; }
  .header-nav, .footer-links { font-size: .875rem; }
  .header-nav { gap: .7rem; }
  .header-nav .language-link { min-width: 2.2rem; }
  .studio-copy h1 { font-size: clamp(2.45rem, 11vw, 3rem); }
  .studio-summary { margin-top: 1rem; }
  .studio-label { margin-bottom: .8rem; font-size: .8125rem; }
  .portfolio { padding-block: 1.85rem 3rem; }
  .portfolio-link { display: flex; }
  .portfolio-cover {
    aspect-ratio: 1.84;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .portfolio-copy { align-self: stretch; }
  .project-tabs { gap: .35rem; }
  .project-tab { padding-inline: .45rem; gap: .35rem; font-size: .875rem; }
  .project-icon { width: 1.45rem; height: 1.45rem; }
  .bestiary-grid, .capture-grid { gap: .65rem; }
  .creature-card figcaption { padding: .65rem; }
  .creature-card h3 { font-size: 1rem; }
  .creature-card p { font-size: .875rem; }
  .footer-content { gap: .8rem; }
  .footer-links { gap: .6rem 1rem; }
}

@media (max-width: 23rem) {
  .header-content { column-gap: .55rem; }
  .header-content .brand img { width: 2.25rem; height: 2.25rem; }
  .header-nav { gap: .55rem; font-size: .8125rem; }
  .project-tabs { gap: .3rem; }
  .project-tab { padding-inline: .35rem; gap: .3rem; font-size: .8125rem; }
  .project-icon { width: 1.25rem; height: 1.25rem; }
}
