/* Studio site, "modern comic" brand: flat yellow/red/blue, ink outlines,
   hard offset shadows, halftone dots, Rubik lettering. */

@font-face {
  font-family: 'Rubik';
  src: url('fonts/Rubik.ttf') format('truetype');
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --yellow: #ffd43b;
  --yellow-deep: #fcc419;
  --red: #ff6b6b;
  --blue: #4dabf7;
  --ink: #111111;
  --paper: #fffaf0;
  --text: #1d1d1d;
  --muted: #4a4a4a;
  --line: 4px;
  --shadow: 7px 7px 0 var(--ink);
  --radius: 18px;
  --max: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --halftone: radial-gradient(rgba(17, 17, 17, 0.16) 22%, transparent 24%);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--yellow);
  color: var(--text);
  font-family: 'Rubik', 'Arial', sans-serif;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

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

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: 10px;
}

.skip:focus {
  left: 16px;
}

/* --- Header ------------------------------------------------------------- */

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px var(--gutter);
  background: var(--paper);
  border-bottom: var(--line) solid var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand img {
  border: 3px solid var(--ink);
  border-radius: 12px;
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav a {
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
}

.nav a:hover {
  background: var(--yellow);
}

.lang {
  display: flex;
  border: 3px solid var(--ink);
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.lang button {
  min-width: 46px;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  font: 800 15px/1 'Rubik', sans-serif;
  cursor: pointer;
}

.lang button + button {
  border-left: 3px solid var(--ink);
}

.lang button[aria-pressed='true'] {
  background: var(--ink);
  color: var(--yellow);
}

/* --- Comic bits shared by sections ----------------------------------------- */

.p-gt {
  color: var(--red);
}

.p-us {
  color: var(--blue);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Inked lettering: colored fill, ink outline, solid offset shadow. */
.ink {
  display: block;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.98;
  -webkit-text-stroke: 0.09em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0.07em 0.07em 0 var(--ink);
}

.ink-red {
  color: var(--red);
}

.ink-blue {
  color: var(--blue);
}

.panel {
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 12px 26px;
  border: var(--line) solid var(--ink);
  border-radius: 14px;
  box-shadow: 5px 5px 0 var(--ink);
  font-weight: 800;
  font-size: 19px;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--ink);
}

.btn:active {
  transform: translate(4px, 4px);
  box-shadow: 1px 1px 0 var(--ink);
}

.btn-red {
  background: var(--red);
  color: var(--ink);
}

.btn-blue {
  background: var(--blue);
  color: var(--ink);
}

.btn-white {
  background: var(--paper);
  color: var(--ink);
}

/* --- Hero --------------------------------------------------------------- */

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(78vh, 760px);
  padding: 56px var(--gutter) 64px;
  background: var(--yellow) url('img/hero-art.webp') center / cover no-repeat;
  border-bottom: var(--line) solid var(--ink);
  text-align: center;
}

@media (max-width: 1024px) {
  .hero {
    background-image: url('img/hero-art-1024.webp');
  }
}

.hero-inner {
  position: relative;
  max-width: 560px;
}

.prompt {
  margin: 0 0 4px;
  font-weight: 900;
  font-size: clamp(64px, 11vw, 120px);
  line-height: 1;
  -webkit-text-stroke: 0.09em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0.06em 0.06em 0 var(--ink);
}

.hero-title {
  margin: 0;
  font-size: clamp(54px, 10vw, 96px);
}

.tagline {
  margin: 18px 0 6px;
  font-weight: 800;
  font-size: clamp(22px, 3.4vw, 30px);
}

.heart {
  color: var(--red);
}

.hero-sub {
  margin: 0 auto 26px;
  max-width: 30ch;
  font-size: clamp(17px, 2.2vw, 20px);
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

/* On narrow screens the art's objects sit behind the text: soften them. */
@media (max-width: 700px) {
  .hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
      ellipse at center,
      rgba(255, 212, 59, 0.92) 40%,
      rgba(255, 212, 59, 0.55) 75%
    );
  }
}

/* --- Sections ------------------------------------------------------------ */

.section {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 72px var(--gutter) 24px;
}

.section:last-of-type {
  padding-bottom: 80px;
}

.banner {
  display: inline-block;
  margin: 0 0 32px;
  padding: 8px 26px 10px;
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-weight: 900;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.1;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

.banner-blue {
  background: var(--blue);
}

.banner-red {
  background: var(--red);
}

/* --- Games ---------------------------------------------------------------- */

.games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 28px;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-art {
  position: relative;
  aspect-ratio: 16 / 9;
  border-bottom: var(--line) solid var(--ink);
  background: #e7eefc;
}

.card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sticker {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  transform: rotate(4deg);
}

.sticker-red {
  background: var(--red);
}

.sticker-blue {
  background: var(--blue);
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  padding: 16px 18px 20px;
  font-size: 16px;
  line-height: 1.45;
}

.card-body p {
  margin: 0;
}

.card-body .btn {
  align-self: stretch;
  min-height: 48px;
  margin-top: auto;
  padding: 10px 18px;
  font-size: 17px;
}

.card-title {
  margin: 0;
  font-weight: 900;
  font-size: 24px;
  line-height: 1.1;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 2px 10px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

/* --- About ----------------------------------------------------------------- */

.about {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 32px;
  align-items: start;
}

/* Halftone dots fade out from the top right corner. */
.about-text {
  padding: 28px 30px;
  background:
    linear-gradient(
      to bottom left,
      transparent 0 80px,
      var(--paper) 200px
    ),
    var(--halftone) 0 0 / 14px 14px,
    var(--paper);
}

.about-text p {
  margin: 0 0 14px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-h {
  margin: 22px 0 8px;
  font-weight: 900;
  font-size: 24px;
}

.perks {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.perk {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 16px;
  align-items: center;
  padding: 16px 20px;
}

.perk strong {
  font-weight: 900;
  font-size: 21px;
  line-height: 1.2;
}

.perk span:last-child {
  grid-column: 2;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.35;
}

.perk-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 24px;
  color: var(--ink);
}

.perk-yellow {
  background: var(--yellow);
}

.perk-blue {
  background: var(--blue);
}

.perk-red {
  background: var(--red);
}

/* --- Contacts ------------------------------------------------------------ */

.contact {
  display: flex;
  gap: 32px;
  align-items: center;
  padding: 30px;
}

.contact-art {
  flex-shrink: 0;
  border: var(--line) solid var(--ink);
  border-radius: 24px;
  transform: rotate(-4deg);
}

.contact p {
  margin: 0 0 14px;
}

.contact-lead {
  font-weight: 900;
  font-size: 26px;
  line-height: 1.2;
}

.contact .hero-actions {
  justify-content: flex-start;
  margin-top: 22px;
}

/* --- Footer ----------------------------------------------------------------- */

.footer {
  padding: 22px var(--gutter);
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  font-weight: 700;
}

.footer p {
  margin: 0;
}

/* --- Small screens ----------------------------------------------------------- */

@media (max-width: 860px) {
  .about {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 17px;
  }

  .nav {
    display: none;
  }

  .lang {
    margin-left: auto;
  }

  .brand {
    font-size: 18px;
  }

  .section {
    padding-top: 56px;
  }

  .contact {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
  }

  .contact-art {
    width: 120px;
  }

  .contact .hero-actions {
    justify-content: center;
  }

  .btn {
    width: 100%;
  }

  .card-body .btn {
    align-self: stretch;
  }
}

/* --- Hover effects ------------------------------------------------------------
   Only for real pointers (no sticky hover after a tap on phones) and only
   when the visitor hasn't asked for less motion. */

.brand img,
.nav a,
.lang button,
.hero-title .ink,
.prompt span,
.banner,
.card,
.card-art img,
.chips li,
.perk,
.perk-icon,
.contact-art {
  transition:
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.prompt span {
  display: inline-block;
}

.nav a {
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 4px;
  border-radius: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* A glossy sheen that sweeps across a button. */
.btn::after {
  content: '';
  position: absolute;
  inset: -4px auto -4px -60%;
  z-index: -1;
  width: 40%;
  background: rgba(255, 255, 255, 0.55);
  transform: skewX(-20deg);
  transition: left 0.45s ease;
  pointer-events: none;
}

.btn-white::after {
  background: rgba(255, 212, 59, 0.7);
}

@keyframes wiggle {
  0%,
  100% {
    transform: rotate(4deg);
  }
  25% {
    transform: rotate(-6deg) scale(1.12);
  }
  50% {
    transform: rotate(8deg) scale(1.12);
  }
  75% {
    transform: rotate(-3deg) scale(1.05);
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-0.18em) rotate(-8deg);
  }
  70% {
    transform: translateY(0.04em);
  }
}

@keyframes beat {
  0%,
  100% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.35);
  }
  60% {
    transform: scale(0.95);
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .brand:hover img {
    transform: rotate(-10deg) scale(1.1);
  }

  .nav a:hover {
    background: transparent;
  }

  .nav a:hover::after {
    transform: scaleX(1);
  }

  .lang button[aria-pressed='false']:hover {
    background: var(--yellow);
  }

  .btn:hover::after {
    left: 130%;
  }

  /* Hero: the lettering leans apart, the prompt hops. */
  .hero-title:hover .ink-red {
    transform: translateX(-0.06em) rotate(-3deg);
  }

  .hero-title:hover .ink-blue {
    transform: translateX(0.06em) rotate(3deg);
  }

  .prompt:hover .p-gt {
    animation: bounce 0.6s ease;
  }

  .tagline:hover .heart {
    display: inline-block;
    animation: beat 0.7s ease infinite;
  }

  .banner:hover {
    transform: rotate(1deg) scale(1.04);
  }

  /* Game cards lift and tilt; the art zooms in; the sticker wiggles. */
  .card:hover {
    transform: translate(-5px, -5px) rotate(-0.8deg);
    box-shadow: 13px 13px 0 var(--ink);
  }

  .card:nth-child(even):hover {
    transform: translate(-5px, -5px) rotate(0.8deg);
  }

  .card-art {
    overflow: hidden;
  }

  .card:hover .card-art img {
    transform: scale(1.07);
  }

  .card:hover .sticker {
    animation: wiggle 0.6s ease;
  }

  .chips li:hover {
    transform: translateY(-3px) rotate(-4deg);
    background: var(--blue);
  }

  .chips li:nth-child(2n):hover {
    transform: translateY(-3px) rotate(4deg);
    background: var(--red);
  }

  .perk:hover {
    transform: translate(-4px, -4px);
    box-shadow: 11px 11px 0 var(--ink);
  }

  .perk:hover .perk-icon {
    transform: rotate(-12deg) scale(1.15);
  }

  .contact-art:hover {
    transform: rotate(6deg) scale(1.06);
  }

  .footer:hover .p-gt {
    display: inline-block;
    animation: bounce 0.6s ease;
  }
}

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

  .p-us {
    animation: none;
  }

  .btn {
    transition: none;
  }
}
