/* Palette lifted from the app's DesignSystem.swift so the site and the app read
   as one product. Keep these in step if AppColors changes. */
:root {
  --primary: #FFD93D;
  --secondary: #4D96FF;
  --accent: #FF6B6B;
  --green: #66BB6A;
  --purple: #AB47BC;
  --yellow: #F0C000;
  --red: #FF6B6B;

  --ink: #1C1C1E;
  --ink-soft: #6B6B70;
  --surface: #FFFFFF;
  --surface-alt: #F5F7FA;
  --border: #ECEFF3;

  --radius: 24px;
  --radius-lg: 32px;
  --shadow: 0 6px 20px rgba(28, 28, 30, 0.07);
  --page: min(1080px, 100% - 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Nunito, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  font-size: 17px;
}

h1, h2, h3 {
  font-family: Fredoka, system-ui, -apple-system, sans-serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--secondary); }

.wrap { width: var(--page); margin-inline: auto; }

/* Header ------------------------------------------------------------------ */
/* Narrow screens stack the header: four language pills beside the wordmark wrap
   into it and collide. */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem 1rem; padding: 1.25rem 0;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
/* The logo is a 3.4:1 wordmark, not an icon — forcing it square destroys it. */
.brand img { height: 34px; width: auto; }

.langs { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.langs a {
  font-size: 0.8rem; text-decoration: none; color: var(--ink-soft);
  padding: 0.28rem 0.62rem; border-radius: 999px; border: 1px solid var(--border);
  white-space: nowrap;
}
.langs a[aria-current="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.langs a:hover { border-color: var(--secondary); color: var(--secondary); }
.langs a[aria-current="true"]:hover { color: #fff; }

/* Hero -------------------------------------------------------------------- */
.hero {
  display: grid; gap: 2.5rem; align-items: center;
  grid-template-columns: 1fr;
  padding: 2rem 0 3.5rem;
}
.hero h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); }
.hero .tagline { font-size: clamp(1.05rem, 2.2vw, 1.3rem); font-weight: 600; margin: 0.9rem 0 0; }
.hero .intro { color: var(--ink-soft); margin: 0.75rem 0 1.75rem; max-width: 46ch; }
.hero-art { justify-self: center; max-width: min(200px, 46vw); }

.cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--ink); color: #fff; text-decoration: none;
  font-weight: 700; padding: 0.9rem 1.5rem; border-radius: 999px;
  box-shadow: var(--shadow);
}
.cta:hover { transform: translateY(-1px); }
.cta[aria-disabled="true"] { background: var(--ink-soft); cursor: not-allowed; }
.cta-note { display: block; font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.6rem; }

/* Games ------------------------------------------------------------------- */
section { padding: 3rem 0; }
section > h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); margin-bottom: 1.75rem; }

.games { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.game {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 0.85rem;
}
.game img { border-radius: var(--radius); border: 1px solid var(--border); }
.game h3 { font-size: 1.1rem; }
.game p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
/* The one-line summary above how the game plays. */
.game p.lead { color: var(--ink); font-weight: 700; }
.game .dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; margin-inline-end: 0.45rem; }
.dot.green { background: var(--green); }
.dot.yellow { background: var(--yellow); }
.dot.red { background: var(--red); }
.dot.purple { background: var(--purple); }
/* The other five games, in their accent colours from the app's DesignSystem.swift. */
.dot.teal { background: #00897B; }
.dot.orange { background: #C85A1E; }
.dot.blue { background: #3F6DB5; }
.dot.plum { background: #5E3450; }
.dot.indigo { background: #4B3FA6; }
.game-text { justify-content: flex-start; }

/* Daily + features -------------------------------------------------------- */
.daily {
  /* The secondary blue darkened so white text on it passes WCAG AA (5:1). */
  background: #2A6CD6; color: #fff; border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  display: grid; gap: 1.5rem; align-items: center; grid-template-columns: 1fr;
}
.daily h2 { color: #fff; font-size: clamp(1.4rem, 3vw, 2rem); }
.daily p { margin: 0.75rem 0 0; max-width: 48ch; }
.daily img { max-width: 150px; justify-self: center; }

.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.features li { display: flex; gap: 0.65rem; align-items: flex-start; }
.features li::before {
  content: ""; flex: 0 0 auto; width: 20px; height: 20px; margin-top: 0.2rem;
  border-radius: 50%; background: var(--green);
  -webkit-mask: no-repeat center/12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' d='M6.2 11.7 3 8.5l1.1-1.1 2.1 2.1 5.7-5.7L13 4.9z'/%3E%3C/svg%3E");
  mask: no-repeat center/12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' d='M6.2 11.7 3 8.5l1.1-1.1 2.1 2.1 5.7-5.7L13 4.9z'/%3E%3C/svg%3E");
}

/* Who it is for + FAQ ---------------------------------------------------- */
.why-body { display: grid; gap: 1rem; max-width: 68ch; }
.why-body p { margin: 0; }
.why .features { margin-top: 2rem; }

.faq { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.faq-item {
  background: var(--surface-alt); border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
}
.faq-item h3 { font-size: 1.1rem; }
.faq-item p { margin: 0.5rem 0 0; color: var(--ink-soft); }

/* Footer ------------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--border); padding: 2rem 0 3rem;
  display: flex; flex-wrap: wrap; gap: 1rem 1.5rem;
  align-items: center; justify-content: space-between;
  color: var(--ink-soft); font-size: 0.9rem;
}
.site-footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--secondary); }

@media (min-width: 760px) {
  .hero { grid-template-columns: 1.25fr 0.75fr; padding: 3rem 0 4.5rem; }
  .hero-art { max-width: 260px; }
  .daily { grid-template-columns: 1fr auto; }
  .faq { grid-template-columns: 1fr 1fr; }
  section { padding: 4rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cta:hover { transform: none; }
}
