/* Inner pages on design E (SlateRoom case study, Background).
   Loaded after home-haptic.css, which supplies the tokens, menu, labels, statements, tiles,
   pill buttons, footer and reveal motion. Everything here reuses that vocabulary: colour
   blocks, 40px margins, dot labels, Newsreader Light for statements, hairline rules. */

.page { --line: rgba(0, 0, 0, 0.12); --muted: var(--grey); --body: #3d3d3d; }

/* ---------- Hero ---------- */
.page-hero { display: flex; flex-direction: column; justify-content: space-between; gap: 120px; min-height: 760px; padding: var(--m); }
.page-hero--black { --line: #262626; --muted: #8a8a8a; --body: #b5b5b5; background: #0b0b0b; color: #f5f5f7; }
.page-hero--yellow { --line: rgba(0, 0, 0, 0.18); --muted: rgba(0, 0, 0, 0.55); --body: rgba(0, 0, 0, 0.72); background: var(--yellow); color: var(--black); }
.page-hero__body { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.page-hero__logo { width: 210px; height: auto; margin-bottom: 36px; }
.page-hero__title { max-width: 1040px; font-family: var(--serif); font-weight: 300; font-size: clamp(40px, 4.45vw, 64px); line-height: 1.1; letter-spacing: -0.06em; }
.page-hero__lede { max-width: 640px; font-size: 18px; line-height: 1.45; letter-spacing: -0.02em; color: var(--body); }
.page-hero .label { color: var(--muted); }

/* At-a-glance facts: four ruled columns, like the plan lists on the home page */
.glance { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 20px; align-self: stretch; margin: 0; }
.glance > div { padding-top: 18px; border-top: 1px solid var(--line); }
.glance dt { margin-bottom: 8px; font-size: 14px; letter-spacing: -0.02em; color: var(--muted); }
.glance dd { margin: 0; max-width: 30ch; font-size: 16px; line-height: 1.35; letter-spacing: -0.02em; }
.page-hero__foot { display: flex; flex-direction: column; align-items: flex-start; gap: 40px; }
.pill-btn--dark { background: var(--black); color: var(--white); }
.pill-btn--dark:hover { background: var(--white); color: var(--black); }

/* Full-bleed media under the hero */
.page-media { position: relative; aspect-ratio: 16 / 8; overflow: hidden; background: var(--black); }
.page-media video { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Section index ---------- */
/* The bar spans the page; the links scroll inside a track that stops short of the fixed menu
   button (right 25px, 40px wide), so no link can sit under it. The fade hints there is more. */
.cs-toc { position: sticky; top: 0; z-index: 40; display: flex; height: 64px; background: rgba(255, 255, 255, 0.92); border-bottom: 1px solid rgba(0, 0, 0, 0.12); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.cs-toc__track { display: flex; flex: 1; align-items: center; gap: 28px; min-width: 0; margin-right: 88px; padding: 0 24px 0 var(--m); overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); }
.cs-toc__track::-webkit-scrollbar { display: none; }
.cs-toc a { flex: none; font-size: 14px; letter-spacing: -0.02em; color: var(--grey); transition: color 0.3s; }
.cs-toc a:hover, .cs-toc a.is-active { color: var(--black); }

/* ---------- Sections ---------- */
.sec { padding: 120px var(--m); scroll-margin-top: 64px; }
.sec--black { --line: #262626; --muted: #8a8a8a; --body: #b5b5b5; background: var(--black); color: #f0f0f0; }
.sec--pink { --line: rgba(0, 0, 0, 0.15); --muted: rgba(0, 0, 0, 0.55); --body: rgba(0, 0, 0, 0.75); background: var(--pink); }
.sec--yellow { --line: rgba(0, 0, 0, 0.18); --muted: rgba(0, 0, 0, 0.55); --body: rgba(0, 0, 0, 0.75); background: var(--yellow); }
.sec--brown { --line: rgba(255, 255, 255, 0.2); --muted: rgba(255, 255, 255, 0.7); --body: rgba(255, 255, 255, 0.85); background: var(--accent-deep); color: var(--white); }
.sec--orange { --line: rgba(255, 255, 255, 0.25); --muted: rgba(255, 255, 255, 0.7); --body: rgba(255, 255, 255, 0.85); background: var(--accent); color: var(--white); }
.sec__head { display: flex; flex-direction: column; gap: 40px; margin-bottom: 80px; }
.sec .label { color: var(--muted); }
.sec__title { max-width: 980px; font-family: var(--serif); font-weight: 300; font-size: clamp(36px, 3.9vw, 56px); line-height: 1.1; letter-spacing: -0.055em; }

/* Prose sits in the right two thirds, like a column on a 3-up grid */
.prose, .intro { max-width: 760px; margin-left: calc((100% - 40px) / 3 + 20px); }
.prose p, .intro { font-size: 19px; line-height: 1.5; letter-spacing: -0.015em; color: var(--body); }
.prose p + p { margin-top: 18px; }
.intro { margin-top: -32px; margin-bottom: 72px; }
.prose .pull { margin: 40px 0; font-family: var(--serif); font-weight: 300; font-size: clamp(28px, 2.6vw, 40px); line-height: 1.15; letter-spacing: -0.045em; color: currentColor; }
.caption { grid-column: 1 / -1; margin-top: 20px; font-size: 14px; letter-spacing: -0.02em; color: var(--grey); }

/* Status chips, from the home page pills */
.chip { display: inline-flex; align-self: flex-start; padding: 6px 12px; border-radius: 100px; font-size: 13px; letter-spacing: -0.01em; background: var(--chip); color: var(--black); }
.chip--live { background: var(--yellow); }
.chip--partial { background: var(--pink); }
.chip--no { background: var(--accent); color: var(--white); }
.chip--open { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px currentColor; }
.sec--pink .chip--partial { background: var(--white); }

/* ---------- BYQ Scroll Timeline, on black ---------- */
/* Cards start offset before they slide in; clip so the offset never widens the page */
.byq-timeline { overflow: hidden; }
.byq-timeline-nodes { position: relative; display: flex; flex-direction: column; gap: 48px; padding: 24px 0; }
.byq-spine-track { position: absolute; top: 24px; bottom: 24px; left: 50%; width: 1px; overflow: hidden; background: var(--line); transform: translateX(-50%); }
.byq-spine-fill { position: absolute; inset: 0; background: var(--accent); transform-origin: top center; }
.byq-timeline-node { position: relative; display: grid; grid-template-columns: 1fr 64px 1fr; align-items: center; }
.byq-timeline-dot { z-index: 1; grid-column: 2; grid-row: 1; justify-self: center; width: 12px; height: 12px; border-radius: 50%; background: #3a3a3a; }
.byq-timeline-dot.is-lit { background: var(--accent); box-shadow: 0 0 0 6px rgba(18, 77, 255, 0.18); }
.byq-timeline-card { grid-row: 1; min-width: 0; padding: 28px 28px 32px; border: 1px solid var(--line); background: #0b0b0b; }
.byq-timeline-node[data-side='left'] .byq-timeline-card { grid-column: 1; }
.byq-timeline-node[data-side='right'] .byq-timeline-card { grid-column: 3; }
.card-kicker { font-size: 14px; letter-spacing: -0.02em; color: var(--muted); }
.byq-timeline-card h3 { margin: 12px 0 22px; font-family: var(--serif); font-weight: 300; font-size: clamp(26px, 2.2vw, 32px); line-height: 1.1; letter-spacing: -0.05em; }
.bld { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.bld div { display: grid; grid-template-columns: 84px 1fr; gap: 12px; }
.bld dt { padding-top: 1px; font-size: 13px; color: var(--accent-soft); }
.bld dd { margin: 0; font-size: 15px; line-height: 1.5; color: var(--body); }

/* ---------- BYQ Sticky Media Swap ---------- */
.byq-boundary-story { display: grid; grid-template-columns: 1fr 1.25fr; column-gap: 40px; margin-top: 96px; }
.byq-swap-step { display: grid; align-items: center; min-height: 72svh; }
.byq-swap-entry { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 12px 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.byq-motion .byq-swap-entry, .byq-motion .byq-swap-entry .byq-swap-line { color: var(--grey-light); transition: color 0.5s var(--ease); }
.byq-motion .byq-swap-entry.is-active { color: var(--ink); }
.byq-motion .byq-swap-entry.is-active .byq-swap-line { color: var(--body); }
.byq-swap-num { padding-top: 10px; font-size: 14px; }
.byq-swap-entry strong { display: block; font-family: var(--serif); font-weight: 300; font-size: clamp(28px, 2.6vw, 40px); line-height: 1.08; letter-spacing: -0.05em; }
.byq-swap-line { display: block; margin-top: 16px; font-size: 16px; line-height: 1.5; letter-spacing: -0.01em; }
.byq-swap-stage { position: relative; }
.byq-swap-frame { position: sticky; top: 104px; height: calc(100svh - 144px); max-height: 680px; overflow: hidden; isolation: isolate; background: #0b0b0c; transform: translateZ(0); }
.byq-swap-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center top; background: #0b0b0c; }
.byq-swap-frame img + img { opacity: 0; }

/* ---------- Ruled column grids (architecture, evidence, leadership, applications) ---------- */
.cols { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); border-top: 1px solid var(--line); margin: 0 calc(var(--m) * -1); }
.cols > * { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 32px var(--m) 40px; border-right: 1px solid var(--line); }
.cols > :last-child { border-right: 0; }
.cols h3 { font-family: var(--serif); font-weight: 300; font-size: clamp(24px, 2vw, 30px); line-height: 1.1; letter-spacing: -0.05em; }
.cols p { font-size: 15px; line-height: 1.45; color: var(--body); }
.cols p b { font-weight: 600; color: var(--ink); }
.sec--black .cols p b { color: #f0f0f0; }
.cols .result { font-size: 17px; line-height: 1.35; letter-spacing: -0.02em; color: inherit; }
.flow { --cols: 6; list-style: none; padding: 0; }
.flow > * { padding-right: 24px; }
.flow > * + * { padding-left: 24px; }
.flow h3 { margin-top: 48px; font-size: clamp(22px, 1.75vw, 26px); }
.flow p { font-size: 14px; }
.cols--two { --cols: 2; border-bottom: 0; }
.cols--two h3 { font-family: var(--sans); font-weight: 500; font-size: 14px; letter-spacing: -0.02em; color: var(--muted); }
.flow + .cols--two { border-top: 1px solid var(--line); margin-top: 0; }
.evidence { --cols: 4; }
.evidence h3 { margin-top: 32px; }

/* ---------- Question and answer rows, index style ---------- */
.qa { margin: 0; border-bottom: 1px solid var(--line); }
.qa > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; padding: 28px 0 32px; border-top: 1px solid var(--line); }
.qa dt { font-family: var(--serif); font-weight: 300; font-size: clamp(28px, 2.6vw, 40px); line-height: 1.1; letter-spacing: -0.05em; }
.qa dd { max-width: 620px; margin: 0; font-size: 17px; line-height: 1.5; color: var(--body); }

/* ---------- Numbered lessons on yellow ---------- */
.lessons { --cols: 3; list-style: none; padding: 0; counter-reset: lesson; }
.lessons li { counter-increment: lesson; font-size: 16px; line-height: 1.45; color: var(--body); }
.lessons li::before { content: '0' counter(lesson); font-size: 14px; color: var(--muted); }
.lessons li b { display: block; margin: 40px 0 6px; font-family: var(--serif); font-weight: 300; font-size: clamp(28px, 2.4vw, 36px); line-height: 1.1; letter-spacing: -0.05em; color: var(--black); }

/* ---------- Research on brown, matching the home page block ---------- */
.sec--brown .statement { margin: 64px 0 40px; }
.research__answer { max-width: 640px; margin-bottom: 40px; font-size: 18px; line-height: 1.45; color: var(--body); }
.sec--brown .prose { margin-left: 0; margin-bottom: 96px; }
.thread li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: baseline; gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); }
.thread li:last-child { border-bottom: 1px solid var(--line); }
.thread__name { font-family: var(--serif); font-weight: 300; font-size: clamp(32px, 3.35vw, 48px); line-height: 1.1; letter-spacing: -0.06em; }
.thread p { font-size: 17px; line-height: 1.45; color: var(--body); }

/* ---------- Experience rows (Background) ---------- */
.xp { border-bottom: 1px solid var(--line); }
.xp li { display: grid; grid-template-columns: 160px minmax(0, 1.05fr) minmax(0, 1fr); gap: 20px; padding: 28px 0 32px; border-top: 1px solid var(--line); }
.xp__dates { padding-top: 10px; font-size: 14px; letter-spacing: -0.02em; color: var(--muted); }
.xp h3 { font-family: var(--serif); font-weight: 300; font-size: clamp(28px, 2.6vw, 40px); line-height: 1.1; letter-spacing: -0.05em; }
.xp__org { margin-top: 8px !important; font-size: 16px; letter-spacing: -0.02em; color: var(--muted); }
.xp__text { padding-top: 8px; font-size: 16px; line-height: 1.5; color: var(--body); }
.xp a, .prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.xp a:hover { color: var(--accent); }
.footnote { margin-top: 32px; font-size: 14px; color: var(--muted); }

/* ---------- Next project ---------- */
.next { padding: 120px 0 0; }
.next .label { padding: 0 var(--m); margin-bottom: 24px; }
.next .tile { display: block; }
.next .tile__media { aspect-ratio: 16 / 7; }
.next .tile__media--shot > img { top: 14%; left: 30%; width: 80%; }

/* ---------- Contact block ---------- */
.sec--orange .statement { margin: 64px 0 48px; color: var(--white); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .flow { --cols: 3; }
    .flow > :nth-child(3n) { border-right: 0; }
    .flow > :nth-child(n + 4) { border-top: 1px solid var(--line); }
    .evidence { --cols: 2; }
    .evidence > :nth-child(2n) { border-right: 0; }
    .evidence > :nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 991px) {
    .page-hero { min-height: 0; gap: 96px; }
    .glance { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
    .prose, .intro { margin-left: 0; }
    .byq-boundary-story { grid-template-columns: 1fr 1fr; column-gap: 16px; }
    .cols { --cols: 2; }
    .cols > :nth-child(2n) { border-right: 0; }
    .cols > :nth-child(n + 3) { border-top: 1px solid var(--line); }
    .lessons, .cols--two { --cols: 1; }
    .lessons > *, .cols--two > * { border-right: 0; }
    .lessons > * + *, .cols--two > * + * { border-top: 1px solid var(--line); }
    .qa > div { grid-template-columns: 1fr; gap: 12px; }
    .xp li { grid-template-columns: 1fr; gap: 6px; }
    .xp__dates { padding-top: 0; }
}
@media (max-width: 767px) {
    .page-hero { gap: 72px; padding-top: 32px; }
    .page-hero__logo { width: 160px; margin-bottom: 20px; }
    .glance { grid-template-columns: 1fr; }
    .page-media { aspect-ratio: 4 / 5; }
    .cs-toc { height: 56px; }
    .cs-toc__track { gap: 20px; margin-right: 68px; }   /* button: right 20px, 40px wide */
    .sec { padding: 80px var(--m); scroll-margin-top: 56px; }
    .sec__head { gap: 28px; margin-bottom: 56px; }
    .intro { margin-top: -16px; margin-bottom: 48px; }
    .prose p, .intro { font-size: 17px; }
    .byq-spine-track { left: 6px; transform: none; }
    .byq-timeline-node { grid-template-columns: 28px minmax(0, 1fr); }
    .byq-timeline-node .byq-timeline-dot { grid-column: 1; justify-self: start; }
    .byq-timeline-node[data-side] .byq-timeline-card { grid-column: 2; padding: 22px 20px 26px; }
    .bld div { grid-template-columns: 1fr; gap: 2px; }
    .byq-boundary-story { column-gap: 12px; margin-top: 56px; }
    .byq-swap-entry { grid-template-columns: 1fr; gap: 8px; }
    .byq-swap-entry strong { font-size: 22px; }
    .byq-swap-line { font-size: 13px; }
    .byq-swap-frame { top: 76px; height: 52svh; }
    .cols, .flow, .evidence { --cols: 1; }
    .cols > * { border-right: 0; padding: 28px var(--m) 32px; }
    .cols > * + * { border-top: 1px solid var(--line); }
    .flow h3, .evidence h3 { margin-top: 16px; }
    .thread li { grid-template-columns: 1fr; gap: 6px; }
    .next { padding-top: 80px; }
    .next .tile__media { aspect-ratio: 4 / 5; }
    .next .tile__media--shot > img { top: 18%; left: 10%; width: 165%; }
}
