/* ==========================================================================
   MRKA Digital — v2
   The candidate redesign. Same logo, same six colours, same two faces; the
   page is rebuilt around scroll-driven scenes and a section rail.
   Tokens are copied from site.css unchanged. design-source/_ds/…/tokens/
   is still canonical for the values.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Base palette — six approved colours */
  --mrka-ink: #1A1A18;
  --mrka-coral: #FF5A5F;
  --mrka-bone: #FAF7F2;
  --mrka-coral-deep: #C2373C;
  --mrka-clay: #6E5F52;
  --mrka-hairline: #E3DCD3;

  /* Supporting warm neutrals — depth inside the six, not new brand colours */
  --mrka-white: #FFFFFF;
  --mrka-sand: #F1EBE3;
  --mrka-stone: #DBD2C7;
  --mrka-body: #6E665D;
  --mrka-ink-2: #232320;
  --mrka-ink-3: #33332F;
  --mrka-ink-4: #3A3A36;
  --mrka-ink-5: #46453F;
  --mrka-dust: #8C8378;
  --mrka-sandstone: #A39A8F;
  --mrka-coral-hover: #E8464B;
  --mrka-coral-lift: #FF7B7F;
  --mrka-coral-wash: #FFF4F4;

  --font-brand: Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-technical: "Space Grotesk", ui-monospace, monospace;

  /* Display scale, as site.css. D1 is the hero's alone. */
  --d1-size: clamp(40px, 7.6vw, 122px);
  --d1-leading: 0.98;
  --d1-track: -0.035em;
  --d2-size: clamp(27px, 4.2vw, 64px);
  --d2-leading: 1.05;
  --d2-track: -0.03em;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 48px;
  --space-9: 64px;
  --space-10: 80px;

  --gutter-page: 64px;
  --rhythm-section: 120px;
  --pad-card: 32px;
  --max-page: 1440px;

  --radius-control: 3px;
  --rule-accent: 3px;

  --ease-brand: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-hover: 160ms;
  --dur-rise: 620ms;

  /* The rail sits inside the page gutter, so it never needs space of its own */
  --rail-x: 18px;

  --slice-m-w: 17.888%;
  --slice-r-w: 13.267%;
  --slice-ka-w: 29.036%;
  --slice-d-w: 33.467%;
  --gap-m-r: 1.513%;
  --gap-r-ka: 0.817%;
  --gap-ka-d: 4.016%;
}

/* --------------------------------------------------------------------------
   2. Reset, base and the browser's own surfaces
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* The parts of the page nobody draws still wear the palette. */
  scrollbar-color: var(--mrka-ink-5) var(--mrka-ink);
  accent-color: var(--mrka-coral);
  background: var(--mrka-ink);
}

body {
  margin: 0;
  background: var(--mrka-bone);
  color: var(--mrka-body);
  font: 400 15px/1.6 var(--font-brand);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

::selection { background: var(--mrka-coral); color: var(--mrka-ink); }

h1, h2, h3, p, figure, blockquote, dl, dd { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--mrka-coral); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }
/* Sections receive focus after an in-page jump so a keyboard user carries on
   from there. They are not controls, so they do not get a ring. */
[tabindex="-1"]:focus { outline: none; }

.vh {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  top: 0; left: 0;
  z-index: 100;
  padding: var(--space-3) var(--space-5);
  background: var(--mrka-coral);
  color: var(--mrka-ink);
  font: 500 13px/1 var(--font-brand);
  transform: translateY(-120%);
}
.skip:focus { transform: translateY(0); }

/* --------------------------------------------------------------------------
   3. Shared layout
   -------------------------------------------------------------------------- */

.band { padding: var(--rhythm-section) var(--gutter-page); }
.band--bone  { background: var(--mrka-bone); }
.band--white { background: var(--mrka-white); border-top: 1px solid var(--mrka-hairline); }
.band--white + .band--bone,
.band--white + .chapter > .band--bone:first-child { border-top: 1px solid var(--mrka-hairline); }
.band--ink   { background: var(--mrka-ink); }
.band--coral { background: var(--mrka-coral); }

.inner { max-width: var(--max-page); margin: 0 auto; }

.h-display {
  font: 400 var(--d2-size)/var(--d2-leading) var(--font-brand);
  letter-spacing: var(--d2-track);
  color: var(--mrka-ink);
  text-wrap: balance;
}

.lede {
  font: 400 16px/1.65 var(--font-brand);
  color: var(--mrka-clay);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   4. Buttons — hover is colour only, 160ms
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font: 500 14px/1.2 var(--font-brand);
  letter-spacing: -0.005em;
  text-align: center;
  cursor: pointer;
  transition: color var(--dur-hover) ease,
              background-color var(--dur-hover) ease,
              border-color var(--dur-hover) ease;
}
.btn--primary { background: var(--mrka-coral); color: var(--mrka-ink); border-color: var(--mrka-coral); }
.btn--primary:hover { background: var(--mrka-coral-hover); border-color: var(--mrka-coral-hover); }
[data-ground="ink"] .btn--primary:hover { background: var(--mrka-coral-lift); border-color: var(--mrka-coral-lift); }
.btn--on-coral { background: var(--mrka-ink); color: var(--mrka-bone); border-color: var(--mrka-ink); }
.btn--on-coral:hover { background: transparent; color: var(--mrka-ink); }
.btn--small { padding: 9px 16px; font-size: 13px; }

/* --------------------------------------------------------------------------
   5. Logo — the wordmark is one path, sliced into M / R / KA by windows
   -------------------------------------------------------------------------- */

.logo {
  display: flex;
  align-items: flex-end;
  width: var(--logo-w);
  aspect-ratio: 747 / 116;
  flex: none;
}
.logo__slice { height: 100%; overflow: hidden; position: relative; flex: none; }
.logo__slice img { position: absolute; top: 0; height: 100%; max-width: none; }
.logo__slice--m  { width: var(--slice-m-w); }
.logo__slice--r  { width: var(--slice-r-w); margin-left: var(--gap-m-r); }
.logo__slice--ka { width: var(--slice-ka-w); margin-left: var(--gap-r-ka); }
.logo__slice--d  { width: var(--slice-d-w); margin-left: var(--gap-ka-d); }
.logo__slice--m  img { width: 559.04%; left: 0; }
.logo__slice--r  img { width: 753.75%; left: -146.21%; }
.logo__slice--ka img { width: 344.40%; left: -115.31%; }
.logo__slice--d  img { width: 298.80%; left: -198.80%; }

.reveal .logo__slice > .logo__lift { display: block; width: 100%; height: 100%; }
.reveal .logo__slice--m  .logo__lift { animation: rise var(--dur-rise) var(--ease-brand) 40ms both; }
.reveal .logo__slice--r  .logo__lift { animation: rise var(--dur-rise) var(--ease-brand) 130ms both; }
.reveal .logo__slice--ka .logo__lift { animation: rise var(--dur-rise) var(--ease-brand) 220ms both; }
.reveal .logo__slice--d  { animation: fade 500ms ease 520ms both; }

@keyframes rise { from { transform: translateY(108%); } to { transform: translateY(0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes drawRule { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* --------------------------------------------------------------------------
   6. Loader — once per session, over a hero that is already painted
   -------------------------------------------------------------------------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  background: var(--mrka-ink);
  padding: var(--gutter-page);
}
.intro .loader { display: grid; }
.loader.is-out { opacity: 0; transition: opacity 400ms ease; pointer-events: none; }
.loader.is-gone { display: none; }
.loader__stack { display: grid; justify-items: start; gap: 28px; width: min(520px, 100%); }
.loader__rule {
  height: var(--rule-accent);
  width: 100%;
  background: var(--mrka-coral);
  transform: scaleX(0);
  transform-origin: left;
  animation: drawRule 520ms var(--ease-brand) 980ms both;
}

/* --------------------------------------------------------------------------
   7. Nav — the coral band, as index.html has it
   -------------------------------------------------------------------------- */

.top { background: var(--mrka-coral); }
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding: 20px var(--gutter-page);
}
/* The lockup is only ~26px tall, so the link's own box is under the 24px
   minimum tap target. Extend the hit area without moving the artwork. */
.nav__logo { --logo-w: 168px; position: relative; }
.nav__logo::after { content: ""; position: absolute; inset: -12px -8px; }
.nav__links { display: flex; gap: var(--space-6); margin-left: auto; }
.nav__links a {
  font: 400 14px/1 var(--font-brand);
  color: var(--mrka-ink);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-hover) ease;
}
.nav__links a:hover { border-bottom-color: var(--mrka-ink); }
.nav__cta { flex: none; }
.nav__toggle { display: none; }

/* --------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */

.hero {
  background: var(--mrka-ink);
  color: var(--mrka-bone);
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 72px);
  min-height: calc(100svh - 72px);
}
/* As index.html: the chart is absolute in the bottom right of the body, and
   the headline and copy sit over it, above it in paint order. */
.hero__body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-6) var(--gutter-page) var(--space-9);
}

/* The slate: three facts across the top, a hairline under them. */
.hero__slate {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 14px 0;
  border-top: 1px solid var(--mrka-ink-3);
  border-bottom: 1px solid var(--mrka-ink-3);
  font: 500 11px/1 var(--font-technical);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mrka-dust);
}

/* The headline and the copy under it, centred in the height left over. */
.hero__main { position: relative; margin: auto 0; padding-top: clamp(40px, 7vh, 88px); }

.hero h1 {
  position: relative;
  font: 400 var(--d1-size)/var(--d1-leading) var(--font-brand);
  letter-spacing: var(--d1-track);
  color: var(--mrka-bone);
}

/* Masked line rise. Hero only now: the scenes carry the motion further down,
   and one identical entrance on every section is exactly what they replace. */
.rise { display: block; overflow: hidden; padding-bottom: 0.08em; }
.rise > span { display: block; }
.intro .hero h1 .rise > span { animation: rise 700ms var(--ease-brand) 1700ms both; }
.intro .hero h1 .rise:nth-of-type(2) > span { animation-delay: 1790ms; }
.intro .hero__slate { animation: fade 500ms ease 1650ms both; }
.intro .hero__foot { animation: fade 600ms ease 1950ms both; }
.intro .strip { animation: fade 600ms ease 2100ms both; }

/* The rolling word — baseline maths as site.css. */
.roll {
  --roll-step: 1.16;
  --roll-ascent: 0.3483;
  display: inline-block;
  height: calc(var(--roll-step) * 1em);
  overflow: hidden;
  vertical-align: calc((var(--roll-step) / 2 - var(--roll-ascent)) * -1em);
}
.roll__track { display: block; transition: transform var(--dur-rise) var(--ease-brand); }
.roll__track span {
  display: block;
  height: calc(var(--roll-step) * 1em);
  line-height: var(--roll-step);
  color: var(--mrka-coral);
  white-space: nowrap;
}

.hero__foot {
  position: relative;
  display: grid;
  gap: 34px;
  justify-items: start;
  margin-top: 46px;
}
.hero__lede {
  max-width: 42ch;
  font: 430 15px/1.65 var(--font-brand);
  color: var(--mrka-sandstone);
  text-wrap: pretty;
}
.hero__cta { display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap; }
.hero__cta span { font: 400 13px/1.5 var(--font-brand); color: var(--mrka-dust); }

/* --------------------------------------------------------------------------
   9. The hero chart — the one from index.html, at Marcus's preference
   Three layers in paint order: the grid, the bars, the plot. Both SVGs state
   width and height outright; README explains why each of those matters.
   The draw transitions are gated on .motion, so with motion off, or with no
   script, the line and its points are simply there.
   -------------------------------------------------------------------------- */

.chart {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 56%;
  height: 58%;
  padding-right: var(--gutter-page);
  pointer-events: none;
}
.chart__bars {
  position: absolute;
  inset: 0 var(--gutter-page) 0 0;
  display: flex;
  align-items: flex-end;
  gap: 5px;
}
.chart__bars span {
  flex: 1;
  background: var(--mrka-ink-3);
  height: 100%;
  transform: scaleY(0);
  transform-origin: bottom;
}
.motion .chart__bars span { transition: transform 820ms var(--ease-brand); }
.chart__grid-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% - var(--gutter-page));
  height: 100%;
}
.chart__plot { position: relative; width: 100%; height: 100%; overflow: visible; }
/* Clipped so it never runs behind the headline. v2.js measures the headline
   and sets --grid-top; 72% is the safe default with no script. */
.chart__grid {
  stroke: var(--mrka-ink-3);
  stroke-width: 1;
  clip-path: inset(var(--grid-top, 72%) 0 0 0);
}
.chart__line {
  fill: none;
  stroke: var(--mrka-coral-deep);
  stroke-width: 2;
  stroke-linecap: square;
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
}
.motion .chart__line { transition: stroke-dashoffset 2600ms var(--ease-brand); }
.chart.is-drawn .chart__line { stroke-dashoffset: 0; }
.chart__node { fill: var(--mrka-coral-deep); opacity: 0; }
.motion .chart__node { transition: opacity 300ms ease; }
.chart.is-drawn .chart__node { opacity: 1; }
/* The bright stroke that climbs the route, and the bone head at its end. The
   glow is two drop-shadows, which the brand book's "nothing blurs" still
   rules out (README, open item 6). */
.chart__trail {
  fill: none;
  stroke: var(--mrka-coral);
  stroke-width: 5;
  stroke-linecap: square;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px var(--mrka-coral)) drop-shadow(0 0 14px var(--mrka-coral));
  opacity: 0;
}
.chart__pulse {
  fill: var(--mrka-bone);
  filter: drop-shadow(0 0 5px var(--mrka-coral)) drop-shadow(0 0 12px var(--mrka-coral));
  opacity: 0;
}
html:not(.motion) .chart__line { stroke-dashoffset: 0; }
html:not(.motion) .chart__node { opacity: 1; }
html:not(.motion) .chart__trail,
html:not(.motion) .chart__pulse { display: none; }

/* --------------------------------------------------------------------------
   10. Service strip
   -------------------------------------------------------------------------- */

.strip {
  background: var(--mrka-ink-2);
  border-top: 1px solid var(--mrka-ink-3);
  padding: 0 var(--gutter-page);
}
.strip__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip__item {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 26px var(--space-6) 30px;
  color: var(--mrka-bone);
  transition: color var(--dur-hover) ease;
}
.strip__item:first-child { padding-left: 0; }
.strip__item:last-child { padding-right: 0; }
.strip__item + .strip__item { border-left: 1px solid var(--mrka-ink-3); }
.strip__item::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 2px;
  background: var(--mrka-coral);
  opacity: 0;
  transition: opacity var(--dur-hover) ease;
}
@media (hover: hover) and (pointer: fine) {
  .strip__item:hover { color: var(--mrka-coral); }
  .strip__item:hover::before { opacity: 1; }
}
.strip__item:focus-visible::before { opacity: 1; }
.strip__name { font: 450 17px/1.3 var(--font-brand); letter-spacing: -0.01em; color: inherit; }
.strip__copy { font: 400 14px/1.6 var(--font-brand); color: var(--mrka-sandstone); text-wrap: pretty; }

/* --------------------------------------------------------------------------
   11. The rail
   Fixed, right-hand, inside the gutter. One segment per chapter. It takes the
   colour of whatever ground is under it, which v2.js reads off data-ground.
   -------------------------------------------------------------------------- */

.rail { display: none; }
.js .rail {
  --rail-track: var(--mrka-ink-5);
  --rail-fill: var(--mrka-coral);
  --rail-fg: var(--mrka-dust);
  --rail-strong: var(--mrka-bone);
  --rail-tip-bg: var(--mrka-bone);
  --rail-tip-fg: var(--mrka-ink);
  position: fixed;
  z-index: 40;
  right: var(--rail-x);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--rail-fg);
  transition: opacity 300ms ease, color var(--dur-hover) ease;
}
.rail[data-ground="bone"] {
  --rail-track: var(--mrka-stone);
  --rail-fill: var(--mrka-coral-deep);
  --rail-fg: var(--mrka-clay);
  --rail-strong: var(--mrka-ink);
  --rail-tip-bg: var(--mrka-ink);
  --rail-tip-fg: var(--mrka-bone);
}
.rail[data-ground="coral"] {
  --rail-track: var(--mrka-coral-deep);
  --rail-fill: var(--mrka-ink);
  --rail-fg: var(--mrka-ink);
  --rail-strong: var(--mrka-ink);
  --rail-tip-bg: var(--mrka-ink);
  --rail-tip-fg: var(--mrka-bone);
}
/* While the camera is inside the A there is nothing to navigate. */
.rail.is-hidden { opacity: 0; pointer-events: none; }

.rail__count {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font: 500 10px/1 var(--font-technical);
  letter-spacing: 0.2em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rail__count b { font-weight: 500; color: var(--rail-strong); transition: color var(--dur-hover) ease; }

.rail__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rail__list li { display: block; }
.rail__seg {
  position: relative;
  display: flex;
  justify-content: center;
  width: 22px;
  height: calc(48vh / 6 - 6px);
  min-height: 28px;
}
.rail__trk {
  position: relative;
  display: block;
  width: 2px;
  height: 100%;
  overflow: hidden;
  background: var(--rail-track);
  transition: background-color var(--dur-hover) ease;
}
.rail__fil {
  position: absolute;
  inset: 0;
  background: var(--rail-fill);
  transform-origin: 50% 0;
  transform: scaleY(0);
  transition: background-color var(--dur-hover) ease;
}
.rail__seg.is-on .rail__trk { width: 4px; }
/* The name appears on hover and focus. Instantly: this is looked at tens of
   times a visit, and hover in this brand changes colour, it does not move. */
.rail__tip {
  position: absolute;
  right: 30px;
  top: 50%;
  translate: 0 -50%;
  visibility: hidden;
  padding: 6px 8px;
  white-space: nowrap;
  background: var(--rail-tip-bg);
  color: var(--rail-tip-fg);
  font: 500 10px/1 var(--font-technical);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  pointer-events: none;
}
.rail__seg:hover .rail__tip,
.rail__seg:focus-visible .rail__tip { visibility: visible; }
.rail__seg:hover .rail__trk { background: var(--rail-fg); }

.rail__motion {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 8px 4px;
  background: none;
  border: 1px solid var(--rail-track);
  border-radius: var(--radius-control);
  font: 500 9px/1 var(--font-technical);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rail-fg);
  cursor: pointer;
  transition: color var(--dur-hover) ease, border-color var(--dur-hover) ease;
}
.rail__motion:hover { color: var(--rail-strong); border-color: var(--rail-fill); }

/* --------------------------------------------------------------------------
   12. Scenes
   A scene is an ordinary section until v2.js marks it .is-live, which it does
   only with motion on. Live, the section is as tall as --len viewports and its
   stage sticks to the screen while the scroll plays it. Gating on a class the
   script sets, rather than on .motion from the head, means a script that never
   loads leaves readable sections, not stages frozen on their first frame.
   v2.js writes every transform; the CSS only holds the start frame.
   -------------------------------------------------------------------------- */

.scene { position: relative; background: var(--mrka-ink); color: var(--mrka-bone); }
.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter-page);
  overflow: hidden;
}
.scene.is-live { height: calc(var(--len, 300) * 1vh); }
.is-live .stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  contain: paint;
}

.hud { display: none; }
.is-live .hud {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: 28px;
  font: 500 10px/1 var(--font-technical);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mrka-dust);
}
.hud__no { color: var(--mrka-coral); font-variant-numeric: tabular-nums; }
.hud__bar { position: relative; flex: 1; max-width: 200px; height: 1px; overflow: hidden; background: var(--mrka-ink-3); }
.hud__bar i { position: absolute; inset: 0; background: var(--mrka-sandstone); transform-origin: 0 50%; transform: scaleX(0); }

.play {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--rhythm-section) 0;
}
.is-live .play { flex: 1; min-height: 0; padding: 0; }

.foot { position: relative; z-index: 3; padding-bottom: var(--rhythm-section); }
.is-live .foot { padding-bottom: clamp(28px, 6vh, 56px); }
.foot__body {
  max-width: 46ch;
  font: 400 clamp(15px, 1.2vw, 18px)/1.6 var(--font-brand);
  color: var(--mrka-sandstone);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   13. Scene 01 — the split
   -------------------------------------------------------------------------- */

.split { display: block; }
.split__pre {
  display: block;
  margin-bottom: 0.3em;
  font: 400 clamp(22px, 3.3vw, 52px)/1.1 var(--font-brand);
  letter-spacing: -0.028em;
  color: var(--mrka-sandstone);
}
.split__cut {
  --cut: 58%;
  position: relative;
  display: block;
  white-space: nowrap;
  font: 500 clamp(64px, 18vw, 300px)/0.9 var(--font-brand);
  letter-spacing: -0.05em;
  color: var(--mrka-bone);
}
.split__half { display: block; padding-bottom: 0.12em; }
.split__half--bot::before { content: attr(data-text); }

/* The static composition: the word whole, what it lacks on a band below it. */
.split__half--bot, .split__blade { display: none; }
.split__band {
  display: block;
  margin: 0.08em calc(-1 * var(--gutter-page)) 0;
  padding: 0.08em var(--gutter-page) 0.12em;
  background: var(--mrka-coral);
  color: var(--mrka-ink);
  overflow: hidden;
}
.split__band-in { display: block; font-size: 0.4em; line-height: 1.1; letter-spacing: -0.035em; }

/* The animated composition. Two copies of the word, each clipped to one side
   of the cut; the band opens between them and the blade marks the line. */
.is-live .split__half--bot,
.is-live .split__blade { display: block; }
.is-live .split__half--top { clip-path: polygon(-20% -60%, 120% -60%, 120% var(--cut), -20% var(--cut)); }
.is-live .split__half--bot {
  position: absolute;
  top: 0; left: 0; right: 0;
  clip-path: polygon(-20% var(--cut), 120% var(--cut), 120% 160%, -20% 160%);
}
.is-live .split__band {
  position: absolute;
  left: calc(-1 * var(--gutter-page));
  right: calc(-1 * var(--gutter-page));
  top: var(--cut);
  height: var(--band-h, 0.6em);
  margin: 0;
  padding: 0 var(--gutter-page);
  display: flex;
  align-items: center;
  transform: translateY(-50%) scaleY(0);
}
.is-live .split__band-in { line-height: 1; white-space: nowrap; }
.is-live .split__blade {
  position: absolute;
  left: calc(-1 * var(--gutter-page));
  right: calc(-1 * var(--gutter-page));
  top: var(--cut);
  height: 2px;
  margin-top: -1px;
  background: var(--mrka-coral);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* --------------------------------------------------------------------------
   14. 01, continued — the other way round
   -------------------------------------------------------------------------- */

.other__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 88px;
  align-items: end;
}
.other__grid .lede { max-width: 44ch; font-size: 17px; color: var(--mrka-ink); }

/* The three claims as figures. dt comes first in the markup, as a dl needs;
   column-reverse puts the figure on top where the eye expects it. */
.figures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: var(--space-10);
  border-top: 1px solid var(--mrka-hairline);
}
.figures div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: var(--space-2); padding: var(--space-6) var(--space-6) 0; }
.figures div:first-child { padding-left: 0; }
.figures div + div { border-left: 1px solid var(--mrka-hairline); }
.figures dd {
  font: 500 clamp(48px, 5vw, 76px)/1 var(--font-technical);
  letter-spacing: -0.035em;
  color: var(--mrka-coral-deep);
}
.figures dt {
  font: 400 11px/1.4 var(--font-brand);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mrka-clay);
}

/* --------------------------------------------------------------------------
   15. 02 Twenty years
   -------------------------------------------------------------------------- */

.experience__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 88px;
  align-items: start;
}
.experience__years { color: var(--mrka-coral-deep); }
.experience__copy { display: grid; gap: var(--space-5); padding-top: var(--space-3); }
.experience__copy .lede { color: var(--mrka-ink); font-size: 17px; }
.experience__copy p:not(.lede) { font: 400 15px/1.7 var(--font-brand); color: var(--mrka-clay); text-wrap: pretty; }

/* --------------------------------------------------------------------------
   16. 03 Where I start — intro, the list, the close
   -------------------------------------------------------------------------- */

.route__head {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 88px;
  align-items: end;
}
.route__head .lede { max-width: 46ch; }

/* The list, as it reads with motion off: bone rows on a bone ground. */
.scene--prism:not(.is-live) { background: var(--mrka-bone); color: var(--mrka-ink); }
.scene--prism .play { padding-top: 0; }
.route { border-top: 1px solid var(--mrka-hairline); }
.route__row {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: var(--space-9);
  padding: var(--space-7) 0;
  border-bottom: 1px solid var(--mrka-hairline);
  transition: border-color var(--dur-hover) ease;
}
.route__row:hover { border-bottom-color: var(--mrka-coral); }
.route__case { display: grid; gap: var(--space-3); align-content: start; }
.route__when {
  font: 450 clamp(19px, 1.7vw, 23px)/1.35 var(--font-brand);
  letter-spacing: -0.015em;
  color: var(--mrka-ink);
  text-wrap: pretty;
}
.route__name {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 400 15px/1 var(--font-brand);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mrka-clay);
}
.route__chev { width: 14px; height: 14px; flex: none; }
.route__detail { display: grid; gap: var(--space-4); align-content: start; }
.route__why { font: 400 15px/1.7 var(--font-brand); color: var(--mrka-clay); max-width: 56ch; text-wrap: pretty; }

.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--space-1); }
.tags span {
  font: 400 11px/1 var(--font-brand);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mrka-clay);
  border: 1px solid var(--mrka-hairline);
  padding: var(--space-2) var(--space-3);
}

.route-close { padding-top: var(--space-9); }
.route__foot { display: flex; align-items: center; gap: var(--space-7); flex-wrap: wrap; }
.route__foot p { font: 430 18px/1.6 var(--font-brand); color: var(--mrka-ink); max-width: 48ch; text-wrap: pretty; }

/* --------------------------------------------------------------------------
   17. Scene 03 — the prism
   Four faces of one block, at right angles, turned on X by the scroll. Faces
   darken as they turn away: an ink tint laid over each face, which is the one
   transparency the brand has always allowed.
   -------------------------------------------------------------------------- */

.prism-ui { display: none; }
.scene--prism.is-live .prism-ui {
  display: flex;
  flex-direction: column;
  align-self: center;
  width: 100%;
}
.scene--prism.is-live .route { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.prism-wrap { position: relative; width: 100%; }
.prism { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 4.5%;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.face__text {
  display: block;
  font: 500 100px/1 var(--font-brand);
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.face__shade { position: absolute; inset: 0; background: var(--mrka-ink); opacity: 0; pointer-events: none; }
/* Light, dark, bright, dark. In a set of four exactly one is coral. */
.face--a { background: var(--mrka-bone); color: var(--mrka-ink); }
.face--b { background: var(--mrka-ink); color: var(--mrka-bone); border: 1px solid var(--mrka-ink-4); }
.face--c { background: var(--mrka-coral); color: var(--mrka-ink); }
.face--d { background: var(--mrka-ink-2); color: var(--mrka-coral); border: 1px solid var(--mrka-ink-4); }

.prism-read {
  display: grid;
  grid-template-columns: 88px minmax(170px, auto) minmax(0, 1fr);
  gap: var(--space-4) var(--space-6);
  align-items: baseline;
  margin-top: clamp(24px, 5vh, 48px);
  padding-top: 18px;
  border-top: 1px solid var(--mrka-ink-3);
}
.prism-read__idx { font: 500 12px/1 var(--font-technical); letter-spacing: 0.12em; color: var(--mrka-dust); font-variant-numeric: tabular-nums; }
.prism-read__idx b { font-weight: 500; color: var(--mrka-coral); }
.prism-read__name {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 500 13px/1 var(--font-brand);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mrka-bone);
  white-space: nowrap;
}
.prism-read__why {
  max-width: 60ch;
  font: 400 clamp(15px, 1.15vw, 17px)/1.6 var(--font-brand);
  color: var(--mrka-sandstone);
  text-wrap: pretty;
}
.prism-read.is-swap .prism-read__why,
.prism-read.is-swap .prism-read__name { animation: fade 260ms ease both; }

/* --------------------------------------------------------------------------
   18. 04 What good looks like
   -------------------------------------------------------------------------- */

.results__grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 72px;
  align-items: center;
}
.metric { display: flex; align-items: baseline; gap: var(--space-1); }
.metric__value {
  font: 500 clamp(64px, 11vw, 168px)/1 var(--font-technical);
  letter-spacing: -0.04em;
  color: var(--mrka-coral);
}
.metric__unit { font: 500 clamp(32px, 5vw, 72px)/1 var(--font-technical); color: var(--mrka-coral); }
.metric__label { display: grid; gap: var(--space-2); margin-top: var(--space-5); }
.metric__what { font: 500 20px/1.3 var(--font-brand); letter-spacing: -0.01em; color: var(--mrka-bone); }
.metric__who { font: 400 15px/1.6 var(--font-brand); color: var(--mrka-dust); }
.results__rule { background: var(--mrka-ink-3); height: 100%; min-height: 200px; }
.results__note { display: grid; gap: var(--space-6); }
.results__note p { font: 400 17px/1.6 var(--font-brand); color: var(--mrka-sandstone); text-wrap: pretty; }
.caveat { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.caveat__pill {
  font: 400 10px/1 var(--font-brand);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--mrka-ink-3);
  padding: var(--space-2) var(--space-3);
  color: var(--mrka-sandstone);
}
.caveat span:last-child { font: 400 13px/1.5 var(--font-brand); color: var(--mrka-dust); }

/* --------------------------------------------------------------------------
   19. 05 Who it's for
   -------------------------------------------------------------------------- */

.who__grid { display: grid; grid-template-columns: 1fr 340px; gap: 88px; align-items: end; }
.who__line { display: block; }
.who .roll { --roll-step: 1.2; min-width: 7ch; }
.who .roll__track span { color: var(--mrka-coral-deep); }
.who__aside { display: grid; gap: var(--space-5); padding-bottom: var(--space-3); }
.who__sectors { font: 400 11px/1.6 var(--font-brand); letter-spacing: 0.16em; text-transform: uppercase; color: var(--mrka-clay); }

/* --------------------------------------------------------------------------
   20. Scene 06 — the zoom
   -------------------------------------------------------------------------- */

.zoom__pre {
  margin-bottom: clamp(20px, 4vh, 44px);
  font: 400 clamp(26px, 4vw, 64px)/1.1 var(--font-brand);
  letter-spacing: -0.03em;
  color: var(--mrka-bone);
}
.zoom__wrap { position: relative; width: min(100%, 1180px); line-height: 0; }
.zoom__wrap svg { display: block; width: 100%; height: auto; overflow: hidden; }
.zoom__wrap path { fill: var(--mrka-coral); }
.scene--zoom.is-flooded { background: var(--mrka-coral); }
.zoom__flood { display: none; }
.is-live .zoom__flood {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 4;
  background: var(--mrka-coral);
  opacity: 0;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   21. The review — where the zoom lands
   -------------------------------------------------------------------------- */

.review .review__yours {
  margin: 0 0 clamp(40px, 7vh, 88px) -0.04em;
  font: 500 clamp(72px, 16vw, 250px)/0.84 var(--font-brand);
  letter-spacing: -0.055em;
  color: var(--mrka-ink);
}
.review__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 88px; align-items: start; }
.review .h-display { margin-bottom: var(--space-6); }
.review__lede {
  max-width: 40ch;
  margin-bottom: 36px;
  font: 400 16px/1.65 var(--font-brand);
  color: var(--mrka-ink);
  text-wrap: pretty;
}
.review__lede--tight { margin-top: calc(-1 * var(--space-4)); font-weight: 500; }
.review__cta { display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap; }
.review__cta span { font: 400 13px/1.5 var(--font-brand); color: var(--mrka-ink); }

.docket { background: var(--mrka-bone); border: 1px solid var(--mrka-ink); padding: var(--pad-card); }
.docket__head, .docket__foot { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); }
.docket__head { padding-bottom: 20px; border-bottom: 1px solid var(--mrka-hairline); }
.docket__foot { padding-top: 20px; }
.docket__label { font: 400 11px/1 var(--font-brand); letter-spacing: 0.18em; text-transform: uppercase; color: var(--mrka-clay); }
.docket__ref { font: 400 12px/1 var(--font-technical); color: var(--mrka-clay); }
.docket__row { display: grid; grid-template-columns: 34px 1fr; gap: var(--space-4); padding: 20px 0; border-bottom: 1px solid var(--mrka-hairline); }
.docket__no { font: 500 12px/1.4 var(--font-technical); color: var(--mrka-coral-deep); }
.docket__name { display: block; font: 500 15px/1.3 var(--font-brand); color: var(--mrka-ink); }
.docket__copy { font: 400 13px/1.55 var(--font-brand); color: var(--mrka-clay); text-wrap: pretty; }
.docket__foot span:first-child { font: 400 13px/1.5 var(--font-brand); color: var(--mrka-clay); }
.docket__foot span:last-child { font: 500 13px/1.5 var(--font-technical); color: var(--mrka-ink); }

/* The enquiry form. A bone card like the docket, so the design system's
   Field and Input states apply as drawn: a coral focus border would vanish
   straight onto the coral band. */
.enquiry, .enquiry__sent {
  max-width: 560px;
  background: var(--mrka-bone);
  border: 1px solid var(--mrka-ink);
  padding: var(--pad-card);
}
.enquiry { display: grid; gap: 20px; }
.enquiry[hidden], .enquiry__sent[hidden] { display: none; }
.enquiry__pair { display: grid; grid-template-columns: 3fr 2fr; gap: var(--space-4); }
.field { display: grid; gap: 7px; align-content: start; }
.field__label {
  font: 500 11px/1.2 var(--font-brand);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mrka-clay);
}
.field__control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--mrka-hairline);
  border-radius: var(--radius-control);
  background: var(--mrka-bone);
  color: var(--mrka-ink);
  font: 400 15px/1.4 var(--font-brand);
  transition: background-color var(--dur-hover) ease, border-color var(--dur-hover) ease;
}
textarea.field__control { resize: vertical; min-height: 96px; }
.field__control:focus { outline: none; border-color: var(--mrka-coral); background: var(--mrka-white); }
.field__control[aria-invalid="true"] { border-color: var(--mrka-coral); background: var(--mrka-coral-wash); }
.field__control:disabled { background: var(--mrka-sand); color: #7A7266; cursor: not-allowed; }
.field__error, .field__hint { font: 400 12px/1.4 var(--font-brand); }
.field__error { color: var(--mrka-coral-deep); }
.field__hint { color: var(--mrka-clay); }

.enquiry .review__cta span { color: var(--mrka-clay); }
.enquiry .btn:disabled { background: var(--mrka-sand); border-color: var(--mrka-sand); color: #7A7266; cursor: not-allowed; }
.enquiry__check:empty { display: none; }
.enquiry__status { font: 400 13px/1.5 var(--font-brand); color: var(--mrka-coral-deep); }
.enquiry__status:empty { display: none; }
.enquiry__status a { color: var(--mrka-ink); text-decoration: underline; text-underline-offset: 3px; }
.enquiry__status a:hover { text-decoration-color: var(--mrka-coral); }

/* Off screen rather than display:none, which some bots check for. */
.enquiry__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.enquiry__sent:focus { outline: none; }
.enquiry__sent-head { margin-bottom: var(--space-2); font: 500 20px/1.3 var(--font-brand); letter-spacing: -0.02em; color: var(--mrka-ink); }
.enquiry__sent-copy { font: 400 15px/1.6 var(--font-brand); color: var(--mrka-clay); }

/* --------------------------------------------------------------------------
   22. Footer
   -------------------------------------------------------------------------- */

.foot-site { background: var(--mrka-ink); padding: var(--space-10) var(--gutter-page) var(--space-7); }
.foot-site__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 88px; align-items: start; }
.foot-site__logo { height: 34px; width: auto; margin-bottom: 28px; }
.foot-site__blurb { max-width: 34ch; font: 400 14px/1.65 var(--font-brand); color: var(--mrka-dust); text-wrap: pretty; }
.foot-site__nav { display: grid; }
.foot-site__nav a {
  padding: var(--space-4) 0;
  border-top: 1px solid var(--mrka-ink-3);
  font: 500 17px/1.3 var(--font-brand);
  color: var(--mrka-bone);
  transition: color var(--dur-hover) ease;
}
.foot-site__nav a:last-child { border-bottom: 1px solid var(--mrka-ink-3); }
.foot-site__nav a:hover { color: var(--mrka-coral); }
.foot-site__base a { color: var(--mrka-bone); transition: color var(--dur-hover) ease; }
.foot-site__base a:hover { color: var(--mrka-coral); }
.foot-site__base {
  display: flex;
  justify-content: space-between;
  gap: var(--space-5);
  flex-wrap: wrap;
  margin-top: var(--space-9);
  padding-top: var(--space-5);
  border-top: 1px solid var(--mrka-ink-3);
  font: 400 12px/1.5 var(--font-brand);
  color: var(--mrka-dust);
}

/* --------------------------------------------------------------------------
   23. Breakpoints
   -------------------------------------------------------------------------- */

@media (max-width: 1200px) {
  :root { --gutter-page: 48px; --rhythm-section: 96px; --rail-x: 13px; }
  .other__grid, .experience__grid, .route__head, .review__grid, .foot-site__grid, .who__grid { gap: 56px; }
  .results__grid { gap: 48px; }
}

@media (max-width: 1000px) {
  :root { --gutter-page: 40px; --rhythm-section: 88px; --rail-x: 9px; }

  .nav { flex-wrap: wrap; gap: var(--space-4); }
  .nav__toggle {
    display: inline-block;
    margin-left: auto;
    padding: var(--space-2) var(--space-3);
    background: transparent;
    border: 1px solid var(--mrka-ink);
    border-radius: var(--radius-control);
    font: 500 10px/1 var(--font-technical);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--mrka-ink);
    cursor: pointer;
  }
  .nav__links { order: 3; flex-basis: 100%; display: none; flex-direction: column; gap: 0; margin-left: 0; }
  .nav__links.is-open { display: flex; }
  /* Ink at 45% on coral: the one transparency the brand allows. */
  .nav__links a { padding: var(--space-3) 0; border-top: 1px solid rgba(26, 26, 24, 0.45); border-bottom: 0; font-size: 15px; }
  .nav__cta { margin-left: 0; }

  /* No room and no meaning for the chart below the tablet breakpoint. */
  .hero { min-height: 0; }
  .hero__body { padding-bottom: var(--space-10); }
  .hero__main { padding-top: var(--space-9); }
  .chart { display: none; }
  .hero h1 { font-size: clamp(40px, 8.4vw, 76px); }

  .strip__grid { grid-template-columns: repeat(2, 1fr); }
  .strip__item { padding: 24px var(--space-5) 28px; }
  .strip__item:nth-child(odd) { padding-left: 0; }
  .strip__item:nth-child(even) { padding-right: 0; }
  .strip__item + .strip__item { border-left: none; }
  .strip__item:nth-child(even) { border-left: 1px solid var(--mrka-ink-3); }
  .strip__item:nth-child(n+3) { border-top: 1px solid var(--mrka-ink-3); }

  .other__grid, .experience__grid, .route__head, .review__grid, .who__grid, .foot-site__grid {
    grid-template-columns: 1fr;
    gap: var(--space-7);
  }
  .other__grid, .route__head, .who__grid { align-items: start; }
  .route__row { grid-template-columns: 1fr; gap: var(--space-4); }
  .results__grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .results__rule { display: none; }

  .prism-read { grid-template-columns: auto 1fr; }
  .prism-read__why { grid-column: 1 / -1; }
}

/* The rail becomes a strip of segments across the top edge: the familiar
   stories pattern on a phone. It is a progress read-out here, not navigation —
   a tap that close to the top of the screen is nearly always an accident. */
@media (max-width: 760px) {
  .js .rail {
    top: 0;
    left: 0;
    right: 0;
    transform: none;
    flex-direction: row;
    gap: 0;
    padding: 5px 5px 0;
    pointer-events: none;
  }
  .rail__count, .rail__motion { display: none; }
  .rail__list { flex: 1; flex-direction: row; gap: 3px; }
  .rail__list li { flex: 1; }
  .rail__seg { width: 100%; height: 3px; min-height: 0; }
  .rail__trk { width: 100%; height: 3px; }
  .rail__seg.is-on .rail__trk { width: 100%; }
  .rail__fil { transform-origin: 0 50%; transform: scaleX(0); }
  .rail__tip { display: none; }
}

@media (max-width: 700px) {
  :root { --gutter-page: 24px; --rhythm-section: 72px; --pad-card: 24px; }

  .nav { padding-top: 20px; padding-bottom: 20px; }
  .nav__logo { --logo-w: 132px; }
  .nav__cta { display: none; }

  .hero__slate { font-size: 10px; letter-spacing: 0.14em; }
  .hero__slate span:nth-child(3) { display: none; }
  .hero h1 { font-size: clamp(34px, 10vw, 52px); letter-spacing: -0.03em; }
  .hero__lede { max-width: none; }

  .strip__grid { grid-template-columns: 1fr; }
  .strip__item { padding: 22px 0 26px; }
  .strip__item + .strip__item { border-left: none; border-top: 1px solid var(--mrka-ink-3); }
  .strip__item:nth-child(even) { border-left: none; }

  .figures { grid-template-columns: 1fr; }
  .figures div { padding: var(--space-5) 0 0; }
  .figures div + div { border-left: 0; border-top: 1px solid var(--mrka-hairline); }

  .metric__value { font-size: clamp(56px, 20vw, 96px); }
  .metric__unit { font-size: clamp(28px, 10vw, 48px); }
  .who .roll { min-width: 0; }
  .docket__row { grid-template-columns: 26px 1fr; gap: var(--space-3); }
  .enquiry__pair { grid-template-columns: 1fr; gap: 20px; }

  .hero__cta .btn, .review__cta .btn, .route__foot .btn { display: block; width: 100%; }
  .hero__cta, .review__cta { width: 100%; }
  .route__row { padding: var(--space-6) 0; }
  .route__foot { gap: var(--space-5); }

  .is-live .hud { padding-top: 22px; }
  .hud__bar { display: none; }
  .prism-read { grid-template-columns: 1fr; gap: var(--space-3); }
  .prism-read__idx { display: none; }
}

/* --------------------------------------------------------------------------
   24. Reduced motion
   .motion is already off under prefers-reduced-motion unless the reader has
   switched it back on, so the scenes take care of themselves. This is for the
   few transitions that are not scenes.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .roll__track, .prism-read .prism-read__why { transition: none; animation: none; }
}
