@font-face {
  font-family: "Archivo";
  src: url("fonts/Archivo-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Archivo";
  src: url("fonts/Archivo-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Archivo";
  src: url("fonts/Archivo-Black.ttf") format("truetype");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f7f7f5;
  --ink: #050505;
  --blue: #2e32ff;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button {
  color: inherit;
  font: inherit;
}

.stage {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: clamp(24px, 4vw, 64px);
  background: var(--paper);
  transition:
    transform 1.05s var(--ease-in-out),
    filter 1.05s var(--ease-in-out),
    opacity 650ms ease;
}

.brand-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.25vw, 36px);
  width: min(88vw, 1160px);
}

.mark-slot {
  position: relative;
  flex: 0 0 clamp(76px, 17.2vw, 208px);
  width: clamp(76px, 17.2vw, 208px);
  aspect-ratio: 1;
}

.mark-motion {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform-origin: 50% 50%;
  animation: markRollIn 2.65s 2.45s var(--ease-out) both;
  will-change: transform, opacity;
}

.brand-mark {
  display: block;
  width: 100%;
  height: 100%;
}

.wordmark-reveal {
  position: relative;
  flex: 0 1 min(66vw, 900px);
  width: min(66vw, 900px);
  overflow: visible;
}

.wordmark {
  display: block;
  width: 100%;
  height: auto;
  clip-path: inset(0 100% 0 0);
  animation: wordmarkReveal 1.5s 1s var(--ease-out) forwards;
}

.typing-caret {
  position: absolute;
  z-index: 2;
  top: 2%;
  bottom: 2%;
  left: 0;
  width: 3px;
  background: var(--ink);
  opacity: 1;
  animation:
    caretBlink 500ms 0ms step-end 2,
    caretTravel 1.5s 1s var(--ease-out) forwards,
    caretFade 480ms 2.54s ease forwards;
}

.corner-note {
  position: fixed;
  right: clamp(22px, 3vw, 46px);
  bottom: clamp(22px, 3vw, 46px);
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(10px);
  animation: noteIn 700ms 5.35s var(--ease-out) forwards;
}

.info-toggle {
  position: fixed;
  z-index: 30;
  top: clamp(22px, 3vw, 46px);
  right: clamp(22px, 3vw, 46px);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  overflow: hidden;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-14px);
  animation: buttonIn 700ms 5.15s var(--ease-out) forwards;
  transition:
    color 260ms ease,
    background-color 260ms ease,
    transform 600ms var(--ease-out);
}

.info-toggle:hover,
.info-toggle:focus-visible {
  color: var(--paper);
  background: var(--ink);
  outline: none;
}

.info-glyph {
  position: absolute;
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-1px) scale(1);
  transition:
    opacity 350ms ease,
    transform 500ms var(--ease-out);
}

.close-glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: rotate(-70deg) scale(0.6);
  transition:
    opacity 350ms ease,
    transform 650ms var(--ease-out);
}

.close-glyph span {
  position: absolute;
  width: 20px;
  height: 2px;
  background: currentColor;
}

.close-glyph span:first-child {
  transform: rotate(45deg);
}

.close-glyph span:last-child {
  transform: rotate(-45deg);
}

.about-panel {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding:
    clamp(28px, 4.5vw, 72px)
    clamp(28px, 5vw, 84px)
    clamp(32px, 4.5vw, 72px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  color: var(--ink);
  clip-path: circle(0 at calc(100% - clamp(45px, 5vw, 70px)) clamp(45px, 5vw, 70px));
  visibility: hidden;
  pointer-events: none;
  transition:
    clip-path 1.1s var(--ease-in-out),
    visibility 0s 1.1s;
}

.about-panel::before {
  content: "";
  position: fixed;
  inset: 0 auto auto 0;
  width: clamp(8px, 1vw, 14px);
  height: 100vh;
  height: 100dvh;
  background: var(--blue);
  pointer-events: none;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 850ms 0ms var(--ease-in-out);
}

.about-header {
  flex: 0 0 auto;
  padding-right: 72px;
  opacity: 0;
  transform: translateY(-14px);
  transition:
    opacity 450ms 0ms ease,
    transform 650ms 0ms var(--ease-out);
}

.about-full-logo {
  display: block;
  width: clamp(145px, 13vw, 220px);
  height: auto;
}

.about-content {
  flex: 0 0 auto;
  width: min(1160px, 100%);
  margin: auto 0;
  padding: clamp(56px, 8vh, 112px) 0;
}

.about-kicker,
.about-content h1,
.about-copy,
.about-footer {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 520ms ease,
    transform 850ms var(--ease-out);
}

.about-kicker {
  margin: 0 0 clamp(20px, 3.5vh, 42px);
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  font-weight: 700;
  line-height: 1.4;
}

.about-content h1 {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(3rem, 7.2vw, 7.6rem);
  font-weight: 900;
  letter-spacing: -0.065em;
  line-height: 0.92;
}

.about-copy {
  max-width: 46rem;
  margin: clamp(28px, 5vh, 54px) 0 0;
  font-size: clamp(1rem, 1.5vw, 1.28rem);
  line-height: 1.45;
}

.about-copy a {
  color: inherit;
  font-weight: 700;
  text-decoration-color: var(--blue);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  transition: color 220ms ease;
}

.about-copy a:hover,
.about-copy a:focus-visible {
  color: var(--blue);
}

.about-footer {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 28px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.about-footer p {
  margin: 0;
}

.studio-sections {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.45em;
}

.games-link {
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.studio-link {
  position: relative;
  color: inherit;
  text-decoration: none;
}

.games-link::after,
.studio-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 420ms var(--ease-out);
}

.games-link:hover::after,
.games-link:focus-visible::after,
.studio-link:hover::after,
.studio-link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.games-link:focus-visible,
.studio-link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 7px;
}

.games-panel {
  position: fixed;
  z-index: 24;
  inset: 0;
  padding:
    clamp(28px, 4.5vw, 72px)
    clamp(28px, 5vw, 84px)
    clamp(40px, 5vw, 84px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--ink);
  color: var(--paper);
  clip-path: circle(0 at clamp(72px, 8vw, 140px) calc(100% - clamp(52px, 7vw, 110px)));
  visibility: hidden;
  pointer-events: none;
  transition:
    clip-path 1.1s var(--ease-in-out),
    visibility 0s 1.1s;
}

.games-panel::before {
  content: "";
  position: fixed;
  inset: 0 auto auto 0;
  width: clamp(8px, 1vw, 14px);
  height: 100vh;
  height: 100dvh;
  background: var(--blue);
  pointer-events: none;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 850ms var(--ease-in-out);
}

.games-header,
.games-content {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 480ms ease,
    transform 780ms var(--ease-out);
}

.games-header {
  padding-right: 72px;
}

.games-logo {
  display: flex;
  align-items: center;
  gap: clamp(6px, 0.65vw, 10px);
  width: clamp(145px, 13vw, 220px);
}

.games-logo-icon {
  display: block;
  flex: 0 0 18%;
  width: 18%;
  height: auto;
}

.games-logo-wordmark {
  display: block;
  flex: 1 1 auto;
  width: 0;
  height: auto;
  filter: brightness(0) invert(1);
}

.games-content {
  width: min(1640px, 100%);
  margin-top: clamp(64px, 10vh, 132px);
}

.games-kicker {
  margin: 0 0 16px;
  color: var(--blue);
  font-size: clamp(0.9rem, 1.1vw, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.games-content > h1 {
  margin: 0 0 clamp(48px, 7vh, 92px);
  font-size: clamp(4.5rem, 10vw, 10rem);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 0.82;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 34px);
}

.game-card {
  min-width: 0;
  opacity: 0;
  transform: translateY(42px);
  transition:
    opacity 500ms ease,
    transform 800ms var(--ease-out);
}

.game-cover {
  position: relative;
  display: flex;
  align-items: flex-end;
  aspect-ratio: 2 / 3;
  padding: clamp(16px, 1.8vw, 28px);
  overflow: hidden;
  border: 2px solid rgba(247, 247, 245, 0.78);
  background: #151515;
  transition:
    color 420ms ease,
    background-color 420ms ease,
    transform 520ms var(--ease-out);
}

.game-cover::before,
.game-cover::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30%;
  height: 2px;
  background: currentColor;
  opacity: 0.22;
}

.game-cover::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.game-cover::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.game-cover span {
  position: relative;
  z-index: 1;
  font-size: clamp(2.5rem, 4vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.8;
}

.game-cover--art {
  padding: 0;
}

.game-cover--art::before,
.game-cover--art::after {
  display: none;
}

.game-cover--art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 650ms var(--ease-out);
}

.game-card:hover .game-cover {
  color: var(--ink);
  background: var(--blue);
  transform: translateY(-8px);
}

.game-card:hover .game-cover--art img {
  transform: scale(1.035);
}

.game-card h2 {
  margin: 18px 0 5px;
  font-size: clamp(1rem, 1.3vw, 1.3rem);
  font-weight: 700;
}

.game-card p {
  margin: 0;
  color: rgba(247, 247, 245, 0.58);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.game-card .game-description {
  margin-top: 14px;
  color: rgba(247, 247, 245, 0.78);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.5;
  text-transform: none;
}

.game-card .game-accolades {
  margin-top: 11px;
  color: var(--paper);
  font-size: 0.73rem;
  letter-spacing: 0.015em;
  line-height: 1.5;
  text-transform: none;
}

.panel-open .stage,
.games-open .stage {
  opacity: 0;
  transform: scale(1.035);
  filter: blur(9px);
}

.panel-open .about-panel {
  clip-path: circle(150vmax at calc(100% - clamp(45px, 5vw, 70px)) clamp(45px, 5vw, 70px));
  visibility: visible;
  pointer-events: auto;
  transition:
    clip-path 1.1s var(--ease-in-out),
    visibility 0s;
}

.panel-open .about-panel::before {
  transform: scaleY(1);
  transition-delay: 650ms;
}

.panel-open .about-header {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 680ms;
}

.panel-open .about-kicker {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 570ms;
}

.panel-open .about-content h1 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 650ms;
}

.panel-open .about-copy {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 760ms;
}

.panel-open .about-footer {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 850ms;
}

.games-open .games-panel {
  clip-path: circle(150vmax at clamp(72px, 8vw, 140px) calc(100% - clamp(52px, 7vw, 110px)));
  visibility: visible;
  pointer-events: auto;
  transition:
    clip-path 1.1s var(--ease-in-out),
    visibility 0s;
}

.games-open .games-panel::before {
  transform: scaleY(1);
  transition-delay: 620ms;
}

.games-open .games-header,
.games-open .games-content {
  opacity: 1;
  transform: translateY(0);
}

.games-open .games-header {
  transition-delay: 680ms;
}

.games-open .games-content {
  transition-delay: 590ms;
}

.games-open .game-card {
  opacity: 1;
  transform: translateY(0);
}

.games-open .game-card:nth-child(1) {
  transition-delay: 680ms;
}

.games-open .game-card:nth-child(2) {
  transition-delay: 730ms;
}

.games-open .game-card:nth-child(3) {
  transition-delay: 780ms;
}

.games-open .game-card:nth-child(4) {
  transition-delay: 830ms;
}

.games-open .game-card:nth-child(5) {
  transition-delay: 880ms;
}

.panel-open .info-glyph,
.games-open .info-glyph {
  opacity: 0;
  transform: translateY(-1px) rotate(70deg) scale(0.55);
}

.panel-open .close-glyph,
.games-open .close-glyph {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.games-open .info-toggle {
  color: var(--paper);
}

.games-open .info-toggle:hover,
.games-open .info-toggle:focus-visible {
  color: var(--ink);
  background: var(--paper);
}

@keyframes wordmarkReveal {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes caretBlink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

@keyframes caretTravel {
  0% {
    left: 0;
    opacity: 1;
  }
  100% {
    left: 100%;
    opacity: 1;
  }
}

@keyframes caretFade {
  to {
    opacity: 0;
  }
}

@keyframes markRollIn {
  0% {
    opacity: 0;
    transform: translate3d(82vw, -5%, 0) rotate(880deg) scale(0.9);
  }
  8% {
    opacity: 1;
  }
  72% {
    opacity: 1;
    transform: translate3d(-7%, 0, 0) rotate(-22deg) scale(1);
  }
  84% {
    opacity: 1;
    transform: translate3d(4%, -7%, 0) rotate(10deg) scale(1);
  }
  92% {
    opacity: 1;
    transform: translate3d(-1.5%, 0, 0) rotate(-4deg) scale(1);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0) scale(1);
  }
}

@keyframes noteIn {
  to {
    opacity: 0.42;
    transform: translateY(0);
  }
}

@keyframes buttonIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .stage {
    padding: 22px;
  }

  .brand-lockup {
    width: 92vw;
    gap: 13px;
  }

  .mark-slot {
    flex-basis: clamp(70px, 18vw, 84px);
    width: clamp(70px, 18vw, 84px);
  }

  .wordmark-reveal {
    flex-basis: 67vw;
    width: 67vw;
  }

  .info-toggle {
    top: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }

  .corner-note {
    right: 22px;
    bottom: 22px;
    max-width: 9rem;
    text-align: right;
    line-height: 1.35;
  }

  .about-panel {
    padding:
      max(26px, env(safe-area-inset-top))
      max(24px, env(safe-area-inset-right))
      max(28px, env(safe-area-inset-bottom))
      max(24px, env(safe-area-inset-left));
  }

  .about-header {
    padding-right: 62px;
  }

  .about-full-logo {
    width: clamp(150px, 48vw, 190px);
  }

  .about-content {
    width: 100%;
    margin: 0;
    padding: clamp(72px, 14vh, 118px) 0 clamp(58px, 11vh, 88px);
  }

  .about-kicker {
    margin-bottom: 26px;
    font-size: 1rem;
    line-height: 1.45;
  }

  .about-content h1 {
    max-width: 13ch;
    font-size: clamp(2.25rem, 9.8vw, 3.45rem);
    letter-spacing: -0.045em;
    line-height: 0.98;
  }

  .about-copy {
    max-width: 30rem;
    margin-top: 30px;
    font-size: 1.05rem;
    line-height: 1.6;
  }

  .about-footer {
    flex-direction: column;
    gap: 12px;
    font-size: 0.78rem;
    line-height: 1.55;
  }

  .games-panel {
    padding:
      max(26px, env(safe-area-inset-top))
      max(24px, env(safe-area-inset-right))
      max(34px, env(safe-area-inset-bottom))
      max(24px, env(safe-area-inset-left));
  }

  .games-header {
    padding-right: 62px;
  }

  .games-logo {
    width: clamp(150px, 48vw, 190px);
  }

  .games-content {
    margin-top: clamp(70px, 13vh, 110px);
  }

  .games-kicker {
    margin-bottom: 12px;
    font-size: 0.78rem;
  }

  .games-content > h1 {
    margin-bottom: 42px;
    font-size: clamp(4rem, 21vw, 6.2rem);
    line-height: 0.86;
  }

  .games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px 16px;
  }

  .game-cover {
    padding: 15px;
  }

  .game-cover span {
    font-size: clamp(2.25rem, 12vw, 3.5rem);
  }

  .game-card h2 {
    margin-top: 14px;
    font-size: 1rem;
  }

  .game-card p {
    font-size: 0.67rem;
    line-height: 1.4;
  }

  .game-card .game-description {
    margin-top: 12px;
    font-size: 0.78rem;
    line-height: 1.48;
  }

  .game-card .game-accolades {
    margin-top: 9px;
    font-size: 0.7rem;
    line-height: 1.45;
  }
}

@media (max-width: 700px) and (max-height: 700px) {
  .about-content {
    padding-top: 56px;
    padding-bottom: 48px;
  }
}

@media (max-width: 380px) {
  .about-content h1 {
    font-size: 2.2rem;
  }

  .about-copy {
    font-size: 1rem;
  }
}

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