/* LABEL THIS – styles. Colors, fonts and spacing are variables at the top. */

/* Public Sans (SIL OFL), self-hosted. One variable font file covers every weight. */
@font-face {
  font-family: "Public Sans Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/public-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Public Sans Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/public-sans-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Px Grotesk';
  src: url('/fonts/px-grotesk-regular.eot');
  src: url('/fonts/px-grotesk-regular.eot?#iefix') format('embedded-opentype'),
    url('/fonts/px-grotesk-regular.woff2') format('woff2'),
    url('/fonts/px-grotesk-regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
}


:root {
  --bg: #000;
  --fg: #fff;
  --muted: #a3a3a3;
  --prose: #d4d4d4;
  --accent: #c71d39;
  --rule: #262626;

  --font-body: "Public Sans Variable", "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "PX Grotesk", var(--font-body);

  --pad: clamp(20px, 5.35vw, 77px);
  --max: 1360px;
  --header-h: 96px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  -webkit-text-size-adjust: 100%;
}

html.lb-open {
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 clamp(1rem, 0.9rem + 0.28vw, 1.1875rem) / 1.6 var(--font-body);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
}

.wrap {
  width: min(100% - 2 * var(--pad), var(--max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Links: white text, 2px accent bottom border ---------- */
a {
  color: inherit;
  text-decoration: none;
}

.link {
  color: #fff;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.16em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: all 0.4s;
}

.link:hover,
.link:focus-visible {
  color: var(--accent);
  transition: all 0.15s;
}

.link--caps {
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.display .link {
  padding-bottom: 0.06em;
}

/* ---------- Header and navigation ---------- */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 30;
  padding-top: 24px;
}

.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.site-nav {
  margin: 0;
  justify-self: center;
}

.logo {
  display: block;
  line-height: 0;
}

.logo img {
  width: 120px;
  height: auto;
}

.site-nav {
  margin-left: clamp(24px, 19%, 300px);
  margin-right: auto;
}

.site-nav>ul {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px clamp(15px, 3.1vw, 44px);
}

.nav__link {
  display: inline-block;
  font-size: 1.0625rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.15s;
  white-space: nowrap;
}

.nav__sub {
  color: #fff;
  transition: color 0.15s;
}

/* Menu links carry no underline: hover and keyboard focus turn the text red. */
.nav__link:hover,
.nav__link:focus-visible,
.nav__sub:hover,
.nav__sub:focus-visible {
  color: var(--accent);
}

.nav__dd {
  position: relative;
}

.nav__dd {
  position: relative;
}

.nav__menu {
  position: absolute;
  top: 100%;
  left: -20px;
  padding-top: 14px;
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

.nav__menu ul {
  min-width: 240px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  background: #000;
  border: 1px solid var(--rule);
  font-size: 0.9375rem;
}

.nav__dd:hover .nav__menu,
.nav__dd:focus-within .nav__menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
}

.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: #fff;
  transition: transform 0.2s, top 0.2s;
}

.nav-toggle span:first-child {
  top: 17px;
}

.nav-toggle span:last-child {
  top: 26px;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  top: 21px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  top: 21px;
  transform: rotate(-45deg);
}

@media (max-width: 760px) {
  .nav-toggle {
    grid-column: 3;
    justify-self: end;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 12px);
    margin: 0;
    padding: 12px var(--pad) 28px;
    background: #000;
    border-bottom: 1px solid var(--rule);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s;
  }

  .site-nav>ul {
    flex-direction: column;
    gap: 4px;
  }

  .nav__link {
    padding-block: 10px;
  }

  .nav__menu {
    display: block;
    position: static;
    padding: 0 0 6px 16px;
  }

  .nav__menu ul {
    min-width: 0;
    padding: 6px 0 0;
    border: 0;
    gap: 12px;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  background: #0b1119;
  overflow: hidden;
}

.hero--project {
  min-height: clamp(480px, 70svh, 760px);
}

.hero__video,
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 220px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0) 55%, #000 100%);
}

.hero__text {
  position: relative;
  padding-bottom: clamp(48px, 6vw, 96px);
}

.hero--project .hero__text {
  padding-bottom: clamp(40px, 5vw, 72px);
}

.hero__title {
  color: var(--accent);
  font-size: clamp(2rem, 6.1vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.meta {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.meta:empty {
  display: none;
}

.hero--project .meta {
  color: var(--prose);
  margin-bottom: 8px;
}

/* ---------- Rows: red label on the left, content on the right ---------- */
.block {
  padding-top: clamp(64px, 8vw, 112px);
}

.block--last {
  padding-bottom: 0;
}

.row {
  display: grid;
  gap: 20px clamp(24px, 3vw, 44px);
  border-top: 1px solid var(--rule);
  padding: 32px 0 clamp(56px, 6.1vw, 88px);
}

.row--heading {
  padding-bottom: 0;
}

.project .row:first-child {
  margin-top: clamp(48px, 6.7vw, 96px);
}

@media (min-width: 861px) {
  .row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.row__label {
  color: var(--accent);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.row__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.row__body>p,
.row__body li {
  color: var(--prose);
}

.row__body p.display,
.row__body .lead {
  color: var(--fg);
}

.statement,
.lead {
  font-size: clamp(1.375rem, 1.9vw, 1.6875rem);
  line-height: 1.4;
}

.contact {
  font-size: clamp(1.5rem, 2.4vw, 2.125rem);
  line-height: 1.2;
  align-items: flex-start;
}

.next {
  font-size: clamp(1.5rem, 2.4vw, 2.125rem);
  line-height: 1.2;
}

.row__body h3,
.row__body h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--fg);
  margin-top: 8px;
}

.row__body .list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: disc;
  padding-left: 1.2em;
}

.row__body blockquote {
  margin: 0;
  padding-left: 20px;
  border-left: 2px solid var(--accent);
  font-size: 1.15em;
}

.row__body img {
  width: 100%;
}

/* Stacked list of links */
.links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.row__body .links {
  margin-top: 12px;
}

/* ---------- Team ---------- */
.team {
  gap: 56px;
}

.member {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.member__name {
  font-size: clamp(1.5rem, 2.1vw, 1.875rem);
  line-height: 1.2;
}

.member__role {
  color: var(--muted);
  margin-top: 4px;
}

.member p {
  color: var(--prose);
}

/* ---------- Games on the home page ---------- */
.games {
  display: flex;
  flex-direction: column;
  gap: clamp(56px, 6.7vw, 96px);
  margin-top: clamp(32px, 3.9vw, 56px);
}

.game {
  display: grid;
  gap: 28px clamp(24px, 3vw, 44px);
  align-items: start;
}

@media (min-width: 861px) {
  .game {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.game__media {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #0d0d0d;
}

.game__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.game__body>p {
  color: var(--prose);
}

.game__title {
  font-size: clamp(2rem, 3.05vw, 2.75rem);
  line-height: 1.1;
  margin-top: 4px;
}

.game__body .links {
  margin-top: 8px;
}

.banner {
  display: block;
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  height: auto;
  min-height: 240px;
  object-fit: cover;
  object-position: center top;
  margin-top: clamp(64px, 8.3vw, 120px);
}

/* ---------- Gallery and lightbox ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 520px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}

.gallery__item {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0d0d0d;
  cursor: zoom-in;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s;
}

.gallery__item:hover img {
  opacity: 0.8;
}

.lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #000;
  color: #fff;
}

.lightbox[open] {
  display: grid;
  place-items: center;
}

.lightbox::backdrop {
  background: #000;
}

.lightbox__img {
  display: block;
  width: 100vw;
  height: auto;
  max-height: 100vh;
  object-fit: contain;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: clamp(56px, 8vw, 96px);
  height: min(40vh, 220px);
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.lightbox__nav--prev {
  left: 0;
}

.lightbox__nav--next {
  right: 0;
}

.lightbox__nav svg {
  width: clamp(20px, 2.6vw, 30px);
  height: auto;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2px;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.7));
  opacity: 0.85;
  transition: opacity 0.15s, transform 0.15s;
}

.lightbox__nav path {
  vector-effect: non-scaling-stroke;
}

.lightbox__nav:hover svg {
  opacity: 1;
  transform: scale(1.12);
}

.lightbox__nav:focus-visible {
  outline-offset: -8px;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: clamp(72px, 8.3vw, 120px);
  padding: 24px 0 40px;
  font-size: 0.875rem;
  color: var(--muted);
}

.foot-link {
  color: #fff;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.15s;
}

.foot-link:hover,
.foot-link:focus-visible {
  color: var(--accent);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--rule);
  padding-top: 24px;
}

/* ---------- 404 ---------- */
.no-hero main {
  padding-top: calc(var(--header-h) + 24px);
}

/* ---------- Scroll reveal: fade in and up. data-r="1|2|3" staggers the right side after the left. ---------- */
[data-r="1"] {
  --d: 140ms;
}

[data-r="2"] {
  --d: 260ms;
}

[data-r="3"] {
  --d: 380ms;
}

@media (prefers-reduced-motion: no-preference) {
  html.js:not(.reveal-off) [data-r] {
    transition: opacity 0.8s ease var(--d, 0ms), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0ms);
  }

  html.js:not(.reveal-off) [data-r]:not(.is-in) {
    opacity: 0;
    transform: translateY(32px);
  }
}

@media print {
  [data-r] {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}