/* The "learn" pages (rules, how to play, play online, friends, app): plain readable pages
   that search engines can index, in the game's royal purple and gold */
:root {
  --bg: #120c2a;
  --bg2: #1f1347;
  --ink: #f3efff;
  --muted: #b9b0d9;
  --gold: #facc15;
  --pink: #ec4899;
  --line: rgba(196, 181, 253, 0.18);
  --panel: rgba(255, 255, 255, 0.05);
  --c-red: #e52521;
  --c-blue: #1d6fd8;
  --c-green: #12a150;
  --c-yellow: #f2b705;
  --display: 'Fredoka', 'Trebuchet MS', system-ui, sans-serif;
  --body: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  background:
    radial-gradient(120% 50% at 85% 0%, rgba(124, 58, 237, 0.45), transparent 60%),
    radial-gradient(70% 35% at 0% 25%, rgba(236, 72, 153, 0.16), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}

a { color: var(--gold); }
a:focus-visible, summary:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.page { max-width: 1080px; margin: 0 auto; padding-inline: 20px; }

/* --- top bar --- */
.l-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(18, 12, 42, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.l-nav .page { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }

.l-logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.02em;
  text-shadow: 2px 2px 0 var(--c-red);
  white-space: nowrap;
}

.l-links { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 15px; }
.l-links a { color: var(--muted); text-decoration: none; }
.l-links a:hover, .l-links a[aria-current='page'] { color: var(--ink); }
.l-links a[aria-current='page'] { font-weight: 700; }

.btn-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  background: linear-gradient(180deg, #4ade80, #16a34a);
  box-shadow: 0 3px 0 #14532d, 0 8px 20px rgba(34, 197, 94, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-play:hover { transform: translateY(-2px); box-shadow: 0 5px 0 #14532d, 0 12px 24px rgba(34, 197, 94, 0.45); }
.btn-play:active { transform: translateY(2px); box-shadow: 0 1px 0 #14532d; }
.btn-play.big { padding: 15px 30px; font-size: 19px; }

/* --- hero --- */
.l-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; align-items: center; padding-block: 44px 28px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.l-hero h1 { margin: 0 0 14px; font-family: var(--display); font-size: clamp(32px, 5vw, 48px); line-height: 1.08; font-weight: 700; text-wrap: balance; }
.l-hero h1 em { font-style: normal; color: var(--gold); }
.lead { margin: 0 0 22px; font-size: 18px; color: var(--muted); max-width: 54ch; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.cta-note { font-size: 14px; color: var(--muted); }

/* a fan of cards */
.fan { position: relative; height: 230px; }
.card {
  position: absolute;
  width: 110px;
  height: 160px;
  border-radius: 14px;
  border: 5px solid #fff;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  color: #fff;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.45);
}
.card span { display: grid; place-items: center; width: 72%; height: 64%; border-radius: 50%; background: rgba(255, 255, 255, 0.92); font-size: 30px; transform: rotate(-18deg); }
.card.red { background: var(--c-red); } .card.red span { color: var(--c-red); }
.card.blue { background: var(--c-blue); } .card.blue span { color: var(--c-blue); }
.card.green { background: var(--c-green); } .card.green span { color: var(--c-green); }
.card.yellow { background: var(--c-yellow); } .card.yellow span { color: #8a6500; }
.card.wild { background: conic-gradient(var(--c-red) 0 25%, var(--c-blue) 0 50%, var(--c-yellow) 0 75%, var(--c-green) 0); }
.card.wild span { color: #111; }
.fan .card:nth-child(1) { left: 6%; top: 38px; transform: rotate(-16deg); }
.fan .card:nth-child(2) { left: 30%; top: 16px; transform: rotate(-3deg); z-index: 1; }
.fan .card:nth-child(3) { left: 54%; top: 32px; transform: rotate(12deg); z-index: 2; }

/* quick facts */
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0 0 28px; list-style: none; }
.facts li { padding: 8px 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); font-size: 14.5px; font-weight: 600; }
.facts b { color: var(--gold); }

/* --- sections --- */
.l-section { padding-block: 26px; }
.l-section h2 { margin: 0 0 8px; font-family: var(--display); font-size: 30px; line-height: 1.2; font-weight: 600; text-wrap: balance; }
.l-section > p, .l-section .prose p { margin: 0 0 14px; color: var(--muted); max-width: 68ch; }
.l-section .prose strong { color: var(--ink); }
.l-section h3 { margin: 0; font-size: 17px; font-weight: 700; }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

.tile { padding: 16px 18px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); min-width: 0; }
.tile p { margin: 4px 0 0; font-size: 15px; color: var(--muted); }
.tile .ico { display: block; font-size: 28px; line-height: 1; margin-bottom: 10px; }

/* card types: a small card next to its description */
.ct { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 14px; align-items: center; }
.mini { width: 50px; height: 70px; border-radius: 8px; border: 3px solid #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 17px; color: #fff; }
.mini.red { background: var(--c-red); } .mini.blue { background: var(--c-blue); } .mini.green { background: var(--c-green); } .mini.yellow { background: var(--c-yellow); color: #3a2a00; }
.mini.wild { background: conic-gradient(var(--c-red) 0 25%, var(--c-blue) 0 50%, var(--c-yellow) 0 75%, var(--c-green) 0); text-shadow: 0 1px 2px #000; }

/* steps of a real sequence */
.steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; padding: 16px 18px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-family: var(--display); font-weight: 700; font-size: 20px; color: #1f1347; background: var(--gold); }
.steps p { margin: 4px 0 0; color: var(--muted); }

/* scoring */
.scoring { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.score { padding: 16px; border-radius: 16px; text-align: center; background: linear-gradient(180deg, rgba(124, 58, 237, 0.35), rgba(124, 58, 237, 0.1)); border: 1px solid var(--line); }
.score b { display: block; font-family: var(--display); font-size: 30px; color: var(--gold); font-variant-numeric: tabular-nums; }
.score span { font-size: 14px; color: var(--muted); }

/* compare table */
.table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
thead th { background: rgba(124, 58, 237, 0.25); font-family: var(--display); font-weight: 600; }
tbody tr:last-child td { border-bottom: none; }
td:first-child { font-weight: 600; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { padding: 14px 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 16px; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* the closing call to play */
.band { margin-block: 28px 40px; padding: 26px 28px; border-radius: 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: linear-gradient(135deg, #6d28d9, #db2777); box-shadow: 0 16px 40px rgba(219, 39, 119, 0.25); }
.band h2 { margin: 0; font-family: var(--display); font-size: 26px; font-weight: 600; }
.band p { margin: 4px 0 0; color: #fde7f3; }

/* more pages */
.more { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.more a { display: block; padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color 0.15s ease, transform 0.15s ease; }
.more a:hover { border-color: var(--gold); transform: translateY(-2px); }
.more b { display: block; font-family: var(--display); font-weight: 600; font-size: 17px; }
.more span { font-size: 14px; color: var(--muted); }

.l-foot { border-top: 1px solid var(--line); margin-top: 20px; }
.l-foot .page { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-block: 22px 32px; font-size: 14px; color: var(--muted); }
.l-foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.l-foot a { color: var(--muted); }

/* --- phones --- */
@media (max-width: 760px) {
  .l-links { display: none; }
  .l-nav .page { min-height: 56px; }
  .btn-play { padding: 8px 16px; font-size: 15px; }
  .btn-play.big { width: 100%; padding: 14px 20px; font-size: 18px; }
  .l-hero { grid-template-columns: minmax(0, 1fr); gap: 8px; padding-block: 22px 18px; }
  .lead { font-size: 16.5px; }
  .fan { height: 160px; order: -1; }
  .card { width: 80px; height: 116px; border-width: 4px; border-radius: 11px; }
  .card span { font-size: 22px; }
  .fan .card:nth-child(1) { left: 14%; top: 28px; }
  .fan .card:nth-child(2) { left: 37%; top: 10px; }
  .fan .card:nth-child(3) { left: 60%; top: 26px; }
  .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .scoring { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .l-section h2 { font-size: 25px; }
  .band { padding: 22px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-play, .more a { transition: none; }
}

/* --- the Android app button (Google Play) --- */
.btn-app {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 12px;
  border-radius: 14px;
  color: #ffffff;
  text-decoration: none;
  background: #0b0b14;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  line-height: 1.15;
  white-space: nowrap;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

a.btn-app:hover { transform: translateY(-2px); border-color: #ffffff; }

.btn-app .app-ico { font-size: 24px; line-height: 1; }
.btn-app > span:last-child { display: flex; flex-direction: column; font-family: var(--display); font-weight: 600; font-size: 17px; }
.btn-app small { font-family: var(--body); font-weight: 500; font-size: 11.5px; letter-spacing: 0.02em; color: #d6d0f0; }
.btn-app.big { padding: 10px 20px 10px 14px; }
.btn-app.big > span:last-child { font-size: 18px; }

/* not on Google Play yet: a label, not a link */
.btn-app.soon { cursor: default; border-style: dashed; background: rgba(11, 11, 20, 0.6); }

.cta-note { margin: 12px 0 0; }
.band-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* phones: the Android app comes first, the browser second */
@media (max-width: 760px) {
  .cta, .band-cta { flex-direction: column; align-items: stretch; }
  .cta .btn-app, .band-cta .btn-app { order: -1; justify-content: center; }
  .btn-app.big { padding: 12px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-app { transition: none; }
}
