/* assembl lab home, site-v2 (8 Nov 2026). Built by scripts/build-lab-home.cjs; tokens and rules: /DESIGN.md.
   The look is the foundation ported from assembl.co.nz (/site-v2/site-v2.css + /site-v2/lab.css): deep plum hero,
   aubergine twins, warm ivory and soft blush for the study machines, playground and labels, rose mauve close. Since the
   point-cloud home (Nov 2026) every chapter is on the plum tone; lab/pc/pc.css carries the overrides for the dark cards.
   This file is layout only: every colour is a foundation token (var(--v2-*)), read through the section's tone class.
   Every render is shown whole, at its own proportions, with rounded corners. */

html { background: var(--v2-plum, #21121F); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; font-size: 17px; line-height: 1.6; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
.wrap { width: min(1320px, 100% - 2 * var(--v2-gutter)); margin-inline: auto; }
.anchor { display: block; position: relative; top: -12px; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 80; padding: 12px 18px; border-radius: var(--v2-r-pill); background: var(--v2-ivory); color: var(--v2-plum); font-weight: 500; text-decoration: none; }
.skip:focus { top: 12px; }
[id] { scroll-margin-top: 88px; }
.lab-story .v2-nav .v2-wordmark { min-height: 44px; }

.actions { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.kind { font-size: var(--v2-small); line-height: 1.3; color: var(--v2-fg-2); letter-spacing: .01em; }
.lede a { color: var(--v2-fg); text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* ── hero: one idea, lots of plum, the glass "a" assembling on the right ── */
.hero { position: relative; overflow: clip; }
.hero-glow { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(min(820px, 90vw) min(620px, 70vh) at 78% 38%, rgba(217, 186, 203, .14), transparent 70%); }
.hero-in { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 5vw, 96px); align-items: center;
  min-height: min(980px, 100svh); padding-block: clamp(128px, 16vh, 180px) clamp(72px, 10vh, 128px); }
.hero-copy { position: relative; z-index: 1; display: grid; gap: clamp(24px, 3vw, 36px); justify-items: start; }
.hero-copy h1 { max-width: 9ch; }
.hero .lede { max-width: 40ch; }
.truth-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--v2-small); color: var(--v2-fg-2); }
.truth-note span:last-child { margin-left: 6px; }
.hero-art { position: relative; justify-self: end; width: min(100%, 520px); pointer-events: none; will-change: transform; }
/* 8 Nov 2026: no halo behind the flat mark (the brand has no glows). */
.lab-ticker { margin: 0; }

/* ── chapters: tall, quiet, one heading each ── */
.chapter { padding-block: var(--v2-section); }
.ch-head { display: grid; gap: clamp(20px, 2.4vw, 32px); justify-items: start; margin-bottom: clamp(56px, 7vw, 112px); }
.ch-head h2 { max-width: 15ch; }
.ch-head-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: end; gap: 32px clamp(32px, 6vw, 96px); }
.ch-title { display: grid; gap: clamp(20px, 2.4vw, 32px); justify-items: start; }

/* the frame: every render whole, at its own proportions, rounded. The fill behind is soft blush. */
.frame { position: relative; margin: 0; border-radius: var(--v2-r-card); overflow: hidden; background: var(--v2-blush); }
.frame img { width: 100%; height: auto; }

/* ── twins (aubergine): six cards, render on top, words below ── */
.tw-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: clamp(20px, 2.6vw, 40px); }
.tw-step { position: relative; display: grid; grid-template-rows: auto 1fr; border-radius: var(--v2-r-card); background: rgba(249, 246, 242, .035); box-shadow: inset 0 0 0 1px var(--v2-line); overflow: hidden;
  transition: transform var(--v2-slow) var(--v2-ease), box-shadow var(--v2-base) ease; }
.tw-step:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px rgba(249, 246, 242, .24), 0 40px 70px -46px rgba(217, 186, 203, .45); }
.tw-pic { border-radius: 0; aspect-ratio: 16 / 10; }
.tw-pic img { width: 100%; height: 100%; object-fit: contain; transition: transform var(--v2-slow) var(--v2-ease); }
.tw-step:hover .tw-pic img { transform: scale(1.03); }
.tw-copy { display: grid; gap: 12px; align-content: start; justify-items: start; padding: 26px 28px 24px; }
.tw-copy h3 { font-size: clamp(24px, 2vw, 30px); font-weight: 400; line-height: 1.12; letter-spacing: -.025em; }
.tw-copy .line { color: var(--v2-fg-2); font-size: 16px; line-height: 1.6; }
.go { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 4px; font-size: 15px; font-weight: 500; text-decoration: none; color: var(--v2-fg); }
.go span { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; padding-bottom: 3px; transition: background-size var(--v2-base) var(--v2-ease); }
.go:hover span { background-size: 100% 1px; }
.go svg { transition: transform var(--v2-base) var(--v2-ease); }
.go:hover svg { transform: translateX(4px); }
/* the whole card opens the twin; the visible link stays the one focus stop */
.tw-step .go::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }

.more-rule { margin-block: clamp(72px, 9vw, 140px) clamp(48px, 6vw, 88px); }
.more { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(40px, 5vw, 80px); }
.more h3, .doors h3 { margin-bottom: 22px; font-size: var(--v2-eyebrow); font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--v2-fg); }

/* rows: a small render, the words, an arrow. Dark on aubergine, blush on ivory. */
.rows { display: grid; gap: 12px; }
.row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 10px 20px 10px 10px; border-radius: 22px; color: var(--v2-fg); text-decoration: none;
  background: rgba(249, 246, 242, .035); box-shadow: inset 0 0 0 1px var(--v2-line); transition: transform var(--v2-base) var(--v2-ease), background-color var(--v2-base) ease; }
.row:hover { transform: translateY(-2px); background: rgba(249, 246, 242, .07); }
.row.row-type { grid-template-columns: minmax(0, 1fr) auto; padding: 20px 22px; }
.row-pic { border-radius: 14px; }
.row-copy { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.row-copy strong { font-size: 18px; font-weight: 500; line-height: 1.3; letter-spacing: -.01em; }
.row-line { font-size: 15px; line-height: 1.5; color: var(--v2-fg-2); }
.row .meta { margin-top: 8px; }
.row-go { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--v2-line); transition: transform var(--v2-base) var(--v2-ease); }
.row:hover .row-go { transform: translate(2px, -2px); }

/* ── the light chapters: study (ivory), playground (blush), labels (ivory) ── */
.sheet { position: relative; background: var(--v2-aubergine); }
.sheet > .chapter:first-child { border-radius: 44px 44px 0 0; }

/* study machines: renders large, on blush cards */
.years { display: flex; flex-wrap: wrap; gap: 8px; }
.years a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--v2-r-pill); font-size: 14px; text-decoration: none; color: var(--v2-fg); box-shadow: inset 0 0 0 1px var(--v2-line); transition: background-color var(--v2-fast); }
.years a:hover { background: var(--v2-blush); }
.machines { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 24px); }
.mc { grid-column: span 2; }
.mc-lead, .mc-wide { grid-column: span 3; }
.mc-full { grid-column: 1 / -1; }
.mc a { --v2-fg-2: var(--v2-mauve-deep); display: grid; grid-template-rows: auto 1fr; height: 100%; border-radius: var(--v2-r-card); background: var(--v2-blush); color: var(--v2-fg); text-decoration: none;
  transition: transform var(--v2-slow) var(--v2-ease), box-shadow var(--v2-base) ease; }
.mc a:hover { transform: translateY(-4px); box-shadow: 0 34px 60px -40px rgba(51, 33, 47, .45); }
.mc .frame { margin: 8px 8px 0; border-radius: 22px; aspect-ratio: 4 / 3; background: var(--v2-ivory); }
.mc-lead .frame, .mc-wide .frame, .mc-full .frame { aspect-ratio: 16 / 10; }
.mc .frame img { width: 100%; height: 100%; object-fit: contain; transition: transform var(--v2-slow) var(--v2-ease); }
.mc a:hover .frame img { transform: scale(1.03); }
.mc-copy { display: grid; gap: 8px; align-content: start; justify-items: start; padding: 20px 24px 24px; }
.mc-copy strong { font-size: clamp(22px, 1.8vw, 28px); font-weight: 400; line-height: 1.15; letter-spacing: -.02em; }
.mc-copy .meta { margin-top: 6px; }
.doors { margin-top: clamp(64px, 7vw, 112px); }
.doors .row { --v2-fg-2: var(--v2-mauve-deep); background: var(--v2-blush); box-shadow: none; }
.doors .row:hover { background: var(--v2-pale-rose); }
.rows-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* the playground: a calm index on hairlines, words only */
.index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(24px, 3vw, 48px); }
.ix { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: start; height: 100%; padding: 24px 4px 28px; border-top: 1px solid var(--v2-line); color: var(--v2-fg); text-decoration: none; }
.ix strong { font-size: clamp(20px, 1.6vw, 24px); font-weight: 400; line-height: 1.25; letter-spacing: -.015em; }
.ix .row-line { grid-column: 1; }
.ix .truth { grid-column: 2; grid-row: 1; }
.ix:hover strong { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }

/* the labels */
.about .wrap { display: grid; gap: clamp(20px, 2.4vw, 32px); justify-items: start; }
.labels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); width: 100%; margin-top: clamp(32px, 4vw, 64px); }
.labels div { display: grid; gap: 14px; align-content: start; padding-top: 22px; border-top: 1px solid var(--v2-line); }
.labels dt { line-height: 1; }
.labels dd { color: var(--v2-fg-2); font-size: 16px; line-height: 1.6; }

/* ── the close (rose mauve): the "a" assembles with scroll ── */
.close { overflow: clip; }
.close-in { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: clamp(32px, 5vw, 96px); align-items: center; padding-block: var(--v2-section); }
.close-copy { display: grid; gap: clamp(20px, 2.4vw, 32px); justify-items: start; }
.close-copy h2 { max-width: 14ch; }
.close-a { justify-self: center; width: min(100%, 300px); }

/* Ask about this: a quiet plum pill, as on the company site */
.askb > button { background: rgba(33, 18, 31, .9) !important; color: var(--v2-ivory) !important; box-shadow: inset 0 0 0 1px rgba(249, 246, 242, .16), 0 14px 34px -14px rgba(0, 0, 0, .8) !important; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }

/* ── responsive ── */
@media (max-width: 1080px) {
  .labels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 959px) {
  .hero-in { grid-template-columns: 1fr; min-height: 0; padding-top: 112px; gap: 8px; }
  .hero-art { order: -1; width: min(62%, 300px); justify-self: center; }
  .more { grid-template-columns: 1fr; }
  .rows-3 { grid-template-columns: 1fr; }
  .ch-head-row { grid-template-columns: 1fr; }
  .mc, .mc-lead, .mc-wide { grid-column: span 3; }
  .machines > .mc:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .close-in { grid-template-columns: 1fr; }
  .close-a { order: -1; width: min(48%, 200px); }
}
@media (max-width: 720px) {
  /* phones: the twins become one swipeable row instead of six screen-high cards */
  .tw-steps { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 86%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; padding-bottom: 6px; scrollbar-width: none; }
  .tw-steps::-webkit-scrollbar { display: none; }
  .tw-step { scroll-snap-align: start; }
  .tw-step:hover { transform: none; }
  .tw-copy { padding: 20px 20px 18px; }
  .tw-copy .src { display: none; }
  .machines { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .mc { grid-column: span 1; }
  .mc-lead { grid-column: span 2; }
  .machines > .mc:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .mc:not(.mc-lead) .mc-copy { padding: 14px 14px 16px; }
  .mc:not(.mc-lead) .mc-copy strong { font-size: 18px; }
  .mc:not(.mc-lead) .row-line { font-size: 14px; }
  .mc:not(.mc-lead) .frame { margin: 6px 6px 0; border-radius: 16px; }
  .index { grid-template-columns: 1fr; }
  .labels { grid-template-columns: 1fr; }
  .sheet > .chapter:first-child { border-radius: 28px 28px 0 0; }
  .row { grid-template-columns: 88px minmax(0, 1fr); gap: 14px; padding-right: 14px; }
  .row.row-type { grid-template-columns: minmax(0, 1fr); }
  .row-go { display: none; }
}
@media (max-width: 360px) {
  .row { grid-template-columns: 1fr; padding: 10px 10px 14px; }
  .row-pic { max-width: 140px; }
  .row-copy { padding-inline: 6px; }
}

/* reduced motion: the foundation already stills everything inside .site-v2; this covers the page scroll */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-art { will-change: auto; }
}
