@font-face {
  font-family: "Chakra Petch";
  src: url("assets/chakra-petch-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Chakra Petch";
  src: url("assets/chakra-petch-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Chakra Petch";
  src: url("assets/chakra-petch-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Chakra Petch";
  src: url("assets/chakra-petch-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #0a0a0f;
  --surface: #13131a;
  --text: #f5f5f5;
  --muted: #9ca3af;
  --line: #2a2a35;
  --border: 2px;
  --accent: #ff5722;
  --accent-hover: #ff7043;
  --on-accent: #0a0a0f;
  --font: "Chakra Petch", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html:has(.lightbox[open]) {
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font);
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

body,
figure,
p,
h1,
h2,
h3 {
  margin: 0;
}

a {
  color: inherit;
}

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

main:focus {
  outline: none;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

.container {
  width: min(100% - 112px, 1440px);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  transform: translateY(-160%);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}

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

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

/* Header */

.site-header {
  position: relative;
  z-index: 5;
  border-bottom: var(--border) solid var(--line);
  background: var(--background);
}

.header-inner {
  display: flex;
  min-height: 96px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  text-decoration: none;
}

.brand-wordmark {
  display: grid;
  gap: 2px;
  line-height: 1;
}

.brand-wordmark strong {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-wordmark span {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.28em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3vw, 48px);
}

.site-nav a,
.game-status,
.game-tags,
.button,
.site-footer,
.lightbox-counter {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav a {
  color: #d1d5db;
  font-size: 16px;
  text-decoration: none;
  transition: color 180ms ease;
}

.site-nav a:hover {
  color: var(--accent);
}

.site-nav .nav-contact {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  border: var(--border) solid #4b4b5a;
  color: var(--text);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  transition: border-color 180ms ease, color 180ms ease;
}

.nav-contact:hover {
  border-color: var(--accent);
}

.nav-contact svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-width: 1.8;
}

/* Hero */

.hero {
  position: relative;
  display: flex;
  min-height: max(680px, calc(100svh - 96px));
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  border-bottom: var(--border) solid var(--line);
  background:
    radial-gradient(ellipse at 74% 48%, rgba(255, 87, 34, 0.06), transparent 38%),
    var(--background);
}

.hero::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  background-image:
    linear-gradient(rgba(200, 202, 214, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 202, 214, 0.05) 1px, transparent 1px);
  background-position: center center;
  background-size: 80px 80px;
  content: "";
  mask-image: radial-gradient(ellipse at 74% 48%, #000 2%, transparent 64%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding-block: 80px;
}

.hero-art {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-art::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 10, 15, 0.85), rgba(10, 10, 15, 0.35) 45%, transparent 75%),
    linear-gradient(0deg, rgba(10, 10, 15, 0.5), transparent 30%);
  content: "";
}

.hero h1 {
  font-size: clamp(6rem, 11vw, 11rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.86;
}

.hero-description {
  max-width: 520px;
  margin-top: 32px;
  color: #c9cbd3;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 500;
  line-height: 1.3;
}

.button {
  display: inline-flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  padding: 0 26px;
  font-size: 17px;
  text-decoration: none;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.button:focus-visible,
.nav-contact:focus-visible {
  clip-path: none;
}

.button svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-width: 2;
}

.button-primary {
  margin-top: 44px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}

.button-primary:hover {
  background: var(--accent-hover);
}

/* Game */

.section-spacing {
  padding-block: clamp(100px, 11vw, 160px);
}

.game-section {
  background: #0d0d12;
  scroll-margin-top: 20px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
}

.section-heading h2 {
  font-size: clamp(3rem, 6.5vw, 6.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.95;
}

.heading-mark {
  padding-bottom: 6px;
  color: var(--accent);
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
}

.game-card {
  background: var(--surface);
}

.game-gallery {
  display: grid;
  grid-template-columns: 1.75fr 1fr;
  gap: 6px;
  background: var(--background);
}

.game-gallery-main,
.game-gallery-side figure {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #1c1c26;
}

.game-gallery-main {
  aspect-ratio: 16 / 9;
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 0 100%);
}

.game-gallery-side {
  display: grid;
  min-height: 0;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.game-gallery-side figure:last-child {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0 100%);
}

.shot {
  position: absolute;
  inset: 0;
  display: block;
  cursor: zoom-in;
}

.shot:focus-visible {
  outline-offset: -4px;
}

.game-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.75) brightness(0.78);
  transition: filter 400ms ease, transform 700ms ease;
}

.game-gallery figure:hover .game-screenshot {
  filter: saturate(0.9) brightness(0.9);
  transform: scale(1.025);
}

.game-gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 5, 8, 0.5), transparent 40%, rgba(5, 5, 8, 0.78));
  pointer-events: none;
}

.game-status {
  position: absolute;
  top: 28px;
  left: 30px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: var(--border) solid rgba(255, 87, 34, 0.4);
  background: rgba(10, 10, 15, 0.82);
  color: #e5e7eb;
  font-size: 14px;
  pointer-events: none;
}

.signal-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(255, 87, 34, 0.7);
}

.game-logo {
  position: absolute;
  bottom: 32px;
  left: 30px;
  width: min(42%, 320px);
  height: auto;
  pointer-events: none;
}

.game-info {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto auto;
  align-items: center;
  gap: 36px;
  padding: 36px;
  border: var(--border) solid var(--line);
  border-top: 0;
}

.game-copy p {
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(1.15rem, 1.5vw, 1.4rem);
  font-weight: 500;
  line-height: 1.45;
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #c9cbd3;
  font-size: 14px;
}

.game-tags span {
  padding: 10px 14px;
  border: var(--border) solid #3a3a48;
}

.button-outline {
  min-width: 230px;
  border: var(--border) solid #6b6b7b;
  color: var(--text);
}

.button-outline:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

/* Lightbox */

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 72px 104px;
  border: 0;
  background: #050508;
  color: var(--text);
}

.lightbox::backdrop {
  background: rgba(5, 5, 8, 0.7);
}

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

.lightbox-figure {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  align-content: center;
  gap: 18px;
}

.lightbox-image {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100dvh - 190px);
  object-fit: contain;
  touch-action: pan-y;
  user-select: none;
}

.lightbox-counter {
  color: var(--muted);
  font-size: 14px;
}

.lightbox-button {
  position: absolute;
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  padding: 0;
  border: var(--border) solid #4b4b5a;
  background: rgba(10, 10, 15, 0.82);
  color: var(--text);
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  transition: border-color 180ms ease, color 180ms ease;
}

.lightbox-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.lightbox-button:focus-visible {
  clip-path: none;
  outline-offset: 3px;
}

.lightbox-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-width: 2;
}

.lightbox-close {
  top: 24px;
  right: 24px;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

/* Contact */

.contact-section {
  position: relative;
  overflow: hidden;
  border-top: var(--border) solid var(--line);
  background:
    radial-gradient(ellipse at 83% 85%, rgba(255, 87, 34, 0.07), transparent 38%),
    var(--background);
  scroll-margin-top: 20px;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 0.7fr;
  align-items: end;
  gap: 50px;
}

.contact-layout h2 {
  font-size: clamp(4rem, 9vw, 9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.9;
}

.contact-copy {
  padding-bottom: 8px;
}

.contact-copy p {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: clamp(1.25rem, 1.6vw, 1.5rem);
  font-weight: 500;
  line-height: 1.4;
}

.contact-email {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--accent);
  color: var(--text);
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 180ms ease;
}

.contact-email:hover {
  color: var(--accent);
}

.contact-email svg {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
}

/* Footer */

.site-footer {
  border-top: var(--border) solid var(--line);
  color: #8b8d98;
  font-size: 14px;
}

.footer-inner {
  display: flex;
  min-height: 110px;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.footer-brand {
  color: var(--text);
}

.footer-brand .brand-wordmark strong {
  font-size: 23px;
}

.footer-brand .brand-wordmark span {
  font-size: 8px;
}

@media (max-width: 1000px) {
  .container {
    width: min(100% - 64px, 1440px);
  }

  .game-info {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .game-copy,
  .game-tags {
    grid-column: 1;
  }

  .game-info .button {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 16px;
  }

  .container {
    width: calc(100% - 40px);
  }

  .header-inner {
    min-height: 0;
    flex-wrap: wrap;
    gap: 14px 12px;
    padding-block: 16px 14px;
  }

  .brand-wordmark strong {
    font-size: 22px;
  }

  .brand-wordmark span {
    font-size: 8px;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: 14px;
    padding-top: 14px;
    border-top: var(--border) solid var(--line);
  }

  /* The brand link already returns to the top on small screens. */
  .site-nav a[href="#studio"] {
    display: none;
  }

  .site-nav a {
    font-size: 14px;
    white-space: nowrap;
  }

  .site-nav .nav-contact {
    min-height: 42px;
    gap: 10px;
    padding-inline: 14px;
  }

  .hero {
    min-height: max(600px, calc(100svh - 132px));
  }

  .hero-inner {
    padding-block: 72px;
  }

  .hero-art {
    opacity: 0.6;
  }

  .hero-art img {
    object-position: 30% center;
  }

  .hero h1 {
    font-size: clamp(4.5rem, 22vw, 7rem);
    text-shadow: 0 3px 28px rgba(10, 10, 15, 0.55);
  }

  .hero-description {
    margin-top: 24px;
    font-size: 1.4rem;
  }

  .button-primary {
    margin-top: 32px;
  }

  .section-spacing {
    padding-block: 88px;
  }

  .section-heading {
    margin-bottom: 28px;
  }

  .section-heading h2 {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .heading-mark {
    display: none;
  }

  .game-gallery {
    grid-template-columns: 1fr;
  }

  .game-gallery-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
  }

  .game-gallery-side figure {
    aspect-ratio: 16 / 9;
  }

  .game-status {
    top: 14px;
    left: 14px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .game-logo {
    bottom: 16px;
    left: 14px;
    width: min(50%, 230px);
  }

  .game-info {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 26px 20px;
  }

  .game-copy,
  .game-tags,
  .game-info .button {
    grid-column: auto;
    grid-row: auto;
  }

  .game-info .button {
    width: 100%;
  }

  .lightbox {
    padding: 80px 12px 104px;
  }

  .lightbox-image {
    max-height: calc(100dvh - 230px);
  }

  .lightbox-close {
    top: 16px;
    right: 12px;
  }

  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: 24px;
    transform: none;
  }

  .lightbox-prev {
    left: 12px;
  }

  .lightbox-next {
    right: 12px;
  }

  .contact-layout h2 {
    font-size: clamp(3.5rem, 17vw, 5.5rem);
  }

  .footer-inner {
    min-height: 0;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 16px 28px;
    padding-block: 30px;
  }

  .footer-brand {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .site-nav {
    gap: 8px;
  }

  .site-nav a {
    font-size: 13px;
    letter-spacing: 0.04em;
  }

  .site-nav .nav-contact {
    padding-inline: 12px;
  }

  .nav-contact svg {
    display: none;
  }
}

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

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