/* Quillnest public pages (home and features). Same press-sheet world as the app, set for persuading:
   a white sheet on a cool room, a black rail band, four process inks. Tokens come from app.css. */

.lp { background: var(--paper); }
.lp-wrap { width: min(1120px, 100% - 2 * clamp(16px, 4vw, 40px)); margin-inline: auto; }
.lp-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lp h1, .lp h2, .lp h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
.lp h1 { font-size: clamp(36px, 5.4vw, 66px); line-height: 1.05; }
.lp h2 { font-size: clamp(27px, 3.2vw, 40px); line-height: 1.12; }
.lp h3 { font-size: 21px; line-height: 1.2; }
.lp p { margin: 0; }
.lp-lede { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--ink-2); max-width: 56ch; }
.lp .btn.lg { padding: 12px 22px; font-size: 16px; }
.lp-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.lp-fine, .lp-note { font-size: 14px; color: var(--ink-3); }
.lp-link { font-weight: 650; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.lp kbd { font: 600 12.5px var(--font); padding: 1px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--sheet); }

/* header and footer */
.lp-head { background: var(--rail); color: var(--rail-ink); position: sticky; top: 0; z-index: 30; }
.lp-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.lp-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font: 700 21px var(--font); letter-spacing: -0.01em; }
.lp-brand .qn-logo { width: 32px; height: 32px; color: var(--rail-ink); }
.lp-nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 28px); font-weight: 600; font-size: 15px; }
.lp-nav a:not(.btn) { text-decoration: none; padding: 6px 2px; border-bottom: 2px solid transparent; }
.lp-nav a:not(.btn):hover, .lp-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.lp-head :focus-visible, .lp-foot :focus-visible, .lp-close :focus-visible, .lp-rail :focus-visible { outline-color: var(--accent); }
.lp-foot { background: var(--rail); color: var(--rail-ink); padding-block: 34px; margin-top: 0; }
.lp-foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.lp-foot-brand { display: flex; align-items: center; gap: 10px; font: 700 18px var(--font); }
.lp-foot-brand .qn-logo { width: 26px; height: 26px; color: var(--rail-ink); }
.lp-foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14.5px; }
.lp-foot a { color: #c3cad0; }
.lp-foot a:hover { color: #fff; }

/* hero: a sheet with crop marks beside the headline */
.lp-hero { padding-block: clamp(40px, 7vw, 96px); }
.lp-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.lp-hero-copy { display: grid; gap: 22px; }
.lp-sheet { position: relative; margin: 0; padding: 22px clamp(16px, 2.4vw, 28px) 10px; background: var(--sheet); border: 1px solid var(--line); }
.lp-sheet::before, .lp-sheet::after, .lp-sheet figcaption::before, .lp-sheet figcaption::after {
  content: ""; position: absolute; width: 14px; height: 14px; border: 0 solid var(--ink-3); pointer-events: none; }
.lp-sheet::before { top: -9px; left: -9px; border-right-width: 1px; border-bottom-width: 1px; }
.lp-sheet::after { top: -9px; right: -9px; border-left-width: 1px; border-bottom-width: 1px; }
.lp-sheet figcaption::before { bottom: -9px; left: -9px; border-right-width: 1px; border-top-width: 1px; }
.lp-sheet figcaption::after { bottom: -9px; right: -9px; border-left-width: 1px; border-top-width: 1px; }
.lp-sheet figcaption { font-size: 13px; font-weight: 600; color: var(--ink-3); padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.lp-rows { list-style: none; margin: 0; padding: 0; }
.lp-rows li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.lp-rows li:last-child { border-bottom: 0; }
.lp-row-main { display: grid; min-width: 0; }
.lp-row-main b { font-weight: 650; }
.lp-row-main small { color: var(--ink-3); font-size: 13.5px; overflow-wrap: anywhere; }
.lp-due { font-size: 13.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lp-due.is-late { color: var(--signal); }

/* the four inks: whole fields of colour */
.lp-inks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lp-ink { padding: clamp(24px, 3.4vw, 44px) clamp(18px, 2.4vw, 32px); display: grid; align-content: start; gap: 10px; }
.lp-ink p { font-size: 15.5px; line-height: 1.5; max-width: 30ch; }
.lp-ink-you { background: #d6176f; color: #fff; }
.lp-ink-them { background: #0a8fc4; color: #07121a; }
.lp-ink-date { background: #f2b01e; color: #1a1300; }
.lp-ink-done { background: #14171a; color: #eef1f3; }

/* sections */
.lp-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding-block: clamp(56px, 8vw, 112px); }
.lp-split > div:first-child, .lp-feature-text { display: grid; gap: 18px; align-content: start; }
.lp-split p, .lp-feature-text p { color: var(--ink-2); max-width: 54ch; font-size: 16.5px; line-height: 1.6; }
.lp-rail { background: var(--rail); color: var(--rail-ink); }
.lp-rail p { color: #c3cad0; }
.lp-rail .lp-split, .lp-rail .lp-feature { padding-block: clamp(56px, 8vw, 104px); }
.lp-rail .lp-feature-text p, .lp-rail .lp-checks { color: #c3cad0; }

.lp-tree, .lp-tree ol { list-style: none; margin: 0; padding: 0; }
.lp-tree { font-size: 17px; }
.lp-tree ol { margin: 10px 0 0 22px; padding-left: 20px; border-left: 1px solid var(--line-2); }
.lp-tree li { margin-top: 12px; }
.lp-tree li > b { display: block; font: 600 22px var(--serif); letter-spacing: -0.01em; }
.lp-tree ol li > b { font-size: 19px; }
.lp-tree ol ol li > b { font-size: 16.5px; font-family: var(--font); font-weight: 650; }
.lp-tree small { display: block; color: var(--ink-3); font-size: 14px; }

.lp-views { display: grid; gap: 14px; }
.lp-view { background: #1f2327; padding: 18px 20px; }
.lp-view-who { font-size: 13px; font-weight: 700; color: #c3cad0 !important; margin-bottom: 8px !important; }
.lp-msg { display: grid; gap: 4px; background: #fff; color: #14171a; padding: 12px 14px; border-top: 3px solid var(--accent); }
.lp-msg b { font-size: 14px; }
.lp-msg span { font-size: 15px; color: #454c53; }

.lp-three, .lp-defs-wrap { padding-block: clamp(48px, 7vw, 96px); display: grid; gap: 28px; }
.lp-defs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(20px, 3vw, 44px); margin: 0; }
.lp-defs > div { padding-block: 18px; border-top: 2px solid var(--ink); }
.lp-defs dt { font: 600 21px/1.2 var(--serif); letter-spacing: -0.01em; margin-bottom: 8px; }
.lp-defs dd { margin: 0; color: var(--ink-2); line-height: 1.55; max-width: 46ch; }
.lp-defs-wide > div:nth-child(n+4) { grid-column: auto; }

.lp-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding-block: clamp(48px, 7vw, 96px); }
.lp-feature-flip .lp-views { order: -1; }
.lp-checks { margin: 0; padding-left: 20px; display: grid; gap: 10px; color: var(--ink-2); line-height: 1.55; }
.lp-checks li::marker { color: var(--accent-text); }

.lp-pagehead { padding-block: clamp(44px, 7vw, 88px) clamp(12px, 2vw, 24px); }
.lp-pagehead .lp-wrap { display: grid; gap: 20px; }
.lp-pagehead h1 { max-width: 20ch; }

.lp-faq { display: grid; gap: 8px; padding-block: clamp(40px, 6vw, 80px); max-width: 820px; margin-inline: auto; }
.lp-faq h2 { margin-bottom: 14px; }
.lp-faq details { border-top: 1px solid var(--line-2); padding-block: 4px; }
.lp-faq details:last-of-type { border-bottom: 1px solid var(--line-2); }
.lp-faq summary { cursor: pointer; padding: 14px 4px; font-weight: 650; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--ink-3); }
.lp-faq details[open] summary::after { content: "\2212"; }
.lp-faq details p { padding: 0 4px 16px; color: var(--ink-2); line-height: 1.6; max-width: 62ch; }

/* closing band */
.lp-close { background: var(--rail); color: var(--rail-ink); padding-block: clamp(56px, 8vw, 104px); }
.lp-close .lp-wrap { display: grid; gap: 20px; justify-items: start; }
.lp-close h2 { max-width: 22ch; font-size: clamp(30px, 4vw, 50px); }
.lp-close p:not(.lp-actions) { color: #c3cad0; max-width: 58ch; font-size: 17px; line-height: 1.6; }
.lp-close .btn:not(.primary) { background: transparent; color: #fff; border-color: #5a626a; }
.lp-close .btn:not(.primary):hover { border-color: #fff; }

/* one authored moment: the bar fills in once on load */
@media (prefers-reduced-motion: no-preference) {
  .lp-hero .lp-rows li .press i.on { animation: lp-ink .5s var(--ease) both; }
  .lp-hero .lp-rows li:nth-child(2) .press i.on { animation-delay: .08s; }
  .lp-hero .lp-rows li:nth-child(3) .press i.on { animation-delay: .16s; }
  .lp-hero .lp-rows li:nth-child(4) .press i.on { animation-delay: .24s; }
  .lp-hero .lp-rows li:nth-child(5) .press i.on { animation-delay: .32s; }
}
@keyframes lp-ink { from { transform: scaleY(0); transform-origin: bottom; } to { transform: scaleY(1); transform-origin: bottom; } }

@media (max-width: 900px) {
  .lp-hero-grid, .lp-split, .lp-feature { grid-template-columns: minmax(0, 1fr); }
  .lp-feature-flip .lp-views { order: 0; }
  .lp-inks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-defs { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .lp-bar { flex-wrap: wrap; padding-block: 10px; }
  .lp-nav { gap: 14px; font-size: 14px; flex-wrap: wrap; }
  .lp-nav .btn { padding: 7px 12px; }
  .lp-inks { grid-template-columns: minmax(0, 1fr); }
  .lp-rows li { grid-template-columns: auto minmax(0, 1fr); }
  .lp-due { grid-column: 2; }
}

/* ── main only: the home page as one story (hook, turn, seven chapters, end). Layout here, motion in
   site-motion.css. Every fragment is plain HTML and reads fully without JavaScript. ── */
.lp .btn.lg { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }

/* who it is for, above the headline; and the quiet credit under the footer */
.st-kicker { font-size: 15px; font-weight: 700; color: var(--accent-text); }
.lp-credit { margin-top: 22px !important; padding-top: 16px; border-top: 1px solid #2a2f34; font-size: 13px; color: #959da5; }

/* hook: the scattered state of things, as loose scraps */
.st-scraps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.st-scrap { display: grid; gap: 2px; padding: 14px 18px; background: var(--sheet); border: 1px solid var(--line); border-left: 3px solid var(--line-2); max-width: 420px; }
.st-scrap small { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.st-scrap b { font-weight: 650; overflow-wrap: anywhere; }
.st-scrap:nth-child(odd) { justify-self: start; rotate: -1.2deg; }
.st-scrap:nth-child(even) { justify-self: end; rotate: 1deg; }
.st-scrap:nth-child(2) b, .st-scrap:nth-child(4) b { color: var(--signal); }

/* turn: the band where it comes together */
.st-turn { padding-block: clamp(56px, 8vw, 104px); }
.st-turn-in { display: grid; gap: 20px; justify-items: start; }
.st-turn h2 { max-width: 20ch; font-size: clamp(30px, 4vw, 50px); }
.st-turn p { max-width: 60ch; font-size: 17px; line-height: 1.6; }
.st-turn-press { grid-template-columns: repeat(4, 28px); gap: 4px; }
.st-turn-press i { width: 28px; height: 28px; }
.st-turn-press .p-done.on { background: var(--rail-ink); }

/* the chapter rail: links that stay under the header while the story is on screen */
.st-chapters { position: sticky; top: var(--lp-head-h, 64px); z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
.st-chapters ol { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-between; gap: 4px; }
.st-chapters a { display: flex; align-items: center; gap: 8px; min-height: 48px; padding-inline: 4px; text-decoration: none; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.st-chapters a span { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--line-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.st-chapters a:hover, .st-chapters a[aria-current] { color: var(--ink); }
.st-chapters a[aria-current] span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.st-progress { height: 2px; margin-bottom: -1px; }
.st-progress i { display: block; height: 100%; width: calc(var(--st-p, 0) * 100%); background: var(--accent); }

/* a chapter: words on one side, the fragment on the other, alternating */
.st-ch { scroll-margin-top: calc(var(--lp-head-h, 64px) + 50px); border-bottom: 1px solid var(--line); }
.st-ch-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding-block: clamp(48px, 7vw, 96px); }
.st-ch.is-flip .st-fig { order: -1; }
.st-ch-text { display: grid; gap: 16px; align-content: start; }
.st-ch-text p:not(.st-num) { color: var(--ink-2); max-width: 50ch; font-size: 17px; line-height: 1.6; }
.st-num { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--accent-text); }
.st-num::after { content: ""; width: 40px; height: 2px; background: var(--accent); }

/* the illustrative fragments: one printed sheet each, built from the app's own parts */
.st-fig { margin: 0; display: grid; gap: 10px; }
.st-fig figcaption { font-size: 13px; color: var(--ink-3); }
.st-fig > :first-child { background: var(--sheet); border: 1px solid var(--line); border-top: 2px solid var(--ink); padding: 20px clamp(16px, 2.4vw, 24px); }
.st-fig p { margin: 0; }
.st-fig small { color: var(--ink-3); font-size: 13px; }
.st-fig ul, .st-fig ol { list-style: none; margin: 0; padding: 0; }
.st-tick { display: inline-block; width: 18px; height: 18px; flex: none; background: var(--ok); clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 8%, 38% 72%); }

.st-mail { display: grid; gap: 12px; }
.st-mail-head, .st-sign-head, .st-approve-head, .st-done-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.st-mail-subj { font: 600 19px/1.3 var(--serif); }
.st-mail-body { color: var(--ink-2); line-height: 1.55; }
.st-fake-btn { justify-self: start; padding: 9px 16px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 14px; }

.st-sign { display: grid; gap: 14px; }
.st-sign-sum { color: var(--ink-2); line-height: 1.55; }
.st-sign-name { display: grid; gap: 4px; }
.st-sign-name span { font: italic 600 24px var(--serif); padding-bottom: 6px; border-bottom: 1px solid var(--ink); }
.st-sign-done, .st-approve-by { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; font-weight: 600; color: var(--ok); }

.st-files { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; }
.st-thumb { width: 76px; aspect-ratio: 3 / 4; background: #14171a; padding: 10px 8px; display: grid; align-content: start; gap: 5px; }
.st-thumb i { display: block; height: 4px; background: #5a626a; }
.st-thumb i:first-child { height: 14px; background: var(--p-date); margin-bottom: 4px; }
.st-thumb i:nth-child(3) { width: 70%; }
.st-files li { display: grid; padding: 10px 0; border-bottom: 1px solid var(--line); }
.st-files li:first-child { padding-top: 0; }
.st-files li:last-child { border-bottom: 0; padding-bottom: 0; }
.st-files b { overflow-wrap: anywhere; }
.st-older b { font-weight: 600; color: var(--ink-2); }

.st-chat { display: grid; gap: 12px; }
.st-chat li { display: grid; gap: 2px; max-width: 86%; padding: 10px 14px; font-size: 15px; line-height: 1.5; }
.st-chat b { font-size: 13px; }
.st-them { justify-self: start; background: var(--brand-soft); }
.st-you { justify-self: end; border: 1px solid var(--line-2); border-left: 3px solid var(--accent); }

.st-approve, .st-done { display: grid; gap: 14px; }
.st-approve li, .st-done li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.st-approve li:last-child, .st-done li:last-child { border-bottom: 0; }
.st-approve em, .st-done em { margin-left: auto; font-style: normal; font-weight: 650; font-size: 13.5px; color: var(--ok); }
.st-dot { width: 12px; height: 12px; flex: none; background: var(--p-off); }
.st-dot.is-ok { background: var(--ok); }

.st-bell li { display: grid; gap: 2px; padding: 12px 0 12px 18px; position: relative; border-bottom: 1px solid var(--line); }
.st-bell li:first-child { padding-top: 0; }
.st-bell li:last-child { border-bottom: 0; padding-bottom: 0; }
.st-bell li.is-new::before { content: ""; position: absolute; left: 0; top: 7px; width: 8px; height: 8px; background: var(--p-you); }
.st-bell li.is-new:not(:first-child)::before { top: 19px; }
.st-bell li:not(.is-new) b { font-weight: 500; color: var(--ink-2); }

.st-done-head b { font: 600 19px var(--serif); }
.st-badge { font-size: 13px; font-weight: 700; padding: 3px 10px; border: 1px solid var(--ok); color: var(--ok); }
.st-meter { height: 8px; background: var(--p-off); }
.st-meter i { display: block; height: 100%; background: var(--ok); transform-origin: left; }

/* the mid-story reminder that the door is right here */
.st-mid { background: var(--sheet); border-bottom: 1px solid var(--line); }
.st-mid-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding-block: 28px; }
.st-mid p { margin: 0; font: 600 clamp(19px, 2vw, 23px)/1.3 var(--serif); }

@media (max-width: 900px) {
  .st-ch-grid { grid-template-columns: minmax(0, 1fr); }
  .st-ch.is-flip .st-fig { order: 0; }
  .st-chapters a { font-size: 0; gap: 0; justify-content: center; min-width: 40px; }   /* numbers only */
  .st-chapters a span { font-size: 13px; }
}
@media (max-width: 560px) {
  .lp-hero .lp-actions .btn, .st-mid .btn, .lp-close .lp-actions .btn { width: 100%; }
  .st-scrap:nth-child(n) { justify-self: stretch; max-width: none; }
  .st-chat li { max-width: 94%; }
}
@media (max-width: 400px) {
  /* keep the header on one row on small phones: the logo stays, the link's label still says Quillnest */
  .lp-brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lp-nav { gap: 8px; }
}

/* ---- theme toggle ---- */
/* The app's own switch (theme.js, data-theme-toggle, the same stored choice), dressed for the black header.
   It is rendered hidden and site.js shows it, so without JavaScript the page simply follows the system. */
.lp-theme { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; color: var(--rail-ink); background: transparent; border: 1.5px solid transparent; border-radius: 0; box-shadow: none; cursor: pointer; }
.lp-theme:hover, .lp-theme:focus-visible { color: #fff; background: transparent; border-color: #5a626a; box-shadow: none; }
.lp-theme svg { width: 20px; height: 20px; }
.lp-theme[hidden] { display: none; }
/* ---- end theme toggle ---- */
