/* ===========================================================================
   TradeVault trade-site template: the one stylesheet every generated site shares.

   WRITTEN IN A REFERENCE COLOUR. Every hsl() below is hue 158 at a saturation
   based on 84%, moved only in lightness. build.cjs (lib/colour.cjs) re-tints the
   whole sheet to each client's own brand colour and appends their --ink and
   accent, so a site only ever carries its owner's colour. To add a colour here,
   write it as hsl(158 S% L%) and it will follow the brand; a hex will not.

   A fix made in this file reaches every site on its next build. Do not edit the
   copy of it inside out/<client>/assets: that is overwritten.
   =========================================================================== */

:root {
  /* The dark ground. Replaced per site with the brand colour. */
  --ink:        #053827;
  --white:      #ffffff;

  /* The brand hue and saturation, moved in lightness only */
  --ink-900:    hsl(217 46% 6%);
  --ink-800:    hsl(217 46% 9%);
  --ink-700:    hsl(217 44% 15%);
  --ink-600:    hsl(217 41% 20%);
  --brand-500:  hsl(217 39% 28%);
  --accent:   hsl(217 30% 58%);
  --accent-200:   hsl(217 26% 80%);
  --accent-050:   hsl(217 23% 95%);

  /* Neutrals warmed towards the same hue so the page never goes clinical */
  --chalk:      #f7f5f0;
  --paper:      #ffffff;
  --char:       hsl(217 11% 11%);
  --muted:      hsl(217 4% 39%);
  --line:       hsl(217 8% 88%);

  --wrap: 1180px;
  --gut: 20px;
  --r-sm: 10px;
  --r: 18px;
  --r-lg: 28px;

  --shadow-sm: 0 2px 8px hsl(217 16% 10% / .07);
  --shadow:    0 14px 40px hsl(217 16% 10% / .12);
  --shadow-lg: 0 30px 80px hsl(217 22% 8% / .28);

  --ease: cubic-bezier(.2, .7, .2, 1);

  --font-display: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* --------------------------------------------------------------- reset --- */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* The nav is sticky, so an in-page jump lands with the heading underneath it. */
section[id] { scroll-margin-top: 88px; }

body {
  margin: 0;
  background: var(--chalk);
  color: var(--char);
  font: 400 17px/1.65 var(--font-body);
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
img { height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: min(100% - var(--gut) * 2, var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--white);
  padding: 12px 18px;
  border-radius: 0 0 var(--r-sm) 0;
}
.skip:focus { left: 0; }

/* ---------------------------------------------------------------- bits --- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  font: 600 13px/1 var(--font-body);
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--brand-500);
}
.head--light .eyebrow, .section--dark .eyebrow, .hero .eyebrow { color: var(--accent); }

.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.btn {
  --btn-bg: transparent;
  --btn-fg: currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 600 15px/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s var(--ease),
              border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }

.btn--solid { --btn-bg: var(--ink); --btn-fg: var(--white); box-shadow: var(--shadow-sm); }
.btn--solid:hover { --btn-bg: var(--ink-600); box-shadow: var(--shadow); }

.btn--ghost { border-color: currentColor; opacity: .92; }
.btn--ghost:hover { background: hsl(217 46% 12% / .07); opacity: 1; }

.btn--wa { --btn-bg: #1faa54; --btn-fg: #fff; box-shadow: var(--shadow-sm); }
.btn--wa:hover { --btn-bg: #178f45; box-shadow: var(--shadow); }

.btn--lg { padding: 16px 26px; font-size: 16px; }
.btn--lg svg { width: 20px; height: 20px; }

.section { position: relative; }
.section--pad { padding: clamp(64px, 9vw, 118px) 0; }

.section--dark {
  background: var(--ink);
  color: var(--white);
}
/* The mark is white line work with the black-green showing through it, exactly
   like the logo. Never put it on a light surface — it disappears. */
.section--dark::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(70ch 40ch at 15% 0%, hsl(217 39% 28% / .5), transparent 70%),
    radial-gradient(60ch 40ch at 100% 100%, hsl(217 33% 22% / .55), transparent 70%);
  pointer-events: none;
}
.section--dark > * { position: relative; }

.head { max-width: 62ch; margin: 0 0 clamp(36px, 5vw, 56px); }
.head h2 { font-size: clamp(32px, 5.2vw, 54px); }
.head__sub { margin: 18px 0 0; color: var(--muted); font-size: 18px; }
.head--light .head__sub { color: hsl(217 14% 85%); }

.note { margin: 34px 0 0; color: var(--muted); font-size: 15px; }
.note a { color: var(--brand-500); text-underline-offset: 3px; }
.note a:hover { color: var(--ink); }

/* ------------------------------------------------------------------ nav --- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: hsl(217 46% 7% / .82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  color: var(--white);
  border-bottom: 1px solid hsl(217 22% 60% / .16);
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.nav.is-stuck { background: hsl(217 46% 6% / .96); box-shadow: 0 10px 30px hsl(217 27% 4% / .35); }

.nav__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 70px;
  padding: 10px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-right: auto;
}
.brand__mark { width: 42px; height: 42px; flex: none; }
.brand__word {
  font: 800 17px/1.05 var(--font-display);
  letter-spacing: -.015em;
  max-width: 9ch;
}
.brand__word em { font-style: normal; color: var(--accent); }

.nav__links { display: flex; gap: 6px; }
.nav__links a {
  padding: 9px 14px;
  border-radius: 999px;
  font: 500 15px/1 var(--font-body);
  text-decoration: none;
  color: hsl(217 12% 88%);
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.nav__links a:hover { background: hsl(217 27% 70% / .14); color: var(--white); }

.nav__cta { display: flex; align-items: center; gap: 10px; }
.nav__cta .btn--solid { --btn-bg: var(--white); --btn-fg: var(--ink-900); }
.nav__cta .btn--solid:hover { --btn-bg: var(--accent-200); }
.nav__tel { font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------------- hero --- */

.hero {
  position: relative;
  background: var(--ink);
  color: var(--white);
  padding: clamp(56px, 8vw, 104px) 0 clamp(72px, 9vw, 120px);
  overflow: hidden;
}

/* Two slow-drifting washes of the brand colour. It reads as depth rather than as
   an effect, and it is the only thing on the page that moves on its own. */
.hero__wash {
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(38ch 30ch at 20% 25%, hsl(217 38% 30% / .75), transparent 62%),
    radial-gradient(44ch 34ch at 82% 72%, hsl(217 34% 24% / .8), transparent 65%),
    radial-gradient(30ch 26ch at 62% 8%, hsl(217 25% 40% / .35), transparent 68%);
  animation: drift 26s var(--ease) infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.08); }
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}

.hero__title {
  /* Each .line below is a deliberate break, so the size is capped at what makes
     the longest of them ("Painting, decorating") fit the copy column without
     wrapping again. Anything larger re-wraps and the three-line rhythm — and
     the mint stroke sized to the last line — falls apart. */
  font-size: clamp(30px, 3.9vw, 48px);
  letter-spacing: -.03em;
  margin: 0 0 26px;
}
.hero__title .line {
  display: block;
  overflow: hidden;
  /* The mint stroke behind "finished properly" overhangs its line box, and this
     is the element that clips for the rise-in. Pad the clip out and pull the
     padding back off with an equal negative margin, so the overhang survives
     without moving anything. */
  padding: .14em .32em;
  margin: -.14em -.32em;
}
.hero__title .line > span {
  display: block;
  animation: rise .9s var(--ease) calc(var(--i, 0) * .1s) both;
}

@keyframes rise { from { transform: translateY(130%); } to { transform: none; } }

/* The one highlighted phrase: a brush stroke of mint that wipes in behind it. */
/* isolation, or the z-index:-1 below climbs past .hero__inner and .hero (neither
   of which makes a stacking context) to the root, and paints behind the hero's
   own dark green — i.e. vanishes. */
/* The child combinator is doing real work here: `.hero__title .line > span`
   above also matches this element and sets display:block, and it outweighs a
   two-class selector — which is why the stroke ran the full width of the copy
   column rather than stopping at the words. Matching through `>` wins on
   specificity; vertical-align keeps the shrink-wrapped box on the same line
   as the block one it replaces. */
.hero__title .line > .hl {
  position: relative;
  isolation: isolate;
  display: inline-block;
  vertical-align: top;
  color: var(--ink-900);
}
.hero__title .hl::before {
  content: "";
  position: absolute;
  inset: -.04em -.22em -.06em -.18em;
  background: var(--accent);
  border-radius: 6px 14px 8px 12px;
  transform: scaleX(0);
  transform-origin: left center;
  animation: wipe 1s var(--ease) .5s both;
  z-index: -1;
}
@keyframes wipe { to { transform: scaleX(1); } }


.hero__lede {
  max-width: 52ch;
  margin: 0 0 30px;
  color: hsl(217 12% 87%);
  font-size: clamp(17px, 1.6vw, 19px);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.hero__actions .btn--solid { --btn-bg: var(--white); --btn-fg: var(--ink-900); }
.hero__actions .btn--solid:hover { --btn-bg: var(--accent-200); }

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14.5px;
  color: hsl(217 11% 82%);
}
.hero__trust li { display: flex; align-items: center; gap: 8px; }
.hero__trust li::before {
  content: "";
  width: 16px; height: 16px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px no-repeat;
}

.hero__art { position: relative; }
.shot { margin: 0; border-radius: var(--r-lg); overflow: hidden; background: var(--ink-800); }
.shot img { width: 100%; }

.shot--main {
  box-shadow: var(--shadow-lg);
  transform: rotate(-1.6deg);
  animation: float 9s ease-in-out infinite alternate;
}
.shot--inset {
  position: absolute;
  right: -4%;
  bottom: -9%;
  width: 43%;
  border: 6px solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  transform: rotate(3deg);
  animation: float 11s ease-in-out infinite alternate-reverse;
}
@keyframes float { from { translate: 0 -6px; } to { translate: 0 6px; } }

.chip {
  position: absolute;
  left: -6%;
  top: 8%;
  display: grid;
  gap: 2px;
  padding: 12px 18px;
  border-radius: var(--r);
  background: var(--white);
  color: var(--ink-900);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .25s var(--ease);
}
.chip:hover { transform: translateY(-3px) rotate(-1deg); }
.chip strong { font: 800 16px/1.2 var(--font-display); }
.chip span { font-size: 12.5px; color: var(--muted); }

/* --------------------------------------------------------------- ticker --- */

.ticker {
  background: var(--ink-900);
  color: var(--accent-200);
  border-block: 1px solid hsl(217 22% 60% / .14);
  padding: 15px 0;
  overflow: hidden;
}
.ticker__track { display: flex; width: max-content; }
.ticker__run {
  display: flex;
  align-items: center;
  gap: 26px;
  padding-right: 26px;
  white-space: nowrap;
  font: 600 14px/1 var(--font-display);
  letter-spacing: .1em;
  text-transform: uppercase;
  animation: marquee 42s linear infinite;
}
.ticker__run i { color: var(--brand-500); font-style: normal; }
.ticker:hover .ticker__run { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }
/* Until main.js clones the run there is nothing to scroll into, so the single
   row just sits there and reads normally. */
.ticker:not(.is-looping) .ticker__run { animation: none; }

/* -------------------------------------------------------- before / after --- */

.ba {
  --pos: 55%;
  max-width: 480px;
  margin: 0 auto clamp(48px, 6vw, 72px);
}

.ba__frame {
  position: relative;
  aspect-ratio: 443 / 590;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--ink-800);
  box-shadow: var(--shadow);
  touch-action: pan-y;
}
.ba:focus-within .ba__frame { outline: 3px solid var(--accent); outline-offset: 4px; }

.ba__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* clip-path, not width, so the before photo stays the full size of the frame
   and only its visible slice changes. Sizing the layer instead squashes it. */
.ba__clip {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.ba__tag {
  position: absolute;
  top: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: hsl(217 46% 6% / .78);
  color: var(--white);
  font: 700 11px/1 var(--font-display);
  letter-spacing: .12em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}
.ba__tag--before { left: 14px; }
.ba__tag--after { right: 14px; }

.ba__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 3px;
  margin-left: -1.5px;
  background: var(--white);
  box-shadow: 0 0 0 1px hsl(217 46% 6% / .25);
  pointer-events: none;
}
.ba__grip {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow);
}
.ba__grip::before, .ba__grip::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0; height: 0;
  border-block: 6px solid transparent;
  translate: 0 -50%;
}
.ba__grip::before { left: 11px; border-right: 8px solid var(--ink); }
.ba__grip::after { right: 11px; border-left: 8px solid var(--ink); }

/* The range is the drag surface: invisible, laid over the frame, and it brings
   touch, mouse and arrow keys with it for nothing. */
.ba__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
.ba__range::-webkit-slider-thumb { -webkit-appearance: none; width: 64px; height: 100%; }
.ba__range::-moz-range-thumb { width: 64px; height: 100%; border: 0; }

.ba__label {
  display: block;
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

/* --------------------------------------------------------------- cards --- */

.grid { display: grid; gap: 22px; }
.grid--work { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--svc { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

.card--shot { margin: 0; overflow: hidden; }
.card--shot img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: scale .5s var(--ease);
}
.card--shot:hover img { scale: 1.04; }
.card--shot figcaption {
  padding: 18px 20px 22px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.55;
}

.tag {
  display: inline-block;
  margin-right: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-050);
  color: var(--brand-500);
  font: 700 10.5px/1.4 var(--font-display);
  letter-spacing: .1em;
  text-transform: uppercase;
  vertical-align: 1px;
}
.tag--done { background: var(--ink); color: var(--white); }

.card--svc {
  padding: 30px 28px 32px;
  background: hsl(217 33% 12% / .55);
  border: 1px solid hsl(217 25% 55% / .18);
  box-shadow: none;
}
.card--svc:hover { background: hsl(217 32% 15% / .7); border-color: hsl(217 27% 60% / .32); box-shadow: none; }
.card--svc h3 { font-size: 21px; margin: 0 0 10px; }
.card--svc h3 a { color: inherit; text-decoration: none; }
.card--svc h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.card--svc p { color: hsl(217 11% 84%); font-size: 15.5px; margin: 0; }

.card__icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: hsl(217 30% 58% / .16);
}
.card__icon svg {
  width: 26px; height: 26px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --------------------------------------------------------------- steps --- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.step {
  position: relative;
  padding: 30px 26px 32px;
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.step__n {
  display: block;
  margin-bottom: 14px;
  font: 800 13px/1 var(--font-display);
  letter-spacing: .14em;
  color: var(--accent);
}
.step h3 { font-size: 20px; margin: 0 0 8px; }
.step p { color: var(--muted); font-size: 15.5px; margin: 0; }

/* --------------------------------------------------------------- about --- */

.about {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.about__art { display: grid; place-items: center; }
.about__mark {
  width: min(100%, 300px);
  height: auto;
  filter: drop-shadow(0 20px 50px hsl(217 33% 4% / .5));
}
.about__copy h2 { font-size: clamp(30px, 4.4vw, 46px); margin-bottom: 20px; }
.about__copy p { color: hsl(217 11% 85%); }
.about__links { display: flex; gap: 10px; margin-top: 26px; }

/* --------------------------------------------------------------- quote --- */

.quote {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.quote h2 { font-size: clamp(30px, 4.4vw, 48px); margin-bottom: 18px; }
.quote__lede { color: var(--muted); }
.quote__lede a { color: var(--brand-500); font-weight: 600; }

.quote__details {
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
  border-top: 1px solid var(--line);
}
.quote__details li {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
  overflow-wrap: anywhere;
}
.quote__details span {
  font: 600 12px/1.6 var(--font-body);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.quote__details em { font-style: normal; }
.quote__details a { color: var(--ink); font-weight: 500; text-underline-offset: 3px; }
.quote__details a:hover { color: var(--brand-500); }

.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: clamp(24px, 3vw, 34px);
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.field { display: grid; gap: 7px; }
.field--wide { grid-column: 1 / -1; }
.field label {
  font: 600 13px/1 var(--font-body);
  letter-spacing: .04em;
  color: var(--muted);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--chalk);
  color: var(--char);
  font: 400 16px/1.4 var(--font-body);
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand-500);
  background: var(--paper);
}
.field input.is-bad, .field select.is-bad { border-color: #c0392b; }

.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.form__status { margin: 0; font-size: 14px; color: var(--muted); }
.form__status a { color: var(--brand-500); font-weight: 600; }

/* ---------------------------------------------------------------- foot --- */

.foot {
  background: var(--ink-900);
  color: hsl(217 10% 82%);
  padding: clamp(48px, 6vw, 72px) 0 0;
}
.foot__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .6fr) minmax(0, .9fr) minmax(0, 1.2fr);
  gap: 40px;
  padding-bottom: 44px;
}
.foot__brand img { width: 74px; height: 74px; margin-bottom: 16px; }
.foot__word { font: 800 19px/1.2 var(--font-display); color: var(--white); margin: 0 0 6px; }
.foot__strap { font-size: 14px; margin: 0; }

.foot__nav { display: grid; gap: 10px; align-content: start; }
.foot__nav a, .foot__contact a { text-decoration: none; transition: color .2s var(--ease); }
.foot__nav a:hover, .foot__contact a:hover { color: var(--accent); }
.foot__contact { display: grid; gap: 10px; align-content: start; font-size: 15px; overflow-wrap: anywhere; }

.foot__legal {
  padding: 20px 0 28px;
  border-top: 1px solid hsl(217 22% 60% / .14);
  font-size: 13.5px;
}
.foot__legal p { margin: 0; }

/* --------------------------------------------------------- mobile call --- */

.callbar {
  display: none;
  position: fixed;
  left: 12px; right: 12px; bottom: 12px;
  z-index: 90;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font: 700 16px/1 var(--font-display);
  text-decoration: none;
  box-shadow: 0 14px 34px hsl(217 33% 4% / .45);
}
.callbar svg { width: 19px; height: 19px; fill: currentColor; }

/* ------------------------------------------------------------ diagrams --- */

/* A third surface tone, so the explainer does not read as another chalk slab
   sitting against the "How it works" chalk below it. */
.section--tint { background: var(--accent-050); }

.dia { margin: 0; }


.dia__cap {
  max-width: 64ch;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 15px;
}


/* ---- the prep strip: one patch of wall, five times ----
   Pictures rather than a section drawing, because "filled, sanded, primed" is
   something people recognise on a wall and not in a cross-section. The frames
   share one layout of damage, so the eye tracks the same hole across the row. */
.steps + .dia { margin-top: clamp(28px, 4vw, 48px); }
.prep__title {
  margin: 0 0 18px;
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: -.01em;
}
.prep {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: clamp(14px, 2vw, 22px);
  list-style: none;
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.prep__stage { position: relative; min-width: 0; }
.prep__stage img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--r);
  background: var(--chalk);
}
/* The arrow sits in the gap, on the join between two frames. */
.prep__stage + .prep__stage::before {
  content: '';
  position: absolute;
  z-index: 1;
  left: -7px;
  top: calc((100% - 96px) / 2);
  width: 26px; height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111c2e' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / 14px no-repeat;
  box-shadow: var(--shadow-sm);
}
.prep__n {
  display: block;
  margin: 14px 4px 6px;
  font: 800 12px/1 var(--font-display);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-500);
}
.prep__stage h3 { font-size: 17px; margin: 0 4px 4px; }
.prep__stage p { margin: 0 4px 6px; color: var(--muted); font-size: 14px; line-height: 1.45; }
/* The wrapping strip: one door, three times. Portrait, because a door is. */
.prep--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 3vw, 34px); padding-inline: max(clamp(14px, 2vw, 22px), calc((100% - 880px) / 2)); }
.prep--3 .prep__stage img { aspect-ratio: 3 / 4; }
.prep--3 .prep__stage + .prep__stage::before { left: calc(clamp(14px, 3vw, 34px) / -2); }
.prep--3 .prep__stage h3 { font-size: 19px; }
.prep--3 .prep__stage p { font-size: 15px; }
.prep__payoff {
  margin: 16px 0 0;
  padding: 18px 22px;
  border: 1.5px solid var(--accent-200);
  border-radius: var(--r);
  background: var(--accent-050);
  color: var(--ink);
  font-weight: 600;
  text-align: center;
}
.dia__note { display: block; margin-top: 6px; font-size: 13px; opacity: .8; }

.is-in .prep__stage {
  animation: diaStep .55s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 130ms);
}


@keyframes diaStep { from { opacity: 0; transform: translateY(8px); } }

/* -------------------------------------------------------------- reveal --- */

/* The hidden state is behind a class only main.js adds, so a page whose script
   never loads is simply visible. Hiding in CSS and revealing in JS fails to a
   blank page, which is the worst outcome for a page whose job is a phone number. */
.js-reveal { opacity: 0; transform: translateY(20px); }
.js-reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

/* ------------------------------------------------------- service pages --- */

/* A shorter hero than the homepage's: these pages are arrived at with an intent
   already formed, so they get to the point rather than re-introducing the business. */
.svc-hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
  padding: clamp(40px, 6vw, 72px) 0 clamp(48px, 7vw, 84px);
}
.svc-hero__inner { position: relative; }
.svc-hero h1 {
  font-size: clamp(30px, 4.6vw, 52px);
  letter-spacing: -.03em;
  margin: 0 0 18px;
}
/* The keyword line sits inside the h1 so the heading says what the page is
   about, not only the slogan. It keeps the eyebrow look and its own line. */
.svc-hero h1 .eyebrow { display: flex; text-wrap: wrap; line-height: 1.5; color: var(--accent); }
.svc-hero__lede {
  max-width: 58ch;
  margin: 0 0 30px;
  color: hsl(217 12% 87%);
  font-size: clamp(16px, 1.6vw, 19px);
}
.svc-hero .hero__actions { margin-bottom: 0; }
.svc-hero .btn--solid { --btn-bg: var(--white); --btn-fg: var(--ink-900); }
.svc-hero .btn--solid:hover { --btn-bg: var(--accent-200); }

.crumb {
  margin-bottom: 20px;
  font-size: 14px;
  color: hsl(217 11% 78%);
}
.crumb a { color: var(--accent); text-decoration: none; }
.crumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
.crumb span { margin: 0 6px; opacity: .6; }

.svc-split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.svc-copy p { color: var(--muted); }

.checks {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: clamp(22px, 3vw, 30px);
  list-style: none;
  border-radius: var(--r-lg);
  background: var(--accent-050);
  font-size: 15.5px;
}
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks li::before {
  content: "";
  width: 18px; height: 18px;
  margin-top: 3px;
  flex: none;
  border-radius: 50%;
  background: var(--brand-500);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}

/* <details> rather than a JS accordion: it opens with the script dead, it is
   keyboard operable for free, and the browser's own find-in-page can reach
   closed answers. */
.faq { display: grid; gap: 12px; max-width: 74ch; }
.faq details {
  border-radius: var(--r);
  background: hsl(217 33% 12% / .55);
  border: 1px solid hsl(217 25% 55% / .18);
  overflow: hidden;
}
.faq summary {
  padding: 18px 22px;
  cursor: pointer;
  font: 700 17px/1.4 var(--font-display);
  color: var(--white);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  font: 400 24px/1 var(--font-body);
  color: var(--accent);
  transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { background: hsl(217 32% 16% / .5); }
.faq p {
  margin: 0;
  padding: 0 22px 20px;
  color: hsl(217 11% 84%);
  font-size: 15.5px;
}

.svc-more { display: flex; flex-wrap: wrap; gap: 10px; margin: 34px 0 0; }

.xlinks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.xlink {
  display: block;
  padding: 22px 20px;
  border-radius: var(--r);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.xlink:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.xlink strong { display: block; margin-bottom: 5px; font: 700 17px/1.2 var(--font-display); }
.xlink span { font-size: 14.5px; color: var(--muted); }

/* -------------------------------------------------------------- gallery --- */

/* Columns, not a grid: the photos keep their own shape instead of being
   cropped to one, which is the whole point of having a gallery page. */
.gal { columns: 3; column-gap: 22px; }
.gal__item { margin: 0 0 22px; break-inside: avoid; overflow: hidden; }
.gal__item[hidden] { display: none; }
.gal__link { position: relative; display: block; cursor: zoom-in; }
.gal__link img { display: block; width: 100%; height: auto; background: var(--chalk); }
.gal__tag { position: absolute; left: 12px; top: 12px; margin: 0; box-shadow: var(--shadow-sm); }
.gal__item figcaption { padding: 14px 18px 18px; color: var(--muted); font-size: 15px; }

.gal__filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; }
.gal__chip {
  padding: 10px 18px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: 600 14.5px/1 var(--font-body);
  cursor: pointer;
}
.gal__chip:hover { border-color: var(--accent); }
.gal__chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--white); }

.more { margin: 26px 0 0; }

.lb {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: hsl(217 33% 4% / .94);
  color: var(--white);
}
.lb[open] { display: grid; place-items: center; }
.lb::backdrop { background: hsl(217 33% 4% / .6); }
.lb__fig { margin: 0; padding: 56px 16px 20px; max-width: 100%; text-align: center; }
.lb__fig img {
  display: block;
  max-width: min(100%, 1100px);
  max-height: calc(100dvh - 170px);
  width: auto; height: auto;
  margin: 0 auto;
  border-radius: var(--r-sm);
}
.lb__fig figcaption { max-width: 60ch; margin: 14px auto 0; font-size: 15px; color: hsl(217 11% 88%); }
.lb__btn {
  position: absolute;
  width: 48px; height: 48px;
  border: 0; border-radius: 50%;
  background: hsl(0 0% 100% / .14);
  color: var(--white);
  font: 400 30px/1 var(--font-body);
  cursor: pointer;
}
.lb__btn:hover { background: hsl(0 0% 100% / .26); }
.lb__close { top: 12px; right: 12px; }
.lb__prev { left: 12px; top: 50%; margin-top: -24px; }
.lb__next { right: 12px; top: 50%; margin-top: -24px; }

@media (max-width: 1040px) { .gal { columns: 2; } }
@media (max-width: 720px) {
  .gal { column-gap: 12px; }
  .gal__item { margin-bottom: 12px; border-radius: var(--r); }
  /* Two narrow columns have no room for a sentence; it is in the viewer. */
  .gal__item figcaption { display: none; }
  .gal__tag { left: 8px; top: 8px; }
  .lb__prev, .lb__next { top: auto; bottom: 14px; margin: 0; }
  .lb__fig { padding-bottom: 76px; }
}

/* ------------------------------------------------------------ responsive --- */

@media (max-width: 1040px) {
  .grid--work, .grid--svc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .xlinks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav__links { display: none; }
  .prep { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 20px; }
  .prep__stage:nth-child(4)::before { display: none; }
}

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .svc-split { grid-template-columns: minmax(0, 1fr); }
  .hero__art { max-width: 460px; margin: 20px auto 0; }
  .about, .quote { grid-template-columns: minmax(0, 1fr); }
  .about__art { order: 2; }
  .about__mark { width: min(60%, 220px); }
  .foot__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .brand__word { max-width: none; font-size: 15px; }
  .nav__tel { display: none; }
  .grid--work, .grid--svc, .steps, .xlinks { grid-template-columns: minmax(0, 1fr); }
  .form { grid-template-columns: minmax(0, 1fr); }
  /* The doors go down the page as rows: picture left, words right. */
  .prep.prep--3 { grid-template-columns: minmax(0, 1fr); }
  .prep--3 .prep__stage { display: grid; grid-template-columns: 104px minmax(0, 1fr); column-gap: 14px; align-content: center; }
  .prep--3 .prep__stage img { grid-row: 1 / span 4; }
  .prep--3 .prep__stage:last-child { grid-column: auto; }
  .prep--3 .prep__stage:last-child img { aspect-ratio: 3 / 4; }
  .prep--3 .prep__n { margin-top: 10px; align-self: end; }

  /* Two up, and the finished wall gets the full width to itself. */
  .prep { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; row-gap: 18px; }
  .prep__stage::before { display: none !important; }
  .prep__stage:last-child { grid-column: 1 / -1; }
  .prep__stage:last-child img { aspect-ratio: 2 / 1; }
  .hero { padding-bottom: 92px; }
  .chip { left: 0; top: -14px; padding: 10px 14px; }
  .shot--inset { width: 40%; right: -2%; }
  .callbar { display: flex; }
  .foot { padding-bottom: 76px; }
  .foot__inner { grid-template-columns: minmax(0, 1fr); gap: 30px; }
}

@media (max-width: 420px) {
  .hero__actions .btn { width: 100%; }
}

/* ------------------------------------------------------- reduced motion --- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .hero__title .hl::before { transform: scaleX(1); }
  .js-reveal { opacity: 1; transform: none; }
}

/* ------------------------------------------------------ per-site variants --- */

/* A logo drawn for a light background (dark artwork) cannot sit straight on the
   dark ground, so it gets a white tile. Set "logoOnDark": false in site.json. */
.logo--tile { background: var(--white); border-radius: var(--r-sm); padding: 4px; object-fit: contain; }
.brand__mark, .foot__brand img { object-fit: contain; }

/* No logo at all: the About copy takes the full width. */
.about--solo { grid-template-columns: minmax(0, 1fr); max-width: 78ch; }

/* --------------------------------------------------------- video slides --- */

/* Short vertical build-up reels. Every one is 9:16, so the frame holds that
   shape before the poster has loaded and nothing jumps. */
.reel { margin: 0; min-width: 0; }
.reel__frame {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--ink-900);
  box-shadow: var(--shadow);
}
.reel__video { display: block; width: 100%; height: 100%; object-fit: cover; }
.reel.is-live .reel__video { cursor: pointer; }
.reel figcaption { padding: 14px 4px 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.reel figcaption strong { display: block; color: var(--char); font: 700 17px/1.3 var(--font-display); }

.reel__sound {
  position: absolute;
  right: 12px; bottom: 12px;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 0; border-radius: 50%;
  background: hsl(217 46% 6% / .72);
  color: var(--white);
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.reel__sound[hidden] { display: none; }
.reel__sound svg { width: 22px; height: 22px; fill: currentColor; }
.reel__sound .reel__waves { opacity: .3; }
.reel__sound[aria-pressed="true"] { background: var(--accent); color: var(--ink-900); }
.reel__sound[aria-pressed="true"] .reel__waves { opacity: 1; }

/* The row of slides: three across on a desktop, and on a phone a strip you
   swipe sideways, each slide snapping into place with the next one peeking in. */
.reels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 30px); }

/* In the hero, in place of a photograph. */
.hero__art--reel { display: grid; justify-items: center; }
.reel--hero { width: min(100%, 340px); transform: rotate(-1.4deg); }
.reel--hero .reel__frame { box-shadow: var(--shadow-lg); border: 6px solid hsl(217 33% 12%); }
.reel--hero figcaption { color: hsl(217 11% 82%); text-align: center; }
.reel--hero figcaption strong { color: var(--white); }
.hero__art--reel .chip { left: 0; }

/* On a service page: the slide on one side, what it shows on the other. */
.svc-reel {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.svc-reel__copy h2 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 22px; }
.reel-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; counter-reset: reel; }
.reel-steps li {
  counter-increment: reel;
  position: relative;
  padding: 16px 18px 16px 60px;
  border-radius: var(--r);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  color: var(--muted);
  font-size: 15.5px;
}
.reel-steps li::before {
  content: counter(reel, decimal-leading-zero);
  position: absolute; left: 18px; top: 17px;
  font: 800 13px/1.6 var(--font-display);
  letter-spacing: .1em;
  color: var(--brand-500);
}
.reel-steps strong { display: block; color: var(--char); font: 700 16.5px/1.35 var(--font-display); }

@media (max-width: 900px) {
  .svc-reel { grid-template-columns: minmax(0, 1fr); }
  .svc-reel .reel { width: min(100%, 340px); margin-inline: auto; }
  .reel--hero { width: min(78%, 300px); }
}
@media (max-width: 720px) {
  .reels {
    display: flex;
    gap: 14px;
    margin-inline: calc(var(--gut) * -1);
    padding: 4px var(--gut) 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gut);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .reels::-webkit-scrollbar { display: none; }
  .reels .reel { flex: 0 0 74%; scroll-snap-align: start; }
}

/* A strip of four: one row on a desktop, two by two below that, and the last
   picture keeps its own cell (the five-strip gives its last one the full row). */
.prep--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1040px) {
  .prep.prep--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prep--4 .prep__stage:nth-child(3)::before { display: none; }
}
@media (max-width: 720px) {
  .prep--4 .prep__stage:last-child { grid-column: auto; }
  .prep--4 .prep__stage:last-child img { aspect-ratio: 1; }
}

/* A long business name gets two wider lines in the header instead of four narrow ones. */
.brand__word--long { max-width: 19ch; font-size: 15.5px; }
@media (max-width: 720px) { .brand__word--long { font-size: 13.5px; max-width: 17ch; } }

/* ------------------------------------------------ sites with no pictures --- */

/* No photo and no reel: the hero copy takes the width, not half of it. */
.hero__art--none { display: none; }
.hero__inner--solo { grid-template-columns: minmax(0, 1fr); }
.hero__inner--solo .hero__copy { max-width: 760px; }
.hero__inner--solo .hero__title { font-size: clamp(34px, 5vw, 60px); }

/* "Why us": the step cards without the numbers. */
.steps--plain .step { padding-top: 28px; border-top: 4px solid var(--accent); }

/* Article-style service pages: long, plain, readable. */
.prose { max-width: 72ch; }
.prose h2 { font-size: clamp(24px, 3vw, 32px); margin: 44px 0 16px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--muted); }
.prose .checks--plain { margin: 0 0 1.2em; }
.callout {
  margin: 28px 0;
  padding: 20px 24px;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--r) var(--r) 0;
  background: var(--accent-050);
  color: var(--char) !important;
}
.closing { margin: 0 0 8px; }
.closing h2 { font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 12px; }
.closing p { max-width: 62ch; color: var(--muted); }

/* The bot trap in the enquiry form. Off-screen, not display:none: some bots skip
   fields that are hidden outright. */
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------- paint spill --- */

/* hero.spill: the highlight is poured, not wiped. A tin stands at the end of
   the highlighted line, wobbles, falls on its side towards the words, and the
   paint runs out of its mouth behind them.

   Geometry, because it decides everything else: the tin tips about its own
   bottom-left corner, so lying down it occupies the space to the LEFT of where
   it stood. It therefore stands one tin-height (1.6em, plus a hair so the full stop stays visible) to the right of the
   words, and lands with its mouth exactly at their end. The line's clip box is
   opened on the right and the top for that, and pulled back with an equal
   negative margin so nothing else moves. */
.hero__title--spill .line:last-child {
  padding-right: 3.1em; margin-right: -3.1em;
  padding-top: 1.2em; margin-top: -1.2em;
}
.hero__title .line > .hl--spill { color: var(--white); }
.spill__ink {
  position: absolute;
  inset: 0;
  z-index: 1;
  color: var(--ink-900);
  white-space: nowrap;
  clip-path: circle(0% at 100% 62%);
  animation: spillSpread 1.5s cubic-bezier(.25, .8, .3, 1) 2.45s both;
}
.hero__title .hl--spill::before { content: none; }

.spill { position: absolute; inset: 0; z-index: -1; pointer-events: none; }

/* The puddle: drawn in the accent, with a lighter wet top and a sheen. It is
   revealed by a circle growing from the tin's mouth, which is how a spill
   spreads, rather than a straight wipe. */
.spill__pool {
  position: absolute;
  top: -.06em; bottom: -.12em; left: -.2em; right: -.42em;
  width: calc(100% + .62em); height: calc(100% + .18em);
  max-width: none; /* the reset caps every svg at 100%, which stopped the puddle short of the tin */
  overflow: visible;
  clip-path: circle(0% at 100% 62%);
  animation: spillSpread 1.5s cubic-bezier(.25, .8, .3, 1) 2.45s both;
}
.spill-hi  { stop-color: color-mix(in srgb, var(--accent) 70%, #fff); }
.spill-mid { stop-color: var(--accent); }
.spill-lo  { stop-color: color-mix(in srgb, var(--accent) 82%, #000); }
.spill__sheen { fill: #fff; opacity: .28; }
@keyframes spillSpread {
  60% { clip-path: circle(95% at 100% 62%); }
  to  { clip-path: circle(150% at 100% 62%); }
}

/* The tin: a photograph. It stands 1.2em past the words; the pivot is its
   bottom-left corner. */
.spill__tin {
  position: absolute;
  bottom: .02em;
  left: calc(100% + 1.7em);
  width: auto;
  height: 1.6em;
  max-width: none;
  transform-origin: 0% 100%;
  filter: drop-shadow(0 .06em .05em hsl(217 33% 4% / .55));
  animation:
    tinIn .45s cubic-bezier(.2, .8, .3, 1.2) 1s both,
    tinWobble .5s ease-in-out 1.45s both,
    tinFall .6s cubic-bezier(.55, 0, .7, 1) 1.95s both;
}
@keyframes tinIn { from { opacity: 0; translate: 0 -.5em; } }
@keyframes tinWobble {
  25% { rotate: -6deg; }
  55% { rotate: 3deg; }
  80% { rotate: -2deg; }
}
@keyframes tinFall {
  0%   { rotate: 0deg; }
  80%  { rotate: -94deg; }
  90%  { rotate: -87deg; }
  to   { rotate: -90deg; }
}

/* Reduced motion: the finished picture, still. */
@media (prefers-reduced-motion: reduce) {
  .spill__pool, .spill__ink { animation: none; clip-path: none; }
  .spill__tin { animation: none; rotate: -90deg; }
}

/* ---------------------------------------------------------- x-ray lens --- */
/* Two matching pictures stacked; a magnifying glass shows the one underneath.
   Without the script (no .is-live) they sit side by side, which is the whole
   story told plainly. main.js sets --x, --y (lens centre), --r (lens radius),
   --rm (the mask radius, before the zoom) and --s (the zoom). */

.xr { margin: 0; }
.xr__stage {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: var(--ink-900); outline: none;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .08);
}
.xr__stage:focus-visible { box-shadow: 0 0 0 3px var(--accent), 0 40px 90px -40px rgba(0, 0, 0, .7); }
.xr__layer { position: relative; overflow: hidden; }
.xr__img, .xr__video { display: block; width: 100%; height: 100%; object-fit: cover; }
.xr__video { position: absolute; inset: 0; opacity: 0; transition: opacity .6s; }
.xr__video.is-playing { opacity: 1; }

/* Side by side until the script takes over */
.xr:not(.is-live) .xr__stage {
  aspect-ratio: auto !important; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: transparent;
}
.xr:not(.is-live) .xr__lens, .xr:not(.is-live) .xr__hint { display: none; }

.xr.is-live .xr__stage { cursor: none; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.xr.is-live .xr__layer { position: absolute; inset: 0; }
.xr.is-live .xr__under {
  -webkit-mask-image: radial-gradient(circle at var(--x) var(--y), #000 calc(var(--rm) - 2px), transparent var(--rm));
          mask-image: radial-gradient(circle at var(--x) var(--y), #000 calc(var(--rm) - 2px), transparent var(--rm));
  transform: scale(var(--s)); transform-origin: var(--x) var(--y);
  will-change: transform, mask-image;
}

/* No picture underneath: the top one again, as a blueprint in the brand colour */
.xr--auto .xr__under { background: var(--ink-900); }
.xr--auto .xr__img--auto { filter: grayscale(1) invert(1) contrast(1.5) brightness(.75); mix-blend-mode: screen; opacity: .8; }
.xr--auto .xr__under::before, .xr--auto .xr__under::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.xr--auto .xr__under::before { background: var(--accent); mix-blend-mode: multiply; z-index: 1; }
.xr--auto .xr__under::after {
  background:
    linear-gradient(hsl(217 30% 58% / .14) 1px, transparent 1px) 0 0 / 3% 3%,
    linear-gradient(90deg, hsl(217 30% 58% / .14) 1px, transparent 1px) 0 0 / 3% 3%;
  z-index: 1;
}
.xr__under > .xr__wires, .xr__under > .xr__pins { z-index: 2; }

/* Wires, current and the hub */
.xr__wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.xr__halo { fill: none; stroke: var(--accent); opacity: .5; }
.xr__wire { fill: none; stroke: var(--accent-200); opacity: .55; }
.xr__flow { fill: none; stroke: #fff; stroke-linecap: round; animation: xr-flow 1.5s linear infinite; }
@keyframes xr-flow { to { stroke-dashoffset: var(--d, -50); } }
.xr__spark { fill: #fff; filter: drop-shadow(0 0 3px var(--accent)) drop-shadow(0 0 8px var(--accent)); }
.xr-c1 { stop-color: var(--accent); }
.xr__aura { animation: xr-breathe 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.xr__ring { fill: none; stroke: var(--accent); transform-box: fill-box; transform-origin: center; animation: xr-spin 16s linear infinite; }
.xr__ring--rev { stroke: var(--accent-200); animation-duration: 23s; animation-direction: reverse; }
.xr__heart { fill: #fff; animation: xr-breathe 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes xr-spin { to { transform: rotate(360deg); } }
@keyframes xr-breathe { 50% { transform: scale(1.14); opacity: .75; } }

/* Labels pinned into the hidden layer */
.xr__pins { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; pointer-events: none; }
.xr__pins li { position: absolute; width: 0; height: 0; }
.xr__pins li::before, .xr__pins li::after {
  content: ""; position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 3px var(--accent), 0 0 18px var(--accent);
}
.xr__pins li::after { background: transparent; box-shadow: 0 0 0 2px var(--accent); animation: xr-ping 2s ease-out infinite; }
@keyframes xr-ping { to { transform: scale(3.2); opacity: 0; } }
.xr__pins span {
  position: absolute; left: 14px; top: -34px; white-space: nowrap;
  padding: 5px 10px; border-radius: 999px; background: rgba(4, 10, 16, .82); border: 1px solid var(--accent);
  color: #fff; font: 700 11px/1.2 Inter, system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase;
  box-shadow: 0 0 16px hsl(217 30% 58% / .45);
}
.xr__pin--hub span { background: var(--accent); color: var(--ink-900); }
.xr__pin--l span { left: auto; right: 14px; }
.xr-section .dia__cap { color: hsl(217 8% 78%); }
.xr-section .dia__note { color: hsl(217 5% 62%); }

/* The glass */
.xr__lens {
  position: absolute; left: 0; top: 0; width: calc(var(--r) * 2); height: calc(var(--r) * 2); border-radius: 50%;
  transform: translate3d(calc(var(--x) - var(--r)), calc(var(--y) - var(--r)), 0);
  pointer-events: none; transition: opacity .35s; z-index: 3;
}
.xr__rim {
  position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .92);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .3), 0 22px 44px -10px rgba(0, 0, 0, .6),
    inset 0 0 0 7px rgba(255, 255, 255, .07), inset 0 0 34px hsl(217 30% 58% / .45);
}
.xr__rim::before, .xr__rim::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid; mix-blend-mode: screen; opacity: .55; }
.xr__rim::before { border-color: #ff3d6e; transform: translate(-1.5px, 0); }
.xr__rim::after { border-color: #3dd8ff; transform: translate(1.5px, 0); }
.xr__glint {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .5) 0, rgba(255, 255, 255, .12) 14%, transparent 34%),
    radial-gradient(circle at 72% 80%, rgba(255, 255, 255, .12) 0, transparent 22%);
}
.xr__handle {
  position: absolute; left: 50%; top: 50%; width: 18px; height: calc(var(--r) * .95); margin-left: -9px;
  border-radius: 9px; background: linear-gradient(90deg, #12171d, #56616e 45%, #0d1115);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .5);
  transform: rotate(-45deg) translateY(calc(var(--r) + 2px)); transform-origin: top center;
}
.xr.is-open .xr__lens { opacity: 0; }

.xr__wave {
  position: absolute; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%;
  border: 2px solid var(--accent); box-shadow: 0 0 24px var(--accent);
  pointer-events: none; z-index: 4; animation: xr-wave 1s cubic-bezier(.2, .7, .3, 1) forwards;
}
.xr__wave + .xr__wave { animation-delay: .12s; }
@keyframes xr-wave { from { transform: scale(1); opacity: 1; } to { transform: scale(70); opacity: 0; } }

.xr__hint {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); margin: 0; z-index: 4;
  padding: 8px 14px; border-radius: 999px; background: rgba(4, 10, 16, .78); color: #fff;
  font-size: 13px; white-space: nowrap; pointer-events: none; transition: opacity .4s;
}
.xr.is-touched .xr__hint { opacity: 0; }

/* What is behind, in words */
.xr__key {
  list-style: none; margin: clamp(28px, 4vw, 44px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px 28px;
}
.xr__key li { border-top: 2px solid hsl(217 30% 58% / .45); padding-top: 14px; }
.xr__n { display: block; font: 700 12px/1 Inter, system-ui, sans-serif; letter-spacing: .14em; color: var(--accent); margin-bottom: 8px; }
.xr__key h3 { font-size: 18px; margin: 0 0 6px; color: var(--white); }
.xr__key p { margin: 0; font-size: 15px; color: hsl(217 8% 78%); }

@media (max-width: 720px) {
  .xr__stage { border-radius: var(--r); }
  .xr:not(.is-live) .xr__stage { grid-template-columns: 1fr; }
  .xr__pins span { font-size: 9.5px; padding: 4px 8px; top: -28px; }
  .xr__hint { font-size: 12px; bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .xr__flow, .xr__spark { display: none; }
}

/* ===================================================================
   Quick checker: questions wired to a hub that lights the outcomes
   =================================================================== */
.ck {
  position: relative; display: grid; gap: 28px 0;
  grid-template-columns: minmax(0, 1.15fr) 190px minmax(0, 1fr); align-items: center;
}
.ck__qs, .ck__outs { position: relative; z-index: 1; display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.ck__q {
  margin: 0; border: 0; padding: 16px 18px 18px; border-radius: var(--r);
  background: hsl(217 22% 14% / .72); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); backdrop-filter: blur(6px);
}
.ck__q legend { float: left; width: 100%; margin: 0 0 10px; font: 700 15px/1.3 Montserrat, sans-serif; color: var(--white); }
.ck__opts { clear: both; display: flex; flex-wrap: wrap; gap: 8px; }
.ck__opt { position: relative; cursor: pointer; }
.ck__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ck__opt span {
  display: block; padding: 8px 13px; border-radius: 999px; font-size: 14px; line-height: 1.2;
  color: hsl(217 8% 84%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); transition: background .2s, color .2s, box-shadow .2s;
}
.ck__opt:hover span { box-shadow: inset 0 0 0 1px var(--accent); }
.ck__opt input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent); }
.ck__opt input:checked + span { background: var(--accent); color: var(--ink-900); box-shadow: 0 0 18px hsl(217 30% 58% / .55); font-weight: 600; }

/* The hub */
.ck__hub { position: relative; z-index: 1; justify-self: center; width: 150px; height: 150px; display: grid; place-items: center; }
.ck__ring, .ck__core { position: absolute; border-radius: 50%; }
.ck__ring { inset: 8px; border: 2px dashed hsl(217 30% 58% / .55); animation: ckSpin 14s linear infinite; }
.ck__ring--rev { inset: 26px; border: 3px dotted hsl(217 30% 58% / .8); animation-direction: reverse; animation-duration: 9s; }
.ck__core {
  inset: 44px; background: radial-gradient(circle at 40% 35%, #fff, var(--accent) 38%, hsl(217 33% 30%) 100%);
  box-shadow: 0 0 30px hsl(217 30% 58% / .7), 0 0 80px hsl(217 30% 58% / .35); transition: transform .3s, box-shadow .3s;
}
.ck__hub-label {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 6px; white-space: nowrap;
  font: 700 12px/1 Montserrat, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
  padding: 5px 9px; border-radius: 999px; background: var(--ink-900); box-shadow: 0 0 0 1px hsl(217 30% 58% / .35);
}
.ck.is-busy .ck__core { transform: scale(1.18); box-shadow: 0 0 44px #fff, 0 0 120px hsl(217 30% 58% / .8); }
.ck.is-busy .ck__ring { animation-duration: 1.4s; }
.ck__wave {
  position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px; border-radius: 50%;
  border: 2px solid var(--accent); animation: ckWave 1.1s ease-out forwards; pointer-events: none;
}
@keyframes ckWave { to { transform: scale(4.2); opacity: 0; } }
@keyframes ckSpin { to { transform: rotate(360deg); } }

/* Outcomes */
.ck__out {
  position: relative; padding: 16px 18px 16px 20px; border-radius: var(--r); background: hsl(217 22% 14% / .72);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); transition: opacity .4s, box-shadow .4s, transform .4s, background .4s;
}
.ck__out h3 { margin: 0 0 4px; font: 700 16px/1.25 Montserrat, sans-serif; color: var(--white); }
.ck__out p { margin: 0; font-size: 14px; line-height: 1.45; color: hsl(217 7% 74%); }
.ck__state {
  float: right; margin: 0 0 6px 10px; padding: 4px 9px; border-radius: 999px; font: 700 11px/1 Montserrat, sans-serif;
  letter-spacing: .06em; text-transform: uppercase; color: hsl(217 5% 70%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
}
.ck__out[data-state="fit"] { background: hsl(217 25% 18% / .9); box-shadow: 0 0 0 2px var(--accent), 0 0 36px hsl(217 30% 58% / .35); transform: translateX(4px); }
.ck__out[data-state="fit"] .ck__state { background: var(--accent); color: var(--ink-900); box-shadow: none; }
.ck__out[data-state="maybe"] .ck__state { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ck__out[data-state="out"] { opacity: .42; }

/* Wires */
.ck__wires { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; overflow: visible; display: none; }
.ck.is-wired .ck__wires { display: block; }
.ck__w path { fill: none; stroke-linecap: round; transition: stroke .4s, opacity .4s; }
.ck__halo { stroke: var(--accent); stroke-width: 9; opacity: 0; filter: blur(4px); }
.ck__line { stroke: hsl(217 16% 60% / .28); stroke-width: 2; }
.ck__flow { stroke: #fff; stroke-width: 2.4; stroke-dasharray: 3 44; opacity: 0; animation: ckFlow 1.1s linear infinite; }
.ck__w.is-live .ck__line { stroke: var(--accent); }
.ck__w.is-live .ck__flow { opacity: .95; }
.ck__w.is-fit .ck__halo { opacity: .45; }
.ck__w.is-out { opacity: .25; }
@keyframes ckFlow { to { stroke-dashoffset: -47; } }

.ck-section .btn--solid { --btn-bg: var(--accent); --btn-fg: var(--ink-900); }
.ck-section .btn--solid:hover { --btn-bg: var(--white); }
.ck__note { margin: 26px 0 0; font-size: 13px; line-height: 1.5; color: hsl(217 5% 64%); max-width: 70ch; }

@media (max-width: 860px) {
  .ck { grid-template-columns: minmax(0, 1fr); }
  .ck__hub { width: 120px; height: 120px; margin-bottom: 18px; }
  .ck__core { inset: 34px; }
  .ck__out[data-state="fit"] { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ck__ring, .ck__flow { animation: none; }
  .ck__w.is-live .ck__flow { opacity: 0; }
}

/* This site's own colour (from brand.colour in site.json) */
:root {
  --ink: #111c2e;
  --accent: #eeb72b;
  --accent-200: hsl(43 64% 82%);
  --accent-050: hsl(43 51% 95%);
}
