/* Cloud Studios: home and game pages. Headings use the system's condensed heavy faces;
   buttons and pills use self-hosted Exo 2, the closest open font to the logo wordmark.
   A 1024px container on white, a black container-width bar, a centred wordmark hero flanked by
   rendered cut-out crowds, a 2-column card grid, a navy and a blue band, and a black footer. */
@font-face { font-family: "Exo 2"; font-weight: 800; font-display: swap; src: url("/fonts/exo2-800.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --ink: #000;
  --muted: #4d4d4d;
  --pill: #fb4a9d;
  --pill-ink: #191919;
  --blue: #0f62d6;
  --navy: #00214e;
  --line: #333;
  --container: 1024px;
  --gutter: 16px;
  --display: "Avenir Next Condensed", "Helvetica Neue", "Roboto Condensed", "Arial Narrow", sans-serif-condensed, Arial, sans-serif;
  --brand: "Exo 2", var(--text); /* the closest open font to the logo wordmark (fonts/OFL.txt) */
  --text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { background: #fff; scroll-padding-top: 16px; }
body {
  margin: 0;
  overflow-x: hidden;
  overflow-x: clip;
  background: #fff;
  color: var(--ink);
  font: 16px/1.65 var(--text);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 10; padding: 10px 16px; background: #fff; color: #000; font-weight: 700; }
.skip:focus { top: 12px; }

/* Header: a black bar the width of the container, not the page. */
.site-header {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: var(--container);
  height: 68px;
  margin: 0 auto;
  padding: 0 14px;
  background: #000;
  color: #fff;
}
.brand { display: block; flex: none; margin-right: 20px; color: #fff; }
.brand svg { width: 214px; height: 32px; }
.site-header nav { display: flex; align-self: stretch; }
.site-header nav a {
  display: flex;
  align-items: center;
  padding: 0 17px;
  color: #a3a3a3;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.site-header nav a:hover { color: #fff; }
.site-header a:focus-visible { outline-color: #fff; outline-offset: -3px; }
.header-icon { display: grid; place-items: center; width: 40px; height: 40px; margin-left: auto; color: #fff; border-radius: 8px; }
.header-icon:hover { background: #262626; }

/* Buttons: a blue pill on white, a white chip on the bands. */
.button {
  display: inline-block;
  padding: 14px 24px;
  border-radius: 120px;
  background: var(--blue);
  color: #fff;
  font: 800 13px/16px var(--brand);
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}
.button:hover { background: #0b4fb0; }
.button--white { padding: 16px 21px; border-radius: 8px; background: #fff; color: #000; }
.button--white:hover { background: #e9edf3; }
.band .button:focus-visible { outline-color: #fff; }
.store-badge { display: inline-block; vertical-align: middle; border-radius: 8px; }
.store-badge img { display: block; }
.store-badge:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* Hero: the wordmark on white, flanked by the two crowds. */
.hero { position: relative; max-width: 1280px; height: 500px; margin: 0 auto; }
.hero-copy { position: relative; z-index: 1; width: 340px; margin: 0 auto; padding-top: 52px; text-align: center; }
.hero h1, .game-intro h1, .band h2, .section-title, .feature h2, .game-intro .tagline {
  font-family: var(--display);
  font-stretch: condensed;
}
.hero h1, .game-intro h1 {
  font-weight: 800;
  font-size: 64px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
@media (min-width: 900px) { .hero h1 { margin: 0 -60px; white-space: nowrap; } }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; }
.hero-copy p { margin: 8px 0 28px; font-size: 20px; line-height: 1.55; }
.hero-copy .hero-tagline { margin: 6px 0 0; font-size: 15px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.hero-cast { position: absolute; inset: 72px 0 0; pointer-events: none; }
.crowd { position: absolute; bottom: 0; width: min(400px, 31vw); }
.crowd--left { left: max(0px, calc(50% - 580px)); }
.crowd--right { right: max(0px, calc(50% - 580px)); }

/* Cards: square-cornered 4:3 art, a pink tag and a short bold title. */
.news { max-width: var(--container); margin: 48px auto 0; padding: 0 var(--gutter); }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 20px; }
@media (min-width: 1064px) { .news { padding: 0; } }
.card { text-align: center; }
.card-art { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #dde6f2; }
.card-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card:hover .card-art img { transform: scale(1.03); }
.pill {
  display: inline-block;
  margin: 18px 0 8px;
  padding: 8px 14px;
  border-radius: 100px;
  background: var(--pill);
  color: var(--pill-ink);
  font: 800 13px/15px var(--brand);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.card h3 { max-width: 420px; margin: 0 auto; font-size: 16px; font-weight: 700; line-height: 1.65; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.more { margin: 48px 0 0; text-align: center; }

/* The other games: smaller tiles under the flagship. */
.more-games { max-width: 720px; margin: 80px auto 0; padding: 0 var(--gutter); }
.tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
.tile h3 { margin-top: 18px; }
.tile { display: flex; flex-direction: column; }
.tile .store-badge { align-self: flex-start; margin-top: auto; padding-top: 16px; }
.tile h3 { font: 800 24px/1.2 var(--display); font-stretch: condensed; text-transform: uppercase; }
.tile h3 a { text-decoration: none; }
.tile h3 a:hover { text-decoration: underline; }
.tile p { margin: 6px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.tile .tile-tagline { color: var(--ink); font-weight: 700; }
.tile:hover .card-art img { transform: scale(1.03); }

/* Bands: navy for games, blue for the studio. Each carries one big cut-out. */
.band { position: relative; margin-top: 80px; color: #fff; }
.band + .band { margin-top: 0; }
.band--games {
  background-color: var(--navy);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='200' viewBox='0 0 240 200'%3E%3Cg fill='%23ffffff' fill-opacity='.04'%3E%3Cpath d='M30 70h50a14 14 0 0 0 0-28 22 22 0 0 0-42-6 16 16 0 0 0-8 34Z'/%3E%3Cpath d='m170 20 9 19 21 3-15 14 4 21-19-10-19 10 4-21-15-14 21-3Z'/%3E%3Crect x='40' y='120' width='46' height='46' rx='10' transform='rotate(12 63 143)'/%3E%3Ccircle cx='180' cy='150' r='22'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 240px 200px;
}
.band--about { background: var(--blue); }
.band-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  max-width: var(--container);
  min-height: 510px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.band-copy { flex: 1 1 0; max-width: 500px; }
.band h2 { padding-bottom: 13px; font-size: 30px; font-weight: 800; line-height: 1.4; letter-spacing: 0.01em; text-transform: uppercase; }
.band p { margin: 0 0 24px; font-size: 17px; line-height: 1.56; }
.band-art { flex: 1 1 0; display: flex; justify-content: center; align-self: flex-end; }
.band--games .band-art img { width: 240px; margin: -60px 0 24px; }
.band--about .band-art img { width: 280px; margin: 36px 0 40px; }
@media (min-width: 1064px) { .band-inner { padding: 0; } }

/* Footer. */
.site-footer { margin-top: 0; background: #000; color: #fff; font-size: 13px; }
main + .sprite + .site-footer { margin-top: 0; }
/* A game page ends on its store badges, so it keeps clear of the footer with its own padding. */
.game-page { padding-bottom: 96px; }
.footer-inner { max-width: var(--container); margin: 0 auto; padding: 40px var(--gutter) 48px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.footer-top h2 { margin-bottom: 10px; font-size: 13px; font-weight: 500; }
.footer-top ul { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-top a { font-size: 16px; font-weight: 700; text-decoration: none; }
.footer-platforms { max-width: 300px; margin: 0; color: #bdbdbd; }
.footer-legal ul { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 24px 0 28px; }
.footer-legal a, .footer-top a { text-underline-offset: 0.2em; }
.footer-legal a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer a:focus-visible { outline-color: #fff; }
.footer-base { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.footer-base p { margin: 0; color: #bdbdbd; line-height: 1.6; }
.footer-logo { display: block; color: #fff; }
@media (min-width: 1064px) { .footer-inner { padding-left: 0; padding-right: 0; } }

/* Game pages: the same system with a centred intro, a banner and feature cards. */
.game-intro { max-width: 720px; margin: 0 auto; padding: 56px var(--gutter) 40px; text-align: center; }
.game-intro .tagline { margin: 10px 0 0; font-size: 24px; font-weight: 800; line-height: 1.3; text-transform: uppercase; }
.game-intro .lead { margin: 18px auto 0; max-width: 600px; font-size: 19px; line-height: 1.6; }
.game-intro .platforms { margin: 14px 0 0; color: var(--muted); font-size: 15px; }
.game-intro .store { margin: 22px 0 0; }
.game-banner { max-width: var(--container); margin: 0 auto; aspect-ratio: 2 / 1; overflow: hidden; background: #dde6f2; }
.game-banner img { width: 100%; height: 100%; object-fit: cover; }
/* Penguin Run's coins and pom-pom sit high in its card; a centred 2:1 crop clips them. */
.game-banner--high img { object-position: 50% 35%; }
.features { max-width: var(--container); margin: 56px auto 0; padding: 0 var(--gutter); }
.card-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feature img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.feature h2 { margin: 18px 0 8px; font-size: 22px; font-weight: 800; line-height: 1.2; text-transform: uppercase; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.feature--icon { padding: 28px 24px 32px; background: #f1f4f9; }
.feature--icon svg { width: 40px; height: 40px; fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.section-title { margin-bottom: 28px; font-size: 30px; font-weight: 800; line-height: 1.2; text-align: center; text-transform: uppercase; }
.game-page .more-games { margin-top: 80px; }
@media (min-width: 1064px) { .features { padding: 0; } }

/* Scroll-in reveals, only where the browser drives them from scroll and motion is welcome. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
    @keyframes reveal { from { opacity: 0; transform: translateY(28px); } }
  }
}
@media (prefers-reduced-motion: reduce) {
  .card-art img { transition: none; }
  .card:hover .card-art img, .tile:hover .card-art img { transform: none; }
}

/* Narrower screens: crowds drop below the wordmark, the grid and bands stack. */
@media (max-width: 899px) {
  .hero { height: auto; }
  .hero-copy { width: auto; max-width: 400px; padding: 56px var(--gutter) 0; }
  .hero h1 { white-space: nowrap; }
  .hero-cast { position: relative; inset: auto; display: flex; justify-content: space-between; margin-top: -16px; overflow: hidden; }
  .crowd { position: static; flex: none; width: min(55%, 380px); margin: 0 -5%; }
  .card-grid--three { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin: 0 auto; }
}
@media (max-width: 639px) {
  .site-header { height: 64px; padding: 0 8px 0 16px; gap: 0; }
  .brand { margin-right: 8px; }
  .brand svg { width: 34px; height: 34px; }
  .site-header nav a { padding: 0 10px; }
  .hero h1, .game-intro h1 { font-size: 48px; }
  .hero-copy p { font-size: 18px; }
  .news { margin-top: 32px; }
  .card-grid, .tile-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .more-games { margin-top: 64px; }
  .game-page { padding-bottom: 64px; }
  .band { margin-top: 64px; }
  .band-inner { flex-direction: column; align-items: stretch; gap: 0; min-height: 0; padding-top: 48px; }
  .band--about .band-inner { flex-direction: column-reverse; padding-top: 24px; padding-bottom: 48px; }
  .band--games .band-art img { width: 180px; margin: 24px 0 0; }
  .band--about .band-art img { width: 200px; margin: 0 0 8px; }
  .band-art { align-self: center; }
  .game-banner { aspect-ratio: 4 / 3; }
  .footer-base { align-items: flex-end; }
}
@media (max-width: 359px) {
  .site-header nav a { padding: 0 7px; font-size: 13px; }
  .hero h1, .game-intro h1 { font-size: 40px; }
}
