/* Layout only. Colours, fonts and shapes come from theme.css — no raw
   colour values belong in this file. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font-body);
}
a { color: var(--brand); }
a:hover { color: var(--brand-deep); }
img { max-width: 100%; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { background: var(--header-bg); color: var(--header-text); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--header-text); text-decoration: none; }
.brand:hover { color: var(--header-text); }
.brand img { height: var(--logo-height); width: auto; display: block; }
.brand span { font: 700 20px/1 var(--font-display); letter-spacing: .01em; }
.site-nav { display: flex; gap: 18px; }
.site-nav a { color: var(--header-text); text-decoration: none; opacity: .85; font-weight: 600; font-size: 15px; }
.site-nav a:hover, .site-nav a[aria-current] { opacity: 1; text-decoration: underline; }

/* Content */
main { padding: 40px 0 56px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.25; }
h1 { font-size: 34px; margin: 0 0 12px; }
h2 { font-size: 22px; margin: 36px 0 10px; }
h3 { font-size: 18px; margin: 22px 0 6px; }
.lead { font-size: 19px; color: var(--text-muted); margin: 0 0 28px; max-width: 40em; }
.muted { color: var(--text-muted); font-size: 15px; }

/* Game cards */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--brand-mid); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; display: flex; gap: 14px; align-items: flex-start;
}
.card img { width: 64px; height: 64px; border-radius: var(--radius-small); flex: none; }
.card h3 { margin: 0 0 2px; }
.card p { margin: 0 0 8px; font-size: 15px; color: var(--text-muted); line-height: 1.45; }
.card .links { font-size: 14px; font-weight: 600; display: flex; gap: 12px; flex-wrap: wrap; }
.badge {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; white-space: nowrap;
  background: var(--accent); color: var(--on-accent);
}
/* status pills: soon = pink, almost = pale sea, early = outline only */
.badge.soon { background: var(--accent); color: var(--on-accent); }
.badge.almost { background: var(--brand-soft); color: var(--brand-deep); box-shadow: inset 0 0 0 1.5px var(--brand-mid); }
.badge.early { background: transparent; color: var(--text-muted); box-shadow: inset 0 0 0 1.5px var(--border-strong); }
/* a live App Store link: inverted text colours, so it reads as a button in light and dark */
.badge.store { background: var(--text); color: var(--bg); text-decoration: none; }
.badge.store:hover { opacity: .85; }

/* Game groups (home page) */
h2.group { margin: 36px 0 12px; font-size: 21px; }
h2.group:first-of-type { margin-top: 8px; }
.group-note { margin: -6px 0 14px; }
.card .links { align-items: center; }

/* Home hero */
.hero { display: flex; align-items: center; gap: 28px; margin-bottom: 32px; flex-wrap: wrap; }
.hero-logo { width: var(--hero-logo-width); max-width: 100%; height: auto; flex: none; }
.hero-text { flex: 1 1 280px; }
.hero-text .lead { margin-bottom: 0; }
.hero-text .lead + .lead { margin-top: 12px; }

/* Beta sign-up banner (home page) */
.beta {
  background: var(--brand-soft); border-radius: var(--radius); padding: 22px 24px; margin: 0 0 28px;
  display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
}
.beta-text { flex: 1 1 300px; }
.beta h2 { margin: 0 0 4px; font-size: 21px; }
.beta-text p { margin: 0; font-size: 15px; color: var(--text-muted); line-height: 1.45; }
.beta-form { flex: 1 1 280px; display: flex; gap: 8px; flex-wrap: wrap; }
.beta-form input {
  flex: 1 1 140px; min-width: 0; font: inherit; font-size: 16px; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-small); background: var(--surface); color: var(--text);
}
.beta-form input:focus { outline: 2px solid var(--brand-mid); outline-offset: 1px; }
.beta-form button {
  flex: none; font: inherit; font-size: 15px; font-weight: 700; padding: 10px 18px; cursor: pointer;
  border: 0; border-radius: var(--radius-small); background: var(--accent); color: var(--on-accent);
}
.beta-form button:hover { filter: brightness(.96); }
.beta-form button:disabled { opacity: .6; cursor: default; }
.beta-msg { flex: 1 0 100%; margin: 0; font-size: 14px; font-weight: 600; min-height: 1.4em; }
.beta-msg.ok { color: var(--brand-deep); }
.beta-msg.err { color: var(--text); }
.beta-msg:empty { display: none; }
.beta.done .beta-text, .beta.done .beta-form > :not(.beta-msg) { display: none; }
.beta.done .beta-msg { font-size: 18px; text-align: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Prose pages (privacy, support) */
.prose { max-width: 42em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 4px 0; }
.box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; margin: 20px 0;
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 22px 0 32px; font-size: 14px; color: var(--text-muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-footer a { color: var(--text-muted); }

@media (max-width: 520px) {
  h1 { font-size: 28px; }
  main { padding-top: 28px; }
}

/* What's new page (updates.html): one section per day, one article per game */
.update-day h2 { font-size: 18px; color: var(--text-muted); margin: 32px 0 10px; }
.update {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--brand-mid);
  border-radius: var(--radius-small); padding: 12px 18px; margin: 0 0 12px;
}
.update-game { margin: 0 0 4px; font-family: var(--font-display); font-weight: 700; font-size: 17px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.update-game a { text-decoration: none; }
.update ul { margin: 0; font-size: 15px; line-height: 1.5; }
.site-nav { flex-wrap: wrap; row-gap: 4px; }
