/* ============================================================
   PRISM landing page for pageviewlens.com (index.html).
   Loaded after assets/prism.css and reuses its tokens, fonts and base.
   Components follow marchildmann.com (assets/css/prism.css): hero, eyebrow,
   pill buttons, cards with a beam edge, spectrum rules. No hex outside :root.
   ============================================================ */

:root {
    --measure: 1180px;
    --gut: clamp(20px, 5vw, 48px);
    --unit: clamp(72px, 10vw, 128px);
    --shadow-lit: 0 10px 40px rgb(from var(--v2) r g b / .35);
    --z-header: 10;
}

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { font-size: 1.0625rem; line-height: 1.6; }
ul, ol { list-style: none; }
:where(h1, h2, h3, p, dl, dd, figure) { margin: 0; }

.wrap {
    max-width: var(--measure);
    margin-inline: auto;
    padding-inline: max(var(--gut), env(safe-area-inset-left, 0px)) max(var(--gut), env(safe-area-inset-right, 0px));
}
.band { padding-block: var(--unit); }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
}
.skip { position: absolute; left: 12px; top: -60px; z-index: 20; padding: 10px 16px; border-radius: var(--r-pill); background: var(--white); color: var(--void); font-weight: 600; text-decoration: none; }
.skip:focus-visible { top: 12px; }
hr.spectrum { height: 1px; border: 0; background: var(--beam); opacity: .4; }

/* ---- type ---- */
h1 { font-size: clamp(44px, 7.6vw, 96px); font-weight: 200; line-height: .97; letter-spacing: -.045em; margin-bottom: 28px; max-width: 15ch; }
h2 { font-size: clamp(30px, 4.4vw, 52px); font-weight: 250; line-height: 1.04; letter-spacing: -.035em; margin-bottom: 20px; }
h3 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 10px; }
h1 b, h2 b { font-weight: 600; background: var(--beam); -webkit-background-clip: text; background-clip: text; color: transparent; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.lede { font-size: clamp(18px, 2vw, 21px); line-height: 1.55; color: var(--dim); max-width: 58ch; font-weight: 300; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); font-weight: 600; margin-bottom: 24px; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--beam); }
.intro { max-width: 62ch; margin-bottom: 52px; }
.fine { font-size: 13px; color: var(--faint); margin-top: 14px; }

/* ---- masthead ---- */
body > header {
    position: sticky; top: 0; z-index: var(--z-header);
    background-color: var(--void);
    background-color: rgb(from var(--void) r g b / .72);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid var(--edge);
}
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-block: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.02em; text-decoration: none; }
.brand svg { width: 26px; height: 26px; }
.masthead nav ul { display: flex; align-items: center; gap: 26px; font-size: 14px; }
.masthead nav a { text-decoration: none; color: var(--dim); transition: color .2s var(--ease); }
.masthead nav a:hover { color: var(--white); }
.masthead nav .btn { padding: 9px 18px; color: var(--white); }
@media (max-width: 760px) { .masthead nav li:not(:last-child) { display: none; } }

/* ---- buttons ---- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn {
    display: inline-block; font-size: 14px; font-weight: 600; letter-spacing: -.01em; text-decoration: none;
    padding: 15px 28px; border-radius: var(--r-pill); border: 1px solid var(--edge-hi); color: var(--white);
    transition: background .22s var(--ease), transform .22s var(--ease), box-shadow .22s var(--ease);
}
.btn:hover { background: var(--surface-hi); transform: translateY(-1px); }
.btn.lit { border-color: var(--white); background: var(--white); color: var(--void); }
.btn.lit:hover { box-shadow: var(--shadow-lit); }

/* ---- hero ---- */
.hero { padding-block: clamp(48px, 7vw, 96px) clamp(48px, 7vw, 88px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; } }
.facts { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 34px; font-size: 13px; color: var(--faint); }
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--v4); box-shadow: 0 0 10px var(--v4); }

/* dashboard preview: a static, labelled illustration (not live data) */
.preview {
    position: relative; overflow: hidden; border-radius: var(--r);
    background: var(--surface); border: 1px solid var(--edge); padding: 22px;
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    box-shadow: 0 30px 80px rgb(from var(--v1) r g b / .18);
}
.preview::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: var(--beam); }
.preview-bar { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--faint); margin-bottom: 18px; }
.preview-bar .live { display: inline-flex; align-items: center; gap: 7px; }
.preview-bar .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kpis div { background: var(--ink); border: 1px solid var(--edge); border-radius: var(--r-sm); padding: 12px; }
.kpis dt { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.kpis dd { font-size: 22px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpis .delta { display: block; font-size: 11px; font-weight: 500; color: var(--good); letter-spacing: 0; }
@media (max-width: 520px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.preview svg { display: block; width: 100%; height: auto; margin-top: 16px; }
.preview .s1 { stroke: var(--chart-1); }
.preview .s2 { stroke: var(--chart-2); }
.preview .a1 { fill: rgb(from var(--chart-1) r g b / .14); }
.preview .grid { stroke: var(--edge); }
.preview figcaption { font-size: 12px; color: var(--faint); margin-top: 12px; }
.channels { display: grid; gap: 8px; margin-top: 14px; font-size: 13px; }
.channels li { display: grid; grid-template-columns: 74px 1fr 38px; align-items: center; gap: 10px; color: var(--dim); }
.channels i { display: block; height: 6px; border-radius: var(--r-pill); background: var(--beam); }
.channels span:last-child { text-align: right; font-variant-numeric: tabular-nums; color: var(--white); }

/* ---- cards ---- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card {
    position: relative; height: 100%; overflow: hidden;
    background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r); padding: 28px 26px;
    transition: background .28s var(--ease), border-color .28s var(--ease);
}
.card::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: var(--beam); opacity: .0; transition: opacity .28s var(--ease); }
.card:hover { background: var(--surface-hi); border-color: var(--edge-hi); }
.card:hover::before { opacity: 1; }
.card p { color: var(--dim); font-weight: 300; font-size: 15.5px; }
.card .idx { font-family: var(--mono); font-size: 12px; color: var(--faint); margin-bottom: 18px; display: block; }

/* ---- comparison table ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--edge); border-radius: var(--r); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 620px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--edge); vertical-align: top; }
thead th { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
tbody th { font-weight: 500; color: var(--white); }
td { color: var(--dim); font-weight: 300; }
tbody tr:last-child > * { border-bottom: 0; }
td.yes { color: var(--white); font-weight: 500; }

/* ---- install / code ---- */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.steps { counter-reset: s; display: grid; gap: 22px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 14px; color: var(--dim); font-weight: 300; }
.steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--white); border: 1px solid var(--edge-hi); }
.steps strong { color: var(--white); font-weight: 600; display: block; }
.term { border: 1px solid var(--edge); border-radius: var(--r); background: var(--ink); overflow: hidden; }
.term-bar { display: flex; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--edge); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--edge-hi); }
.term pre { padding: 18px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; color: var(--dim); }
.term .c { color: var(--faint); }
.term .k { color: var(--page-text); }
.term .s { color: var(--event-text); }
code { font-family: var(--mono); font-size: .92em; }
p code, li code, td code { background: var(--surface-hi); border: 1px solid var(--edge); border-radius: var(--r-xs); padding: 1px 6px; }

/* ---- FAQ ---- */
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { border: 1px solid var(--edge); border-radius: var(--r); background: var(--surface); transition: border-color .2s var(--ease); }
.faq details[open] { border-color: var(--edge-hi); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 24px; font-weight: 500; font-size: 17px; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--faint); font-weight: 300; font-size: 22px; line-height: 1; transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:focus-visible { border-radius: var(--r); }
.faq details > div { padding: 0 24px 22px; color: var(--dim); font-weight: 300; }
.faq details > div p + p { margin-top: 12px; }

/* ---- closing + footer ---- */
.cta { text-align: center; }
.cta h2, .cta .lede { margin-inline: auto; }
.cta .actions { justify-content: center; }
body > footer { border-top: 1px solid var(--edge); padding-block: 36px; font-size: 13px; color: var(--faint); }
body > footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 28px; }
body > footer ul { display: flex; flex-wrap: wrap; gap: 8px 22px; }
body > footer a { text-decoration: none; }
body > footer a:hover { color: var(--white); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (forced-colors: active) {
    h1 b, h2 b { color: CanvasText; background: none; }
    .channels i { background: CanvasText; }
}

/* grid children default to min-width:auto; let the code block and table scroll inside instead of widening the page */
.hero-grid > *, .split > *, .grid-2 > *, .grid-3 > * { min-width: 0; }
.preview-bar .live { white-space: nowrap; }
