:root {
  color-scheme: dark;
  --page-bg: #10131c;
  --page-surface: #171b27;
  --paper: #f5f0e7;
  --ink: #10131c;
  --muted: #aeb5c5;
  --line: rgba(255, 255, 255, 0.14);
  --orange: #ff9e45;
  --mint: #71e3c5;
  --header-height: 5.5rem;
  --content-width: 86rem;
  --radius-large: 2rem;
  --radius-medium: 1.25rem;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  background: var(--page-bg);
  color: #fff;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 20rem;
  min-height: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--page-bg);
  color: #fff;
  text-rendering: optimizeLegibility;
}

body,
button {
  font: inherit;
}

a {
  color: inherit;
}

button,
summary {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  transform: translateY(-160%);
  border-radius: 999px;
  padding: 0.75rem 1rem;
  background: #fff;
  color: #111827;
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  padding: 0.65rem clamp(1rem, 4vw, 4rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 15, 23, 0.78);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(18px);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}

.site-brand img {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  filter: drop-shadow(0 0.55rem 0.75rem rgba(0, 0, 0, 0.38));
}

.site-brand span {
  display: grid;
  gap: 0.06rem;
}

.site-brand strong {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.site-brand small {
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.site-navigation {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 1.6rem);
}

.site-navigation > a,
.games-menu > summary {
  border-radius: 999px;
  padding: 0.66rem 0.88rem;
  color: #e9edf7;
  font-size: 0.84rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  list-style: none;
}

.site-navigation > a:hover,
.games-menu > summary:hover,
.games-menu[open] > summary {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.games-menu {
  position: relative;
}

.games-menu summary::-webkit-details-marker {
  display: none;
}

.games-menu summary span {
  display: inline-block;
  margin-left: 0.3rem;
  color: var(--orange);
  transition: transform 180ms ease;
}

.games-menu[open] summary span {
  transform: rotate(45deg);
}

.games-menu-panel {
  position: absolute;
  top: calc(100% + 0.8rem);
  right: 0;
  display: grid;
  min-width: 17rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(20, 24, 35, 0.98);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.38);
}

.games-menu-panel a {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.35rem;
  padding: 0.78rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #f6f7fb;
  font-size: 0.87rem;
  font-weight: 750;
  text-decoration: none;
}

.games-menu-panel a:last-child {
  border-bottom: 0;
}

.games-menu-panel a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.games-menu-panel span {
  color: var(--orange);
  font-variant-numeric: tabular-nums;
}

.menu-toggle {
  display: none;
}

.portfolio-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(18rem, 0.82fr) minmax(28rem, 1.18fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 6rem);
  min-height: max(48rem, 100svh);
  padding: calc(var(--header-height) + 4rem) max(6vw, calc((100vw - var(--content-width)) / 2)) 5rem;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(16, 19, 28, 0.98), rgba(20, 25, 37, 0.96)),
    var(--page-bg);
}

.portfolio-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 4rem 4rem;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.hero-glow {
  position: absolute;
  z-index: -2;
  width: 35rem;
  height: 35rem;
  border-radius: 50%;
  filter: blur(7rem);
  opacity: 0.24;
  pointer-events: none;
}

.hero-glow-one {
  top: 5%;
  right: 8%;
  background: #6be0c0;
}

.hero-glow-two {
  left: 8%;
  bottom: -15%;
  background: #ff7f3c;
}

.hero-intro {
  position: relative;
  z-index: 2;
  max-width: 39rem;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  color: #d7dce7;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow > span {
  width: 1.9rem;
  height: 2px;
  background: var(--orange);
}

.hero-intro h1 {
  max-width: 11ch;
  font-size: clamp(3.5rem, 7.1vw, 7.5rem);
  font-weight: 850;
  letter-spacing: -0.075em;
  line-height: 0.88;
}

.hero-intro h1 em {
  color: transparent;
  font-style: normal;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.62);
}

.hero-lede {
  max-width: 36rem;
  margin-top: 1.8rem;
  color: #c1c8d7;
  font-size: clamp(1rem, 1.35vw, 1.17rem);
  line-height: 1.75;
}

.hero-actions,
.chapter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  font-size: 0.84rem;
  font-weight: 850;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--orange);
  color: #17110d;
  box-shadow: 0 0.8rem 2.2rem rgba(255, 126, 54, 0.2);
}

.button-primary:hover {
  background: #ffb46c;
}

.button-quiet {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.button-quiet:hover {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.09);
}

.catalog-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  max-width: 34rem;
  margin-top: 3.5rem;
  border-top: 1px solid var(--line);
}

.catalog-stats div {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
  padding: 1rem 0.55rem 0 0;
}

.catalog-stats dt {
  font-size: clamp(1rem, 1.5vw, 1.35rem);
  font-weight: 850;
  letter-spacing: -0.03em;
}

.catalog-stats dd {
  color: #8992a5;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.game-reel {
  position: relative;
  min-width: 0;
  padding: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-large);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 2.5rem 7rem rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(0.8rem);
}

.reel-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.1rem 0.25rem 0.75rem;
}

.reel-topline p {
  color: #98a1b3;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.reel-topline p span {
  color: #fff;
}

.reel-arrows {
  display: flex;
  gap: 0.35rem;
}

.reel-arrows button {
  display: grid;
  width: 2.45rem;
  height: 2.45rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.reel-arrows button:hover {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.1);
}

.reel-stage {
  position: relative;
  aspect-ratio: 1.22 / 1;
  min-height: 25rem;
  overflow: hidden;
  border-radius: calc(var(--radius-large) - 0.55rem);
  background: #222836;
}

.reel-slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.reel-slide[hidden] {
  display: none;
}

.reel-slide.is-active {
  animation: reel-in 360ms ease both;
}

.reel-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms ease;
}

.reel-slide:hover > img {
  transform: scale(1.025);
}

.reel-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 25%, rgba(6, 8, 13, 0.16) 50%, rgba(6, 8, 13, 0.88) 100%),
    linear-gradient(90deg, rgba(6, 8, 13, 0.22), transparent 55%);
}

.reel-copy {
  position: absolute;
  left: clamp(1.25rem, 4vw, 2.5rem);
  right: clamp(1.25rem, 4vw, 2.5rem);
  bottom: clamp(1.3rem, 4vw, 2.4rem);
  z-index: 2;
}

.reel-copy p {
  margin-bottom: 0.35rem;
  color: #f3d4a7;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.reel-copy h2 {
  max-width: 10ch;
  font-size: clamp(2.1rem, 4.1vw, 4.8rem);
  font-weight: 880;
  letter-spacing: -0.065em;
  line-height: 0.95;
  text-shadow: 0 0.2rem 1.5rem rgba(0, 0, 0, 0.45);
}

.reel-copy a {
  display: inline-flex;
  gap: 0.5rem;
  margin-top: 0.9rem;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  text-underline-offset: 0.3rem;
}

.reel-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.3rem;
  padding-top: 0.65rem;
}

.reel-tabs button {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
  border: 0;
  border-radius: 0.75rem;
  padding: 0.62rem 0.45rem;
  background: transparent;
  color: #8992a5;
  font-size: 0.66rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.reel-tabs button span {
  color: #697286;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
}

.reel-tabs button:hover,
.reel-tabs button.is-active {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.reel-tabs button.is-active span {
  color: var(--orange);
}

@keyframes reel-in {
  from { opacity: 0.45; transform: translateX(0.8rem); }
  to { opacity: 1; transform: translateX(0); }
}

.game-chapter {
  --chapter-bg: #233b36;
  --chapter-ink: #fff;
  --chapter-muted: rgba(255, 255, 255, 0.75);
  --chapter-line: rgba(255, 255, 255, 0.22);
  --chapter-accent: #ffd65a;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(18rem, 0.8fr) minmax(28rem, 1.2fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 8rem);
  min-height: max(47rem, 100svh);
  padding: clamp(7rem, 11vw, 11rem) max(7vw, calc((100vw - var(--content-width)) / 2)) clamp(8rem, 11vw, 11rem);
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 15%, color-mix(in srgb, var(--chapter-accent) 20%, transparent), transparent 32rem),
    var(--chapter-bg);
  color: var(--chapter-ink);
  scroll-margin-top: 0;
}

.game-chapter::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.19;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.065) 1px, transparent 1px);
  background-size: 5rem 5rem;
  mask-image: linear-gradient(115deg, transparent 10%, black, transparent 90%);
}

.chapter-copy {
  position: relative;
  z-index: 3;
  max-width: 38rem;
}

.chapter-reverse .chapter-copy {
  order: 2;
}

.chapter-reverse .chapter-media {
  order: 1;
}

.chapter-kicker {
  margin-bottom: 1.25rem;
  color: var(--chapter-accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.chapter-copy h2 {
  max-width: 8.5ch;
  font-size: clamp(3.6rem, 7.8vw, 8.5rem);
  font-weight: 900;
  letter-spacing: -0.085em;
  line-height: 0.78;
  text-wrap: balance;
}

.chapter-logo {
  width: min(19rem, 70%);
  height: auto;
  margin: -2.5rem 0 -1.1rem;
  filter: drop-shadow(0 1rem 1.4rem rgba(0, 0, 0, 0.28));
}

.chapter-lede {
  max-width: 35rem;
  margin-top: 2rem;
  color: var(--chapter-muted);
  font-size: clamp(1.03rem, 1.45vw, 1.24rem);
  line-height: 1.7;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.65rem 0 0;
  padding: 0;
  list-style: none;
}

.feature-tags li {
  border: 1px solid var(--chapter-line);
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
  color: var(--chapter-muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.button-light {
  background: #fff;
  color: #151923;
  box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.14);
}

.button-light:hover {
  background: color-mix(in srgb, #fff 86%, var(--chapter-accent));
}

.text-link {
  padding: 0.65rem 0.35rem;
  font-size: 0.82rem;
  font-weight: 850;
  text-underline-offset: 0.32rem;
}

.availability-note {
  padding: 0.65rem 0.35rem;
  color: var(--chapter-muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.chapter-number {
  position: absolute;
  top: 6%;
  right: 3%;
  z-index: -1;
  color: transparent;
  font-size: clamp(10rem, 29vw, 32rem);
  font-weight: 950;
  letter-spacing: -0.12em;
  line-height: 0.75;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.12);
  user-select: none;
}

.chapter-media {
  position: relative;
  min-width: 0;
  min-height: clamp(29rem, 47vw, 43rem);
}

.media-frame {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.3);
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.chapter-media:hover .media-frame-wide img {
  transform: scale(1.025);
}

.media-frame-wide {
  position: absolute;
  top: 6%;
  right: 0;
  width: 92%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-large);
  transform: rotate(1.5deg);
}

.chapter-reverse .media-frame-wide {
  right: auto;
  left: 0;
  transform: rotate(-1.5deg);
}

.media-frame-detail {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: 2%;
  border: 0.45rem solid rgba(255, 255, 255, 0.92);
  border-radius: 1.5rem;
  transform: rotate(-3deg);
}

.chapter-reverse .media-frame-detail {
  right: 0;
  left: auto;
  transform: rotate(3deg);
}

.media-frame-phone {
  width: clamp(8.8rem, 17vw, 14rem);
  aspect-ratio: 9 / 16;
}

.media-frame-landscape {
  width: clamp(16rem, 30vw, 28rem);
  aspect-ratio: 16 / 9;
}

.chapter-carousel {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: 1%;
  width: clamp(10.5rem, 19vw, 15.5rem);
  overflow: hidden;
  border: 0.42rem solid rgba(255, 255, 255, 0.94);
  border-radius: 1.45rem;
  background: #f7f8fb;
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.3);
  color: #171b25;
  transform: rotate(-3deg);
}

.chapter-carousel-stage {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 0.95rem;
  background: #202531;
  touch-action: pan-y;
}

.chapter-carousel figure {
  position: absolute;
  inset: 0;
  margin: 0;
}

.chapter-carousel figure[hidden] {
  display: none;
}

.chapter-carousel figure.is-active {
  animation: reel-in 280ms ease both;
}

.chapter-carousel figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chapter-carousel figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 2.7rem 0.8rem 0.75rem;
  background: linear-gradient(transparent, rgba(9, 12, 19, 0.82));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 850;
}

.chapter-carousel-controls {
  display: grid;
  grid-template-columns: 2.25rem 1fr 2.25rem;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.1rem 0;
}

.chapter-carousel-controls button {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border: 1px solid #d8dce5;
  border-radius: 50%;
  background: #fff;
  color: #151923;
  cursor: pointer;
}

.chapter-carousel-controls button:hover {
  border-color: #8f97a8;
  background: #eef0f5;
}

.chapter-carousel-controls p {
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-align: center;
}

.media-caption {
  position: absolute;
  top: 1%;
  left: 1%;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.chapter-reverse .media-caption {
  right: 1%;
  left: auto;
  justify-content: flex-end;
}

.media-caption span {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0.42rem 0.66rem;
  background: rgba(8, 11, 17, 0.65);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  backdrop-filter: blur(0.6rem);
}

.next-chapter {
  position: absolute;
  right: max(6vw, calc((100vw - var(--content-width)) / 2));
  bottom: 2.25rem;
  display: grid;
  gap: 0.18rem;
  color: var(--chapter-ink);
  font-size: 0.82rem;
  font-weight: 850;
  text-align: right;
  text-decoration: none;
}

.next-chapter span {
  color: var(--chapter-muted);
  font-size: 0.61rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.next-chapter:hover {
  text-decoration: underline;
  text-underline-offset: 0.3rem;
}

.chapter-garden {
  --chapter-bg: #bfeee0;
  --chapter-ink: #123a39;
  --chapter-muted: #315e59;
  --chapter-line: rgba(19, 75, 70, 0.28);
  --chapter-accent: #db632f;
}

.chapter-garden::before,
.chapter-runner::before {
  background-image:
    linear-gradient(rgba(17, 58, 57, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 58, 57, 0.08) 1px, transparent 1px);
}

.chapter-garden .chapter-number,
.chapter-runner .chapter-number {
  -webkit-text-stroke-color: rgba(17, 58, 57, 0.14);
}

.chapter-defense {
  --chapter-bg: #27351d;
  --chapter-ink: #fff8df;
  --chapter-muted: #d7dfc8;
  --chapter-line: rgba(255, 248, 223, 0.25);
  --chapter-accent: #ffcb50;
}

.chapter-below {
  --chapter-bg: #21151d;
  --chapter-ink: #fff1d4;
  --chapter-muted: #d8c7ca;
  --chapter-line: rgba(255, 241, 212, 0.23);
  --chapter-accent: #61d5d4;
}

.chapter-blox-td {
  --chapter-bg: #192740;
  --chapter-ink: #fff8e9;
  --chapter-muted: #cbd8ec;
  --chapter-line: rgba(230, 239, 255, 0.24);
  --chapter-accent: #ff9b45;
}

.chapter-runner {
  --chapter-bg: #ded9f5;
  --chapter-ink: #28223e;
  --chapter-muted: #544c70;
  --chapter-line: rgba(40, 34, 62, 0.25);
  --chapter-accent: #a23472;
}

.game-chapter {
  background-color: var(--chapter-bg);
}

.project-rail {
  position: fixed;
  z-index: 35;
  top: 50%;
  left: 1.15rem;
  display: grid;
  gap: 0.55rem;
  transform: translateY(-50%);
}

.project-rail a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.62rem;
  font-weight: 850;
  text-decoration: none;
  mix-blend-mode: difference;
}

.project-rail a span {
  display: grid;
  width: 1.6rem;
  height: 1.6rem;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.project-rail a b {
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  white-space: nowrap;
  transition: max-width 220ms ease, opacity 220ms ease;
}

.project-rail a:hover,
.project-rail a.is-active {
  color: #fff;
}

.project-rail a:hover b,
.project-rail a.is-active b {
  max-width: 8rem;
  opacity: 1;
}

.rail-line {
  position: absolute;
  z-index: -1;
  top: 0.8rem;
  bottom: 0.8rem;
  left: 0.78rem;
  width: 1px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.3);
  mix-blend-mode: difference;
}

.rail-line span {
  display: block;
  width: 100%;
  height: 0;
  background: #fff;
  transition: height 220ms ease;
}

.contact-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(12rem, 0.55fr) minmax(20rem, 1.45fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 7rem);
  min-height: 78svh;
  padding: clamp(7rem, 11vw, 11rem) max(8vw, calc((100vw - 75rem) / 2));
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 50%, rgba(255, 158, 69, 0.22), transparent 28rem),
    radial-gradient(circle at 90% 10%, rgba(113, 227, 197, 0.18), transparent 30rem),
    #10131c;
}

.contact-mark img {
  width: min(22rem, 100%);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 2rem 3rem rgba(0, 0, 0, 0.4));
}

.contact-copy {
  max-width: 49rem;
}

.contact-copy h2 {
  max-width: 11ch;
  font-size: clamp(3rem, 6.8vw, 7rem);
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 0.92;
}

.contact-copy > p {
  max-width: 43rem;
  margin-top: 1.5rem;
  color: #bac1d0;
  font-size: clamp(1rem, 1.45vw, 1.2rem);
  line-height: 1.75;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2rem;
  padding: 2.5rem max(5vw, calc((100vw - var(--content-width)) / 2));
  border-top: 1px solid var(--line);
  background: #0b0e15;
  color: #c7ccda;
}

.footer-brand {
  display: grid;
  gap: 0.25rem;
}

.footer-brand strong {
  color: #fff;
  font-size: 0.92rem;
}

.footer-brand span,
.site-footer > p {
  color: #7f8799;
  font-size: 0.7rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1rem;
}

.site-footer nav a {
  font-size: 0.72rem;
  font-weight: 800;
  text-underline-offset: 0.25rem;
}

.site-footer > p {
  grid-column: 1 / -1;
}

@media (max-width: 1120px) {
  .portfolio-hero {
    grid-template-columns: 1fr;
    align-content: center;
    padding-inline: max(7vw, 2rem);
  }

  .hero-intro {
    max-width: 48rem;
    padding-top: 2rem;
  }

  .hero-intro h1 {
    max-width: 13ch;
    font-size: clamp(4rem, 10vw, 7.4rem);
  }

  .game-reel {
    width: min(56rem, 100%);
    margin-inline: auto;
  }

  .reel-stage {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }

  .game-chapter {
    grid-template-columns: 1fr;
    gap: 3.5rem;
    padding-inline: max(9vw, 3rem);
  }

  .chapter-copy,
  .chapter-reverse .chapter-copy {
    order: 1;
    max-width: 50rem;
  }

  .chapter-media,
  .chapter-reverse .chapter-media {
    order: 2;
    width: min(56rem, 100%);
    margin-inline: auto;
  }

  .chapter-copy h2 {
    font-size: clamp(4.8rem, 13vw, 8rem);
  }

  .chapter-logo {
    width: 17rem;
  }

  .media-frame-wide {
    width: 90%;
  }

  .media-frame-phone {
    width: clamp(8rem, 20vw, 12rem);
  }

  .media-frame-landscape {
    width: clamp(17rem, 43vw, 27rem);
  }

  .project-rail {
    display: none;
  }
}

@media (max-width: 820px) {
  :root {
    --header-height: 4.75rem;
  }

  .site-header {
    padding: 0.5rem 1rem;
  }

  .site-brand img {
    width: 3.6rem;
    height: 3.6rem;
  }

  .has-js .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.8rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.55rem 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
  }

  .menu-toggle > span:first-child {
    position: relative;
    width: 1rem;
    height: 2px;
    background: currentColor;
  }

  .menu-toggle > span:first-child::before,
  .menu-toggle > span:first-child::after {
    content: "";
    position: absolute;
    left: 0;
    width: 1rem;
    height: 2px;
    background: currentColor;
  }

  .menu-toggle > span:first-child::before {
    top: -0.35rem;
  }

  .menu-toggle > span:first-child::after {
    top: 0.35rem;
  }

  .menu-label {
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .site-navigation {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 1rem;
    right: 1rem;
    display: grid;
    align-items: stretch;
    gap: 0.3rem;
    max-height: calc(100svh - var(--header-height) - 1rem);
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    padding: 0.65rem;
    background: rgba(15, 18, 27, 0.98);
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.4);
  }

  .has-js .site-navigation:not(.is-open) {
    display: none;
  }

  .site-navigation > a,
  .games-menu > summary {
    display: block;
    padding: 0.8rem;
  }

  .games-menu-panel {
    position: static;
    min-width: 0;
    margin-top: 0.35rem;
    border-radius: 0.8rem;
    box-shadow: none;
  }

  .games-menu-panel a {
    padding: 0.72rem 0.8rem;
  }

  .contact-section {
    grid-template-columns: 1fr;
  }

  .contact-mark img {
    width: min(13rem, 45vw);
  }

  .site-footer {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  .site-brand span {
    display: none;
  }

  .portfolio-hero {
    min-height: auto;
    gap: 3rem;
    padding: calc(var(--header-height) + 2.5rem) 1rem 3.5rem;
  }

  .hero-intro {
    padding-top: 0;
  }

  .hero-intro h1 {
    max-width: 12ch;
    font-size: clamp(3.55rem, 18vw, 5.4rem);
    line-height: 0.88;
  }

  .hero-intro h1 em {
    -webkit-text-stroke-width: 1px;
  }

  .hero-lede {
    font-size: 0.98rem;
    line-height: 1.65;
  }

  .hero-actions {
    align-items: stretch;
  }

  .hero-actions .button {
    flex: 1 1 auto;
  }

  .catalog-stats {
    margin-top: 2.5rem;
  }

  .catalog-stats dt {
    font-size: 0.9rem;
  }

  .catalog-stats dd {
    font-size: 0.57rem;
  }

  .game-reel {
    border-radius: 1.35rem;
    padding: 0.55rem;
  }

  .reel-stage {
    aspect-ratio: 0.92 / 1;
    border-radius: 1rem;
  }

  .reel-copy h2 {
    font-size: clamp(2.35rem, 12vw, 3.5rem);
  }

  .reel-tabs {
    display: flex;
    gap: 0.2rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    scrollbar-width: none;
  }

  .reel-tabs::-webkit-scrollbar {
    display: none;
  }

  .reel-tabs button {
    flex: 0 0 5.8rem;
  }

  .game-chapter {
    gap: 2.5rem;
    min-height: auto;
    padding: 6.5rem 1.1rem 7rem;
  }

  .chapter-copy h2 {
    max-width: 8ch;
    font-size: clamp(4.2rem, 22vw, 6.8rem);
  }

  .chapter-logo {
    width: 14rem;
    margin: -2rem 0 -0.8rem;
  }

  .chapter-lede {
    margin-top: 1.5rem;
    font-size: 1rem;
    line-height: 1.65;
  }

  .feature-tags {
    gap: 0.4rem;
  }

  .feature-tags li {
    padding: 0.45rem 0.62rem;
    font-size: 0.66rem;
  }

  .chapter-actions {
    align-items: stretch;
  }

  .chapter-actions .button {
    flex: 1 1 9rem;
  }

  .text-link,
  .availability-note {
    flex: 1 0 100%;
  }

  .chapter-media {
    min-height: 25rem;
  }

  .media-frame-wide {
    top: 3%;
    width: 96%;
    aspect-ratio: 4 / 3;
  }

  .media-frame-wide img {
    object-position: center;
  }

  .media-frame-phone {
    width: 8.4rem;
  }

  .media-frame-landscape {
    width: min(18rem, 80vw);
  }

  .media-frame-detail {
    bottom: 4%;
    border-width: 0.32rem;
    border-radius: 1rem;
  }

  .chapter-carousel {
    bottom: 3%;
    width: min(11rem, 48vw);
    border-width: 0.32rem;
    border-radius: 1.1rem;
  }

  .media-caption {
    top: 0;
  }

  .media-caption span {
    font-size: 0.58rem;
  }

  .next-chapter {
    right: 1.1rem;
    bottom: 1.6rem;
  }

  .contact-section {
    gap: 1.4rem;
    min-height: auto;
    padding: 6rem 1.25rem;
  }

  .contact-copy {
    order: 1;
  }

  .contact-mark {
    order: 2;
  }

  .contact-mark img {
    width: 8rem;
    margin: 1rem 0 0;
  }

  .contact-copy h2 {
    font-size: clamp(3.1rem, 15vw, 5rem);
  }

  .contact-copy > p {
    font-size: 0.98rem;
  }

  .site-footer {
    padding: 2.5rem 1.25rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
