/* dusted.fun game selector. Same palette and type as the Blocks game (BlocksTheme.cs, WebGL template):
   paper white, warm surfaces, ink, the orange accent and the dark "cabinet" of the boards. */
:root {
  --paper: #FFFFFF;
  --surface: #F6F4F1;
  --surface-2: #ECE8E3;
  --line: #E5E0DA;
  --ink: #14110F;
  --muted: #6B625A;
  --accent: #E8481F;
  --accent-hover: #D63E17;
  --cabinet: #221B17;
  --cabinet-edge: #3A2F28;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: max(16px, env(safe-area-inset-left));
  --gutter-r: max(16px, env(safe-area-inset-right));
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.5; font-weight: 500;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
::selection { background: var(--accent); color: #FFFFFF; }
:focus-visible { outline: 3px solid rgba(232, 72, 31, .45); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #FFFFFF;
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Layout */
.top, main, .foot {
  width: 100%; max-width: 1040px; margin: 0 auto;
  padding-left: var(--gutter); padding-right: var(--gutter-r);
}

/* Top bar */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: calc(18px + env(safe-area-inset-top)); padding-bottom: 8px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-size: 15px; font-weight: 800; letter-spacing: .22em;
}
.brand img { width: 28px; height: 28px; image-rendering: pixelated; }
.top-app {
  font-size: 14px; font-weight: 700; color: var(--muted); text-decoration: none;
  padding: 8px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line);
  transition: color .15s ease, box-shadow .15s ease;
}
.top-app:hover { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }

/* Hero: one compact band, so the games sit in the first screen. */
.hero { padding: 28px 0 8px; }
.hero h1 {
  font-size: clamp(38px, 9vw, 72px); font-weight: 800; line-height: .98; letter-spacing: -.045em;
  text-wrap: balance;
}
.hero .accent { color: var(--accent); }
.lede { margin-top: 14px; max-width: 34ch; font-size: 17px; line-height: 1.45; color: var(--muted); font-weight: 500; }

/* Buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  background: var(--accent); color: #FFFFFF; text-decoration: none;
  font-size: 16px; font-weight: 700; letter-spacing: .005em; white-space: nowrap;
  box-shadow: 0 8px 22px rgba(232, 72, 31, .28);
  transition: transform .12s var(--ease), background-color .15s ease, box-shadow .2s ease;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(.97); }
.btn-ink { background: var(--ink); box-shadow: none; }
.btn-ink:hover { background: #2C241F; }
.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Games gallery: every card has the same size and the same parts. */
.games { margin-top: 28px; }
.games-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-label { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.games-meta { font-size: 13px; font-weight: 700; color: var(--muted); }
.gallery {
  display: grid; gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
}
.card {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden; aspect-ratio: 3 / 4; border-radius: 22px; color: #FFFFFF; isolation: isolate;
  background:
    repeating-linear-gradient(90deg, transparent 0 15px, rgba(0, 0, 0, .07) 15px 16px),
    repeating-linear-gradient(0deg, transparent 0 15px, rgba(0, 0, 0, .07) 15px 16px),
    linear-gradient(160deg, color-mix(in srgb, var(--game) 85%, #FFFFFF), color-mix(in srgb, var(--game) 80%, #000000));
  box-shadow: 0 18px 32px -20px color-mix(in srgb, var(--game) 70%, #000000);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 26px 44px -22px color-mix(in srgb, var(--game) 75%, #000000); }
.card:focus-within { box-shadow: 0 0 0 3px rgba(232, 72, 31, .55), 0 18px 32px -20px color-mix(in srgb, var(--game) 70%, #000000); }
/* The art floats in the upper part of the poster with a hard pixel shadow. */
.card-art {
  position: absolute; z-index: -1; left: 6%; top: 6%; width: 88%; height: 58%;
  object-fit: contain; filter: drop-shadow(0 8px 0 rgba(0, 0, 0, .18));
}
.card-art.pix { left: 22%; top: 12%; width: 56%; height: 48%; image-rendering: pixelated; }
.badge {
  position: absolute; top: 10px; left: 10px; padding: 4px 8px; border-radius: 999px;
  background: var(--accent); color: #FFFFFF; box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
  font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
}
.card-foot {
  /* In flow at the foot of the card (not positioned), so the play link's ::after covers the whole card. */
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px;
  padding: 44px 12px 12px;
  background: linear-gradient(180deg, transparent, rgba(20, 17, 15, .8) 55%);
}
.card-name { font-size: 22px; font-weight: 800; letter-spacing: -.035em; line-height: 1; }
.card-tagline {
  margin-top: 4px; font-size: 12px; line-height: 1.3; color: rgba(255, 255, 255, .8);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
/* Round play button; it carries the link and its name, and its ::after makes the whole poster clickable. */
.play {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: #FFFFFF; box-shadow: 0 6px 14px rgba(0, 0, 0, .25);
}
.play::before {
  content: ""; margin-left: 3px;
  border-left: 13px solid var(--ink); border-top: 8px solid transparent; border-bottom: 8px solid transparent;
}
.play::after { content: ""; position: absolute; inset: 0; border-radius: 22px; }
.card:hover .play::before { border-left-color: var(--accent); }
.play:focus-visible { outline-offset: 3px; }
.chip {
  font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: #FFFFFF; padding: 6px 9px; border-radius: 999px; background: rgba(255, 255, 255, .18);
}
/* Phones: name and button share a row, the tagline runs the full width beneath. */
@media (max-width: 639px) {
  .card-foot { grid-template-areas: "name action" "tag tag"; align-items: center; column-gap: 6px; row-gap: 0; }
  .card-foot > div { display: contents; }
  .card-name { grid-area: name; }
  .card-tagline { grid-area: tag; -webkit-line-clamp: 2; }
  .card-foot > .play, .card-foot > .chip { grid-area: action; }
  .play { width: 36px; height: 36px; }
  .play::before { border-left-width: 11px; border-top-width: 7px; border-bottom-width: 7px; }
}
.card.is-off { filter: saturate(.35); }
.card.is-off:hover { transform: none; }

/* iPhone app */
.app {
  display: flex; flex-direction: column; gap: 16px; align-items: flex-start;
  margin-top: 40px; padding: 22px; border-radius: 24px;
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.app h2 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.app p { margin-top: 4px; color: var(--muted); font-size: 15px; }

/* Footer */
.foot {
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  padding-top: 40px; padding-bottom: calc(28px + env(safe-area-inset-bottom));
  font-size: 13px; color: var(--muted); text-align: center;
}
.foot nav { display: flex; gap: 18px; font-weight: 700; }
.foot a { text-decoration: none; padding: 4px 2px; }
.foot a:hover { color: var(--accent); }

/* Motion: the gallery rises in once the page is shown. */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.hero h1, .lede, .games, .app { animation: rise .6s var(--ease) both; }
.lede { animation-delay: .08s; }
.games { animation-delay: .14s; }
.app { animation-delay: .22s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (min-width: 640px) {
  .app { flex-direction: row; align-items: center; justify-content: space-between; }
  .gallery { gap: 16px; }
  .card-foot { padding: 56px 16px 16px; }
  .card-name { font-size: 28px; }
  .card-tagline { font-size: 13px; }
  .play { width: 48px; height: 48px; }
}
/* Wide screens: centered headline, all four posters in one row. */
@media (min-width: 900px) {
  .hero { padding-top: 48px; text-align: center; }
  .lede { margin-inline: auto; }
  .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
