/* Daniel's Lion - one stylesheet for the whole site.
   Two looks: html.st-crayon (pencil and crayon on paper, default) and html.st-movie (bright, flat, bold).
   Two editions: html.ed-school (default) and html.ed-church. Use .church-only / .school-only to show a block in one edition.
   Palette borrowed from the games' Crayon Kit: paper #f6f1e2, ink #3b3a38, blue #2457c5, red #e05a3a,
   green #2a8c3a, yellow #e8b00a, brown #6b4a2e. */

:root {
  --paper: #f6f1e2;
  --paper2: #fbf7ea;
  --ink: #3b3a38;
  --ink-soft: #6b665f;
  --blue: #2457c5;
  --red: #e05a3a;
  --green: #2a8c3a;
  --yellow: #e8b00a;
  --brown: #6b4a2e;
  --sky: #cfe6f5;
  --card: #fffdf4;
  --line: 3px;
  --radius: 255px 18px 225px 18px / 18px 225px 18px 255px;
  --radius-sm: 120px 10px 110px 10px / 10px 110px 10px 120px;
  --font-hand: "Segoe Print", "Chalkboard SE", "Bradley Hand", "Comic Sans MS", "Comic Neue", cursive;
  --font-body: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --shadow: 3px 4px 0 rgba(59, 58, 56, 0.18);
}

/* Movie look: soft and warm, like a still from an animated film. Low-contrast edges (a thin tinted line instead of
   ink), gentle shadows, muted accents that sit well next to the crayon pictures. */
html.st-movie {
  --paper: #f3eee6;
  --paper2: #faf7f1;
  --ink: #3a3f4a;
  --ink-soft: #6e7482;
  --edge: #ddd3c4;
  --blue: #4a7fc1;
  --red: #d9775f;
  --green: #5a9e6f;
  --yellow: #e9c46a;
  --brown: #8a6a4b;
  --sky: #dbe8ef;
  --card: #fffdf9;
  --line: 2px;
  --radius: 20px;
  --radius-sm: 14px;
  --font-hand: "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
  --shadow: 0 8px 22px rgba(80, 70, 50, 0.10);
}
/* A third look (studio-made art) can be added here later as html.st-studio with its own tokens. */
html.st-movie .card, html.st-movie .note, html.st-movie .page .box, html.st-movie .hero .art, html.st-movie .game .big,
html.st-movie .game .thumbs button, html.st-movie .seg, html.st-movie .btn, html.st-movie .dl-head .brand img,
html.st-movie .lost img, html.st-movie .facts span { border-color: var(--edge); }
html.st-movie .btn.play { border-color: transparent; }
html.st-movie h1, html.st-movie h2, html.st-movie h3 { letter-spacing: 0; font-weight: 700; }
html.st-movie .dl-foot { border-top: 1px solid var(--edge); }
html.st-movie .page td, html.st-movie .page th { border-bottom: 1px solid var(--edge); }
html.st-movie blockquote { border-left-color: var(--yellow); background: var(--paper2); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.45;
  min-height: 100vh;
}
html.st-crayon body {
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(115deg, rgba(36, 87, 197, 0.045) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(28deg, rgba(107, 74, 46, 0.03) 0 1px, transparent 1px 7px);
}
html.st-movie body {
  background: linear-gradient(180deg, #e9eef0 0, #f3eee6 260px, #f6f2ea 100%);
}
a { color: var(--blue); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-hand); line-height: 1.15; margin: 0 0 0.35em 0; letter-spacing: 0.01em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 0.8em 0; }
.serif { font-family: var(--font-serif); font-style: italic; color: var(--ink-soft); }
.wrap { width: min(1100px, 100% - 32px); margin: 0 auto; }
.hidden { display: none !important; }
.sr { position: absolute; left: -9999px; }

/* Edition-only blocks */
html.ed-school .church-only { display: none !important; }
html.ed-church .school-only { display: none !important; }

/* ---------- header ---------- */
.dl-head { padding: 10px 0 6px 0; }
.dl-head .bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
}
.dl-head .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.dl-head .brand img { width: 92px; height: 58px; object-fit: cover; object-position: 50% 45%; border: var(--line) solid var(--ink); border-radius: var(--radius-sm); background: var(--paper2); }
html.st-movie .dl-head .brand img { box-shadow: var(--shadow); }
.dl-head .brand .name { font-family: var(--font-hand); font-size: 1.45rem; font-weight: bold; letter-spacing: 0.04em; line-height: 1.1; }
.dl-head .brand .name small { display: block; font-family: var(--font-serif); font-style: italic; font-weight: normal; font-size: 0.8rem; color: var(--ink-soft); letter-spacing: 0; }
.dl-head .switches { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }

.seg { display: inline-flex; border: var(--line) solid var(--ink); border-radius: 999px; background: var(--card); overflow: hidden; box-shadow: var(--shadow); }
.seg button {
  appearance: none; border: 0; background: transparent; color: var(--ink);
  font: inherit; font-family: var(--font-hand); font-size: 0.95rem; font-weight: bold;
  padding: 7px 13px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; min-height: 42px;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.seg button svg { width: 22px; height: 22px; flex: 0 0 22px; }
.seg button[aria-pressed="true"] { background: var(--yellow); color: #2a2200; }
.seg.style button[aria-pressed="true"] { background: var(--sky); color: var(--ink); }
html.st-movie .seg button[aria-pressed="true"] { background: var(--blue); color: #fff; }
html.st-movie .seg.style button[aria-pressed="true"] { background: var(--green); color: #fff; }
.seg button:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }

/* ---------- nav tabs (drawn by site.js) ---------- */
.dl-head .nav { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 10px; }
.dl-head .nav a {
  font-family: var(--font-hand); font-weight: bold; font-size: 0.98rem; text-decoration: none; color: var(--ink);
  padding: 7px 14px; border: 2px solid transparent; border-radius: 999px; min-height: 38px; display: inline-flex; align-items: center;
}
.dl-head .nav a:hover { border-color: var(--ink-soft); }
.dl-head .nav a[aria-current="page"] { background: var(--card); border-color: var(--ink); box-shadow: var(--shadow); }
html.st-movie .dl-head .nav a[aria-current="page"] { border-color: var(--edge); }
html.st-movie .dl-head .nav a:hover { border-color: var(--edge); }
.dl-head .brand .name sup { font-size: 0.5em; vertical-align: super; letter-spacing: 0; margin-left: 2px; }

/* ---------- crumbs ---------- */
.crumbs { font-size: 0.95rem; margin: 8px 0 14px 0; color: var(--ink-soft); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- hero (home) ---------- */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: center; margin: 10px 0 26px 0; }
.hero .art { border: var(--line) solid var(--ink); border-radius: var(--radius); overflow: hidden; background: var(--paper2); box-shadow: var(--shadow); transform: rotate(-1deg); }
html.st-movie .hero .art { transform: none; }
.hero .art img { width: 100%; aspect-ratio: 1774 / 1254; object-fit: cover; }
html.ed-school .hero .art img.church-only, html.ed-church .hero .art img.school-only { display: none; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
.hero .tag { font-size: 1.15rem; }

/* ---------- cards ---------- */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; margin: 10px 0 30px 0; }
.card {
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  background: var(--card); border: var(--line) solid var(--ink); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform 0.15s ease;
}
.card:hover, .card:focus-visible { transform: translateY(-3px) rotate(-0.4deg); }
html.st-movie .card:hover { transform: translateY(-4px); }
.card .pic { aspect-ratio: 16 / 10; overflow: hidden; background: var(--sky); position: relative; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; }
.card .pic .tape { position: absolute; left: 50%; top: -6px; width: 90px; height: 22px; margin-left: -45px; background: rgba(232, 176, 10, 0.55); transform: rotate(-2deg); }
html.st-movie .card .pic .tape { display: none; }
.card .body { padding: 12px 16px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { margin: 0; font-size: 1.35rem; }
.card .words { color: var(--ink-soft); font-size: 1rem; margin: 0; }
.card .count { font-family: var(--font-hand); font-size: 0.95rem; color: var(--ink-soft); }
.card .icons { display: flex; gap: 10px; margin-top: auto; padding-top: 6px; }
.card .icons svg { width: 30px; height: 30px; }
.card.soon { opacity: 0.85; border-style: dashed; }
.card.soon .pic { display: flex; align-items: center; justify-content: center; background: var(--paper2); }
.card.soon .pic svg { width: 40%; height: 40%; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  font-family: var(--font-hand); font-weight: bold; text-decoration: none; cursor: pointer;
  border: var(--line) solid var(--ink); border-radius: var(--radius-sm); box-shadow: var(--shadow);
  padding: 12px 22px; font-size: 1.1rem; color: var(--ink); background: var(--card);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.btn.play { background: var(--green); color: #fff; font-size: 1.7rem; padding: 18px 40px; min-height: 76px; }
.btn.play svg { width: 36px; height: 36px; }
.btn.play:hover { filter: brightness(1.06); }
.btn.play:active { transform: translate(2px, 2px); box-shadow: none; }
.btn.small { font-size: 1rem; padding: 8px 14px; }
.btn.play .ed { font-family: var(--font-serif); font-style: italic; font-weight: normal; font-size: 0.85rem; opacity: 0.9; }

/* ---------- game page ---------- */
.game { display: grid; grid-template-columns: 1.3fr 1fr; gap: 26px; align-items: start; margin-bottom: 26px; }
.game .big { border: var(--line) solid var(--ink); border-radius: var(--radius); overflow: hidden; background: var(--sky); box-shadow: var(--shadow); }
.game .big img { width: 100%; aspect-ratio: 12 / 7; object-fit: cover; }
.game .thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.game .thumbs button { appearance: none; padding: 0; border: var(--line) solid var(--ink); border-radius: var(--radius-sm); overflow: hidden; background: var(--sky); cursor: pointer; opacity: 0.75; }
.game .thumbs button[aria-pressed="true"] { opacity: 1; outline: 3px solid var(--yellow); }
.game .thumbs img { aspect-ratio: 12 / 7; object-fit: cover; width: 100%; }
.game .side { display: flex; flex-direction: column; gap: 14px; }
.game .side h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.game .lines { font-size: 1.15rem; }
.game .playbox { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.game .playbox .hint { font-size: 0.95rem; color: var(--ink-soft); }
.facts { display: flex; flex-wrap: wrap; gap: 8px; }
.facts span { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-hand); font-size: 0.95rem; padding: 5px 11px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); }
.facts svg { width: 20px; height: 20px; }
.note { background: var(--card); border: var(--line) solid var(--ink); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); font-size: 1rem; }
.note h2 { font-size: 1.3rem; }
.note ul { margin: 0 0 0.6em 1.2em; padding: 0; }

/* ---------- plain pages (parents, privacy, 404) ---------- */
.page { max-width: 780px; margin: 0 auto 30px auto; }
.page h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); }
.page h2 { margin-top: 1.3em; }
.page .box { background: var(--card); border: var(--line) solid var(--ink); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow); margin: 14px 0; }
.page table { border-collapse: collapse; width: 100%; font-size: 0.98rem; }
.page td, .page th { text-align: left; padding: 6px 8px; border-bottom: 1px dashed var(--ink-soft); vertical-align: top; }
blockquote { margin: 0.6em 0 0.9em 0; padding: 8px 16px; border-left: 4px solid var(--yellow); font-family: var(--font-serif); font-style: italic; background: var(--paper2); }
.lost { text-align: center; padding: 30px 0; }
.lost img { width: min(420px, 80%); margin: 0 auto 14px auto; border: var(--line) solid var(--ink); border-radius: var(--radius); transform: rotate(2deg); }

/* ---------- footer ---------- */
.dl-foot { margin-top: 20px; padding: 18px 0 30px 0; border-top: 2px dashed var(--ink-soft); font-size: 0.95rem; color: var(--ink-soft); }
.dl-foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.dl-foot a { color: var(--ink); text-decoration: none; font-family: var(--font-hand); }
.dl-foot a:hover { text-decoration: underline; }
.dl-foot .verse { font-family: var(--font-serif); font-style: italic; }
.dl-foot .vision { width: 100%; font-family: var(--font-hand); font-size: 1.1rem; color: var(--ink); }

/* ---------- phone and tablet ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .game { grid-template-columns: 1fr; }
  .dl-head .switches { margin-left: 0; width: 100%; justify-content: space-between; }
}
@media (max-width: 520px) {
  body { font-size: 17px; }
  .dl-head .brand { gap: 8px; }
  .dl-head .brand img { width: 64px; height: 44px; flex: 0 0 64px; }
  .dl-head .brand .name { font-size: 1.05rem; letter-spacing: 0.02em; }
  .dl-head .brand .name small { font-size: 0.72rem; }
  .seg button { padding: 7px 10px; font-size: 0.9rem; }
  .btn.play { width: 100%; }
  .shelf { grid-template-columns: 1fr; }
  .game .thumbs { grid-template-columns: repeat(4, 1fr); gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .card:hover { transition: none; transform: none; }
}
