/* QUBES playtest site. Colors come from the rulebook. */

@font-face {
  font-family: "Fredoka";
  src: url("assets/fonts/fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("assets/fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  color-scheme: light;

  --cream: #fff8ec;
  --paper: #ffffff;
  --ink: #2a2240;
  --ink-2: #4a4260;
  --line: #e6dccb;

  /* Symbol colours (text-safe on cream and on their pastels) */
  --red: #a51219;
  --blue: #1f4fbf;
  --purple: #7e22b4;
  --green: #1c7341;
  /* Fill-only colours (too light for text) */
  --yellow: #e3a800;
  --orange: #d4561a;

  /* Card pastels from the rulebook */
  --red-soft: #f2cbc5;
  --blue-soft: #d3d8e3;
  --purple-soft: #e6cde3;
  --yellow-soft: #f8e8be;

  --radius: 24px;
  --radius-sm: 14px;
  --gutter: 20px;
  --max: 1040px;

  --font-display: "Fredoka", "Arial Rounded MT Bold", ui-rounded, system-ui, sans-serif;
  --font-body: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem; /* 18px */
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
h2 { font-size: clamp(1.75rem, 5vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

a { color: var(--blue); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 4px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  background: var(--ink);
  color: var(--cream);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  z-index: 100;
  font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid var(--line);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}
.topbar .brand img { width: 120px; }
.topbar nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.topbar nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.topbar nav a:hover { background: var(--paper); }
@media (max-width: 420px) {
  .topbar .brand img { width: 96px; }
  .topbar nav a { padding: 0 8px; font-size: 1rem; }
  .topbar nav .optional { display: none; }
}

/* ---------- Buttons (styled like the logo tiles) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 12px 24px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 0 6px 0 var(--ink);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:hover { transform: translateY(2px); box-shadow: 0 4px 0 var(--ink); }
.btn:active { transform: translateY(6px); box-shadow: 0 0 0 var(--ink); }
.btn-primary { background: var(--red); color: #fff; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-green { background: var(--green); color: #fff; }

.btn-row {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 1.5rem;
}
@media (min-width: 640px) {
  .btn-row { flex-direction: row; flex-wrap: wrap; }
}

/* Unfilled placeholder links get a visible TODO tag */
a[href$="_URL"]::after,
a[href="mailto:CONTACT_EMAIL"]::after {
  content: "TODO";
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  background: var(--yellow);
  color: var(--ink);
  border-radius: 6px;
  padding: 1px 6px;
  margin-left: 8px;
}
.todo {
  background: var(--yellow-soft);
  color: var(--ink);
  border: 2px dashed var(--yellow);
  border-radius: 6px;
  padding: 0 6px;
  font-weight: 700;
}

/* ---------- Sections ---------- */
section { padding-block: 56px; }
section + section { border-top: 2px solid var(--line); }
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px;
}
.lead { font-size: 1.25rem; }
.narrow { max-width: 680px; }

/* ---------- Hero ---------- */
.hero { padding-block: 40px 56px; text-align: center; }
.hero .logo { width: min(560px, 100%); margin: 0 auto 20px; }
.hero h1 {
  font-size: clamp(1.6rem, 5.5vw, 2.5rem);
  margin-bottom: 0.4em;
}
.hero .lead { max-width: 600px; margin-inline: auto; color: var(--ink-2); }
.facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts svg { width: 28px; height: 28px; flex: none; }
.hero .btn-row { justify-content: center; align-items: center; }
.hero .symbols { width: min(300px, 70%); margin: 36px auto 0; }

/* ---------- Cards ---------- */
.card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 24px;
}
.card.red { background: var(--red-soft); }
.card.blue { background: var(--blue-soft); }
.card.purple { background: var(--purple-soft); }
.card.yellow { background: var(--yellow-soft); }

.two-col { display: grid; gap: 28px; align-items: center; }
@media (min-width: 820px) {
  .two-col { grid-template-columns: 1.1fr 1fr; gap: 48px; }
}

.placeholder-art {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
  background: var(--blue-soft);
  border: 3px dashed var(--ink-2);
  border-radius: var(--radius);
  color: var(--ink-2);
  font-weight: 700;
}

.cast {
  display: grid;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}
@media (min-width: 640px) { .cast { grid-template-columns: repeat(3, 1fr); } }
.cast h3 { margin-bottom: 4px; }
.cast p { margin: 0; font-weight: 800; }
.cast .red h3 { color: var(--red); }
.cast .blue h3 { color: var(--blue); }
.cast .purple h3 { color: var(--purple); }

/* ---------- Lists ---------- */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 16px;
  align-items: start;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  background: var(--red);
}
.steps li:nth-child(2)::before { background: var(--blue); }
.steps li:nth-child(3)::before { background: var(--purple); }
.steps li:nth-child(4)::before { background: var(--green); }
.steps li p { margin: 0; align-self: center; }

.ticks {
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
  display: grid;
  gap: 12px;
}
.ticks li {
  position: relative;
  padding-left: 40px;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.ticks.boxes li::before {
  background: var(--paper);
  border: 3px solid var(--ink);
}

/* ---------- Kids note ---------- */
.kids {
  background: var(--yellow-soft);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 8px 0 var(--ink);
  padding: 28px 24px;
  text-align: center;
}
.kids p {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  font-weight: 500;
  line-height: 1.35;
  margin: 0;
}
.kids .read-aloud {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink-2);
  margin-bottom: 12px;
}

/* ---------- Remote ---------- */
.remote-grid { display: grid; gap: 20px; margin-top: 28px; }
@media (min-width: 820px) { .remote-grid { grid-template-columns: 1fr 1fr; } }
.remote-grid .card h3 { margin-bottom: 12px; }
.note {
  border-left: 6px solid var(--purple);
  background: var(--paper);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin-top: 24px;
}
.note p { margin: 0; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; margin-top: 20px; }
.faq details {
  background: var(--paper);
  border-radius: var(--radius-sm);
  border: 2px solid var(--line);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 20px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.6rem;
  line-height: 1;
  color: var(--blue);
  flex: none;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 20px 16px; margin: 0; }

.contact-line { font-size: 1.25rem; font-weight: 700; }

/* ---------- Footer ---------- */
footer {
  background: var(--ink);
  color: var(--cream);
  padding-block: 32px;
  text-align: center;
  font-size: 1rem;
}
footer p { margin: 0; }
footer .todo { background: transparent; color: var(--cream); border-color: var(--yellow); }
