/* Same colours as floofometer/shared.css */
:root {
  --bg: #fbf7f2;
  --surface: #ffffff;
  --surface-2: #f3ece3;
  --text: #2b2420;
  --muted: #6f655d;
  --border: #e4d9cc;
  --accent: #c8642c;
  --accent-text: #ffffff;
  --good: #2f8a3e;
  --radius: 16px;
  /* Background picture of the whole start page. "none" = plain colour.
     To use one: --page-bg-image: url("img/background.jpg");  (path relative to this file)
     --page-shade lies over the picture so the text stays readable (more alpha = calmer picture). */
  --page-bg-image: none;
  --page-shade: rgba(251, 247, 242, .82);
  /* Shade over a game card's own background picture (set per game in hub.js: `background`). */
  --card-shade: rgba(255, 255, 255, .86);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1715;
    --surface: #26201d;
    --surface-2: #322a26;
    --text: #f2ebe4;
    --muted: #b3a79d;
    --border: #41372f;
    --accent: #e07a3f;
    --accent-text: #1b1715;
    --good: #6cc77a;
    --page-shade: rgba(27, 23, 21, .78);
    --card-shade: rgba(38, 32, 29, .84);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  /* the shade first (on top), then the picture; without a picture only the colour shows */
  background-image: linear-gradient(var(--page-shade), var(--page-shade)), var(--page-bg-image);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

.hero, main, .foot {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 16px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "left text right";
  align-items: end;
  gap: 12px;
  text-align: center;
  padding-top: 24px;
  padding-bottom: 8px;
}
.hero-text { grid-area: text; padding-bottom: 12px; }
/* Mascots left and right of the title (img/site_logo_1.webp, img/site_logo_2.webp) */
.mascot { display: block; height: 230px; width: auto; }
.mascot-left { grid-area: left; justify-self: end; }
.mascot-right { grid-area: right; justify-self: start; }
@media (max-width: 640px) {
  /* phone: both mascots side by side above the title */
  .hero {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "left right" "text text";
    padding-top: 16px;
  }
  .mascot { height: 150px; }
  .hero-text { padding-bottom: 0; }
}
.hero h1 { font-size: clamp(38px, 5.4vw, 56px); line-height: 1.15; margin: 8px 0 10px; letter-spacing: -.5px; }
.tagline { color: var(--muted); max-width: 560px; margin: 0 auto; font-size: clamp(18px, 2.2vw, 21px); }
/* counter under the tagline ("[gul] 1,234 floof fans so far"), filled by hub.js */
.fans { color: var(--muted); margin: 8px auto 0; font-size: 15px; }
.fans strong { color: var(--text); }
.fans-icon { display: inline-block; width: 1.6em; height: 1.6em; vertical-align: -0.45em; }
@media (max-width: 640px) { .hero h1 { font-size: 42px; } } /* phone: full width for the title */

.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 36px 0 12px;
}

.games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
  gap: 16px;
}

.game-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  position: relative;
  padding: 20px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease;
}
/* a card with its own background picture (hub.js sets --card-bg) */
.game-card.has-bg {
  background-image: linear-gradient(var(--card-shade), var(--card-shade)), var(--card-bg);
  background-size: cover;
  background-position: center;
}
a.game-card:hover { transform: translateY(-3px); border-color: var(--accent); }
a.game-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }


.game-icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  font-size: 32px;
  border-radius: 14px;
  background: var(--surface-2);
}
.game-icon img { display: block; width: 44px; height: 44px; }

.game-body { min-width: 0; flex: 1; }
.game-name { margin: 0 0 4px; font-size: 21px; }
.game-desc { margin: 0 0 10px; color: var(--muted); }

.game-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 12px;
  border-radius: 999px;
  padding: 2px 10px;
  background: var(--surface-2);
  color: var(--muted);
}

.game-today { margin: 12px 0 0; font-size: 14px; font-weight: 600; }
.game-today.new { color: var(--accent); }
.game-today.progress { color: var(--accent); }
.game-today.done { color: var(--good); }
.game-today .inline-icon { display: inline-block; width: 1.5em; height: 1.5em; vertical-align: -0.4em; }

.play {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 26px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 17px;
  transition: transform .15s ease, filter .15s ease;
}
.play .countdown { font-variant-numeric: tabular-nums; }
a.game-card:hover .play { transform: scale(1.05); filter: brightness(1.08); }

.foot { color: var(--muted); font-size: 13px; text-align: center; padding-top: 40px; padding-bottom: 32px; }
.foot-links { margin: 6px 0 0; }

/* ---------- about page (about.html) ---------- */
.about { padding-top: 20px; }
.back-row { margin-bottom: 12px; }
.back { font-size: 14px; text-decoration: none; }
.back:hover { text-decoration: underline; }
.about-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
}
.about-mascot { display: block; flex-shrink: 0; height: 300px; width: auto; }
.about-text h1 { margin: 0 0 12px; font-size: 32px; }
.about-text p { margin: 0 0 14px; font-size: 17px; }
.about-text p:last-child { margin-bottom: 0; }
@media (max-width: 640px) {
  /* phone: mascot above the text */
  .about-card { flex-direction: column; gap: 12px; padding: 20px; }
  .about-mascot { height: 200px; }
  .about-text h1 { text-align: center; }
}
