@font-face {
  font-family: "Nunito";
  src: url("/assets/nunito-extrabold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("/assets/nunito-extrabold.ttf") format("truetype");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

:root {
  --paper: #f1dfb8;
  --paper-light: #f8edcf;
  --ink: #20140f;
  --earth: #24170f;
  --orange: #ed6016;
  --orange-dark: #b93e08;
  --survey-green: #667c6b;
  --white: #fff9eb;
  --display: "Nunito", "Arial Rounded MT Bold", sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --page-gutter: clamp(1.25rem, 4vw, 4rem);
  --content-width: 80rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-width: 20rem;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

h1,
h2,
p,
figure {
  margin-top: 0;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 0.92;
}

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

a {
  color: inherit;
  text-underline-offset: 0.25em;
}

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

button:focus-visible,
a:focus-visible,
iframe:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 4px;
  box-shadow: 0 0 0 6px var(--orange-dark);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 0.9rem;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-180%);
}

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

.site-header {
  display: grid;
  grid-template-columns: minmax(8rem, 10rem) 1fr auto;
  align-items: center;
  gap: 2rem;
  width: 100%;
  padding: 1rem var(--page-gutter);
  border-bottom: 1px solid rgb(32 20 15 / 18%);
  background: var(--paper-light);
}

.studio-mark img {
  width: 8.75rem;
}

.site-nav {
  display: flex;
  justify-content: flex-end;
  gap: clamp(1rem, 3vw, 2rem);
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.site-nav a,
.footer-links a {
  text-decoration: none;
}

.site-nav a:hover,
.footer-links a:hover {
  text-decoration: underline;
}

.language-switch {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding-left: 1rem;
  border-left: 1px solid rgb(32 20 15 / 24%);
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 700;
}

.language-switch button {
  padding: 0.2rem;
  border: 0;
  color: rgb(32 20 15 / 75%);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.language-switch button[aria-pressed="true"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 0.18em;
  text-underline-offset: 0.25em;
}

.game-hero {
  display: grid;
  grid-template-areas:
    "copy art"
    "actions art";
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
  grid-template-rows: auto 1fr;
  align-items: center;
  gap: 1.75rem clamp(3rem, 7vw, 7rem);
  max-width: var(--content-width);
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) var(--page-gutter) clamp(4rem, 7vw, 6rem);
}

.game-copy {
  grid-area: copy;
  min-width: 0;
}

.game-status {
  width: max-content;
  margin-bottom: 1rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--survey-green);
  color: var(--orange-dark);
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.11em;
}

h1 {
  max-width: 11ch;
  margin-bottom: 1.25rem;
  font-size: clamp(3.4rem, 7vw, 5.2rem);
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

h1 span {
  display: block;
}

.game-name {
  margin-bottom: 0.12em;
  color: var(--orange-dark);
  font-size: 1em;
  line-height: 0.9;
  letter-spacing: -0.035em;
}

.game-subtitle {
  max-width: 9ch;
  color: var(--ink);
  font-size: 0.72em;
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.game-description {
  max-width: 65ch;
  margin-bottom: 0;
  font-size: clamp(1rem, 1.3vw, 1.1rem);
}

.game-key-art {
  grid-area: art;
  justify-self: end;
  width: min(100%, 27rem);
  margin: 0;
  padding: 0.45rem;
  border: 1px solid rgb(32 20 15 / 26%);
  background: rgb(248 237 207 / 60%);
  box-shadow: 0 1rem 2rem rgb(32 20 15 / 12%);
  transform: rotate(0.35deg);
}

.game-key-art img {
  width: 100%;
  aspect-ratio: 460 / 215;
}

.game-actions {
  grid-area: actions;
  align-self: start;
  min-width: 0;
}

.steam-store-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(100%, 23rem);
  min-height: 4.4rem;
  padding: 0.65rem 0.75rem 0.65rem 1.1rem;
  border: 1px solid #66c0f4;
  color: #d6e7f5;
  background: linear-gradient(135deg, #1b2838, #2a475e);
  box-shadow: 0 0.55rem 1.1rem rgb(27 40 56 / 18%);
  text-decoration: none;
  transition: background-color 180ms ease-out, border-color 180ms ease-out, transform 180ms ease-out;
}

.steam-store-link:hover {
  border-color: #9bd8fa;
  background: linear-gradient(135deg, #203a50, #316282);
  transform: translateY(-2px);
}

.steam-store-link small,
.steam-store-link strong {
  display: block;
}

.steam-store-link small {
  margin-bottom: 0.15rem;
  color: #66c0f4;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.steam-store-link strong {
  color: #fff;
  font-family: var(--display);
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

.steam-store-link svg {
  width: 2.55rem;
  padding: 0.65rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #66c0f4;
  fill: none;
  stroke: #1b2838;
  stroke-width: 1.8;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.trailer-action {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.15rem;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.trailer-action svg {
  width: 1.35rem;
  fill: var(--orange-dark);
}

.studio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3rem;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: clamp(3.5rem, 6vw, 5rem) var(--page-gutter);
  border-top: 1px solid rgb(32 20 15 / 18%);
}

.studio-intro {
  display: grid;
  grid-template-columns: 3.75rem minmax(0, 1fr);
  align-items: center;
  gap: 1.35rem;
}

.studio-intro > img {
  width: 3.75rem;
}

.studio-intro > div {
  min-width: 0;
}

.studio h2 {
  margin-bottom: 0.45rem;
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.studio-intro p {
  margin-bottom: 0;
  color: rgb(32 20 15 / 72%);
}

.team-names {
  display: flex;
  gap: 1rem;
}

.team-names > span {
  display: grid;
  grid-template-columns: 2.6rem auto;
  align-items: center;
  gap: 0.7rem;
  min-width: 7.5rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgb(32 20 15 / 22%);
}

.team-names b {
  display: grid;
  width: 2.6rem;
  aspect-ratio: 1;
  place-items: center;
  color: var(--paper-light);
  background: var(--earth);
  font-family: var(--display);
  font-size: 1.7rem;
  clip-path: polygon(8% 0, 100% 0, 100% 82%, 82% 100%, 0 100%, 0 18%);
}

.team-names strong {
  font-family: var(--display);
  font-size: 1.35rem;
  text-transform: uppercase;
}

.site-footer {
  display: grid;
  grid-template-columns: 8rem 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem var(--page-gutter);
  color: var(--paper);
  background: #100c09;
  font-size: 0.78rem;
}

.footer-logo img {
  width: 7rem;
}

.site-footer p {
  margin-bottom: 0;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 1rem;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.light-action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 3.25rem;
  padding: 0.7rem 0.9rem 0.7rem 1.1rem;
  color: var(--ink);
  background: var(--paper-light);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.light-action svg {
  width: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.error-page {
  display: grid;
  min-height: 100vh;
  padding: var(--page-gutter);
  place-content: center;
  justify-items: start;
  color: var(--white);
  background: var(--earth);
}

.error-page > img {
  width: 5rem;
  margin-bottom: 2rem;
}

.error-page .error-code {
  margin-bottom: 0.5rem;
  color: var(--orange);
  font-family: var(--display);
  letter-spacing: 0.14em;
}

.error-page h1 {
  margin-bottom: 1rem;
}

.error-page > p:not(.error-code) {
  margin-bottom: 2rem;
  color: #e2cfaa;
}

@media (max-width: 850px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    display: none;
  }

  .game-hero {
    grid-template-areas:
      "copy"
      "art"
      "actions";
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 2rem;
    max-width: 44rem;
  }

  .game-key-art {
    justify-self: start;
    width: min(100%, 25rem);
  }

  .studio {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .team-names {
    justify-self: start;
  }
}

@media (max-width: 520px) {
  :root {
    --page-gutter: 1rem;
  }

  .site-header {
    padding-block: 0.85rem;
  }

  .studio-mark img {
    width: 7.6rem;
  }

  .language-switch {
    padding-left: 0.7rem;
  }

  .game-hero {
    padding-top: 3rem;
    padding-bottom: 3.5rem;
  }

  h1 {
    font-size: clamp(2.8rem, 12.5vw, 3.35rem);
  }

  .game-description {
    font-size: 0.98rem;
  }

  .game-key-art {
    width: 100%;
    padding: 0.3rem;
  }

  .studio {
    padding-block: 3.25rem;
  }

  .studio-intro {
    grid-template-columns: 3rem 1fr;
    gap: 1rem;
  }

  .studio-intro > img {
    width: 3rem;
  }

  .studio h2 {
    font-size: 2.65rem;
  }

  .team-names {
    width: 100%;
  }

  .team-names > span {
    min-width: 0;
    flex: 1;
  }

  .site-footer {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 1rem;
  }

  .site-footer p {
    text-align: left;
  }
}

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