/* Lumen — editorial theme: paper, ink, one accent. Edit the tokens below to rebrand. */
:root {
  --paper: #f3efe6;      /* page background */
  --paper-2: #ebe6da;    /* alternate surface */
  --sheet: #faf8f3;      /* product mockup / document surface */
  --ink: #1c1a16;        /* text */
  --muted: #5a554b;      /* secondary text, AA on all surfaces */
  --rule: #d6cfc0;       /* 1px rules */
  --accent: #a8321c;     /* the only colour: links, highlights, primary button */
  --accent-soft: #f1dcd2;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --radius: 3px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --wrap: 1200px;        /* section width, gutters included */
  --content: calc(var(--wrap) - 2 * var(--gutter)); /* inner content width */
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body { background: var(--paper); color: var(--ink); font: 400 1.125rem/1.6 var(--serif); overflow-x: clip; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--paper); }
h1, h2, h3 { font-weight: 500; line-height: 1.08; letter-spacing: -.015em; text-wrap: balance; }
em { font-style: italic; }
ul, ol { padding: 0; }

.skip { position: absolute; left: var(--gutter); top: -3rem; z-index: 100; padding: .5rem .8rem; background: var(--ink); color: var(--paper); font: 500 .85rem var(--mono); }
.skip:focus { top: .5rem; }

.kicker { font: 500 .78rem/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.2rem; }

/* ---------- Buttons: flat, 1px, no decoration ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: .8rem 1.25rem; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent); color: var(--sheet); font: 500 .9rem/1.2 var(--mono); text-decoration: none; transition: background-color .2s, color .2s, border-color .2s; }
.btn:hover { background: #8a2714; border-color: #8a2714; }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-sm { padding: .5rem .9rem; font-size: .82rem; }
.btn-invert { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-invert:hover { background: transparent; color: var(--paper); border-color: var(--paper); }

/* ---------- Nav: opaque bar with a bottom rule ---------- */
.nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 2rem; padding: .9rem max(var(--gutter), calc((100% - var(--content)) / 2)); background: var(--paper); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.scrolled { border-bottom-color: var(--rule); }
.logo { display: inline-flex; align-items: center; gap: .5rem; font: 600 1.35rem/1 var(--serif); letter-spacing: -.02em; text-decoration: none; }
.logo svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.6; }
.nav nav { display: flex; gap: 1.6rem; margin-left: 1rem; }
.nav nav a, .link { font: 400 .85rem var(--mono); color: var(--muted); text-decoration: none; }
.nav nav a:hover, .link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 1.2rem; }

/* ---------- Hero ---------- */
.hero { max-width: var(--wrap); margin: 0 auto; padding: clamp(3rem, 9vw, 7rem) var(--gutter) 3rem; }
.hero h1 { font-size: clamp(2.5rem, 6.4vw, 5.6rem); max-width: 15ch; font-weight: 400; letter-spacing: -.025em; }
.hero h1 em, .section h2 em, .pin h2 em { color: var(--accent); }
.hero-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--rule); align-items: start; }
.lead { font-size: 1.25rem; line-height: 1.55; max-width: 38em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.fine { width: 100%; font: .78rem/1.5 var(--mono); color: var(--muted); }

/* ---------- Product mockup: tilted, straightens with scroll (--tilt set in app.js) ---------- */
.showcase { padding: 1rem var(--gutter) 6rem; }
.mock-wrap { perspective: 1800px; max-width: var(--content); margin: 0 auto; }
.mock {
  --tilt: 1; background: var(--sheet); border: 1px solid var(--ink); border-radius: var(--radius); overflow: hidden;
  transform: rotateX(calc(var(--tilt) * 24deg)) scale(calc(1 - var(--tilt) * .08)); transform-origin: 50% 0;
}
.mock-bar { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 1rem; border-bottom: 1px solid var(--rule); font: .75rem var(--mono); color: var(--muted); }
.mock-bar span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mock-status { flex: none; color: var(--accent); }
.mock-body { display: grid; grid-template-columns: 240px 1fr; min-height: 400px; }
.mock-side { padding: 1.4rem 1.2rem; border-right: 1px solid var(--rule); background: var(--paper); font: .82rem/1.5 var(--mono); }
.mock-label { font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.mock-label:not(:first-child) { margin-top: 1.6rem; }
.mock-queues { list-style: none; }
.mock-queues li, .mock-total { display: flex; justify-content: space-between; padding: .35rem 0; border-bottom: 1px solid var(--rule); }
.mock-total { border-bottom: 0; font-weight: 500; }
.mock-to { color: var(--muted); }
.mock-doc { padding: clamp(1.2rem, 3vw, 2.4rem) clamp(1.2rem, 4vw, 3rem); max-width: 46rem; }
.doc-kicker { font: .72rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.doc-title { font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.2; font-weight: 500; margin: .5rem 0 1rem; }
.doc-text { min-height: 6.5em; font-size: 1.05rem; }
.doc-text::after { content: ''; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -.15em; background: var(--accent); animation: blink 1s steps(1) infinite; }
.doc-text.done::after { display: none; }
@keyframes blink { 50% { opacity: 0; } }
.tasks { list-style: none; margin-top: 1.4rem; border-top: 1px solid var(--rule); font: .8rem/1.4 var(--mono); }
.tasks li { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid var(--rule); opacity: 0; transition: opacity .4s; }
.tasks li.show { opacity: 1; }
.tasks i { flex: none; width: 10px; height: 10px; border: 1px solid var(--muted); transition: background-color .3s, border-color .3s; }
.tasks li.done i { background: var(--accent); border-color: var(--accent); }
.tasks em { margin-left: auto; font-style: normal; color: var(--muted); }

/* ---------- Statement (words get .lit on scroll) ---------- */
.statement-wrap { max-width: var(--wrap); margin: 0 auto; padding: 4rem var(--gutter) 6rem; border-top: 1px solid var(--rule); }
.statement { font-size: clamp(1.6rem, 3.4vw, 2.7rem); line-height: 1.3; max-width: 30em; letter-spacing: -.01em; }
.js .statement span[aria-hidden] { color: #a39d90; transition: color .3s; }
.js .statement span.lit { color: var(--ink); }
.js .statement span.lit.hot { color: var(--accent); }

/* ---------- Sections ---------- */
.section { max-width: var(--wrap); margin: 0 auto; padding: 6rem var(--gutter); border-top: 1px solid var(--rule); }
.head { margin-bottom: 3.5rem; }
.head h2, .pin h2, .final h2 { font-size: clamp(2rem, 4.4vw, 3.6rem); font-weight: 400; max-width: 20ch; }
.head-lead { margin-top: 1.2rem; max-width: 34em; color: var(--muted); }
.head-split { display: flex; justify-content: space-between; align-items: end; gap: 2rem; flex-wrap: wrap; }

/* The report: alternating note / sample rows separated by rules */
.part { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 5vw, 5rem); padding: 2.5rem 0; border-top: 1px solid var(--rule); }
.part-n { font: 500 .8rem var(--mono); color: var(--accent); margin-bottom: .6rem; }
.part-note h3 { font-size: 1.6rem; margin-bottom: .7rem; }
.part-note p:last-child { color: var(--muted); max-width: 30em; }
.part-sample { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.4rem 1.6rem; }

.data { width: 100%; border-collapse: collapse; font: .85rem/1.4 var(--mono); font-variant-numeric: tabular-nums; }
.data th, .data td { padding: .55rem .4rem; border-bottom: 1px solid var(--rule); text-align: right; font-weight: 400; }
.data th:first-child { text-align: left; }
.data thead th { font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.data tfoot th, .data tfoot td { font-weight: 500; border-bottom: 0; border-top: 1px solid var(--ink); }
.data .hl th, .data .hl td { background: var(--accent-soft); }
.spark { margin-top: 1.4rem; }
.spark svg { width: 100%; max-width: 360px; height: auto; display: block; fill: none; stroke: var(--ink); stroke-width: 18; }
.spark .base { stroke: var(--rule); stroke-width: 1; }
.spark figcaption { margin-top: .5rem; font: .75rem/1.5 var(--mono); color: var(--muted); }

.issues { list-style: none; padding-block: .4rem; counter-reset: i; }
.issues li { display: grid; gap: .2rem; padding: .9rem 0 .9rem 2rem; border-bottom: 1px solid var(--rule); position: relative; counter-increment: i; }
.issues li:last-child { border-bottom: 0; }
.issues li::before { content: counter(i, decimal-leading-zero); position: absolute; left: 0; top: 1.05rem; font: .75rem var(--mono); color: var(--accent); }
.issues b { font-weight: 500; }
.issues span { font: .78rem/1.5 var(--mono); color: var(--muted); }
.excerpt { font-size: 1.3rem; line-height: 1.5; border-left: 3px solid var(--accent); }
.fixes { padding-left: 3rem; display: grid; gap: .6rem; }
.fixes li::marker { font: .8rem var(--mono); color: var(--accent); }

.around { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 2.5rem; margin-top: 3rem; border-top: 1px solid var(--ink); }
.around div { padding-top: 1.2rem; }
.around dt { font-weight: 600; margin-bottom: .4rem; }
.around dd { color: var(--muted); font-size: 1rem; }

/* ---------- Pinned "Setup": sticky panel, active step from scroll ---------- */
.pin { position: relative; height: 300vh; background: var(--paper-2); border-block: 1px solid var(--rule); }
.pin-sticky { position: sticky; top: 0; height: 100vh; display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; padding: 5rem var(--gutter) 2rem; max-width: var(--wrap); margin: 0 auto; }
.pin h2 { margin-bottom: 2rem; }
.pin-steps { list-style: none; border-top: 1px solid var(--rule); }
.pin-steps li { position: relative; display: flex; gap: 1.2rem; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); opacity: .55; transition: opacity .4s; }
.pin-steps li.active { opacity: 1; }
.pin-steps .n { font: 500 .8rem var(--mono); color: var(--accent); padding-top: .35rem; }
.pin-steps h3 { font-size: 1.3rem; margin-bottom: .25rem; }
.pin-steps p { color: var(--muted); font-size: 1rem; }
.pin-steps .bar { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--accent); transform-origin: left; scale: var(--sp, 0) 1; }
.pin-visual { position: relative; aspect-ratio: 5 / 4; width: 100%; max-height: 70vh; background: var(--paper); border: 1px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.scene { position: absolute; inset: 0; display: grid; place-items: center; padding: 1.5rem; opacity: 0; translate: 0 12px; transition: opacity .5s var(--ease), translate .5s var(--ease); }
.scene.active { opacity: 1; translate: none; }
.panel { width: min(100%, 420px); background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.3rem 1.4rem; font: .85rem/1.5 var(--mono); }
.p-head { display: flex; justify-content: space-between; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding-bottom: .7rem; border-bottom: 1px solid var(--rule); }
.p-head b { color: var(--accent); font-weight: 500; }
.checks { list-style: none; }
.checks li { display: flex; align-items: center; gap: .7rem; padding: .5rem 0; border-bottom: 1px solid var(--rule); }
.checks li::before { content: ''; width: 12px; height: 12px; border: 1px solid var(--ink); flex: none; transition: background-color .3s calc(var(--k, 0) * 120ms + .3s); }
.checks li:not(.on) { color: var(--muted); }
.scene.active .checks li.on::before { background: var(--accent); border-color: var(--accent); }
.checks li:nth-child(2) { --k: 1; } .checks li:nth-child(3) { --k: 2; } .checks li:nth-child(4) { --k: 3; } .checks li:nth-child(5) { --k: 4; }
.checks em { margin-left: auto; font-style: normal; color: var(--muted); }
.c-input { min-height: 5.4em; margin: 1rem 0; font-size: .95rem; color: var(--ink); }
.c-input span::after { content: ''; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -.15em; background: var(--accent); animation: blink 1s steps(1) infinite; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chips span { padding: .2rem .5rem; border: 1px solid var(--rule); border-radius: var(--radius); font-size: .75rem; color: var(--muted); }
.c-btn { display: inline-block; margin-top: 1.2rem; padding: .5rem .9rem; border: 1px solid var(--rule); color: var(--muted); border-radius: var(--radius); transition: background-color .3s, color .3s, border-color .3s; }
.composer.ready .c-btn { background: var(--accent); border-color: var(--accent); color: var(--sheet); }
.feed ul { list-style: none; }
.feed li { display: flex; justify-content: space-between; padding: .55rem 0; border-bottom: 1px solid var(--rule); opacity: 0; transition: opacity .4s; }
.feed li.show { opacity: 1; }
.feed li em { font-style: normal; color: var(--accent); }
.f-metric { display: flex; justify-content: space-between; align-items: baseline; margin-top: 1rem; color: var(--muted); }
.f-metric strong { font: 400 2.2rem/1 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- Quote ---------- */
.quote { max-width: var(--wrap); margin: 0 auto; padding: 6rem var(--gutter); }
.quote figure { max-width: 46rem; margin-left: auto; }
.quote blockquote { font-size: clamp(1.5rem, 2.8vw, 2.2rem); line-height: 1.3; font-style: italic; }
.quote figcaption { margin-top: 1.4rem; font: .82rem var(--mono); color: var(--muted); }

/* ---------- Pricing ---------- */
.toggle { position: relative; display: inline-flex; padding: 3px; border: 1px solid var(--ink); border-radius: var(--radius); font: .85rem var(--mono); }
.toggle button { position: relative; z-index: 1; padding: .5rem 1rem; border: 0; background: none; cursor: pointer; color: var(--ink); transition: color .3s; }
.toggle button.on { color: var(--paper); }
.toggle button span { color: var(--accent); transition: color .3s; }
.toggle button.on span { color: var(--paper); }
.toggle i { position: absolute; top: 3px; bottom: 3px; left: 3px; width: var(--w, 90px); translate: var(--x, 0) 0; border-radius: 2px; background: var(--ink); transition: translate .35s var(--ease), width .35s var(--ease); }
.plans { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--ink); border-radius: var(--radius); }
.plan { display: flex; flex-direction: column; padding: clamp(1.5rem, 3vw, 2.5rem); }
.plan + .plan { border-left: 1px solid var(--ink); background: var(--sheet); }
.plan h3 { font-size: 1.8rem; }
.desc { color: var(--muted); margin-top: .3rem; }
.price { display: flex; align-items: baseline; gap: .5rem; margin: 1.6rem 0; }
.price b { font: 400 3.4rem/1 var(--serif); font-variant-numeric: tabular-nums; transition: opacity .2s; }
.price b.swap { opacity: 0; }
.price span { font: .8rem var(--mono); color: var(--muted); }
.plan ul { list-style: none; border-top: 1px solid var(--rule); margin-bottom: 2rem; flex: 1; }
.plan li { padding: .6rem 0; border-bottom: 1px solid var(--rule); font-size: 1rem; }
.plan .btn { align-self: flex-start; }
.plans-note { margin-top: 1rem; font: .78rem var(--mono); color: var(--muted); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 50rem; border-top: 1px solid var(--ink); }
.faq-list details { border-bottom: 1px solid var(--rule); }
.faq-list summary { display: flex; justify-content: space-between; gap: 1rem; padding: 1.2rem 0; cursor: pointer; list-style: none; font-size: 1.2rem; font-weight: 500; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; font: 1.1rem var(--mono); color: var(--accent); transition: rotate .3s var(--ease); }
.faq-list details[open] summary::after { rotate: 45deg; }
.faq-list summary:hover { color: var(--accent); }
.faq-list details p { padding: 0 0 1.4rem; max-width: 42em; color: var(--muted); }

/* ---------- Final CTA + footer (ink band) ---------- */
.final { background: var(--ink); color: var(--paper); padding: 6rem var(--gutter); }
.final-inner { max-width: var(--content); margin: 0 auto; }
.final h2 em { color: #e8b4a4; }
.final p { margin-block: 1.2rem 2rem; color: #cfc8b9; max-width: 34em; }
.footer { background: var(--ink); color: #cfc8b9; padding: 3rem var(--gutter) 2rem; border-top: 1px solid #3a362e; }
.footer-top { max-width: var(--content); margin: 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer .logo { color: var(--paper); }
.cols { display: flex; gap: clamp(2rem, 6vw, 5rem); flex-wrap: wrap; }
.cols h3 { font: 500 .72rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #a8a192; margin-bottom: .8rem; }
.cols a { display: block; padding: .2rem 0; font-size: .95rem; text-decoration: none; }
.cols a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.copy { max-width: var(--content); margin: 3rem auto 0; font: .75rem var(--mono); color: #a8a192; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav nav { display: none; }
  .hero-row, .part { grid-template-columns: 1fr; }
  .hero-row { gap: 1.5rem; }
  .mock-body { grid-template-columns: 1fr; min-height: 0; }
  .mock-side { display: none; }
  .around { grid-template-columns: 1fr; }
  .pin { height: auto; }
  .pin-sticky { position: static; height: auto; grid-template-columns: 1fr; padding-block: 5rem; }
  .pin-steps li { opacity: 1; }
  .pin-visual { aspect-ratio: auto; min-height: 340px; max-height: none; }
  .plans { grid-template-columns: 1fr; }
  .plan + .plan { border-left: 0; border-top: 1px solid var(--ink); }
}
@media (max-width: 520px) {
  .nav { gap: 1rem; }
  .nav-cta .link { display: none; }
  .part-sample { padding: 1rem; }
  .data th, .data td { padding-inline: .2rem; font-size: .78rem; }
  .data thead th { font-size: .62rem; }
  .fixes { padding-left: 2rem; }
  .price b { font-size: 2.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .mock { transform: none; }
  .tasks li, .feed li { opacity: 1; }
  .pin-steps li { opacity: 1; }
}
