/* =================================================================
   v2: "colour by chapter". Loads after main.css and only adds to it.
   Chapters are full-bleed fields (ink, cream, accent); the header takes
   the ink of the chapter under it. Motion lives in v2.js and in the
   no-preference blocks below, so reduced motion is simply the finished page.
   ================================================================= */
:root {
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-reveal: 800ms;
  --field-cream: #f3efd9;
  --field-ink: #15171f;
}
.chapter { position: relative; padding: clamp(96px, 12vw, 176px) 0; overflow-x: clip; }
.ch-dark { background: var(--bg); color: var(--text); }
.ch-cream { background: var(--field-cream); color: #2a2b33; --cream: #15171f; --text: #2a2b33; --text-dim: #555a68; --card: #e8e2c9; --card-2: #ded7b9; }
.ch-accent { background: var(--accent); color: var(--field-ink); --cream: #15171f; --text: #15171f; --text-dim: #3b2a2d; }
.ch-cream .btn-primary, .ch-accent .btn-primary { background: var(--field-ink); color: var(--field-cream); }
.v2-h { margin: 0; font-size: clamp(2.25rem, 1.3rem + 3.6vw, 4.5rem); line-height: 0.98; font-weight: 800; letter-spacing: -0.045em; color: var(--cream); text-wrap: balance; }
.v2-lede { margin: 20px 0 0; max-width: 46ch; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); color: var(--text); }
.v2-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: clamp(36px, 5vw, 64px); }

/* Header takes the chapter's ink */
header.site { transition: background-color 280ms ease, color 280ms ease; }
header.site[data-ink="dark"] { background: var(--field-cream); }
header.site[data-ink="dark"] .wordmark, header.site[data-ink="dark"] .nav-links a { color: #15171f; }
header.site[data-ink="dark"] .nav-cta { background: #15171f; color: var(--field-cream); }
header.site[data-ink="accent"] { background: var(--accent); }
header.site[data-ink="accent"] .wordmark, header.site[data-ink="accent"] .nav-links a { color: #15171f; }
header.site[data-ink="accent"] .nav-cta { background: #15171f; color: var(--accent); }

/* ---------- Motion primitives (hidden states only under html.js + no-preference) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] { opacity: 0; transform: translateY(18px); animation: v2-rise var(--t-reveal) var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 90ms + 250ms); }
  .js .lines [data-line] { transform: translateY(105%); animation: v2-line 1000ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 120ms + 80ms); }
  .js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .shutter { clip-path: inset(0 0 100% 0); transition: clip-path 1100ms var(--ease-in-out); }
  .js .shutter img { transform: scale(1.12); transition: transform 1500ms var(--ease-soft); }
  .js .shutter.is-in { clip-path: inset(0); }
  .js .shutter.is-in img { transform: none; }
}
@keyframes v2-rise { to { opacity: 1; transform: none; } }
@keyframes v2-line { to { transform: none; } }
.lines .line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.lines [data-line] { display: block; }

/* ---------- Hero ---------- */
.v2-hero { padding: clamp(24px, 4vw, 56px) 0 clamp(56px, 7vw, 96px); overflow: hidden; }
.v2-hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px); align-items: end; }
.v2-pitch { margin: 0; max-width: 30ch; font-size: clamp(1.25rem, 1rem + 0.9vw, 1.75rem); line-height: 1.25; font-weight: 600; letter-spacing: -0.02em; color: var(--cream); text-wrap: balance; }
.v2-name {
  margin: clamp(28px, 4vw, 56px) 0 0; font-family: "Schibsted Grotesk", "Name Fallback", Arial, sans-serif;
  font-size: clamp(5rem, 19vw, 18.5rem); font-weight: 800; line-height: 0.78; letter-spacing: -0.06em; color: var(--cream);
}
.v2-name .line + .line { margin-top: 0.02em; }
.v2-name-inner { display: inline-block; transform-origin: 0 100%; }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .v2-name-inner { animation: v2-settle linear both; animation-timeline: scroll(root); animation-range: 0 80vh; }
  }
}
@keyframes v2-settle { to { transform: scale(0.92); opacity: 0.5; } }
.v2-cta { margin-top: clamp(28px, 3.5vw, 44px); display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.v2-photo { margin: 0; overflow: hidden; border-radius: var(--radius); }
.v2-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 40%; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .v2-photo.is-in img { animation: v2-drift linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  }
}
@keyframes v2-drift { from { transform: scale(1.04) translateY(-2%); } to { transform: scale(1.04) translateY(2%); } }
@media (max-width: 860px) {
  .v2-hero-grid { grid-template-columns: 1fr; }
  .v2-name { font-size: 30vw; margin-top: 8px; }
  .v2-photo img { aspect-ratio: 4 / 3; }
  .v2-hero-copy { order: 2; }
}

/* ---------- Marquee band (accent field) ---------- */
.marquee { background: var(--accent); color: #15171f; overflow: hidden; padding: clamp(18px, 2.4vw, 32px) 0; }
.marquee-track { display: flex; width: max-content; }
.marquee-track span { flex-shrink: 0; font-size: clamp(2.5rem, 1.5rem + 5vw, 6.5rem); font-weight: 800; letter-spacing: -0.045em; line-height: 1; white-space: nowrap; padding-right: 0.5em; }
.marquee-track span::after { content: ""; display: inline-block; width: 0.22em; height: 0.22em; border-radius: 50%; background: currentColor; margin-left: 0.5em; vertical-align: 0.22em; }
@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: v2-marquee 46s linear infinite; animation-play-state: paused; }
  .marquee.is-running .marquee-track { animation-play-state: running; }
  .marquee:hover .marquee-track { animation-play-state: paused; }
}
@keyframes v2-marquee { to { transform: translateX(-50%); } }
.marquee-note { margin: 0; padding: 18px var(--edge) 0; max-width: calc(var(--max) + 2 * var(--edge)); margin-inline: auto; color: var(--text-dim); font-size: 1rem; }

/* ---------- Proof ---------- */
.v2-proof .cases { gap: 0; }
.v2-proof .case { background: transparent; border-radius: 0; box-shadow: inset 0 1px 0 rgba(255,255,255,0.08); }
.v2-proof .case[open] { background: transparent; }
.v2-proof .case summary { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) auto; padding: clamp(28px, 3.2vw, 44px) 0; gap: 12px 40px; }
.v2-proof .case-metric { font-size: clamp(4rem, 2rem + 6vw, 8.5rem); line-height: 0.85; letter-spacing: -0.06em; }
.v2-proof .case-body { padding: 0 0 clamp(28px, 3vw, 44px) calc(41.6% + 20px); }
@media (prefers-reduced-motion: no-preference) {
  .v2-proof .case summary:hover .case-metric { transform: translateX(6px); }
  .v2-proof .case-metric { transition: transform 300ms var(--ease-out); }
}
@media (max-width: 860px) {
  .v2-proof .case summary { grid-template-columns: minmax(0, 1fr) auto; }
  .v2-proof .case-body { padding-left: 0; }
}

/* ---------- Recommendations (cream chapter) ---------- */
.rec-wrap { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(32px, 5vw, 80px); align-items: end; }
.rec-stage { display: grid; }
.rec { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(10px); filter: blur(4px); transition: opacity 420ms var(--ease-out), transform 520ms var(--ease-out), filter 420ms ease, visibility 0s 420ms; }
.rec.is-on { opacity: 1; visibility: visible; transform: none; filter: none; transition: opacity 520ms var(--ease-out), transform 620ms var(--ease-out), filter 520ms ease, visibility 0s; }
.rec blockquote { margin: 0; }
.rec .rec-quote { margin: 0; font-size: clamp(1.5rem, 1.05rem + 1.7vw, 2.5rem); line-height: 1.18; font-weight: 700; letter-spacing: -0.03em; color: #15171f; text-wrap: balance; }
.rec .rec-quote::before { content: "\201C"; display: block; font-size: 2.6em; line-height: 0.55; height: 0.42em; color: var(--accent); }
.rec .rec-full { margin: 20px 0 0; max-width: 62ch; color: #3a3d48; font-size: 1rem; }
.rec .rec-who { display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.rec .rec-who img.rec-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.rec .rec-who b { display: block; color: #15171f; }
.rec .rec-who span { color: #555a68; font-size: 0.9375rem; }
.rec .rec-logo { height: 20px; width: auto; margin-top: 6px; }
.rec-side { display: grid; gap: 18px; }
.rec-faces { display: grid; grid-template-columns: repeat(4, 56px); gap: 12px; }
.rec-face { width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%; overflow: hidden; cursor: pointer; background: #ded7b9; opacity: 0.55; filter: grayscale(1); transition: opacity 200ms ease, filter 200ms ease, transform 160ms var(--ease-out), box-shadow 200ms ease; }
.rec-face img { width: 100%; height: 100%; object-fit: cover; }
.rec-face[aria-pressed="true"] { opacity: 1; filter: none; box-shadow: 0 0 0 3px var(--field-cream), 0 0 0 5px var(--accent); }
.rec-face:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .rec-face:hover { opacity: 1; filter: none; } }
.rec-nav { display: flex; align-items: center; gap: 10px; }
.rec-count { font-variant-numeric: tabular-nums; color: #555a68; min-width: 3.2em; }
.ch-cream .arrow-btn { background: #15171f; color: var(--field-cream); }
@media (max-width: 860px) {
  .rec-wrap { grid-template-columns: 1fr; }
  .rec-faces { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
  .rec-face { width: 100%; height: auto; aspect-ratio: 1; }
}

/* ---------- Programs: pinned title, three colour panels pass ---------- */
.prog-story { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.prog-title { position: sticky; top: 18vh; }
.prog-panels { display: grid; gap: 16px; }
.prog-panel {
  position: relative; display: flex; flex-direction: column; gap: 16px; min-height: 58vh; justify-content: flex-end;
  padding: clamp(28px, 3.4vw, 48px); border-radius: var(--radius); background: var(--accent); color: #15171f; overflow: hidden;
}
.prog-panel .mark { margin: 0 0 auto; font-size: clamp(2.75rem, 1.6rem + 4.4vw, 6rem); font-weight: 800; letter-spacing: -0.055em; line-height: 0.85; color: #15171f; }
.prog-panel .mark em { font-style: normal; color: var(--field-cream); }
.prog-panel p { margin: 0; max-width: 46ch; font-size: 1.0625rem; }
.prog-panel .stat { font-weight: 800; }
.prog-panel .go { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
.prog-panel .go::after { content: ""; position: absolute; inset: 0; }
.prog-panel .go svg { transition: transform 220ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .prog-panel:hover .go svg { transform: translateX(6px); } }
.prog-panel:active { transform: scale(0.99); transition: transform 140ms var(--ease-out); }
.prog-panel:has(.go:focus-visible) { outline: 3px solid var(--cream); outline-offset: 4px; }
@media (max-width: 860px) { .prog-story { grid-template-columns: 1fr; } .prog-title { position: static; } .prog-panel { min-height: 0; } }

/* ---------- AI tools: index with preview ---------- */
.tool-index { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(32px, 4vw, 64px); align-items: start; }
.ti-list { list-style: none; margin: 0; padding: 0; }
.ti-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 4px 16px; padding: 18px 0; box-shadow: inset 0 -1px 0 rgba(255,255,255,0.08); transition: opacity 200ms ease; }
.ti-name { font-size: clamp(1.75rem, 1.2rem + 1.8vw, 3rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--cream); transition: color 200ms ease, transform 300ms var(--ease-out); }
.ti-go { font-weight: 700; color: var(--accent); font-size: 0.9375rem; white-space: nowrap; }
.ti-desc { grid-column: 1 / -1; color: var(--text-dim); font-size: 0.9375rem; max-width: 58ch; }
.ti-row img.ti-inline { display: none; }
.ti-frame { position: sticky; top: 14vh; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--card); }
.ti-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; opacity: 0; transform: scale(1.03); transition: opacity 320ms ease, transform 600ms var(--ease-out); }
.ti-frame img.is-on { opacity: 1; transform: none; }
@media (hover: hover) and (pointer: fine) {
  .ti-list:hover .ti-row:not(:hover) { opacity: 0.4; }
  .ti-row:hover .ti-name { transform: translateX(8px); color: var(--accent-hi); }
}
@media (max-width: 860px) {
  .tool-index { grid-template-columns: 1fr; }
  .ti-frame { display: none; }
  .ti-row img.ti-inline { display: block; grid-column: 1 / -1; order: -1; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; border-radius: var(--radius); margin-bottom: 12px; }
}

/* ---------- Speaking: drag row (cream chapter) ---------- */
.drag-row { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 calc(50% - 50vw) 0 calc(-1 * var(--edge)); padding: 0 var(--edge) 6px; scroll-padding-inline: var(--edge); }
.drag-row::-webkit-scrollbar { display: none; }
.drag-row .speak-card { flex: 0 0 clamp(260px, 30vw, 400px); scroll-snap-align: start; background: #e8e2c9; }
.ch-cream .speak-card img { aspect-ratio: 4 / 5; }
.ch-cream .speak-event { color: #15171f; }
.ch-cream .speak-date { color: #555a68; }
.ch-cream .speak-linkedin { color: #a83f4b; }
@media (hover: hover) and (pointer: fine) { .ch-cream .speak-card:hover { background: #ded7b9; } }

/* ---------- Timeline: the line draws as you scroll ---------- */
.v2-timeline .timeline-row { position: relative; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .v2-timeline .timeline-item::after { transform-origin: 0 50%; animation: v2-draw linear both; animation-timeline: view(); animation-range: entry 20% cover 45%; background: var(--accent); }
  }
}
@keyframes v2-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Contact (accent chapter) + curtain footer ---------- */
.v2-contact .connect-lead { color: #15171f; }
.v2-contact .btn-outline { background: rgba(21,23,31,0.12); color: #15171f; }
@media (hover: hover) and (pointer: fine) { .v2-contact .btn-outline:hover { background: rgba(21,23,31,0.2); } }
.v2-contact .open-to { color: #15171f; }
.v2-main { position: relative; z-index: 2; background: var(--bg); }
.site-foot.curtain { position: sticky; bottom: 0; z-index: 1; }

/* ---------- Program pages ---------- */
.v2-ipage .ihero { padding-bottom: clamp(16px, 3vw, 40px); }
.v2-ipage .v2-mark { font-size: clamp(3.5rem, 1.2rem + 7vw, 8.5rem); line-height: 0.86; }
.v2-ipage .v2-mark .line { padding-bottom: 0.08em; margin-bottom: -0.08em; }
.v2-ipage .v2-mark em { font-style: normal; color: var(--accent); }
.v2-ipage .isec { padding-top: clamp(96px, 11vw, 168px); }
.prog-panels-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.prog-panels-2 .prog-panel { min-height: clamp(320px, 38vw, 460px); }
@media (max-width: 860px) { .prog-panels-2 { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .v2-head { flex-direction: column; align-items: flex-start; gap: 0; }
  .v2-head .carousel-nav { margin-top: 20px; }
}
