/* PonderOwl website: one stylesheet, no third-party fonts or scripts.
   The brand matches the apps: Fredoka headings, Nunito text, forest green
   and owl amber (apps/ponderowl/lib/src/ui/palette.dart). Fonts are
   self-hosted (SIL Open Font License, assets/fonts/OFL-*.txt). */
@font-face { font-family: Fredoka; src: url(/assets/fonts/Fredoka-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: Fredoka; src: url(/assets/fonts/Fredoka-Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: Nunito; src: url(/assets/fonts/Nunito-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Nunito; src: url(/assets/fonts/Nunito-Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: Nunito; src: url(/assets/fonts/Nunito-ExtraBold.ttf) format("truetype"); font-weight: 800; font-display: swap; }

:root {
  --bg: #fbf8f2; --ink: #1c2a26; --muted: #5a6763; --card: #ffffff; --line: #e8e1d3; --soft: #edf5f1;
  --accent: #1f4d41;          /* forest: links, primary buttons */
  --accent-ink: #ffffff;
  --amber: #f2a33a; --amber-ink: #2a1a05; --amber-soft: #fdf1df;
  --amber-text: #9a5208;      /* amber for text on light backgrounds (WCAG AA) */
  --hero: #1f4d41; --hero-ink: #f6f1e7; --hero-muted: #c9dcd4;
  --shadow: 0 1px 2px rgba(28, 42, 38, .06), 0 8px 24px rgba(28, 42, 38, .08);
  --radius: 20px;
  --display: Fredoka, "Segoe UI", system-ui, sans-serif;
  --text: Nunito, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111916; --ink: #eef3f0; --muted: #a9b8b2; --card: #18221f; --line: #2a3833; --soft: #17302a;
    --accent: #7fc8b2; --accent-ink: #0f1f1a; --amber-soft: #2e2414; --amber-text: #f2a33a;
    --hero: #143a30; --hero-ink: #f6f1e7; --hero-muted: #b4cfc5;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 var(--text); }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.wrap.wide { max-width: 1180px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 6vw, 44px); line-height: 1.12; margin: 28px 0 14px; }
h2 { font-size: clamp(24px, 4vw, 32px); line-height: 1.2; margin: 40px 0 12px; }
h3 { font-size: 20px; line-height: 1.3; margin: 20px 0 6px; font-weight: 600; }
p.lead { font-size: 19px; color: var(--muted); margin: 0 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--card); padding: 8px 12px; border-radius: 8px; }

/* Header: logo, store navigation and one "get the app" button. */
header.site { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent);
              backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); padding: 0; }
header.site .wrap { display: flex; align-items: center; gap: 18px; min-height: 66px; flex-wrap: wrap; }
header.site a { text-decoration: none; color: var(--ink); }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 700 23px/1 var(--display); letter-spacing: -.3px; }
.logo svg, .logo img { width: 38px; height: 38px; flex: none; border-radius: 11px; }
.logo b { color: var(--amber-text); font-weight: 700; }
header.site nav { display: flex; gap: 4px; margin-left: auto; }
header.site nav a { font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 10px; color: var(--muted); }
header.site nav a:hover, header.site nav a[aria-current="page"] { color: var(--ink); background: var(--soft); }
header.site .cta { margin: 0; padding: 9px 16px; font-size: 15px; }
@media (max-width: 760px) {
  header.site .wrap { gap: 8px 12px; padding-top: 10px; padding-bottom: 6px; }
  header.site nav { order: 3; width: 100%; margin: 0 -8px; overflow-x: auto; justify-content: space-between; gap: 0; }
  header.site nav a { padding: 6px 8px; font-size: 14px; }
  header.site .cta { margin-left: auto; }
}

main { padding: 8px 0 40px; }

/* Buttons, pills and cards (shared by every page). */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
          background: var(--accent); color: var(--accent-ink); font: 800 16px/1.2 var(--text); text-decoration: none;
          border: 2px solid var(--accent); border-radius: 14px; padding: 12px 22px; margin: 6px 0; cursor: pointer;
          transition: transform .12s ease, box-shadow .12s ease; }
.button:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.button.amber { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); }
.button.secondary { background: transparent; color: var(--accent); }
.button.light { background: transparent; color: var(--hero-ink); border-color: color-mix(in srgb, var(--hero-ink) 55%, transparent); }
.pill { display: inline-block; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 13px;
        border-radius: 999px; padding: 4px 12px; letter-spacing: .02em; }
.pill.amber { background: var(--amber); color: var(--amber-ink); }
.pill.soft { background: var(--soft); color: var(--accent); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin: 16px 0;
        box-shadow: var(--shadow); }
.card.accent { border-color: var(--accent); background: var(--soft); }
.card ul, .card ol { margin: 8px 0 0; padding-left: 22px; }
.card li { margin: 4px 0; }
code, .code { font: 700 18px/1.4 ui-monospace, Consolas, monospace; background: var(--soft); border: 1px dashed var(--accent);
              border-radius: 8px; padding: 2px 10px; letter-spacing: 1px; }
.legal h2 { font-size: 21px; }
.legal p, .legal li { font-size: 16px; }

/* Footer. */
footer.site { border-top: 1px solid var(--line); padding: 34px 0 44px; font-size: 13px; color: var(--muted); background: var(--card); }
footer.site nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; }
footer.site nav a { font-weight: 700; font-size: 14px; }
footer.site .cols { display: grid; gap: 24px; grid-template-columns: 1.4fr repeat(3, 1fr); margin-bottom: 22px; }
footer.site .cols h4 { font: 600 15px var(--display); color: var(--ink); margin: 0 0 8px; }
footer.site .cols a { display: block; padding: 3px 0; color: var(--muted); text-decoration: none; font-size: 14px; }
footer.site .cols a:hover { color: var(--accent); }
footer.site .cols a.logo { display: inline-flex; padding: 0; font-size: 22px; color: var(--ink); margin-bottom: 4px; }
@media (max-width: 760px) { footer.site .cols { grid-template-columns: 1fr 1fr; } }

/* ── Storefront (home page) ──────────────────────────────────────────── */
.store-hero { background: radial-gradient(1200px 500px at 85% -10%, #2c6b5a 0%, transparent 60%), var(--hero); color: var(--hero-ink);
        overflow: hidden; }
.store-hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 64px; }
.store-hero h1 { margin-top: 12px; color: var(--hero-ink); }
.store-hero h1 em { font-style: normal; color: var(--amber); }
.store-hero p.lead { color: var(--hero-muted); }
.store-hero .ctas { display: flex; flex-wrap: wrap; gap: 10px 12px; margin: 22px 0 14px; }
.store-hero .ticks { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 14px 0 0; color: var(--hero-muted);
               font-weight: 700; font-size: 15px; }
.store-hero .ticks li::before { content: "✓"; color: var(--amber); margin-right: 6px; }
.store-hero .soon { color: var(--hero-muted); font-size: 14px; margin: 6px 0 0; }
.store-hero .soon a { color: var(--hero-ink); }
.shots { position: relative; min-height: 360px; }
@media (max-width: 900px) {
  .store-hero .wrap { grid-template-columns: 1fr; padding-top: 36px; padding-bottom: 44px; }
  .shots { min-height: 0; margin-top: 8px; }
}

/* Device frames around real app screenshots. */
.laptop { position: relative; background: #0d1512; border-radius: 16px 16px 6px 6px; padding: 10px 10px 14px;
          box-shadow: 0 30px 60px rgba(0, 0, 0, .35); }
.laptop::before { content: ""; display: block; height: 14px; margin: -2px 0 8px;
                  background: radial-gradient(circle, #e35d4f 4px, transparent 5px) 4px 50%/14px 14px no-repeat,
                              radial-gradient(circle, #e9b949 4px, transparent 5px) 22px 50%/14px 14px no-repeat,
                              radial-gradient(circle, #5fbf6f 4px, transparent 5px) 40px 50%/14px 14px no-repeat; }
.laptop img { display: block; width: 100%; border-radius: 6px; }
.phone { background: #0d1512; border-radius: 34px; padding: 9px; box-shadow: 0 24px 50px rgba(0, 0, 0, .35); width: 100%; }
.phone img { display: block; width: 100%; border-radius: 26px; }
/* An app window that isn't a phone or a laptop: a rounded card. */
.screen { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); max-width: 520px; }
.screen img { display: block; width: 100%; height: auto; }
/* Lesson videos, two side by side. */
.videos { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 760px) { .videos { grid-template-columns: 1fr; } }
.videos figure { margin: 0; }
.videos video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--soft); border: 1px solid var(--line);
                border-radius: var(--radius); box-shadow: var(--shadow); }
.videos figcaption { margin-top: 10px; font-size: 16px; }
.shots .laptop { width: 92%; }
.shots .phone { position: absolute; width: 34%; right: 0; bottom: -28px; }
@media (max-width: 900px) { .shots .phone { bottom: -16px; width: 30%; } }

/* A strip of what's covered. */
.strip { border-bottom: 1px solid var(--line); background: var(--card); }
.strip ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin: 0; padding: 18px 0;
            font: 600 16px var(--display); color: var(--muted); }
.strip li b { color: var(--ink); }

.section { padding: 64px 0 8px; }
.section > .wrap > h2:first-child, .section .head h2 { margin-top: 0; }
.head { max-width: 640px; margin-bottom: 26px; }
.head .eyebrow, .eyebrow { display: block; font-weight: 800; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--amber-text); margin-bottom: 8px; }
.head p { color: var(--muted); font-size: 18px; margin: 0; }

/* Product cards: the store's catalogue. */
.products { display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .products { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .products { grid-template-columns: 1fr; } }
.product { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
           overflow: hidden; box-shadow: var(--shadow); }
.product .art { aspect-ratio: 16 / 10; background: var(--soft); display: grid; place-items: center; overflow: hidden; position: relative; }
.product .art img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.product .art.icon img { width: 42%; height: auto; border-radius: 26%; box-shadow: var(--shadow); object-fit: contain; }
.product .art .pill { position: absolute; top: 14px; left: 14px; }
.product .body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product h3 { margin: 0; font-size: 22px; }
.product .meta { color: var(--muted); font-size: 15px; margin: 0; }
.product .price { font: 700 22px var(--display); margin: 8px 0 0; }
.product .price small { font: 600 14px var(--text); color: var(--muted); }
.product .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 12px; }
.product .actions .button { flex: 1 1 auto; padding: 10px 16px; min-height: 44px; font-size: 15px; }
.platforms { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.platforms li { font-size: 12px; font-weight: 800; border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; color: var(--muted); }
.platforms li.on { border-color: var(--accent); color: var(--accent); }

/* Feature rows: a screenshot beside its story, alternating sides. */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin: 56px 0; }
.feature.flip .copy { order: 2; }
.feature .copy h3 { font-size: clamp(22px, 3vw, 28px); margin: 6px 0 10px; font-weight: 700; }
.feature .copy p { color: var(--muted); margin: 0 0 10px; }
.feature .copy ul { padding-left: 20px; margin: 8px 0 0; }
.feature .media { display: flex; justify-content: center; gap: 16px; }
.feature .media .phone { max-width: 260px; }
.feature .media .phone + .phone { margin-top: 48px; }
@media (max-width: 860px) {
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 22px; margin: 40px 0; }
  .feature.flip .copy { order: 0; }
  .feature .media .phone { max-width: 46%; }
}

/* Pricing table. */
.pricing { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 960px) { .pricing { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .pricing { grid-template-columns: 1fr; } }
.plan-card { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 22px; position: relative;
             display: flex; flex-direction: column; gap: 4px; }
.plan-card.best { border-color: var(--amber); box-shadow: var(--shadow); }
.plan-card .pill { position: absolute; top: -13px; left: 20px; }
.plan-card h3 { margin: 0; font-size: 18px; }
.plan-card .amount { font: 700 36px/1.1 var(--display); margin: 6px 0 0; }
.plan-card .per { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.plan-card .save { color: var(--accent); font-weight: 800; font-size: 14px; margin: 0; }
.plan-card .button { margin-top: auto; }
.free-note { text-align: center; color: var(--muted); margin: 18px 0 0; }

/* Books band (secondary to the apps). */
.band { background: var(--amber-soft); border-radius: var(--radius); padding: 30px; display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; }
.band .covers { display: flex; }
.band .covers img { width: 110px; border-radius: 6px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.band .covers img + img { margin-left: -38px; transform: rotate(5deg); }
.band h2 { margin: 0 0 8px; font-size: 26px; }
.band p { margin: 0 0 12px; color: var(--muted); }
@media (max-width: 700px) { .band { grid-template-columns: 1fr; } }

/* FAQ: details/summary, no script. */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 4px 20px; margin: 10px 0; }
.faq summary { cursor: pointer; font: 600 18px/1.4 var(--display); padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

.cta-band { background: var(--hero); color: var(--hero-ink); border-radius: var(--radius); padding: 40px 32px; text-align: center; margin: 64px 0 24px; }
.cta-band h2 { color: var(--hero-ink); margin: 0 0 8px; }
.cta-band p { color: var(--hero-muted); margin: 0 0 18px; }

/* /book/* pages: one switch on <body data-mode="prelaunch|live"> decides
   which blocks show, so the page works without JavaScript. */
body[data-mode="prelaunch"] [data-show="live"],
body[data-mode="live"] [data-show="prelaunch"] { display: none !important; }

/* /buy/ pages (desktop checkout): plan cards, the email field, the key. */
.buy .plans { border: 0; padding: 0; margin: 20px 0; display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
@media (max-width: 460px) { .buy .plans { grid-template-columns: 1fr; } }
.buy .plans legend { font-weight: 800; margin-bottom: 8px; padding: 0; }
.buy .plan { position: relative; display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 2px solid var(--line);
             border-radius: 16px; padding: 14px 14px 12px 40px; cursor: pointer; }
.buy .plan input { position: absolute; left: 14px; top: 18px; accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.buy .plan:has(input:checked) { border-color: var(--accent); background: var(--soft); }
.buy .plan:has(input:focus-visible) { outline: 3px solid var(--amber); outline-offset: 2px; }
.buy .plan .name { font-weight: 800; }
.buy .plan .price { font: 700 22px var(--display); }
.buy .plan .price small { display: block; font: 400 14px var(--text); color: var(--muted); }
.buy .plan .note { font-size: 13px; color: var(--muted); }
.buy .plan.best .note { color: var(--accent); font-weight: 800; }
.buy .field { display: block; font-weight: 800; margin: 16px 0; }
.buy .field input { display: block; width: 100%; max-width: 420px; margin: 6px 0 4px; font: inherit; font-weight: 400; padding: 10px 12px;
                    border: 2px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); }
.buy .field input:focus { border-color: var(--accent); outline: none; }
.buy .field .small { display: block; font-weight: 400; }
.buy .renew p { margin: 12px 0 0; padding: 10px 14px; border-left: 4px solid var(--accent); background: var(--card); border-radius: 8px; font-size: 15px; }
.buy .renew .renew-plan { display: none; }
@supports selector(:has(*)) {
  .buy .renew .renew-all { display: none; }
  .buyform:has(input[value="monthly"]:checked) .renew-plan[data-plan="monthly"],
  .buyform:has(input[value="six_months"]:checked) .renew-plan[data-plan="six_months"],
  .buyform:has(input[value="yearly"]:checked) .renew-plan[data-plan="yearly"],
  .buyform:has(input[value="lifetime"]:checked) .renew-plan[data-plan="lifetime"] { display: block; }
}
.buy .pay { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 20px; }
.buy button.button { font: 800 16px var(--text); }
.buy .notice.error { border-color: #b3261e; }
.buy .terms p { color: var(--muted); margin: 8px 0; }
.buy .keybox { margin: 20px 0; }
.buy code.key { display: inline-block; font-size: clamp(18px, 5vw, 26px); padding: 10px 16px; user-select: all; word-break: break-all; }

/* /books/: the paperbacks, a cover card each (generated by site_pages.dart). */
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin: 12px 0 8px; }
.book { display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--line);
        border-radius: 16px; padding: 12px; box-shadow: var(--shadow); }
.book img { width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--line); }
.book h3 { margin: 8px 0 0; }
.book p { margin: 0; }
.book .button, .book .soon-tag { margin-top: auto; text-align: center; }
.soon-tag { border: 2px dashed var(--line); border-radius: 12px; padding: 10px; color: var(--muted); font-weight: 800; font-size: 15px; }

/* Click a picture to see it larger (assets/zoom.js). */
img.zoomable { cursor: zoom-in; }
img.zoomable:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
dialog.zoom { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0;
              border: 0; background: transparent; color: #fff; overflow: hidden; }
dialog.zoom::backdrop { background: rgba(10, 16, 14, .88); }
dialog.zoom figure { margin: 0; height: 100%; display: flex; flex-direction: column; }
dialog.zoom .zoom-frame { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
                          padding: 56px 16px 8px; box-sizing: border-box; }
dialog.zoom .zoom-frame img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
                              border-radius: 10px; background: #fff; box-shadow: 0 12px 40px rgba(0, 0, 0, .45); cursor: zoom-in; }
dialog.zoom.actual .zoom-frame { display: block; overflow: auto; text-align: center; }
dialog.zoom.actual .zoom-frame img { max-width: none; max-height: none; cursor: zoom-out; }
dialog.zoom figcaption { padding: 6px 16px 18px; max-width: 900px; margin: 0 auto; text-align: center;
                         font-size: 16px; line-height: 1.5; color: #e6ece9; }
dialog.zoom .zoom-close { position: absolute; top: 10px; right: 12px; z-index: 1; width: 44px; height: 44px; border-radius: 50%;
                          border: 0; background: rgba(255, 255, 255, .16); color: #fff; font: 700 28px/44px var(--text); cursor: pointer; }
dialog.zoom .zoom-close:hover { background: rgba(255, 255, 255, .28); }
@media (prefers-reduced-motion: no-preference) {
  dialog.zoom[open] .zoom-frame img { animation: zoom-in .18s ease-out; }
  @keyframes zoom-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
}

/* Footer: an oversized wordmark that bleeds off the bottom (footer.design). */
footer.site { overflow: hidden; padding-bottom: 0; }
footer.site .wordmark { margin: 24px 0 -0.24em; font: 700 clamp(72px, 20vw, 280px)/0.9 var(--display); letter-spacing: -.04em; text-align: center;
                        white-space: nowrap; user-select: none; pointer-events: none; color: transparent;
                        background: linear-gradient(180deg, var(--soft), transparent 85%); -webkit-background-clip: text; background-clip: text; }
