@font-face {
  font-family: Bungee;
  src: url('/fonts/bungee-latin.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dm-sans-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f7efd9;
  --ink: #082b3d;
  --teal: #00777e;
  --orange: #ef571b;
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
  scrollbar-color: var(--teal) var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; background-image: url('/brand/paper.jpg'); }
a { color: inherit; text-underline-offset: .25em; }
::selection { background: #ffca58; color: var(--ink); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 6px; }
img { display: block; max-width: 100%; }
svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 2.4; flex: 0 0 auto; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 5;
  padding: .9rem 1.2rem;
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

.masthead {
  min-height: 88px;
  max-width: 1680px;
  margin-inline: auto;
  padding: 10px clamp(22px, 3.5vw, 64px);
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { width: 64px; height: 64px; image-rendering: pixelated; }
.brand > span { font: 400 clamp(23px, 2.6vw, 42px)/1 Bungee, sans-serif; letter-spacing: -.035em; }
.brand span span { color: var(--teal); }
.masthead nav { display: flex; gap: clamp(24px, 3vw, 52px); margin-left: auto; }
.masthead nav a { font-size: 18px; font-weight: 800; text-decoration-thickness: 3px; text-decoration-color: var(--orange); }
.masthead nav a:hover { color: var(--teal); }
.masthead-note { margin: 0 0 0 clamp(0px, 2vw, 28px); font-size: 15px; line-height: 1.2; text-transform: uppercase; font-weight: 800; transform: rotate(-5deg); }

.catalog { border-top: 3px solid var(--ink); }
.game-ad { --accent: var(--teal); --art-bg: color-mix(in srgb, var(--game-color) 70%, var(--paper)); border-bottom: 3px solid var(--ink); overflow: clip; }
.ad-inner { display: grid; grid-template-columns: 46% 54%; max-width: 1680px; min-height: 460px; margin-inline: auto; }
.ad-copy { align-self: center; padding: 26px 32px 30px clamp(24px, 4vw, 72px); position: relative; z-index: 1; }
.ad-copy h2 { font: 400 clamp(44px, 5vw, 80px)/1.04 Bungee, sans-serif; letter-spacing: -.035em; text-wrap: balance; margin: 0 0 18px; color: var(--accent); overflow-wrap: break-word; }
.ad-copy h2.long-title { font-size: clamp(40px, 3.8vw, 60px); }
.game-hook { max-width: 39ch; margin: 0 0 10px; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.25; font-weight: 800; text-transform: uppercase; }
.game-description { max-width: 48ch; font-size: 17px; line-height: 1.45; margin: 0 0 20px; }
.play-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 40px; min-width: 218px; min-height: 58px; padding: 12px 22px; background: #bf3e0d; color: var(--paper); border-radius: 5px; font-size: 23px; font-weight: 800; text-decoration: none; transition: background 160ms ease-out, gap 160ms ease-out; }
.play-link:hover { background: var(--ink); gap: 48px; }
.ad-art { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; overflow: clip; background: var(--art-bg); }
.ad-art img { position: relative; width: 100%; max-height: 480px; object-fit: contain; image-rendering: pixelated; }
.art-cover { padding: 0; }
.art-cover > img { height: 100%; max-height: none; position: absolute; inset: 0; object-fit: cover; filter: none; }
.gurpy-comment { position: absolute; right: 20px; bottom: 20px; display: flex; align-items: center; gap: 8px; max-width: 255px; z-index: 2; transform: rotate(-5deg); }
.gurpy-comment img { width: 64px; height: 64px; image-rendering: pixelated; filter: none; }
.gurpy-comment p { max-width: 170px; background: var(--paper); color: var(--teal); border: 2px solid var(--teal); border-radius: 4px; margin: 0; padding: 10px; font-size: 15px; line-height: 1.15; font-weight: 800; text-transform: uppercase; }
.reverse .ad-inner { grid-template-columns: 54% 46%; }
.reverse .ad-copy { grid-column: 2; grid-row: 1; padding-left: 40px; padding-right: clamp(24px, 4vw, 72px); }
.reverse .ad-art { grid-column: 1; grid-row: 1; }
.game-ad:nth-of-type(4n + 1) { --accent: #c74719; }
.game-ad:nth-of-type(4n + 3) { --accent: #a13725; }
.game-ad:nth-of-type(4n + 4) { --accent: #146654; }
.game-imu { --art-bg: #102d4a; }
.game-im-shred { --art-bg: #e8b449; }
.game-imt, .game-imv, .game-tinyranger { --art-bg: #173b35; }
.game-dungeon-groove { --art-bg: #23283f; }
.game-ad:first-of-type .ad-art > img { animation: arrive 850ms cubic-bezier(.16, 1, .3, 1) both; }
@keyframes arrive { from { transform: translateY(16px) rotate(-2deg); clip-path: inset(0 0 3%); } to { transform: translateY(0) rotate(0); clip-path: inset(0); } }

.about { display: grid; grid-template-columns: 144px minmax(0, 650px) minmax(200px, 1fr); gap: 42px; align-items: center; background: var(--ink); color: var(--paper); padding: 76px max(24px, calc((100vw - 1536px) / 2)); }
.about-portrait { image-rendering: pixelated; }
.about h2 { margin: 0 0 22px; font: 400 clamp(30px, 3.2vw, 48px)/1.15 Bungee, sans-serif; letter-spacing: -.025em; }
.about p { max-width: 65ch; margin: 0 0 14px; font-size: 18px; line-height: 1.55; }
.about p:last-child { margin-bottom: 0; }
.about-link { display: inline-flex; gap: 16px; align-items: center; justify-self: end; max-width: 240px; font-size: 21px; font-weight: 800; text-decoration-color: #56c6c8; }
.about a:focus-visible { outline-color: #65d9d8; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px clamp(24px, 4vw, 72px); font-size: 14px; font-weight: 600; }
footer p { margin: 0; }
footer a { display: inline-flex; align-items: center; gap: 10px; }

@media (min-width: 1680px) { .game-ad { background: linear-gradient(90deg, var(--paper) 50%, var(--art-bg) 50%); } .game-ad.reverse { background: linear-gradient(90deg, var(--art-bg) 50%, var(--paper) 50%); } }
@media (max-width: 1000px) {
  .masthead { gap: 20px; }
  .masthead-note { display: none; }
  .ad-inner, .reverse .ad-inner { grid-template-columns: 48% 52%; min-height: 460px; }
  .reverse .ad-inner { grid-template-columns: 52% 48%; }
  .ad-copy, .reverse .ad-copy { padding: 36px 26px; }
  .ad-copy h2, .ad-copy h2.long-title { font-size: clamp(36px, 4.8vw, 54px); margin-bottom: 20px; }
  .about { grid-template-columns: 100px 1fr; gap: 28px; padding: 54px 28px; }
  .about-link { grid-column: 2; justify-self: start; max-width: none; }
}
@media (max-width: 660px) {
  .masthead { flex-wrap: wrap; gap: 16px; padding: 15px 20px 18px; }
  .brand { gap: 10px; }
  .brand img { width: 48px; height: 48px; }
  .brand > span { font-size: clamp(22px, 6vw, 32px); }
  .masthead nav { width: 100%; margin-left: 58px; gap: 30px; }
  .masthead nav a { font-size: 16px; }
  .ad-inner, .reverse .ad-inner { display: grid; grid-template-columns: 1fr; min-height: 0; }
  .ad-copy, .reverse .ad-copy { display: contents; }
  .ad-copy h2, .ad-copy h2.long-title { grid-row: 1; max-width: 15ch; font-size: clamp(36px, 9.5vw, 56px); margin: 0; padding: 30px 24px 16px; }
  .game-hook { grid-row: 2; font-size: 16px; max-width: 37ch; margin: 0; padding: 0 24px 22px; }
  .game-description { grid-row: 4; font-size: 16px; max-width: 46ch; margin: 0; padding: 22px 24px 0; }
  .play-link { grid-row: 5; justify-self: start; min-height: 54px; min-width: 204px; margin: 20px 24px 30px; font-size: 21px; }
  .ad-art, .reverse .ad-art { grid-column: 1; grid-row: 3; min-height: 250px; max-height: 360px; }
  .ad-art > img { max-height: 300px; max-width: 510px; }
  .ad-art.art-cover { padding: 0; }
  .art-cover > img { max-height: none; max-width: none; }
  .gurpy-comment { right: 14px; bottom: 14px; max-width: 215px; }
  .gurpy-comment img { width: 48px; height: 48px; }
  .gurpy-comment p { font-size: 12px; max-width: 145px; padding: 8px; }
  .about { grid-template-columns: 1fr; padding: 44px 24px; gap: 26px; }
  .about-portrait { width: 100px; height: 100px; }
  .about h2 { font-size: 32px; }
  .about p { font-size: 16px; }
  .about-link { grid-column: auto; font-size: 18px; }
  footer { padding: 22px 24px; align-items: start; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .game-ad:first-of-type .ad-art > img { animation: none; }
  .play-link { transition: none; }
}
