/* The marketing site wears the app's clothes (docs/lifebook-editorial-comic-implementation-brief.md):
   paper, ivory panels framed with one ink line, coral for what you can do, a yellow caption
   tag for labels, Poppins for the headings and the system face for the words. No halftone, no
   hard shadows, no tilt: the comic is in the pages, not the chrome. */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/poppins-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/poppins-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/poppins-latin-700-normal.woff2') format('woff2'); }

:root {
  color-scheme: light;
  --bg: #f7f3ea;
  --surface: #fffdf8;
  --surface-2: #f1ece0;
  --line: #d9d1c7;
  --line-strong: #bfb6a9;
  --ink: #242320;
  --ink-2: #4a4843;
  --muted: #66645e;
  --accent: #b83b2c;
  --accent-soft: #f6e3df;
  --on-accent: #fff;
  --gold: #f2c14e;
  --gold-soft: #fbefcf;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;
  --font-head: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --frame: 1.5px solid var(--ink);
  --hairline: 1px solid var(--line);
  --r: 12px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:focus-visible, .btn:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; margin: 0 0 0.4em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 4.2vw, 2.4rem); }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { max-width: 1040px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* The top bar and the footer: flat on the paper, the wordmark as the app sets it */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: var(--hairline); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.brand b { font-weight: 700; color: var(--accent); }
.brand-mark { width: 36px; height: 36px; border-radius: 9px; }
.top nav { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
@media (max-width: 640px) { .top nav a:not(.btn) { display: none; } }
.top nav a { color: var(--ink-2); font-weight: 600; font-family: var(--font-head); font-size: 0.95rem; text-decoration: none; }
.top nav a:not(.btn):hover { color: var(--accent); }
footer { margin: 72px 0 32px; padding-top: 18px; border-top: var(--hairline); color: var(--muted); font-size: 0.9rem; }
footer nav { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
footer a { color: var(--ink-2); }

/* The hero: the words on the left; on the right one phone at a hand's width, the week's page behind it */
.hero { display: grid; gap: 32px; align-items: center; padding: 36px 0 10px; }
@media (min-width: 820px) { .hero { grid-template-columns: 1.15fr 0.85fr; padding: 48px 0 8px; } }
.hero p.lede, .closing p.lede { font-size: 1.2rem; color: var(--ink-2); max-width: 32em; }
.hero-copy .caption-box { margin-bottom: 14px; }
.hero-art { position: relative; height: 500px; }
.hero-page { position: absolute; left: 0; top: 36px; width: 58%; max-width: 300px; border: var(--frame); border-radius: 6px; background: #fff; }
.hero-phone { position: absolute; right: 2%; top: 0; width: 52%; max-width: 256px; }
@media (max-width: 500px) { .hero-art { height: 440px; } .hero-page { max-width: 210px; } .hero-phone { max-width: 196px; } }

/* The caption tag: the yellow box with an ink line, as on the pages and the app's panels */
.caption-box { display: inline-block; padding: 3px 10px; background: var(--gold); color: var(--ink); border: var(--frame); border-radius: 6px; font-family: var(--font-head); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.78rem; line-height: 1.5; }

/* Buttons: an ink outline by default, coral for the one thing to do */
.btn { display: inline-block; padding: 12px 20px; background: var(--surface); color: var(--ink); border: var(--frame); border-radius: 10px; font-family: var(--font-head); font-weight: 600; font-size: 1rem; line-height: 1.3; text-decoration: none; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.primary:hover { background: #a3331f; border-color: #a3331f; }
.btn.small { padding: 8px 14px; font-size: 0.9rem; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 20px 0 8px; }
.actions.center { justify-content: center; }
.note { font-size: 0.9rem; color: var(--muted); }
.lead { font-size: 1.1rem; max-width: 40em; margin-bottom: 1.4em; }

/* Phones: a screenshot in a rounded frame with one ink line, never wider than a hand.
   A cropped phone shows the top of the screen, where the thing being talked about is. */
.phone { border: var(--frame); border-radius: 28px; overflow: hidden; background: var(--bg); max-width: 300px; }
.phone img { width: 100%; }
.phone.crop { height: 400px; border-radius: 28px 28px 10px 10px; }
.phone.crop.tall { height: 470px; }
.phones-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; justify-items: center; padding-bottom: 24px; }
.phones-2 .phone { max-width: 220px; }
.two .phone.crop { height: 400px; }
.phones-2 .phone:last-child { transform: translateY(24px); }
.phones-1 { display: grid; justify-items: center; }

/* The gallery of drawn pages: three, each a hand wide, or a swipe on a phone. Each page
   carries its caption the way a page does, in a yellow box. */
.gallery { display: grid; gap: 22px; }
@media (min-width: 700px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 699px) { .gallery { grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 14px; margin: 0 -16px; } .gallery figure { scroll-snap-align: start; } }
.gallery figure { margin: 0; display: flex; flex-direction: column; }
.gallery img { border: var(--frame); border-radius: 6px; background: #fff; }
.gallery figcaption { flex: 1; margin-top: 12px; padding: 10px 14px; background: var(--gold-soft); border: var(--frame); border-radius: 8px; font-size: 0.95rem; line-height: 1.45; }
.gallery figcaption b { font-family: var(--font-head); font-weight: 600; }

/* How it works: three panels, each a cropped screen with a numbered caption */
.steps { display: grid; gap: 18px; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--surface); border: var(--frame); border-radius: var(--r); padding: 18px 18px 16px; }
.step .phone { margin: 0 auto 16px; max-width: 240px; height: 300px; border-radius: 22px 22px 8px 8px; }
.step .num { font-family: var(--font-head); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.08em; color: var(--accent); line-height: 1; margin-bottom: 6px; }
.step h3 { margin-bottom: 4px; }
.step p { color: var(--ink-2); margin: 0; }

/* The artist's board: the stages picture, framed on the paper */
.board img { width: 100%; max-width: 1040px; margin: 0 auto; border: var(--frame); border-radius: var(--r); }
.board picture { display: block; }
@media (max-width: 600px) { .board img { max-width: 420px; } }
.board-note { max-width: 46em; margin: 18px auto 0; text-align: center; color: var(--ink-2); }

/* Two columns: words beside phones */
.two { display: grid; gap: 28px; align-items: center; }
@media (min-width: 760px) { .two { grid-template-columns: 1fr 1fr; } .two.flip > div:first-child { order: 2; } }
.two p { color: var(--ink-2); }

/* The whole game: a list of its parts and one phone showing the part chosen. Radio buttons
   inside their labels, read with :has(), so the page carries no script and choosing a part
   never scrolls it. */
.picker { display: grid; gap: 24px; align-items: start; }
@media (min-width: 1000px) { .picker { grid-template-columns: 1.1fr 0.9fr; } }
.options { display: grid; gap: 8px; }
.options label { position: relative; display: block; padding: 10px 14px; background: var(--surface); border: var(--frame); border-radius: 10px; cursor: pointer; }
.options label input { position: absolute; inset: 0; margin: 0; opacity: 0; pointer-events: none; }
.options label b { display: block; font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; }
.options label span { display: block; font-size: 0.92rem; color: var(--ink-2); }
.options label:hover { background: var(--surface-2); }
.options label:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); }
.options label:has(input:checked) b { color: var(--accent); }
.options label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.screens { display: grid; justify-items: center; }
/* Never taller than the window, so the whole screen stays in view beside the list. */
.screens .phone { display: none; width: min(300px, calc((100vh - 60px) * 0.46)); max-width: 100%; }
.picker:has(#f-goals:checked) .s-goals { display: block; }
.picker:has(#f-quests:checked) .s-quests { display: block; }
.picker:has(#f-tavern:checked) .s-tavern { display: block; }
.picker:has(#f-journal:checked) .s-journal { display: block; }
.picker:has(#f-vision:checked) .s-vision { display: block; }
.picker:has(#f-market:checked) .s-market { display: block; }
.picker:has(#f-stats:checked) .s-stats { display: block; }
.picker:has(#f-insights:checked) .s-insights { display: block; }
/* On a wide screen the list is two columns, no taller than the phone, so every part and its screen are in view together and nothing moves. */
@media (min-width: 1000px) {
  .picker { align-items: center; }
  .options { grid-template-columns: 1fr 1fr; }
  .options label { min-height: 128px; }
}
/* Below a laptop's width the parts are a row of chips to swipe, with the screen right under them */
@media (max-width: 999px) {
  .options { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 10px; margin: 0 -16px; scroll-snap-type: x proximity; }
  .options label { flex: 0 0 auto; padding: 8px 14px; white-space: nowrap; scroll-snap-align: start; border-radius: 999px; }
  .options label span { display: none; }
  .screens .phone { max-width: 260px; }
}

/* Questions */
.faq { display: grid; gap: 10px; max-width: 760px; }
.faq details { background: var(--surface); border: var(--frame); border-radius: 10px; padding: 0 16px; }
.faq summary { cursor: pointer; padding: 12px 0; font-family: var(--font-head); font-weight: 600; list-style: none; position: relative; padding-right: 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-family: var(--font); font-weight: 600; font-size: 1.5rem; line-height: 1; color: var(--accent); }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 0 0 14px; color: var(--ink-2); }

/* The closing call */
.closing { text-align: center; padding: 20px 0 0; }
.closing p.lede { margin: 0 auto 10px; }

/* Sections: room between them, so each reads as its own panel */
section { margin: 64px 0; }
@media (min-width: 760px) { section { margin: 88px 0; } }
section > h2 { margin-bottom: 0.3em; }

/* The styles shelf */
.shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (min-width: 700px) { .shelf { grid-template-columns: repeat(6, 1fr); } }
.shelf figure { margin: 0; }
.shelf img { border: var(--frame); border-radius: 8px; aspect-ratio: 1; object-fit: cover; background: var(--surface-2); }
.shelf figcaption { font-size: 0.85rem; font-family: var(--font-head); font-weight: 600; margin-top: 6px; text-align: center; }

/* Pricing */
.prices { display: grid; gap: 14px; margin-bottom: 18px; }
@media (min-width: 760px) { .prices { grid-template-columns: 1.2fr 1fr 1fr 1fr; } }
.price { background: var(--surface); border: var(--frame); border-radius: var(--r); padding: 18px; }
.price.main { background: var(--gold-soft); }
.price h3 { margin-bottom: 0; }
.price .caption-box { margin-bottom: 8px; }
.price .amount { font-family: var(--font-head); font-weight: 700; font-size: 2rem; letter-spacing: -0.02em; line-height: 1.2; }
.price .amount small { font-family: var(--font); font-weight: 400; font-size: 0.9rem; letter-spacing: 0; color: var(--muted); }
.price ul { padding-left: 18px; margin: 8px 0 0; color: var(--ink-2); }
.price li { margin: 3px 0; }

/* Long pages: privacy, terms, support */
.prose { max-width: 720px; }
.prose h1 { margin-top: 28px; }
.prose h2 { font-size: 1.5rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.1rem; margin-top: 1.4em; }
.prose dt { font-family: var(--font-head); font-weight: 600; margin-top: 12px; }
.prose dd { margin: 2px 0 0; color: var(--ink-2); }
.prose table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; padding: 6px 8px; border-bottom: var(--hairline); vertical-align: top; }
.updated { color: var(--muted); font-size: 0.9rem; }
