/* Catty Tales website. Tokens match Docs/02-visual-design. */
:root {
  --bg: #f8f2ee;
  --card: #ffffff;
  --chip: #fcf3ef;
  --text: #5e3a3a;
  --text-2: #846158;
  --accent: #e0605e;
  --accent-ink: #ffffff;
  --mustard: #e3b94a;
  --teal: #47b6b2;
  --violet: #9b78d9;
  --rose: #ec8bbe;
  --sage: #aedb92;
  --shadow: 0 10px 30px rgba(122, 74, 74, 0.12);
  --radius: 22px;
  --max: 880px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #241c1e;
    --card: #342a2c;
    --chip: #433638;
    --text: #f4e7e2;
    --text-2: #c4ada6;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Soft floating blobs in the background, like the game's bubbles. */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.35;
}
body::before { width: 340px; height: 340px; background: var(--rose); top: -80px; right: -80px; }
body::after { width: 300px; height: 300px; background: var(--teal); bottom: -100px; left: -90px; }

a { color: var(--accent); font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-style: wavy; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
  font-size: 22px;
}
.brand img { width: 42px; height: 42px; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--chip);
}
.nav a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 24px;
  padding: 28px 0 8px;
}
.hero h1 { font-size: clamp(34px, 6vw, 52px); line-height: 1.1; margin: 0 0 12px; font-weight: 900; }
.hero p { color: var(--text-2); font-size: 19px; margin: 0 0 20px; }
.hero .art { display: flex; align-items: flex-end; justify-content: center; }
.hero .art img:first-child { width: 62%; animation: bob 3.2s ease-in-out infinite; }
.hero .art img:last-child { width: 40%; animation: bob 2.6s ease-in-out infinite reverse; }

.page-hero { display: flex; align-items: center; gap: 18px; padding: 24px 0 6px; }
.page-hero img { width: 96px; height: 96px; flex: none; animation: bob 3s ease-in-out infinite; }
.page-hero h1 { margin: 0; font-size: clamp(30px, 5vw, 42px); line-height: 1.15; font-weight: 900; }
.page-hero p { margin: 4px 0 0; color: var(--text-2); }

@keyframes bob { 50% { transform: translateY(-6px); } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
}

/* Cards and content */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 28px;
  margin: 18px 0;
}
.card h2 { margin: 0 0 8px; font-size: 24px; font-weight: 900; display: flex; align-items: center; gap: 10px; }
.card h3 { margin: 18px 0 4px; font-size: 18px; font-weight: 800; }
.card p, .card li { margin: 6px 0; }
.card ul { padding-left: 22px; }
.card li::marker { color: var(--accent); }

.tldr {
  background: linear-gradient(135deg, var(--chip), var(--card));
  border: 2px dashed var(--accent);
}
.tldr ul { list-style: none; padding: 0; }
.tldr li { padding-left: 34px; position: relative; }
.tldr li::before { content: "🐾"; position: absolute; left: 0; }

.emoji { font-size: 26px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chip { background: var(--chip); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 15px; }

table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 16px; }
th, td { text-align: left; padding: 10px 12px; vertical-align: top; }
th { background: var(--chip); font-weight: 800; }
tr + tr td { border-top: 1px solid var(--chip); }
.table-scroll { overflow-x: auto; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 800;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.btn.ghost { background: var(--card); color: var(--text); }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }

.toc { columns: 2; column-gap: 28px; padding-left: 20px; }
@media (max-width: 640px) {
  .toc { columns: 1; }
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero .art { order: -1; max-width: 300px; margin: 0 auto; }
  .btns { justify-content: center; }
  .card { padding: 22px 20px; }
}

/* FAQ */
details { background: var(--chip); border-radius: 16px; padding: 14px 18px; margin: 10px 0; }
details[open] { background: var(--card); box-shadow: var(--shadow); }
summary { cursor: pointer; font-weight: 800; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-size: 22px; line-height: 1; }
details[open] summary::after { content: "−"; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.feature { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.feature .emoji { display: block; margin-bottom: 6px; }
.feature h3 { margin: 0 0 4px; font-size: 18px; }
.feature p { margin: 0; color: var(--text-2); font-size: 16px; }

.note { color: var(--text-2); font-size: 15px; }

footer {
  margin: 40px 0 30px;
  padding-top: 18px;
  border-top: 2px dashed var(--chip);
  color: var(--text-2);
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
footer a { color: var(--text-2); }
