@font-face {
  font-family: Bricolage;
  src: url("assets/bricolage-grotesque.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #14131b;
  --panel: #201e29;
  --line: #383442;
  --paper: #f8f5ed;
  --muted: #c0bacb;
  --acid: #f3f35a;
  --lilac: #c5b3ff;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-family: Bricolage, system-ui, sans-serif;
  font-synthesis: none;
  background-color: var(--ink);
  color: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
a, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--lilac); outline-offset: 5px; }
main:focus { outline: none; }
#games, #studio, #contact { scroll-margin-block-start: 1.5rem; }

.shell { width: min(100% - 6rem, 75rem); margin-inline: auto; }
.skip {
  position: absolute;
  z-index: 3;
  padding: .75rem 1rem;
  background: var(--acid);
  color: var(--ink);
  transform: translateY(-120%);
}
.skip:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}
.header-inner { min-height: 4.8rem; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--paper);
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 800;
  text-decoration: none;
}
.brand small {
  display: block;
  margin-top: .25rem;
  font: 600 .69rem/1 var(--mono);
  letter-spacing: .09em;
  text-transform: uppercase;
}
.brand-mark {
  position: relative;
  display: block;
  flex: none;
  width: 2.65rem;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: .38rem;
  background: #fff;
}
.brand-mark img {
  position: absolute;
  top: 1%;
  left: 6%;
  width: 88%;
  height: auto;
  clip-path: polygon(0 0, 100% 0, 100% 71%, 90% 72%, 80% 75%, 67% 77%, 53% 78%, 40% 78%, 27% 76%, 16% 74%, 9% 73%, 0 72%);
}
nav { display: flex; gap: clamp(1rem, 3vw, 2.5rem); align-items: center; }
nav a, .site-footer a {
  font-weight: 700;
  text-decoration-thickness: .1em;
  text-underline-offset: .25em;
  text-decoration-color: transparent;
}
nav a:hover, .site-footer a:hover { text-decoration-color: currentColor; }

.hero {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 78% 45%, #26203b 0%, var(--ink) 58%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 1.5rem;
  min-height: 34rem;
  padding-block: 2.65rem 3rem;
}
.hero-copy { position: relative; z-index: 1; container-type: inline-size; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--lilac);
  font: 600 .84rem/1.5 var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}
.diamond { flex: 0 0 .53rem; height: .53rem; transform: rotate(45deg); background: currentColor; }
h1 {
  margin-block: 1.1rem 1.25rem;
  font-size: min(13cqi, 5.6rem);
  font-weight: 800;
  line-height: .85;
  letter-spacing: -.033em;
}
h1 em { display: block; color: var(--acid); font-style: normal; }
.hero-intro {
  max-width: 29rem;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.6vw, 1.3rem);
  line-height: 1.5;
}
.button {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  min-height: 2.85rem;
  padding: .65rem 1.05rem;
  border: 1px solid transparent;
  border-radius: .32rem;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.15;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.button-primary {
  margin-top: 1.65rem;
  min-height: 3.15rem;
  padding-inline: 1.25rem;
  color: var(--ink);
  background: var(--acid);
}
.button-primary:hover { background: #ffffa3; }

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 27.5rem);
  aspect-ratio: 1;
  justify-self: center;
  perspective: 56rem;
}
.hero-art::before {
  position: absolute;
  inset: auto 9% 5% 11%;
  height: 15%;
  border-radius: 50%;
  background: #08070d;
  filter: blur(1.4rem);
  transform: rotate(-8deg);
  opacity: .65;
  content: "";
}
.hero-logo {
  position: relative;
  width: 64%;
  aspect-ratio: 576 / 800;
  transform: rotateX(var(--logo-tilt-x, 16deg)) rotateY(var(--logo-tilt-y, -25deg)) rotateZ(var(--logo-roll, -11deg));
  transform-style: preserve-3d;
  transition: transform .22s ease-out;
  --logo-radius: 10% / 7.2%;
  --layer-depth: clamp(.105rem, .23vw, .2rem);
}
.logo-spinner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.logo-face, .logo-depth {
  position: absolute;
  inset: 0;
  border-radius: var(--logo-radius);
}
.logo-depth {
  background: linear-gradient(155deg, #d4cddf 5%, #a097b5 55%, #6c6584 100%);
  transform: translateZ(calc(-1 * var(--layer) * var(--layer-depth)));
}
.logo-face {
  overflow: hidden;
  background: #fff;
  transform: translateZ(0);
}
.logo-face img { width: 100%; height: 100%; }
.logo-face::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 1px 1px 2px #fff, inset -2px -2px 3px #a19aaf80;
  pointer-events: none;
  content: "";
}

.games { padding-block: 3.5rem 5.5rem; }
.section-heading { margin-bottom: 1.45rem; }
h2 {
  font-size: clamp(3rem, 6.2vw, 5.5rem);
  font-weight: 800;
  line-height: .95;
  letter-spacing: -.033em;
}
.section-heading h2 span { color: var(--acid); }
.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 1.5rem;
}
.game-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--panel);
  --game-accent: var(--acid);
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .game-card {
    transition: transform .18s cubic-bezier(.2, .75, .3, 1), box-shadow .18s ease, border-color .18s ease;
  }
  .game-card:hover {
    transform: translateY(-.3rem) scale(1.025);
    border-color: color-mix(in srgb, var(--game-accent) 42%, var(--line));
    box-shadow: 0 .9rem 2rem #08070f80;
  }
}
.racers { --game-accent: var(--lilac); }
.game-art { position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 16 / 9; }
.game-backdrop { width: 100%; height: 100%; object-fit: cover; }
.valor .game-art { background: #176ba1; }
.valor-logo {
  position: absolute;
  top: 34%;
  left: 50%;
  width: 44%;
  height: auto;
  transform: translate(-50%, -50%);
}
.racers .game-art { background: #57362f; }
.racers .game-art::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: radial-gradient(ellipse 43% 100% at 69% 105%, #ffe1b2a3 0%, #ffc29152 45%, #f58e5724 72%, transparent 100%);
  pointer-events: none;
  content: "";
}
.racers-logo {
  position: absolute;
  z-index: 1;
  top: 7%;
  left: 4%;
  width: 34%;
  height: auto;
}
.racer-character {
  position: absolute;
  z-index: 1;
  width: auto;
  max-width: none;
  transform: translateX(-50%);
  filter: drop-shadow(0 .3rem .42rem #160c22a8);
}
.racer-ninja {
  bottom: -24%;
  left: 50%;
  height: 112%;
  transform: translateX(-50%) scaleX(-1);
}
.racer-pirate {
  bottom: -23%;
  left: 83%;
  height: 114%;
}
.racer-black {
  z-index: 2;
  bottom: -27%;
  left: 67%;
  height: 135%;
}
.game-status {
  position: absolute;
  z-index: 3;
  top: 1rem;
  left: 1rem;
  padding: .42rem .62rem;
  background: var(--game-accent);
  color: var(--ink);
  font: 700 .81rem/1.2 var(--mono);
  text-transform: uppercase;
}
.racers .game-status { right: 1rem; left: auto; }
.game-body { padding: clamp(1.25rem, 2.5vw, 2rem); }
.game-genre { color: var(--game-accent); }
.game-card h3 {
  margin-block: .4rem .67rem;
  font-size: clamp(2.05rem, 3.65vw, 3.6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
}
.game-body p:not(.eyebrow) {
  max-width: 30rem;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.5;
}
.game-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .85rem 1.15rem; margin-top: 1.25rem; }
.button-game { border-color: var(--game-accent); color: var(--game-accent); }
.button-game:hover { background: var(--game-accent); color: var(--ink); }
.text-link { color: var(--paper); font-weight: 700; text-underline-offset: .24em; }
.text-link:hover { color: var(--game-accent); }

.studio { background: var(--lilac); color: var(--ink); }
.studio-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
  padding-block: clamp(2.75rem, 6vw, 5.5rem);
}
.studio .eyebrow { color: var(--ink); margin-bottom: 1rem; }
.studio-copy p { max-width: 29rem; font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.43; }
.socials { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.35rem; }
.socials a { border-color: var(--ink); }
.socials a:hover { background: var(--ink); color: var(--lilac); }
.studio :focus-visible { outline-color: var(--ink); }

.contact {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  padding-block: clamp(3rem, 7vw, 5.75rem);
}
.contact h2 span { color: var(--acid); }
.contact-form {
  display: grid;
  gap: 1rem;
  padding: clamp(1.1rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--panel);
}
.contact-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.contact-form label { display: grid; gap: .45rem; font-weight: 700; }
.contact-form input, .contact-form textarea {
  width: 100%;
  min-height: 2.9rem;
  padding: .7rem .8rem;
  border: 1px solid #655d76;
  border-radius: .32rem;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-weight: 400;
}
.contact-form textarea { resize: vertical; }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.contact-actions .button { margin-top: 0; }
.contact-note { color: var(--muted); font-size: .94rem; line-height: 1.45; }
.site-footer { padding-block: 1.6rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }

@media (max-width: 66rem) {
  .shell { width: calc(100% - 4rem); }
  .hero-inner { min-height: 30rem; }
  h1 { font-size: min(12cqi, 5.6rem); }
}

@media (max-width: 48rem) {
  .shell { width: calc(100% - 2.5rem); }
  .header-inner { min-height: 4.4rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 1.6rem; padding-block: 2.7rem 2.25rem; }
  .hero-art { width: min(75%, 21rem); }
  .games { padding-block: 2.8rem 3.5rem; }
  .game-grid, .studio-inner, .contact { grid-template-columns: 1fr; }
}

@media (max-width: 25rem) {
  .shell { width: calc(100% - 2rem); }
  .header-inner { gap: .5rem; }
  .brand { font-size: 1.05rem; gap: .45rem; }
  .brand-mark { width: 2.25rem; }
  nav { gap: .48rem; font-size: .875rem; }
  .contact-fields { grid-template-columns: 1fr; }
  .game-status { top: .65rem; left: .65rem; }
  .racers .game-status { right: .65rem; }
}

@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
  .hero-logo { transition: none; }
}
