/*
 * Puzled's plain pages (About, How to play, Contact, Privacy): readable without the app, for
 * players, search engines and AdSense's reviewers (docs/decisions/0007-ads.md). Bright and
 * daytime, in the palette BRAND.md sets.
 */
@font-face {
  font-family: "Fredoka";
  src: url("fonts/fredoka-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --sea: #1f8a8a;
  --deep-sea: #0e3b4a;
  --sand: #f3e3c3;
  --sand-light: #faf1de;
  --coral: #ff7a59;
  --ink: #0b2a35;
  --line: rgb(14 59 74 / 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font:
    17px / 1.55 system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  overflow-wrap: break-word;
}

main,
.site-head,
.site-foot {
  max-width: 640px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

main {
  padding-top: 8px;
  padding-bottom: 32px;
}

h1,
h2,
h3,
.brand {
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  color: var(--deep-sea);
  line-height: 1.2;
}

h1 {
  font-size: 2rem;
  margin: 8px 0 4px;
}

h2 {
  font-size: 1.3rem;
  margin: 32px 0 6px;
}

h3 {
  font-size: 1.1rem;
  margin: 20px 0 4px;
}

a {
  color: var(--sea);
}

.lede {
  font-size: 1.1rem;
}

.updated {
  margin: 0 0 20px;
  opacity: 0.75;
}

/* The bar at the top: the wordmark home, and a way into the games. */
.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: max(12px, env(safe-area-inset-top));
  padding-bottom: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 1.5rem;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.play {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  text-decoration: none;
}

/* A game's picture beside its name: the same art as its card on home. */
.games {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.games a {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 4px 14px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: var(--sand-light);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 1px 0 var(--line);
}

.games img {
  grid-row: span 2;
  width: 72px;
  height: 72px;
  border-radius: 12px;
}

.games strong {
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--deep-sea);
}

.games span {
  font-size: 0.95rem;
}

.hero {
  display: block;
  width: 160px;
  height: 160px;
  margin: 16px auto 8px;
  border-radius: 24px;
}

.share {
  margin: 8px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--sand-light);
  font:
    0.95rem / 1.5 ui-monospace,
    "SF Mono",
    Menlo,
    Consolas,
    monospace;
  white-space: pre-wrap;
}

li + li {
  margin-top: 4px;
}

/* Low Tide's deck: a card's picture, its name, its number and what it does. */
.deck {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.deck th,
.deck td {
  padding: 6px 4px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.deck td:nth-child(2),
.deck th:nth-child(2) {
  text-align: center;
  white-space: nowrap;
}

.deck img {
  width: 32px;
  height: 32px;
  vertical-align: middle;
  margin-right: 6px;
}

.site-foot {
  padding-top: 16px;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
}

.site-foot nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-foot p {
  margin: 8px 0 0;
  opacity: 0.8;
}
