/* crayonbible.com
   Colors are the app's own paper, ink and crayon colors (App/Support/Theme.swift).
   Fonts are self-hosted: Crayon Bible Title/Text (ours) and Fredoka (SIL OFL 1.1, see /fonts/OFL-Fredoka.txt). */

@font-face { font-family: "Crayon Bible Title"; src: url("/fonts/CrayonBible-Title.woff") format("woff"); font-display: swap; unicode-range: U+0020-2025, U+2027-FFFF; }
@font-face { font-family: "Crayon Bible Text"; src: url("/fonts/CrayonBible-Text.woff") format("woff"); font-display: swap; unicode-range: U+0020-2025, U+2027-FFFF; }
/* The Crayon Bible fonts' ellipsis draws as a single dot, so "…" falls back to Fredoka. */
@font-face { font-family: "Fredoka"; src: url("/fonts/Fredoka.woff") format("woff"); font-weight: 300 700; font-display: swap; }

:root {
  --paper: #fcf6ea;
  --paper-deep: #f6ead2;
  --card: #fffdf8;
  --ink: #3c1818;
  --soft: #6b4a44;
  --blue: #1866b4;
  --blue-ink: #ffffff;
  --green: #376b27;
  --yellow: #fccc36;
  --coral: #e8553d;
  --line: #ead9bd;
  --frame: #2d2220;
  --focus: #1866b4;
  --shadow: 0 2px 0 #ead9bd, 0 14px 30px -18px rgba(60, 24, 24, .45);
  --title: "Crayon Bible Title", "Fredoka", ui-rounded, system-ui, sans-serif;
  --label: "Crayon Bible Text", "Fredoka", ui-rounded, system-ui, sans-serif;
  --body: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1d1614; --paper-deep: #251c19; --card: #2a201c; --ink: #f6ece0; --soft: #d6c3b5;
    --blue: #8cc0f5; --blue-ink: #10233a; --green: #9fd585; --line: #4a3a32; --frame: #0f0b0a; --focus: #fccc36;
    --shadow: 0 2px 0 #3a2d27, 0 14px 30px -18px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1d1614; --paper-deep: #251c19; --card: #2a201c; --ink: #f6ece0; --soft: #d6c3b5;
  --blue: #8cc0f5; --blue-ink: #10233a; --green: #9fd585; --line: #4a3a32; --frame: #0f0b0a; --focus: #fccc36;
  --shadow: 0 2px 0 #3a2d27, 0 14px 30px -18px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper);
  color: var(--ink); font: 400 1.125rem/1.6 var(--body); overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--title); font-weight: 400; line-height: 1.12; margin: 0; letter-spacing: .005em; }
p { margin: 0 0 1em; }
.sc { font-variant: small-caps; text-transform: lowercase; }
.sc::first-letter { text-transform: uppercase; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--card); color: var(--ink); padding: 12px 16px; z-index: 20; border-radius: 12px; font-weight: 600; }
.skip:focus { left: 16px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }

/* Header */
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 10px; }
.wordmark { display: inline-flex; align-items: center; min-height: 44px; border-radius: 12px; }
.wordmark img { width: 168px; height: auto; }
.nav ul { display: flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 clamp(7px, 2vw, 12px); font-family: var(--label); font-size: 1.05rem; color: var(--ink); text-decoration: none; border-radius: 22px; }
.nav a:hover { background: var(--card); box-shadow: inset 0 0 0 2px var(--line); }
.nav a[aria-current="page"] { box-shadow: inset 0 0 0 2px var(--line); background: var(--card); }

/* Crayon underline used under section titles, like the app's screen titles */
.scribble { display: inline-block; padding-bottom: .32em; background: url("/img/underline-yellow.webp") no-repeat center bottom / 100% .32em; }

/* Buttons: the app's chunky crayon buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 10px 24px; border-radius: 999px; font-family: var(--label); font-size: 1.2rem; line-height: 1.2; text-decoration: none; text-align: center; border: 0; }
.btn-blue { background: var(--blue); color: var(--blue-ink); box-shadow: 0 4px 0 color-mix(in srgb, var(--blue) 60%, #000); }
.btn-cream { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 3px var(--line), 0 4px 0 var(--line); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(2px); box-shadow: none; }

/* Hero */
.hero { padding: 20px 0 40px; overflow-x: clip; }
.hero .wrap { display: grid; gap: 28px; align-items: center; }
@media (min-width: 960px) { .hero .wrap { grid-template-columns: 1.05fr 1fr; gap: 40px; } .hero { padding: 36px 0 64px; } }
.hero h1 { font-size: clamp(2.35rem, 1.4rem + 4.6vw, 4.4rem); line-height: 1.04; margin-bottom: 20px; max-width: 13ch; }
.hero .lede { font-size: clamp(1.15rem, 1.05rem + .45vw, 1.35rem); color: var(--soft); max-width: 34em; margin-bottom: 24px; }
.soon { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 24px; padding: 8px 18px 8px 10px; border-radius: 999px; background: var(--yellow); color: #3c1818; font-family: var(--label); font-size: 1.1rem; line-height: 1.25; }
.soon img { width: 40px; height: 40px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; }
@media (max-width: 480px) { .hero .actions .btn { width: 100%; } }

.stage { position: relative; max-width: 560px; margin: 0 auto 7%; width: 100%; padding: 0 0 24px; }
.stage .ipad { width: 78%; margin-left: auto; border: 10px solid var(--frame); border-radius: 30px; overflow: hidden; background: var(--frame); transform: rotate(2.5deg); box-shadow: var(--shadow); }
.stage .iphone { position: absolute; left: 0; bottom: 0; width: 36%; }
.stage .pip { position: absolute; right: -4%; bottom: -15%; width: 26%; filter: drop-shadow(0 8px 10px rgba(60,24,24,.18)); }
@media (prefers-reduced-motion: no-preference) {
  .stage .pip { animation: hop 1.6s cubic-bezier(.3,.7,.4,1) .4s 1 both; transform-origin: 50% 100%; }
  @keyframes hop { 0% { transform: translateY(30px) scale(.9); opacity: 0; } 40% { transform: translateY(-14px) rotate(-4deg); opacity: 1; } 70% { transform: translateY(0) rotate(2deg); } 100% { transform: none; } }
}

/* Phone frame around real app screens */
.phone { border: 7px solid var(--frame); border-radius: 30px; overflow: hidden; background: var(--frame); box-shadow: var(--shadow); }
.phone img { width: 100%; border-radius: 22px; }

/* Facts strip */
.facts { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.facts li { display: flex; gap: 12px; align-items: center; padding: 12px 16px; background: var(--card); border-radius: 20px; box-shadow: inset 0 0 0 2px var(--line); font-weight: 500; line-height: 1.35; }
.facts img { width: 44px; height: 44px; flex: none; object-fit: contain; }

/* Sections */
.section { padding: 64px 0; }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); margin-bottom: 16px; }
.section-head p { color: var(--soft); font-size: 1.2rem; }
.band { background: var(--paper-deep); border-block: 3px dashed var(--line); }

/* The lesson trail */
.trail { list-style: none; margin: 0; padding: 0; counter-reset: step; position: relative; }
.trail > li { counter-increment: step; position: relative; display: grid; gap: 20px; padding: 0 0 48px 64px; }
.trail > li::before {
  content: counter(step); position: absolute; left: 0; top: -4px; width: 48px; height: 48px; display: grid; place-items: center;
  background: url("/img/circle-blue.webp") center / contain no-repeat; color: #fff; font-family: var(--title); font-size: 1.6rem; z-index: 1;
}
.trail::before { content: ""; position: absolute; left: 21px; top: 20px; bottom: 60px; border-left: 6px dotted #d9b98a; }
.step-text h3 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); margin-bottom: 4px; }
.step-time { display: inline-block; font-family: var(--label); color: var(--green); font-size: 1.05rem; margin-bottom: 10px; }
.step-text p { max-width: 32em; }
.step-shot { width: min(100%, 250px); margin: 0; }
.step-shot figcaption { font-size: .95rem; color: var(--soft); margin-top: 10px; line-height: 1.4; }
@media (min-width: 600px) and (max-width: 859px) {
  .trail > li { grid-template-columns: 1fr 220px; align-items: start; gap: 28px; }
}
@media (min-width: 860px) {
  .trail::before { left: 50%; margin-left: -3px; top: 30px; bottom: 120px; }
  .trail > li { grid-template-columns: 1fr 1fr; gap: 0 96px; padding: 0 0 40px; align-items: center; }
  .trail > li::before { left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; font-size: 2rem; }
  .trail > li .step-text { grid-column: 1; grid-row: 1; justify-self: end; text-align: right; }
  .trail > li .step-text p { margin-left: auto; }
  .trail > li .step-shot { grid-column: 2; grid-row: 1; justify-self: start; }
  .trail > li:nth-child(even) .step-text { grid-column: 2; justify-self: start; text-align: left; }
  .trail > li:nth-child(even) .step-text p { margin-left: 0; }
  .trail > li:nth-child(even) .step-shot { grid-column: 1; justify-self: end; }
  .trail > li:nth-child(odd) .step-shot { transform: rotate(1.5deg); }
  .trail > li:nth-child(even) .step-shot { transform: rotate(-1.5deg); }
}
.trail-end { display: flex; align-items: center; gap: 16px; justify-content: center; text-align: center; flex-wrap: wrap; font-family: var(--label); font-size: 1.25rem; }
.trail-end img { width: 110px; }

/* Modes */
.modes { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.mode { background: var(--card); border-radius: 32px; padding: 28px; box-shadow: inset 0 0 0 3px var(--line); display: grid; grid-template-columns: 1fr; gap: 8px; }
.mode img { width: 132px; margin-bottom: 4px; }
.mode h3 { font-size: 2rem; }
.mode .ages { font-family: var(--label); color: var(--green); font-size: 1.15rem; margin: 0 0 8px; }
.ticks { margin: 0; padding: 0; list-style: none; }
.ticks li { position: relative; padding-left: 34px; margin-bottom: 10px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .3em; width: 22px; height: 22px; background: url("/img/star.webp") center / contain no-repeat; }
.note { color: var(--soft); margin-top: 24px; }

/* Songs */
.songs { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.song { background: var(--card); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.song > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.song-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.song h3 { font-size: 1.7rem; }
.song .ref { font-family: var(--label); color: var(--green); margin: -6px 0 0; }
.song audio { width: 100%; min-height: 54px; }
.song blockquote { margin: 0; padding: 14px 16px; border-radius: 18px; background: var(--blue); color: var(--blue-ink); font-family: var(--label); font-size: 1.2rem; line-height: 1.4; }
.song blockquote p { margin: 0; }
.song blockquote cite { display: block; font-style: normal; font-size: 1rem; margin-top: 6px; opacity: .92; }
details { border-radius: 16px; }
details summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--blue); border-radius: 12px; }
details summary::marker { color: var(--blue); }
.lyrics { white-space: pre-line; color: var(--soft); margin: 6px 0 0; font-size: 1rem; }

/* Bible accuracy */
.bible { display: grid; gap: 36px; align-items: start; }
@media (min-width: 960px) { .bible { grid-template-columns: 1fr 1fr; gap: 56px; } }
.script { margin: 0; background: var(--card); border-radius: 28px; padding: 22px; box-shadow: var(--shadow); }
.script img { border-radius: 18px; margin-bottom: 18px; width: 100%; }
.script h3 { font-size: 1.5rem; margin-bottom: 12px; }
.lines { list-style: none; margin: 0; padding: 0; }
.lines li { display: grid; gap: 2px 16px; padding: 12px 0; border-top: 2px dashed var(--line); }
@media (min-width: 520px) { .lines li { grid-template-columns: 1fr auto; } }
.lines q { quotes: none; }
.lines .src { font-family: var(--label); color: var(--green); white-space: nowrap; }
.script figcaption { color: var(--soft); font-size: .98rem; margin-top: 8px; }
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.rules h3 { font-size: 1.45rem; margin-bottom: 6px; }
.rules p { margin: 0; }
.gentle { margin: 28px 0 0; display: grid; gap: 12px; }
.gentle img { border-radius: 22px; box-shadow: var(--shadow); }
.gentle figcaption { color: var(--soft); font-size: .98rem; }

/* Family features */
.features { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); list-style: none; margin: 0; padding: 0; }
.features li { background: var(--card); border-radius: 26px; padding: 22px; box-shadow: inset 0 0 0 2px var(--line); display: grid; grid-template-columns: 76px 1fr; gap: 16px; align-items: start; }
.features img { width: 76px; height: 76px; object-fit: contain; }
@media (max-width: 420px) { .features li { grid-template-columns: 1fr; gap: 10px; } .features img { width: 60px; height: 60px; } }
.features h3 { font-size: 1.45rem; margin-bottom: 6px; }
.features p { margin: 0; }
.features .verse { display: block; margin-top: 8px; font-family: var(--label); color: var(--green); }
.ask { margin-top: 24px; display: grid; gap: 16px; align-items: center; background: var(--yellow); color: #3c1818; border-radius: 28px; padding: 22px; }
@media (min-width: 720px) { .ask { grid-template-columns: 220px 1fr; padding: 22px 32px 22px 22px; } }
.ask img { border-radius: 18px; }
.ask h3 { font-size: 1.6rem; margin-bottom: 6px; }
.ask p { margin: 0; }
.ask .prompt { font-family: var(--label); font-size: 1.25rem; margin: 8px 0 0; }

/* Units */
.units { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); list-style: none; margin: 0; padding: 0; counter-reset: unit; }
.units li { counter-increment: unit; background: var(--card); border-radius: 28px; padding: 22px; text-align: center; box-shadow: inset 0 0 0 2px var(--line); }
.units img { width: 132px; margin: 0 auto 12px; }
.units .num { font-family: var(--label); color: var(--soft); margin: 0 0 2px; }
.units h3 { font-size: 1.7rem; margin-bottom: 10px; }
.units p { margin: 0; }
.units .src { display: block; font-family: var(--label); color: var(--green); margin-top: 6px; }

/* Safety */
.safety { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .safety { grid-template-columns: 1.3fr 1fr; } }
.safe-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.safe-list li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.safe-list svg { width: 40px; height: 40px; }
.safe-list b { display: block; font-size: 1.2rem; }
.safe-art { justify-self: center; display: grid; gap: 16px; justify-items: center; text-align: center; }
.safe-art img { width: min(60%, 260px); }

/* Pricing */
.plans { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: stretch; }
.plan { background: var(--card); border-radius: 32px; padding: 28px; box-shadow: inset 0 0 0 3px var(--line); display: flex; flex-direction: column; gap: 10px; }
.plan.family { box-shadow: inset 0 0 0 4px var(--blue), var(--shadow); }
.plan h3 { font-size: 2rem; }
.price { font-family: var(--body); font-weight: 700; font-size: 2.6rem; line-height: 1.1; margin: 4px 0 0; }
.price small { display: block; margin-top: 4px; font-size: 1.1rem; font-weight: 500; color: var(--soft); }
.price-alt { margin: 0; font-weight: 500; }
.plan .ticks { margin-top: 8px; }
.trial { display: inline-block; align-self: flex-start; background: var(--yellow); color: #3c1818; font-family: var(--label); padding: 4px 14px; border-radius: 999px; margin: 0; }
.never { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; }
.never li { padding: 8px 16px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); }
.fine { color: var(--soft); font-size: 1rem; margin-top: 18px; max-width: 46em; }

/* FAQ */
.faq { max-width: 820px; display: grid; gap: 12px; }
.faq details { background: var(--card); box-shadow: inset 0 0 0 2px var(--line); border-radius: 20px; padding: 6px 20px; }
.faq summary { color: var(--ink); font-size: 1.15rem; padding: 8px 0; }
.faq details[open] summary { margin-bottom: 4px; }
.faq details p { color: var(--soft); }

/* Closing call to action */
.closing { text-align: center; padding: 72px 0 80px; }
.closing > .wrap > img { width: 180px; margin: 0 auto 10px; }
.closing h2 { font-size: clamp(2.1rem, 1.5rem + 2.8vw, 3.4rem); margin-bottom: 14px; }
.closing p { color: var(--soft); max-width: 36em; margin-left: auto; margin-right: auto; }
.closing .soon { margin-top: 8px; color: #3c1818; }

/* Footer */
.site-footer { border-top: 3px dashed var(--line); padding: 28px 0 40px; color: var(--soft); font-size: 1rem; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 4px 20px; list-style: none; margin: 0 0 12px; padding: 0; }
.site-footer .links a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer p { margin: 0 0 6px; }

/* Inner pages: privacy, help, 404 */
.page { padding: 24px 0 64px; }
.doc { max-width: 760px; margin: 0 auto; }
.doc-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.doc-head img { width: clamp(64px, 18vw, 110px); flex: none; }
.doc-head > div { min-width: 0; }
a[href^="mailto:"] { overflow-wrap: anywhere; }
.doc h1 { font-size: clamp(2.1rem, 1.6rem + 2.4vw, 3.2rem); }
.doc h2 { font-size: clamp(1.6rem, 1.4rem + .8vw, 2rem); margin: 40px 0 10px; }
.doc ul { padding-left: 1.3em; }
.doc li { margin-bottom: 6px; }
.meta { color: var(--soft); margin: 8px 0 0; }
.callout { background: var(--card); box-shadow: inset 0 0 0 2px var(--line); border-left: 10px solid var(--green); border-radius: 20px; padding: 18px 22px 4px; margin: 24px 0; }
.lost { text-align: center; padding: 48px 0 72px; }
.lost img { width: 200px; margin: 0 auto 16px; }
.lost h1 { font-size: clamp(2.2rem, 1.6rem + 3vw, 3.4rem); margin-bottom: 12px; }
.lost p { color: var(--soft); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .btn:hover { transform: none; }
}
