/* P2.8: the text of PH01 and PH08 in their page (src/site/app-text.ts), read without script and seen
   while the app loads, in the colours of the platform (08-design-system). Every rule stays inside
   `.app-text`, which the app removes as it starts: nothing here touches its screens. The page's own
   style (packages/ui) already gives the background and the fonts. */
.app-text {
  --at-surface: #1a1633;
  --at-line: #3a3366;
  --at-text: #f5f3ff;
  --at-muted: #b8b2d9;
  --at-cyan: #2ee6f5;
  --at-display: "Fredoka Variable", "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  box-sizing: border-box;
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px max(16px, env(safe-area-inset-left)) 40px;
  color: var(--at-text);
  font:
    17px / 1.6 "Nunito Variable",
    "Nunito",
    "Segoe UI",
    system-ui,
    sans-serif;
}

.app-text * {
  box-sizing: border-box;
}

.app-text a {
  color: var(--at-cyan);
  text-underline-offset: 0.2em;
}

.app-text a:focus-visible {
  outline: 3px solid var(--at-cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.app-text-top a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  color: var(--at-text);
  font: 600 26px var(--at-display);
  text-decoration: none;
}

.app-text h1,
.app-text h2,
.app-text h3 {
  font-family: var(--at-display);
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
}

.app-text h1 {
  max-width: 24ch;
  margin: 16px 0;
  font-size: clamp(32px, 5vw, 52px);
}

.app-text h2 {
  margin: 40px 0 12px;
  font-size: 26px;
}

.app-text h3 {
  margin: 28px 0 12px;
  font-size: 21px;
}

.app-text h3 span {
  color: var(--at-muted);
  font-family: "Nunito Variable", "Nunito", system-ui, sans-serif;
  font-size: 16px;
}

.app-text p {
  max-width: 72ch;
  margin: 0 0 12px;
}

.app-text .lead {
  font-size: 20px;
}

/* How it works: three numbered cards side by side on a wide screen. */
.app-text .steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.app-text .steps li {
  padding: 16px 16px 16px 60px;
  border: 1px solid var(--at-line);
  border-radius: 16px;
  background: var(--at-surface);
  counter-increment: step;
  position: relative;
}

.app-text .steps li::before {
  content: counter(step);
  position: absolute;
  top: 14px;
  left: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ff4fa3;
  color: #14061a;
  font: 700 18px / 32px var(--at-display);
  text-align: center;
}

/* The games: a grid of cards, their name a link to their page. */
.app-text .games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-text .games li {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 12px 16px 14px;
  border: 1px solid var(--at-line);
  border-radius: 16px;
  background: var(--at-surface);
}

.app-text .games a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--at-text);
  font: 600 20px var(--at-display);
}

.app-text .games .meta {
  color: var(--at-cyan);
  font-size: 15px;
  font-weight: 700;
}

.app-text .games .pitch {
  color: var(--at-muted);
  font-size: 15px;
}

.app-text .more {
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-text .more li {
  max-width: 72ch;
  margin: 0 0 8px;
  color: var(--at-muted);
}

.app-text .more a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-right: 8px;
  font-weight: 800;
}

.app-text .app-text-end {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--at-line);
  color: var(--at-muted);
  font-size: 15px;
}

.app-text .app-text-end a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--at-muted);
  font-weight: 700;
}

@media (min-width: 760px) {
  .app-text .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
