/*
  The pages beside the home page: /how-pricing-works (the pricing engine in full, with worked examples) and
  /book-a-demo (the demo form on a page of its own). The sections' shared head, the worked example's quote card, the
  rules list and the who-it's-for cards are home.css's; the steps, the questions, the closing band and the footer
  links are site.css's and sections.css's; the form itself is contact.css's.
*/

/* ---------- a page's hero: its head beside a card ---------- */
.page-hero { padding: 64px 0 72px; }
.page-hero-in { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) {
    .page-hero { padding: 96px 0 104px; }
    .page-hero-in { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 72px; }
}
.page-hero h1 { font-size: clamp(36px, 5vw, 58px); margin-bottom: 22px; text-wrap: balance; }
.page-hero .lede { max-width: 600px; }

/* the price in three lines, and what's on the page */
.sum-card { padding: 28px; border-radius: 22px; background: var(--bg-2); border: 2px solid var(--btn); box-shadow: 0 30px 60px -34px var(--shadow); }
html.dark .sum-card { border-color: var(--accent); }
.sum-label { margin-bottom: 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); }
.sum-lines { margin: 0 0 26px; }
.sum-lines div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.sum-lines dt { font-weight: 600; }
.sum-lines dd { margin: 0; color: var(--soft); }
.sum-lines .sum-total { border-bottom: 0; }
.sum-lines .sum-total dt { color: var(--accent); }
.sum-lines .sum-total dd { color: var(--ink); }
.toc ol { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; align-items: baseline; gap: 12px; padding: 6px 0; color: var(--ink); font-weight: 500; text-decoration: none; }
.toc a::before { content: counter(toc); flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--btn); color: var(--on-btn); font-size: 12px; font-weight: 600; transform: translateY(-1px); }
.toc a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 520px) { .sum-card { padding: 22px 18px; border-radius: 18px; } .sum-lines div { grid-template-columns: 6.5em minmax(0, 1fr); } }

/* ---------- the reel: the pricing film's player (reel.js), shown once its film is there (scripts/stamp.mjs) ----------
   On a phone held upright the poster and the film are the vertical cut, as tall as the screen allows. */
.reel { border-top: 1px solid var(--line); }
.reel[hidden], .link-play[hidden] { display: none; }
.reel .film-poster { display: block; box-shadow: 0 30px 60px -28px var(--shadow); }
.reel-poster img { aspect-ratio: 16 / 9; object-fit: cover; }
@media (orientation: portrait) and (max-width: 700px) {
    .reel .film-poster { width: min(100%, calc(72svh * 9 / 16)); margin: 0 auto; }
    .reel-poster img { aspect-ratio: 9 / 16; }
}
.reel .film-playing:not(.reel-vertical) { width: 100%; }
.reel .reel-vertical video { aspect-ratio: 9 / 16; }

/* ---------- how pricing works: the lines of a quote ---------- */
.lines, .markups, .examples, .calc-sec, .numbers { padding: 96px 0; border-top: 1px solid var(--line); }
.lines { background: var(--bg-2); }
@media (max-width: 899px) { .lines, .markups, .examples, .calc-sec, .numbers { padding: 64px 0; } }
.line-group { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.line-group::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.line-grid { display: grid; gap: 16px; margin: 0 0 44px; padding: 0; list-style: none; }
.line-grid:last-child { margin-bottom: 0; }
@media (min-width: 720px) { .line-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .line-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.line-grid li { display: flex; flex-direction: column; padding: 24px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); }
.line-grid h4 { margin: 0 0 8px; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.line-grid p { color: var(--soft); font-size: 16px; }
.line-grid .calc { margin-top: auto; padding-top: 16px; }
.line-grid .calc::before { content: ''; display: block; margin-bottom: 12px; border-top: 1px dashed var(--line); }
.calc, .working li { font: 500 14px/1.5 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; color: var(--accent); font-variant-numeric: tabular-nums; }
.line-grid .calc { color: var(--accent); font-size: 13.5px; }

/* markups: three cards */
.trio { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 900px) { .trio { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.trio li { padding: 26px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); }
.trio h3 { font-size: 20px; margin-bottom: 10px; }
.trio p { color: var(--soft); font-size: 16px; }

/* the rules: the home page's checklist, a step lighter */
.rules-sec { background: var(--bg-2); }

/* ---------- the worked examples: the working beside the quote ---------- */
.example { display: grid; gap: 28px; padding: 44px 0; border-top: 1px solid var(--line); }
.examples .section-head + .example { padding-top: 0; border-top: 0; }
.example:last-child { padding-bottom: 0; }
@media (min-width: 1000px) {
    .example { grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 64px; align-items: start; }
    .example-copy { position: sticky; top: 100px; }
}
.example-n { display: inline-block; margin-bottom: 12px; padding: 5px 11px; border-radius: 999px; background: var(--tint); color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.example h3 { font-size: clamp(26px, 3vw, 34px); margin-bottom: 12px; text-wrap: balance; }
html.serif .example h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.015em; }
.example-copy > p:not([class]) { color: var(--soft); font-size: 17px; max-width: 560px; }
.example-label { margin: 26px 0 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); }
.working { display: grid; gap: 6px; margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); list-style: none; }
.working li { font-size: 13.5px; color: var(--ink); overflow-wrap: anywhere; }
.applied { gap: 8px; }
.applied li { font-size: 16px; }
.quote .quote-name { margin-bottom: 6px; font: 560 24px/1.15 var(--serif); letter-spacing: -0.015em; }
html:not(.serif) .quote .quote-name { font-family: var(--sans); font-weight: 600; }

/* ---------- the price calculator: the copy beside a panel shaped like the back office's ---------- */
.calc-sec-in { display: grid; gap: 36px; align-items: start; }
@media (min-width: 960px) { .calc-sec-in { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 72px; } }
.calc-sec h2 { font-size: clamp(30px, 4vw, 46px); margin-bottom: 16px; text-wrap: balance; }
.calc-note { margin-top: 18px; padding: 14px 16px; border-left: 3px solid var(--sig); background: var(--bg-2); border-radius: 0 12px 12px 0; color: var(--ink); font-size: 16px; }
.calc-panel { margin: 0; padding: 24px; border-radius: 18px; background: var(--bg-2); border: 1px solid var(--line); box-shadow: 0 24px 50px -32px var(--shadow); }
.calc-panel-title { font-weight: 600; font-size: 17px; }
.calc-panel dl { margin: 0; }
.calc-panel dl div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.calc-panel dt { color: var(--soft); }
.calc-panel dd { margin: 0; font: 500 14px/1.5 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.calc-panel .calc-panel-sum { border-bottom: 0; padding-top: 10px; }
.calc-panel .calc-panel-sum dt { color: var(--ink); font-weight: 600; }
.calc-panel .calc-panel-sum dd { color: var(--accent); font-weight: 600; }
.calc-panel .quote-group { margin-top: 18px; }
.trace { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.trace li { position: relative; padding-left: 16px; color: var(--soft); font-size: 14px; }
.trace li::before { content: ''; position: absolute; left: 2px; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--sig); }

/* ---------- book a demo: the form beside what happens next ---------- */
.book { padding: 56px 0 88px; }
.book-in { display: grid; gap: 36px; grid-template-areas: "intro" "form" "next"; }
@media (min-width: 960px) {
    .book { padding: 88px 0 104px; }
    .book-in { grid-template-columns: minmax(0, 1fr) minmax(0, 560px); grid-template-rows: auto 1fr; grid-template-areas: "intro form" "next form"; column-gap: 72px; row-gap: 44px; align-items: start; }
}
.book-intro { grid-area: intro; }
.book-intro h1 { font-size: clamp(36px, 5vw, 58px); margin-bottom: 22px; text-wrap: balance; }
.book-intro .lede { margin-bottom: 0; }
.book-intro .link-play { margin-top: 18px; }
.book-form { grid-area: form; }
/* the form is built by contact.js: hold its place until then, so nothing below jumps */
.book-form:not(.demo) { min-height: 780px; border: 1px solid var(--line); border-radius: 22px; background: var(--bg-2); }
.book-noscript { padding: 32px; }
.book-noscript h2 { font-size: 28px; margin-bottom: 10px; }
.book-noscript a { color: var(--accent); font-weight: 600; }
.book-next { grid-area: next; }
.book-next h2 { font-size: clamp(24px, 2.6vw, 30px); margin-bottom: 20px; }
.next-steps { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.next-steps li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 16px; align-items: start; }
.next-steps .n { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--btn); color: var(--on-btn); font-weight: 600; font-size: 15px; }
.next-steps h3 { font-size: 19px; margin: 6px 0 4px; }
.next-steps p { color: var(--soft); font-size: 16px; }

/* your own numbers: what to send, beside why */
.numbers-in { display: grid; gap: 32px; align-items: start; }
@media (min-width: 960px) { .numbers-in { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 72px; } }
.numbers h2 { font-size: clamp(30px, 4vw, 46px); margin-bottom: 16px; text-wrap: balance; }
.numbers-more { margin-top: 18px; }
.numbers-more a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }
.numbers-more a:hover { color: var(--ink); }
.numbers-list { padding: 28px; border-radius: 18px; background: var(--bg-2); border: 1px solid var(--line); }
.numbers-list li { color: var(--ink); }
@media (min-width: 640px) { .numbers-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; } }
