/* ════════════════════════════════════════════════════════════
   LEMON How it works and Living Insights: chapters
   Scrolling down brings each chapter up over the last one. Inside
   a chapter the page holds still and the detail slides in from the
   right. js/page-journey.js does the moving, on big screens only
   (html.pj). Phones and anyone who asked for less motion get the
   same content stacked, with the usual fade as it comes into view.
   ════════════════════════════════════════════════════════════ */

/* ─── The stacked version. Colours and shapes for every screen ─── */
.ch { position: relative; background: var(--ink); color: var(--cream); }
.ch-bg { position: relative; overflow: hidden; }
.ch-bg picture { display: block; height: 100%; }
.ch-bg img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.ch-panel { padding: clamp(2.2rem, 6vh, 3.4rem) var(--gutter); }
.ch-panel + .ch-panel { padding-top: 0; }
.ch .eyebrow { color: rgba(250,247,240,0.86); }
.ch .eyebrow .idx { color: var(--amber); }
.ch h2 { color: var(--cream); font-size: clamp(2.6rem, 5.4vw, 6.4rem); line-height: 1.02; margin: 0.9rem 0 1rem; max-width: 15ch; }
.ch h2 .f-italic { color: var(--amber); }
.ch-title p { color: rgba(250,247,240,0.92); font-size: clamp(1.02rem, 1.25vw, 1.4rem); line-height: 1.55; max-width: 38rem; }
.ch-h { font-family: var(--font-display); font-weight: 300; font-variation-settings: "opsz" 144; letter-spacing: -0.015em; color: var(--cream); font-size: clamp(1.7rem, 3vw, 3.2rem); line-height: 1.1; margin-bottom: 1.2rem; }
.ch-text p { color: rgba(250,247,240,0.9); font-size: 1.05rem; line-height: 1.6; }
.ch-text p + p { margin-top: 0.8rem; }
.ch b { font-weight: 400; }
.ch .btn-ghost { color: var(--cream); }

/* Where we listen: words on the left, logos on the right */
.pl-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
.ch .listen-words span { color: var(--cream); background: rgba(250,247,240,0.08); border-color: rgba(250,247,240,0.28); }
.dg-field { position: relative; width: 100%; max-width: 62vh; aspect-ratio: 1; margin: 0 auto; }
.fb { position: absolute; width: 11%; aspect-ratio: 1; margin: -5.5% 0 0 -5.5%; border-radius: 50%; background: var(--cream); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(11,10,9,0.35); }
.fb img { width: 58%; height: 58%; object-fit: contain; }

/* Three columns: the 3 ways we listen */
.ways3 { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
.ways3 li { border-top: 1px solid rgba(250,247,240,0.28); padding-top: 1rem; }
.ways3 b { display: block; font-family: var(--font-display); font-size: clamp(1.5rem, 2.4vw, 2.6rem); letter-spacing: -0.01em; line-height: 1.15; color: var(--cream); }
.ways3 span.d { display: block; margin-top: 0.6rem; font-size: 1.02rem; line-height: 1.55; color: rgba(250,247,240,0.88); }
.ways3 .says { display: flex; flex-direction: column; align-items: flex-start; gap: 0.45rem; margin-top: 1rem; }
.ways3 .says i { font-family: var(--font-display); font-size: 0.98rem; line-height: 1.3; color: var(--ink); background: var(--amber); border-radius: 14px 14px 14px 4px; padding: 0.45rem 0.8rem; }
.ways3 .says i.q2 { color: var(--cream); background: rgba(250,247,240,0.1); border: 1px solid rgba(250,247,240,0.28); font-style: normal; }

/* What comes out of listening, on the dark */
.ch .lf-box { background: rgba(250,247,240,0.07); border-color: rgba(250,247,240,0.22); }
.ch .lf-box .n { color: rgba(250,247,240,0.72); }
.ch .lf-box h4 { color: var(--cream); }
.ch .lf-box p { color: rgba(250,247,240,0.86); }
.ch .lf-group { border-color: rgba(250,247,240,0.28); }
.ch .lf-group > .n { color: rgba(250,247,240,0.86); }
.ch .lf-box.new { border-color: #A995FF; box-shadow: 0 0 0 1px #A995FF; }
.ch .lf-box.new .n { color: #C7BAFF; }
.ch .lf-box.ask { background: var(--amber); border-color: var(--amber); }
.ch .lf-box.ask h4, .ch .lf-box.ask p, .ch .lf-box.ask .n { color: var(--ink); }
.ch .lf-arrow { color: var(--amber); }
.ch .distinction { max-width: none; padding: 0.45rem 0.8rem; border-left: 0; border-radius: var(--radius); background: rgba(250,247,240,0.04); color: rgba(250,247,240,0.72); font-size: 0.82rem; line-height: 1.45; }

/* The 3 ways we talk to customers */
.lanes { list-style: none; }
.lane { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.8rem; border-top: 1px solid rgba(250,247,240,0.22); padding: clamp(0.7rem, 1.8vh, 1.3rem) 0; }
.lane b { display: block; font-family: var(--font-display); font-size: clamp(1.3rem, 1.9vw, 2.3rem); letter-spacing: -0.01em; line-height: 1.15; color: var(--cream); }
.lane .d { display: block; color: rgba(250,247,240,0.86); font-size: clamp(0.95rem, 1.05vw, 1.25rem); line-height: 1.45; margin-top: 0.3rem; }
.lane-art { display: flex; align-items: center; gap: 1rem; min-height: clamp(3.4rem, 9vh, 7rem); }
.art-talk { flex-direction: column; align-items: stretch; gap: 0.35rem; justify-content: center; }
.art-talk i { display: block; height: clamp(0.8rem, 1.7vh, 1.3rem); border-radius: 999px; background: rgba(250,247,240,0.8); transform-origin: left center; }
.art-talk i:nth-child(1) { width: 58%; }
.art-talk i:nth-child(2) { width: 44%; margin-left: auto; background: var(--amber); transform-origin: right center; }
.art-talk i:nth-child(3) { width: 70%; }
.art-talk i:nth-child(4) { width: 36%; margin-left: auto; background: var(--amber); transform-origin: right center; }
.art-wave { flex-wrap: wrap; }
.wave { display: flex; align-items: center; gap: 2px; flex: 1 1 14rem; height: clamp(3rem, 8vh, 6rem); }
.wave i { flex: 1; height: 100%; border-radius: 2px; background: var(--amber); }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chips span { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid rgba(250,247,240,0.4); border-radius: 999px; padding: 0.25rem 0.6rem; color: var(--cream); }
.art-bars { flex-direction: column; align-items: stretch; gap: 0.35rem; justify-content: center; }
.art-bars i { display: block; height: clamp(0.5rem, 1.2vh, 0.9rem); border-radius: 2px; background: rgba(250,247,240,0.8); transform-origin: left center; }
.art-bars i:first-child { background: var(--amber); }
.ch-foot { color: rgba(250,247,240,0.86); font-size: clamp(0.95rem, 1.05vw, 1.25rem); margin-top: 1rem; }

/* AI moderators, and designing the questions together */
.uses-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.2rem; }
.uses { list-style: none; display: grid; gap: 0.7rem; }
.uses li { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: 0.9rem; align-items: center; background: rgba(250,247,240,0.07); border: 1px solid rgba(250,247,240,0.2); border-radius: var(--radius); padding: 0.9rem 1.1rem; color: var(--cream); font-size: 1.05rem; line-height: 1.45; }
.uses svg { width: 2.2rem; height: 2.2rem; color: var(--amber); }
.ch-text p.promise { font-family: var(--font-display); font-weight: 300; font-variation-settings: "opsz" 144; letter-spacing: -0.015em; color: var(--amber); font-style: italic; font-size: clamp(1.6rem, 2.6vw, 2.8rem); line-height: 1.15; margin-top: 1.4rem; }

/* Living Insights: what you get beside the picture of it */
.li-detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
.ch .gets-label { margin-top: 0; color: rgba(250,247,240,0.72); font-size: 0.72rem; }
.ch .gets li { color: var(--cream); font-size: 1.1rem; }
.ch .gets li::before { background: var(--amber); }
.ch .viz-cap { color: rgba(250,247,240,0.72); }
.ch-solo .ch-inner > .section-head { margin-bottom: 0; }
.ch-solo h2 { max-width: none; }
.ch-solo .lead { color: rgba(250,247,240,0.9); }
.ch .learn-more { display: inline-block; }

/* ─── Sections that come up after a chapter ─── */
.rise { position: relative; background: var(--cream); }
#built .section-title .f-italic { white-space: nowrap; }
html.pj #built .section-title { font-size: min(3.5vw, 8vh, 3.8rem); }
@media (max-width: 920px) { #built .section-title { font-size: min(7vw, 1.9rem); } }

.curious-text { max-width: 46rem; margin-top: 1.2rem; font-size: clamp(1.05rem, 1.35vw, 1.5rem); line-height: 1.6; color: var(--ink); }
.curious-text + .curious-text { margin-top: 0.9rem; }

@media (min-width: 700px) {
  .ways3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.4rem, 3vw, 3rem); }
}

/* On a phone the whole whale and plane stay in the frame */
@media (max-width: 920px) { #sandbox .ch-bg img { aspect-ratio: 1; } }

/* ─── The moving version ─── */
html.pj { scroll-behavior: auto; }
html.pj body { overflow-x: clip; }
html.pj .ch-stage { position: sticky; top: 0; height: 100vh; overflow: clip; border-radius: 28px 28px 0 0; background: var(--ink); }
html.pj .ch-stage [data-reveal] { opacity: 1; transform: none; transition: none; }
html.pj .ch-bg { position: absolute; inset: 0; }
html.pj .ch-bg img { height: 100%; aspect-ratio: auto; will-change: transform; }
html.pj .ch-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top right, rgba(11,10,9,0.8) 0%, rgba(11,10,9,0.58) 36%, rgba(11,10,9,0) 64%), linear-gradient(to bottom, rgba(11,10,9,0.6), rgba(11,10,9,0) 20%); }
html.pj #ask .ch-bg img { object-position: 50% 12%; }
html.pj .ch-shade { position: absolute; inset: 0; background: #0B0A09; opacity: 0; pointer-events: none; }
html.pj .ch-track { position: absolute; inset: 0; display: flex; will-change: transform; }
html.pj .ch-panel { flex: none; width: 100vw; height: 100vh; padding: clamp(4.4rem, 10vh, 7rem) 0 clamp(5rem, 12vh, 7.5rem); display: grid; place-items: center; }
html.pj .ch-inner { width: calc(min(84vw, 148vh) / var(--z, 1)); zoom: var(--z, 1); }
/* On a very big screen the detail grows with it, so it doesn't sit small in the middle */
@media (min-width: 2200px) and (min-height: 1200px) { html.pj { --z: 1.2; } }
html.pj .ch-title { place-items: end start; padding: 0 var(--gutter) clamp(5.4rem, 14vh, 9rem); }
html.pj .ch h2 { font-size: min(5.8vw, 11vh); }
html.pj .ch-solo h2 { font-size: min(4.6vw, 8.6vh); }
html.pj .ch-solo .section-head { max-width: none; }
html.pj .ch-solo .lead { max-width: 60rem; }
html.pj .ch-solo h2 { margin: 0.5rem 0 0.7rem; }
html.pj .ch-solo .reveal-map { margin-top: clamp(1rem, 2.4vh, 2rem); }
html.pj .ch-solo .rm-label { margin-bottom: 0.9rem; }
html.pj .ch .viz { zoom: 1.2; }
html.pj .ch .li-window { zoom: 1.08; }
html.pj .rise .section-title { font-size: min(4.4vw, 8vh); }
html.pj .rise .prose p { font-size: 1.14rem; line-height: 1.6; }
html.pj .ch-h { font-size: min(3.5vw, 6.2vh); margin-bottom: clamp(0.8rem, 2.6vh, 1.8rem); }
html.pj .ch-text p { font-size: 1.2rem; }
html.pj .ways3 span.d { font-size: 1.15rem; }
html.pj .ways3 .says i { font-size: 1.1rem; }
html.pj .lane .d { font-size: 1.05rem; }
html.pj .lane b { font-size: 1.9rem; }
html.pj .uses li { font-size: 1.15rem; }
html.pj .lf-box h4 { font-size: 1.45rem; }
html.pj .lf-box p { font-size: 1rem; }
html.pj .rm-card h3 { font-size: 1.75rem; }
html.pj .rm-card p { font-size: 1.05rem; line-height: 1.5; }
html.pj .ch .gets li { font-size: 1.2rem; }
html.pj .pl-split { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr); gap: 4vw; align-items: center; }
html.pj .dg-field { max-width: calc(min(66vh, 40vw) / var(--z, 1)); }
html.pj .uses-split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 5vw; align-items: center; }
html.pj .li-detail { grid-template-columns: minmax(0, 0.62fr) minmax(0, 1.38fr); gap: 4vw; align-items: center; }
html.pj .lanes .lane { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); align-items: center; }
html.pj .lflow { margin-top: 0.6rem; }
html.pj .distinction { margin-top: clamp(0.8rem, 2vh, 1.4rem); }
html.pj .ch-dim { position: absolute; inset: 0; z-index: 4; background: #0B0A09; opacity: 0; pointer-events: none; }

/* A section after a chapter comes up over it, like a curtain */
html.pj .ch + .ch, html.pj .ch + .rise { margin-top: -100vh; }
html.pj .rise { min-height: 100vh; display: flex; align-items: center; border-radius: 28px 28px 0 0; }
html.pj .rise > .container { width: 100%; }
.ch-mark { display: none; }
html.pj .ch-mark { display: block; position: absolute; top: 0; left: 0; width: 1px; height: calc(100% - 100vh); pointer-events: none; }

/* The names along the bottom, as on the home page */
html.pj .ch-rail { position: absolute; z-index: 3; left: var(--gutter); right: var(--gutter); bottom: clamp(1.2rem, 3.4vh, 2.2rem); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0.5rem 1rem; color: var(--cream); pointer-events: none; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; }
.ch-rail span { opacity: 0.55; text-shadow: 0 1px 8px rgba(11,10,9,0.6); }
.ch-rail span.on { opacity: 1; }
.ch-rail b { grid-column: 1 / -1; grid-row: 2; display: block; height: 2px; background: rgba(250,247,240,0.28); overflow: hidden; }
.ch-rail b i { display: block; height: 100%; background: var(--amber); transform: scaleX(0); transform-origin: left center; }

/* The scroll arrow */
.scroll-cue { display: none; }
html.pj .scroll-cue { position: fixed; z-index: 50; left: 50%; bottom: clamp(3.4rem, 8vh, 5rem); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 0.15rem; color: var(--cream); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; text-shadow: 0 1px 8px rgba(11,10,9,0.55); opacity: 0; pointer-events: none; transition: opacity 0.5s ease; }
html.pj .scroll-cue.on { opacity: 1; }
html.pj .scroll-cue svg { width: 1.5rem; height: 1.5rem; animation: cue-bob 1.8s ease-in-out infinite; }
@keyframes cue-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(0.35rem); } }

/* Over the moving scenes the menu stays clear. It turns solid only over ordinary sections */
html.pj #navbar { transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.3s ease; }
html.pj #navbar.pj-solid { background: rgba(250,247,240,0.92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); padding: 0.7rem 0; }

/* Small labels on the pictures grow with the screen */
html.pj .viz-k, html.pj .li-bar .title, html.pj .li-quote small, html.pj .li-flag b, html.pj .cv-meta { font-size: 0.62rem; }
html.pj .viz-cap, html.pj .st-aud span { font-size: 0.64rem; }
html.pj .st-link, html.pj .sb-row .ev { font-size: 0.58rem; }
html.pj .st-lbl { font-size: 0.62rem; }
html.pj .lf-box .n, html.pj .lf-group > .n, html.pj .rm-card .n { font-size: 0.64rem; }
html.pj .rm-label span { font-size: 0.7rem; }
html.pj .listen-words span { font-size: 0.66rem; }
html.pj .gets-label { font-size: 0.72rem; }
html.pj .ev-item, html.pj .ev-finding { border-radius: 0.65rem; }
html.pj .ev-links { gap: 0.6rem; margin-top: 1.4rem; }

/* Short windows: everything tightens up to fit */
@media (max-height: 760px) {
  html.pj .ch-text p, html.pj .ways3 span.d, html.pj .uses li { font-size: 0.94rem; }
  html.pj .lf-box { padding: 0.8rem 0.9rem; }
  html.pj .lf-box p { font-size: 0.84rem; line-height: 1.4; }
  html.pj .rm-card { padding: 0.9rem 1rem; }
  html.pj .rm-card p { font-size: 0.86rem; line-height: 1.4; }
  html.pj .rm-card h3 { font-size: 1.25rem; margin: 0.2rem 0; }
  html.pj .ch .viz, html.pj .ch .li-window { zoom: 1; }
  html.pj .viz, html.pj .li-body { padding: 0.8rem; }
  html.pj .li-body { gap: 0.5rem; }
  html.pj .ev-item { padding: 0.45rem 0.6rem; }
  html.pj .ev-counts { margin-top: 0.5rem; }
  html.pj .ev-counts div { padding: 0.3rem; }
  html.pj .ch-h { font-size: min(3vw, 5.6vh); }
  html.pj .ch-solo h2 { font-size: 7vh; }
  html.pj .lf-box h4 { font-size: 1.15rem; }
  html.pj .lf-group { padding: 0.5rem; }
  html.pj .lf-group > .n { margin-bottom: 0.35rem; }
  html.pj .lf-mid { gap: 0.5rem; }
  html.pj .distinction { padding: 0.3rem 0.8rem; font-size: 0.74rem; margin-top: 0.5rem; }
  html.pj .rm-card h3 { font-size: 1.25rem; }
  html.pj .rm-card p { font-size: 0.86rem; }
  html.pj .rm-label { margin-bottom: 0.6rem; }
  html.pj .rm-base { margin-top: 1.2rem; }
  html.pj .rm-top .rm-card::after { bottom: -1.2rem; height: 1.2rem; }
  html.pj .lane b { font-size: 1.35rem; }
  html.pj .lane .d { font-size: 0.9rem; }
  html.pj .li-q, html.pj .li-a, html.pj .li-flag, html.pj .li-quote { font-size: 0.82rem; line-height: 1.4; }
  html.pj .cv-chart { margin-top: 0.3rem; gap: 0.2rem; }
  html.pj .ch .gets li { font-size: 1rem; }
}
/* The shortest windows give the names and the arrow's room to the content */
@media (max-height: 700px) {
  html.pj .ch-rail, html.pj .scroll-cue { display: none; }
  html.pj .ch-panel:not(.ch-title) { padding: 3.6rem 0 0.6rem; }
  html.pj .ch-title { padding-bottom: 2rem; }
  html.pj .lflow .lf-box p { font-size: 0.78rem; }
}
