/* methodreader.com layout and components. Colors and type come from tokens.css; this
   file never names a color of its own. The page frame (header, hero, sections, footer)
   follows Method Schedule's site.css so the family's sites share one layout; the reader
   demo in the middle is ours. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--accent-strong); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
code { font-family: var(--mono); font-size: .86em; background: var(--code-bg); padding: .08em .35em; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; }
h2 { font-size: clamp(27px, 4vw, 38px); font-weight: 700; margin-bottom: 12px; }
h2 .answer { display: block; color: var(--muted); font-weight: 600; }
p { margin: 0 0 14px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 28px; } }

.skip {
  position: absolute; left: 8px; top: -100px; z-index: 100;
  background: var(--surface); color: var(--ink); padding: 10px 16px;
  border: 2px solid var(--accent); border-radius: 8px;
}
.skip:focus { top: 8px; }

/* Screenplay sluglines head each section: the app's subject, set in the script face. */
.slug {
  font-family: var(--script); font-weight: 700; font-size: 13px; letter-spacing: .04em;
  color: var(--muted); margin: 0 0 14px;
}

/* ------------------------------------------------------------------ header */
:root { --head: 60px; }
.top { position: sticky; height: var(--head); top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--rule); }
.top .wrap { height: 100%; display: flex; align-items: center; gap: 12px 22px; padding-top: 10px; padding-bottom: 10px; }
.home { display: inline-flex; align-items: center; padding: 6px 0; margin-right: auto; }
.home img { height: 22px; width: auto; }
.nav { display: none; gap: 18px; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: 15px; padding: 6px 0; }
.nav a:hover { color: var(--ink); text-decoration: underline; }
.gh { display: inline-flex; align-items: center; }
.gh svg { width: 18px; height: 18px; fill: currentColor; }
@media (min-width: 900px) { .nav { display: flex; align-items: center; } }

.btn {
  display: inline-block; padding: 12px 20px; border-radius: 8px; font-weight: 600; font-size: 16px;
  text-decoration: none; line-height: 1.2; white-space: nowrap;
  background: var(--accent); color: var(--accent-ink); border: 2px solid var(--accent);
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-ink); text-decoration: none; }
.top .btn { padding: 8px 14px; font-size: 15px; }
.fine { font-size: 14px; color: var(--muted); }

/* ------------------------------------------------------------------ hero */
/* ------------------------------------------------------------------ film */
.film { padding: 64px 0 8px; }
.film h2 { margin: 0 0 22px; }
.reel { display: block; width: 100%; height: auto; aspect-ratio: 1280 / 800;
  border: 1px solid var(--rule); border-radius: 12px; background: var(--surface-2);
  box-shadow: var(--shadow); }
.film-text { margin: 14px 0 0; color: var(--muted); max-width: 72ch; }
.film-text summary { cursor: pointer; color: var(--ink-soft); }
.film-text p { margin: 10px 0 0; }

.hero { padding: 56px 0 40px; }
.hero .brand { margin: 0 0 26px; }
.hero .brand img { height: clamp(30px, 5.6vw, 58px); width: auto; }
.pitch { font-size: clamp(28px, 4.8vw, 48px); line-height: 1.12; letter-spacing: -.025em; font-weight: 650; margin: 0 0 18px; max-width: 17em; }
.pitch .answer { display: block; color: var(--accent); }
.lede { font-size: clamp(17px, 2vw, 19px); color: var(--ink-soft); max-width: 36em; margin: 0 0 26px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.renamed {
  margin: 28px 0 0; padding: 12px 16px; max-width: 40em; font-size: 15px; color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: 8px;
}

/* ------------------------------------------------------------------ sections */
.band { padding: 72px 0; border-top: 1px solid var(--rule); }
.band.alt { background: var(--surface); }
.lead { color: var(--ink-soft); font-size: 18px; max-width: 34em; }

/* ------------------------------------------------------------------ the reader demo
   One scene in two devices: a PDF that can only be scaled, and Method Reader's book,
   which reflows. Scroll moves the devices (layout() in the page script); the settings
   demonstrate themselves on a timer. The text column (.phase) sits where .wrap's text
   does, and the script measures it, so the devices stay inside the page's measure. */
.act { position: relative; border-top: 1px solid var(--rule); }
/* The page opens on the problem (the owner, 2026-10-19), so the first act has
   no rule above it and its heading is the page's h1. */
.act.lead-in { border-top: 0; }
.phase h1 { font-size: clamp(30px, 5vw, 54px); line-height: 1.08; letter-spacing: -.025em; font-weight: 700; margin: 0 0 14px; max-width: 14em; }
.phase .lead { max-width: 30em; }
.act.two { height: 210vh; }
/* Pinned under the sticky header, so the header never covers a device. */
.stick { position: sticky; top: var(--head); height: calc(100vh - var(--head)); overflow: hidden; }
.phase {
  position: absolute; top: 10vh; z-index: 6; pointer-events: none;
  left: max(16px, calc((100% - 1120px) / 2 + 28px)); right: max(16px, calc((100% - 1120px) / 2 + 28px));
}
.phase.out { opacity: 0; }
.phase.col { top: 50%; transform: translateY(-50%); width: min(340px, 30vw); right: auto; }
.stage { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.dev { position: absolute; left: 50%; top: 50%; will-change: transform, opacity; }
.device {
  position: relative; background: var(--device); border-radius: 16px; padding: 16px 13px 34px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, .28);
}
/* The device's name rides the chin, where an e-reader carries its brand. */
.chin {
  position: absolute; left: 0; right: 0; bottom: 9px; text-align: center;
  font: 600 12px/1 var(--sans); letter-spacing: .02em; color: var(--device-chin);
}
.chin.ours { color: var(--device-accent); }
.screen { background: var(--screen); border-radius: 2px; position: relative; overflow: hidden; }

/* Laid out once at a fixed size then transform-scaled: a PDF does not reflow, it scales. */
.pdfpage {
  position: absolute; top: 0; left: 0; width: 320px; height: 414px; transform-origin: 0 0;
  background: var(--pdf-page); font-family: var(--script); font-size: 6.27px; line-height: 1.5;
  color: var(--pdf-ink); overflow: hidden; padding-top: 22px;
}
.pdfpage > div { padding-left: 17.6%; padding-right: 11.8%; }
.pdfpage .s { font-weight: 700; margin-bottom: .9em; }
.pdfpage .x { margin-bottom: .9em; }
.pdfpage .c { margin-left: 37%; font-weight: 700; padding-right: 6%; }
.pdfpage .d { margin-left: 17%; margin-right: 14%; margin-bottom: .9em; }
.pdfpage .pg { text-align: right; margin-bottom: 1.4em; }
.pdfpage .t { text-align: right; margin: .9em 0; }
.zoom {
  position: absolute; right: 8px; bottom: 8px; font: 10px/1.4 var(--sans); color: var(--screen-muted);
  background: var(--screen); padding: 2px 6px; border-radius: 3px;
}

/* The second device is a working reader: a clipped viewport with a flow inside it. */
.ebook { position: absolute; inset: 0; display: flex; flex-direction: column; color: var(--screen-ink); }
.ebook .view { flex: 1 1 auto; overflow: hidden; min-height: 0; position: relative; }
.ebook .flow { position: absolute; top: 0; left: 0; right: 0; transition: transform .3s cubic-bezier(.32, .72, 0, 1); }
.ebook .s, .ebook .c { font-weight: 700; }
.ebook .t { text-align: right; color: var(--screen-muted); }
.ebook .pg { text-align: right; color: var(--screen-muted); font-size: .82em; }
.ebook.nopg .pg { display: none; }
.ebook .loc {
  flex: 0 0 auto; display: flex; justify-content: space-between; font: 10px/1.4 var(--sans);
  color: var(--screen-muted); border-top: 1px solid rgba(0, 0, 0, .1);
}

.pager {
  position: absolute; top: 100%; left: 0; right: 0; margin-top: 18px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  opacity: 0; transition: opacity .35s ease-out; pointer-events: none; font-size: 14px; color: var(--muted);
}
.pager.on { opacity: 1; pointer-events: auto; }
.pager button, .panel .pick {
  font: inherit; color: var(--ink); background: var(--surface); cursor: pointer;
  border: 1px solid var(--rule-strong); border-radius: 6px; padding: 6px 12px;
}
.pager button:hover:not(:disabled), .panel .pick:hover { border-color: var(--accent); color: var(--accent-strong); }
.pager button:disabled { opacity: .4; cursor: default; }
.pager .count { min-width: 8.5em; text-align: center; font-variant-numeric: tabular-nums; }

.panel { font-size: 15px; color: var(--ink-soft); max-width: 320px; margin-top: 26px; opacity: 0; transition: opacity .35s ease-out; }
.panel.on { opacity: 1; pointer-events: auto; }
.panel .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.panel .pick { padding: 3px 10px; font-size: 14px; }
.meter { display: flex; gap: 4px; border-radius: 3px; }
.meter b { width: 12px; height: 12px; border-radius: 2px; background: var(--rule); transition: background .16s ease-out, transform .16s ease-out; }
.meter b.f { background: var(--accent); }
.meter.live b { cursor: pointer; }
.meter.live b:hover { transform: scaleY(1.3); }
.panel .hintline { font-size: 13px; color: var(--muted); margin-top: 12px; }

/* ------------------------------------------------------------------ drag and drop */
.shots { display: grid; grid-template-columns: 1fr; gap: 28px; margin-top: 36px; }
.shots figure { margin: 0; }
.shots img { width: 100%; height: auto; }
.shots figcaption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 4px; }
@media (min-width: 900px) { .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* One wide picture of the app (the hero's Preview page, the command line under Yours to
   keep): the capture tool's frame and shadow are in the image, so no border here. */
.shot { margin: 36px 0 0; }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 4px; }
.trans { font-family: var(--script); font-size: 13px; color: var(--muted); text-align: right; margin: 36px 0 0; }

/* ------------------------------------------------------------------ who it's for */
.cards { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 32px 0; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 22px 22px 18px; box-shadow: var(--shadow); }
.band.alt .card { background: var(--bg); }
.card h3 { font-family: var(--script); font-size: 15px; letter-spacing: .04em; color: var(--accent-strong); }
.card p { color: var(--ink-soft); font-size: 16px; margin: 0; }
.note {
  max-width: 46em; margin: 0 0 16px; padding: 14px 18px; font-size: 15px; color: var(--ink-soft);
  border: 1px solid var(--rule); border-left: 3px solid var(--note-fill); border-radius: 8px; background: var(--bg);
}
.closer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 28px; }

/* ------------------------------------------------------------------ downloads */
.downloads p { color: var(--ink-soft); max-width: 46em; }
.files { border-collapse: collapse; width: 100%; margin: 24px 0; font-size: 15px; color: var(--ink-soft); }
.files th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 0 18px 10px 0; border-bottom: 1px solid var(--rule-strong); }
.files td { padding: 12px 18px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.files td:first-child { color: var(--ink); font-weight: 600; }
.files td:nth-child(2) { white-space: nowrap; }
.files td:last-child { padding-right: 0; }
@media (max-width: 820px) {
  /* Each file becomes a block of three lines; the roles keep it a table for a screen reader. */
  .files thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .files, .files tbody, .files tr, .files td { display: block; }
  .files tr { padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .files td { border: 0; padding: 2px 0; }
  .files td:nth-child(2) { white-space: normal; }
}

/* ------------------------------------------------------------------ footer */
.end { font-family: var(--script); font-size: 13px; color: var(--muted); text-align: right; padding-top: 28px; padding-bottom: 8px; }
.foot { border-top: 1px solid var(--rule); padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.foot a { color: var(--ink-soft); }
.foot .suite { flex-basis: 100%; }
.foot .right { margin-left: auto; }

/* ------------------------------------------------------------------ narrow screens
   A phone is a column, not a stage: the heading sits at the top and the devices stack
   under it (layout() moves them). The settings list does not fit beside a reader at
   this width, so the reader demonstrates the settings on its own and the pager stays. */
@media (max-width: 999px) {
  .act.two { height: 230vh; }
  .phase.col { top: 9vh; transform: none; width: auto; right: max(16px, calc((100% - 1120px) / 2 + 28px)); }
  .phase.col .lead, .panel { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .act.two { height: auto; }
  .stick { position: static; height: auto; overflow: visible; padding: 72px 0; }
  .phase { position: static; opacity: 1 !important; transform: none !important; margin: 0 auto 34px; max-width: 1120px; padding: 0 28px; width: auto; pointer-events: auto; }
  .stage { position: static; display: flex; gap: 44px; flex-wrap: wrap; justify-content: center; padding-bottom: 40px; pointer-events: auto; }
  .dev { position: static !important; transform: none !important; opacity: 1 !important; }
  .panel, .pager { opacity: 1; pointer-events: auto; }
  .pager { position: static; }
}
