:root {
  --bg: #f2f2f0;
  --dot: #c6c6c4;
  --dot-size: 0.8px;
  --paper: #ffffff;
  --ink: #1c1b19;
  --muted: #6f6b64;
  --line: #ddd9d2;
  --accent: #1c1b19;
  --header-h: 64px;
  --shadow: 0 10px 28px rgba(28, 27, 25, 0.1);
  --radius: 14px;
  --page-fade: 400ms;
  --scribble: "Covered By Your Grace", "Segoe Script", "Bradley Hand", cursive;
  --font-sans: "Instrument Sans", "Inter", "Heebo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --weight-strong: 500;
  --weight-body: 400; /* Instrument Sans starts at 400 */
  --weight-ui: 400;
  font-family: var(--font-sans);
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon-arrow {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  overflow: visible;
  vertical-align: -0.15em;
}

.icon-arrow--left {
  transform: rotate(180deg);
}

.icon-doc {
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  flex-shrink: 0;
  overflow: visible;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
}

body {
  color: var(--ink);
  font-weight: var(--weight-body);
}

h1,
h2,
h3,
h4,
h5,
h6,
strong,
b,
th,
dt {
  font-weight: var(--weight-strong);
}

.site-header,
.board-viewport,
.page,
.site-toolbar {
  opacity: 0;
  transition: opacity var(--page-fade) ease;
}

body.is-ready .site-header,
body.is-ready .board-viewport,
body.is-ready .page,
body.is-ready .site-toolbar {
  opacity: 1;
}

body.is-leaving .site-header,
body.is-leaving .board-viewport,
body.is-leaving .page,
body.is-leaving .site-toolbar {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .board-viewport,
  .page,
  .site-toolbar {
    opacity: 1;
    transition: none;
  }

}

body.home,
body.page-inner {
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) var(--dot-size), transparent var(--dot-size));
  background-size: 16px 16px;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  pointer-events: none;
  background: transparent;
  border: none;
  box-shadow: none;
}

.site-chip {
  pointer-events: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(28, 27, 25, 0.1), 0 1px 3px rgba(28, 27, 25, 0.06);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  height: 44px; /* same height as the music/avatar chip on the right */
  margin: 0;
  pointer-events: auto;
  text-decoration: none;
}

.site-logo__mark {
  position: relative;
  display: block;
  height: 100%;
  transform-origin: left center;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) and (pointer: fine) {
  .site-logo:hover .site-logo__mark,
  .site-logo:focus-visible .site-logo__mark {
    transform: scale(1.1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-logo__mark {
    transition: none;
  }
}

.site-logo__svg {
  display: block;
  height: 100%;
  width: auto;
  overflow: visible;
  filter: drop-shadow(0 4px 8px rgba(28, 27, 25, 0.12)) drop-shadow(0 1px 2px rgba(28, 27, 25, 0.1));
  transition: filter 220ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .site-logo:hover .site-logo__svg,
  .site-logo:focus-visible .site-logo__svg {
    filter: drop-shadow(0 7px 12px rgba(28, 27, 25, 0.16)) drop-shadow(0 1px 3px rgba(28, 27, 25, 0.12));
  }
}

.logo-eye {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: logo-blink 5.5s ease-in-out 1.5s infinite;
}

.logo-pupil {
  transition: transform 90ms ease-out;
}

@keyframes logo-blink {
  0%, 94%, 100% { transform: scaleY(1); }
  97% { transform: scaleY(0.1); }
}

@media (prefers-reduced-motion: reduce) {
  .logo-eye {
    animation: none;
  }

  .logo-pupil {
    transition: none;
  }
}

.site-logo__base {
  height: 100%;
  width: auto;
  max-width: none;
}

/* The flower is a separate layer cut from the logo so it can spin on its own */
.site-logo__flower {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  transform-origin: 73.7% 21.83%;
  animation: logo-flower-spin 6s ease-in-out 2s infinite;
  pointer-events: none;
}

@keyframes logo-flower-spin {
  0% { transform: rotate(0deg); }
  14% { transform: rotate(360deg); }
  100% { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .site-logo__flower {
    animation: none;
  }
}

.site-nav {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 0.4rem 0 0.35rem;
  gap: 0.45rem;
  flex-wrap: nowrap;
  overflow: visible;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.92rem;
}

.site-nav a[aria-current="page"] {
  font-weight: var(--weight-strong);
}

.site-header__right {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  pointer-events: none;
}

/* Avatar cluster: M (in the chip) + Y to its right, overlapping, M on top */
.site-header__right:has(.site-presence) .site-nav {
  padding-right: calc(0.4rem + 22px);
}

.site-presence {
  position: absolute;
  top: calc((44px - 32px) / 2);
  right: 0.4rem;
  z-index: 2;
  display: block;
  pointer-events: auto;
  cursor: default;
}

.site-presence__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #7b61ff;
  color: #fff;
  font-size: 0.92rem;
  font-weight: var(--weight-strong);
  letter-spacing: 0;
  line-height: 1;
  box-shadow: 0 0 0 2px #fff;
}

.site-presence__tip {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  padding: 4px 8px;
  border-radius: 6px;
  background: #1c1b19;
  color: #fff;
  font-size: 11px;
  font-weight: var(--weight-ui);
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  z-index: 23;
}

@media (hover: hover) and (pointer: fine) {
  .site-presence:hover .site-presence__tip {
    display: block;
  }
}

.site-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #ff3ea5;
  color: #fff;
  font-size: 0.72rem;
  font-weight: var(--weight-strong);
  letter-spacing: 0;
  overflow: hidden;
  line-height: 1;
  position: relative;
  z-index: 3;
  box-shadow: 0 0 0 2px #fff;
}

.site-avatar:hover {
  background: #f0268f;
}

.site-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-avatar[aria-current="page"] {
  font-weight: var(--weight-strong);
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px #ff3ea5;
}

.about-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(28, 27, 25, 0.28);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 300ms ease, visibility 300ms ease;
}

.about-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.about-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  width: 420px;
  max-width: 92vw;
  padding: 68px 28px 48px;
  overflow-y: auto;
  background: #fff;
  border-radius: 20px 0 0 20px;
  box-shadow: -16px 0 40px rgba(28, 27, 25, 0.14);
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1), visibility 300ms ease;
}

.about-panel.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.about-panel__close {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  cursor: pointer;
}

.about-panel__close svg {
  width: 16px;
  height: 16px;
}

/* the photo is a poster stuck to the wall: a slight tilt and a piece of tape on each corner */
.about-panel__poster {
  position: relative;
  width: 68%; /* a modest size: not a giant portrait of me */
  margin: 0 auto 1.5rem; /* centred in the panel */
  transform: rotate(-0.8deg);
}

.about-panel__photo {
  display: block;
  width: 100%;
  height: auto; /* follow the 4:5 ratio (the height attribute on the image would otherwise fix it at 455px) */
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 50%; /* the photo is already cropped to this portrait frame, with her in the middle */
  border-radius: 4px;
  background: #eceae4;
  box-shadow: 0 6px 16px rgba(28, 27, 25, 0.18), 0 1px 3px rgba(28, 27, 25, 0.12);
}

/* translucent tape: a warm, slightly see-through strip with torn ends, lying across each corner */
.about-panel__tape {
  position: absolute;
  width: 62px;
  height: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 45%),
    rgba(238, 222, 168, 0.62);
  box-shadow: 0 1px 2px rgba(28, 27, 25, 0.16);
  /* torn, zig-zag short ends */
  clip-path: polygon(
    0 0, 100% 0,
    97% 12%, 100% 25%, 97% 37%, 100% 50%, 97% 62%, 100% 75%, 97% 87%, 100% 100%,
    0 100%,
    3% 87%, 0 75%, 3% 62%, 0 50%, 3% 37%, 0 25%, 3% 12%
  );
  pointer-events: none;
}

.about-panel__tape--tl {
  top: -4px;
  left: -20px;
  transform: rotate(-41deg);
}

.about-panel__tape--tr {
  top: -2px;
  right: -22px;
  transform: rotate(38deg);
}

.about-panel__tape--bl {
  bottom: -2px;
  left: -22px;
  transform: rotate(40deg);
}

.about-panel__tape--br {
  bottom: -4px;
  right: -20px;
  transform: rotate(-39deg);
}

.about-panel h2 {
  margin: 0 0 14px;
  font-size: 1.525rem;
  font-weight: var(--weight-strong);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.about-panel h3 {
  margin: 28px 0 14px;
  font-size: 1.175rem;
  font-weight: var(--weight-strong);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.about-panel p {
  margin: 0 0 14px;
  font-size: 1.075rem;
  font-weight: var(--weight-body);
  line-height: 1.55;
  color: var(--ink);
}

.about-panel p:last-child {
  margin-bottom: 0;
}

.about-panel__note {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3em;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 1.075rem;
  font-weight: var(--weight-strong);
  line-height: 1.55;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  text-align: left;
}

.about-panel__note .icon-arrow {
  width: 0.95em;
  height: 0.95em;
  transition: transform 200ms ease;
}

.about-panel__note:hover,
.about-panel__note:hover .icon-arrow {
  color: #ff3ea5;
  text-decoration: none;
}

.about-panel__note:hover .icon-arrow {
  transform: translateX(3px);
}

body.about-open,
html.about-open {
  overflow: hidden;
}

body.about-open .board-viewport {
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .about-backdrop,
  .about-panel {
    transition: none;
  }

  .about-panel:not(.is-open) {
    transform: none;
    opacity: 0;
  }
}

/* ---- Music player: a small BLACK frosted-glass card on the board (bottom left). The play button is white on it. ---- */
.music-glass {
  position: absolute;
  left: 260px;
  top: 1990px; /* bottom left of the board, just outside the first screen: found by dragging the board down and left */
  z-index: 2;
  width: 320px;
}

/* one very soft wash of colour behind the glass, so the frosting has something faint to blur */
.music-glass__glow {
  position: absolute;
  inset: -18px -22px -20px -22px;
  border-radius: 40px;
  background: linear-gradient(120deg, rgba(255, 205, 180, 0.5) 0%, rgba(214, 200, 255, 0.5) 55%, rgba(185, 225, 245, 0.5) 100%);
  filter: blur(34px);
  opacity: 0.4;
  pointer-events: none;
}

.music-card {
  position: relative;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 10px;
  padding: 16px 16px 12px;
  border-radius: 24px;
  /* dark glass: a see-through black, the board and the glow blurred behind it, a thin light edge and a soft shadow */
  background: linear-gradient(145deg, rgba(32, 32, 36, 0.9) 0%, rgba(8, 8, 10, 0.82) 100%);
  -webkit-backdrop-filter: blur(20px) saturate(165%);
  backdrop-filter: blur(20px) saturate(165%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 40px rgba(12, 12, 14, 0.3), 0 2px 6px rgba(12, 12, 14, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
}

.music-card__art {
  align-self: start;
  width: 76px;
  height: 76px;
  border-radius: 14px;
  background-color: #c45c4a;
  background-size: cover;
  background-position: center;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.music-card__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.music-card__eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 9.5px;
  font-weight: var(--weight-strong);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.music-card__eq {
  width: 12px;
  height: 10px;
  fill: currentColor;
}

.music-card__eq rect {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: scaleY(0.35);
}

.music-card__eq rect:nth-child(2) { transform: scaleY(0.75); }
.music-card__eq rect:nth-child(3) { transform: scaleY(0.5); }
.music-card__eq rect:nth-child(4) { transform: scaleY(0.9); }

@keyframes music-eq {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

.music-card.is-playing .music-card__eq rect,
.music-now.is-playing .music-card__eq rect {
  animation: music-eq 0.9s ease-in-out infinite;
}
.music-card.is-playing .music-card__eq rect:nth-child(2),
.music-now.is-playing .music-card__eq rect:nth-child(2) { animation-delay: -0.3s; animation-duration: 0.7s; }
.music-card.is-playing .music-card__eq rect:nth-child(3),
.music-now.is-playing .music-card__eq rect:nth-child(3) { animation-delay: -0.6s; animation-duration: 1.1s; }
.music-card.is-playing .music-card__eq rect:nth-child(4),
.music-now.is-playing .music-card__eq rect:nth-child(4) { animation-delay: -0.15s; animation-duration: 0.8s; }

.music-card__title {
  margin: 5px 0 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.music-card__meta {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: var(--weight-ui);
  color: rgba(255, 255, 255, 0.66);
}

.music-card__progress {
  grid-column: 1 / -1;
}

.music-card__wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 24px;
  cursor: pointer;
}

.music-card__wave span {
  flex: 1 1 0;
  min-width: 0;
  height: calc(var(--h) * 100%);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.24);
}

.music-card__wave span.is-played {
  background: #fff;
}

.music-card__wave:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
  border-radius: 4px;
}

.music-card__times {
  display: flex;
  justify-content: space-between;
  margin-top: 3px;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.6);
}

.music-card__controls {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.music-card__transport,
.music-card__volume {
  display: flex;
  align-items: center;
}

.music-card__transport {
  gap: 4px;
}

.music-card__btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease;
}

.music-card__btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.music-card__btn svg {
  width: 18px;
  height: 18px;
}

.music-card__vol-off,
.music-card__btn.is-muted .music-card__vol-on {
  display: none;
}

.music-card__btn.is-muted .music-card__vol-off {
  display: block;
}

.music-card__play {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #111113;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: transform 150ms ease;
}

.music-card__play:hover {
  transform: scale(1.06);
}

.music-card__play:active {
  transform: scale(0.97);
}

.music-card__play .music-icon {
  display: none;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.music-card__play.is-paused .music-icon--play,
.music-card__play:not(.is-paused) .music-icon--pause {
  display: block;
}

.music-card__play .music-icon--play {
  margin-left: 2px;
}

/* volume slider */
.music-card__range {
  --fill: 70%;
  width: 78px;
  height: 18px;
  margin: 0 0 0 2px;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.music-card__range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, #fff var(--fill), rgba(255, 255, 255, 0.24) var(--fill));
}

.music-card__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.music-card__range::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.24);
}

.music-card__range::-moz-range-progress {
  height: 4px;
  border-radius: 2px;
  background: #fff;
}

.music-card__range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.music-card__btn:focus-visible,
.music-card__play:focus-visible,
.music-card__range:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ---- While a song plays: a small "Pause" pill on the page itself, so you never have to go back to the player ---- */
.music-now {
  position: fixed;
  top: 12px;
  right: 90px; /* right next to the avatars */
  z-index: 19;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 6px 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 24px rgba(28, 27, 25, 0.12), 0 1px 3px rgba(28, 27, 25, 0.06);
  color: var(--ink);
  animation: music-now-in 260ms cubic-bezier(0.3, 0.7, 0.3, 1);
}

.music-now[hidden] {
  display: none;
}

@keyframes music-now-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.music-now__eq {
  flex: none;
  color: var(--ink);
}

.music-now__text {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: var(--weight-strong);
}

.music-now__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px 0 10px;
  border: none;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 12.5px;
  font-weight: var(--weight-strong);
  cursor: pointer;
}

.music-now__toggle svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.music-now__icon--play,
.music-now__toggle:not(.is-playing) .music-now__icon--pause {
  display: none;
}

.music-now__toggle:not(.is-playing) .music-now__icon--play {
  display: block;
}

.music-now__toggle:hover {
  background: #000;
}

.music-now__toggle:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .music-card.is-playing .music-card__eq rect,
  .music-now.is-playing .music-card__eq rect,
  .music-now {
    animation: none;
  }
}

.music-embed {
  position: fixed;
  left: -400px;
  bottom: 0;
  width: 200px;
  height: 200px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.site-toolbar {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 19;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(28, 27, 25, 0.1), 0 1px 3px rgba(28, 27, 25, 0.06);
  pointer-events: auto;
}

.site-toolbar__group {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-toolbar__divider {
  width: 1px;
  height: 30px;
  margin: 0 4px;
  background: #e5e5e0;
  flex-shrink: 0;
}

.toolbar-work {
  position: relative;
}

.toolbar-btn {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 58px;
  height: 52px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}

.toolbar-btn:hover,
.toolbar-btn[aria-expanded="true"] {
  background: #f2f2f0;
}

.toolbar-btn__icon {
  display: block;
  width: 20px;
  height: 20px;
}

.toolbar-btn__label {
  display: block;
  font-size: 10.5px;
  font-weight: var(--weight-ui);
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--muted);
  white-space: nowrap;
}

.toolbar-btn:hover .toolbar-btn__label,
.toolbar-btn[aria-expanded="true"] .toolbar-btn__label {
  color: var(--ink);
}

.toolbar-btn__tip {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  padding: 4px 8px;
  border-radius: 6px;
  background: #1c1b19;
  color: #fff;
  font-size: 11px;
  font-weight: var(--weight-ui);
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  z-index: 23;
}

.toolbar-btn.is-copied .toolbar-btn__tip {
  display: block;
}

@media (hover: hover) and (pointer: fine) {
  .toolbar-btn[data-toolbar="dots"]:hover .toolbar-btn__tip {
    display: block;
  }

  .toolbar-work.is-open > .toolbar-btn:hover .toolbar-btn__tip {
    display: none;
  }
}

.toolbar-popover {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 22;
  transform: translateX(-50%);
  width: min(350px, calc(100vw - 24px));
  padding: 6px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(28, 27, 25, 0.1), 0 1px 3px rgba(28, 27, 25, 0.06);
}

.toolbar-popover[hidden] {
  display: none;
}

.toolbar-popover a {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  text-decoration: none;
}

.toolbar-popover a:hover {
  background: #eef6fd; /* a very pale sky blue, just off white */
}

.toolbar-popover__project {
  font-size: 0.64rem;
  font-weight: var(--weight-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.toolbar-popover__title {
  font-size: 1.02rem;
  font-weight: var(--weight-strong);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.contact-note textarea.is-toolbar-focus {
  outline: 2px solid #7b61ff;
  box-shadow: 0 0 0 4px rgba(123, 97, 255, 0.22);
}

.figma-cursor {
  pointer-events: none;
  user-select: none;
  color: currentColor;
}

.figma-cursor[hidden] {
  display: none;
}

.figma-cursor__stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transform-origin: 2px 2px;
}

.figma-cursor__pointer {
  display: block;
  flex-shrink: 0;
}

.figma-cursor__bubble {
  display: none;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  background: currentColor;
  border: 1px solid #fff;
  border-radius: 50% 50% 50% 0;
  box-shadow: 0 1px 3px rgba(28, 27, 25, 0.18);
}

.figma-cursor--you.is-comment .figma-cursor__pointer {
  display: none;
}

.figma-cursor--you.is-comment .figma-cursor__bubble {
  display: block;
}

.figma-cursor--you.is-comment .figma-cursor__label {
  display: none;
}

.figma-cursor__label {
  margin: 6px 0 0 12px;
  padding: 3px 9px;
  border-radius: 8px;
  background: #7b61ff;
  color: #fff;
  font-size: 12px;
  font-weight: var(--weight-strong);
  line-height: 1.25;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(28, 27, 25, 0.18);
}

.figma-cursor--you {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 18;
  color: #7b61ff;
  will-change: transform;
}

.figma-cursor--you .figma-cursor__label {
  background: #7b61ff;
}

.figma-cursor--you.is-native {
  visibility: hidden;
}

.figma-cursor--marielle {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 14;
  color: #ff3ea5;
  will-change: transform;
}

.figma-cursor--marielle .figma-cursor__label {
  background: #ff3ea5;
}

.figma-comment-toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  z-index: 19;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: #1c1b19;
  color: #fff;
  font-size: 0.75rem;
  line-height: 1.3;
  box-shadow: 0 8px 24px rgba(28, 27, 25, 0.18);
  pointer-events: auto;
  cursor: default;
}

.figma-comment-toast[hidden] {
  display: none;
}

/* Board comments, modelled on Figma's: a purple pin; next to it a one-line field that opens into a box with a toolbar as you
   type; once sent, the pin keeps an avatar and the comment opens as a small card when you point at it. */
.board-comment {
  --cm: #9747ff;
  position: absolute;
  z-index: 16;
  pointer-events: auto;
}

/* the pin: a circle with a square bottom-left corner, its corner on the spot you clicked */
.board-comment__pin {
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--cm);
  border-radius: 50% 50% 50% 0;
  transform: translate(0, -100%);
  pointer-events: none;
}

.board-comment__avatar {
  display: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ece2ff;
  color: var(--cm);
  overflow: hidden;
}

.board-comment__avatar svg {
  display: block;
  width: 100%;
  height: 100%;
}

.board-comment.is-sent .board-comment__pin {
  background: #fff;
  box-shadow: 0 2px 8px rgba(28, 27, 25, 0.2), 0 0 0 1px rgba(28, 27, 25, 0.04);
  pointer-events: auto;
  cursor: default;
}

.board-comment.is-sent .board-comment__pin .board-comment__avatar {
  display: block;
}

/* the composer: a 40px pill beside the pin; it becomes a box once there is text */
.board-comment__composer {
  position: absolute;
  left: 48px;
  top: -36px;
  width: 296px;
  background: #fff;
  border: 1px solid var(--cm);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(28, 27, 25, 0.12), 0 1px 3px rgba(28, 27, 25, 0.08);
  cursor: auto;
}

.board-comment__composer textarea {
  display: block;
  width: 100%;
  height: 38px;
  margin: 0;
  padding: 10px 52px 0 16px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  line-height: 18px;
  color: #1c1b19;
  resize: none;
  overflow: hidden;
  outline: none;
  cursor: text;
}

.board-comment__composer textarea::placeholder {
  color: #a3a3a8;
  opacity: 1;
}

.board-comment.is-typing .board-comment__composer textarea {
  padding: 13px 16px 4px;
  min-height: 46px;
  max-height: 150px;
  overflow-y: auto;
  line-height: 20px;
}

.board-comment__extras {
  display: none;
}

.board-comment.is-typing .board-comment__extras {
  display: block;
}

.board-comment__extras input[type="email"] {
  display: block;
  width: calc(100% - 32px);
  margin: 0 16px;
  padding: 6px 0 8px;
  border: 0;
  border-top: 1px solid #ececf0;
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  color: #1c1b19;
  outline: none;
  cursor: text;
}

.board-comment__extras input[type="email"]::placeholder {
  color: #a3a3a8;
}

.board-comment__tools {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 44px;
  padding: 0 10px;
  border-top: 1px solid #ececf0;
}

.board-comment__tool {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #1c1b19;
  cursor: pointer;
}

.board-comment__tool svg {
  display: block;
  width: 20px;
  height: 20px;
}

.board-comment__tool:hover {
  background: #f3f3f6;
}

.board-comment__tool--static {
  cursor: default;
}

.board-comment__tool--static:hover {
  background: transparent;
}

.board-comment__send {
  position: absolute;
  right: 3px;
  top: 3px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--cm);
  color: #fff;
  cursor: pointer;
  transition: background 140ms ease;
}

.board-comment__send svg {
  display: block;
  width: 18px;
  height: 18px;
}

.board-comment__send:disabled {
  background: #d6d6da;
  cursor: default;
}

.board-comment.is-typing .board-comment__send {
  top: auto;
  right: 6px;
  bottom: 6px;
}

.board-comment__error {
  margin: 0;
  padding: 0 16px 10px;
  font-size: 0.75rem;
  color: #b42318;
}

.board-comment__error[hidden] {
  display: none;
}

.board-comment__gotcha {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* the sent comment: a card that grows out of the pin (same square bottom-left corner) */
.board-comment__bubble {
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: max-content;
  min-width: 200px;
  max-width: 300px;
  padding: 12px 20px 12px 12px;
  background: #fff;
  border-radius: 24px 24px 24px 0;
  box-shadow: 0 8px 24px rgba(28, 27, 25, 0.16), 0 1px 3px rgba(28, 27, 25, 0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.9);
  transform-origin: 0 100%;
  transition: opacity 160ms ease, transform 200ms cubic-bezier(0.22, 1.1, 0.4, 1), visibility 0s linear 200ms;
}

.board-comment.is-sent:hover .board-comment__bubble,
.board-comment.is-peek .board-comment__bubble {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition: opacity 160ms ease, transform 200ms cubic-bezier(0.22, 1.1, 0.4, 1), visibility 0s;
}

.board-comment__bubble .board-comment__avatar {
  display: block;
  flex: none;
  width: 28px;
  height: 28px;
}

.board-comment__meta {
  margin: 0;
  font-size: 0.88rem;
  font-weight: var(--weight-strong);
  line-height: 1.3;
  color: #1c1b19;
}

.board-comment__time {
  margin-left: 6px;
  font-weight: var(--weight-ui);
  color: #8f8e8a;
}

.board-comment__message {
  margin: 2px 0 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: #1c1b19;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
  .board-comment__bubble,
  .board-comment__send {
    transition: none;
  }
}

/* the cursor shows the same purple pin while you are placing a comment */
.figma-cursor--you.is-comment {
  color: #9747ff;
}

/* Cursor trail: fine dots joined by a hairline, drawn over the board */
.cursor-trail {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
}

/* WebGL dot field: replaces the static CSS dots while it is running */
.dot-field {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: none;
  pointer-events: none;
}

body.has-dot-shader .dot-field {
  display: block;
}

body.home.has-dot-shader {
  background-image: none;
}

body.has-dot-shader .board {
  background-image: none;
  background-color: transparent;
}

.toolbar-btn__slash {
  display: none;
}

.toolbar-btn.is-off .toolbar-btn__slash {
  display: block;
}

.toolbar-btn.is-off .toolbar-btn__icon {
  opacity: 0.55;
}

.board-viewport {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: auto;
  cursor: grab;
  z-index: 1;
}

@media (hover: hover) and (pointer: fine) {
  body.home.has-figma-cursors .board-viewport,
  body.home.has-figma-cursors .board-viewport *:not(input):not(textarea):not(button):not(select) {
    cursor: none;
  }

  body.home.has-figma-cursors .board-viewport input,
  body.home.has-figma-cursors .board-viewport textarea {
    cursor: text;
  }

  body.home.has-figma-cursors .board-viewport button,
  body.home.has-figma-cursors .board-viewport button:disabled {
    cursor: pointer;
  }

  body.home.has-figma-cursors .board-comment,
  body.home.has-figma-cursors .board-comment * {
    cursor: auto;
  }

  body.home.has-figma-cursors .board-comment textarea,
  body.home.has-figma-cursors .board-comment input {
    cursor: text;
  }

  body.home.has-figma-cursors .board-comment button {
    cursor: pointer;
  }

  body.home.has-figma-cursors .site-toolbar,
  body.home.has-figma-cursors .site-toolbar *,
  body.home.has-figma-cursors .music-card,
  body.home.has-figma-cursors .music-card *,
  body.home.has-figma-cursors .music-now,
  body.home.has-figma-cursors .music-now * {
    cursor: pointer;
  }

  body.home.has-figma-cursors .about-panel,
  body.home.has-figma-cursors .about-backdrop {
    cursor: auto;
  }

  body.home.has-figma-cursors .about-panel__close {
    cursor: pointer;
  }

  body.home.has-figma-cursors .toolbar-popover {
    cursor: auto;
  }

  body.home.has-figma-cursors .toolbar-popover a {
    cursor: pointer;
  }

  body.home.has-figma-cursors .board-viewport.is-panning ~ .figma-cursor--you .figma-cursor__stack {
    transform: scale(0.9);
  }
}

.board-viewport.is-panning {
  cursor: grabbing;
  user-select: none;
}

.board-viewport.is-panning .sticky-note {
  cursor: grabbing;
}

.board {
  position: relative;
  width: 3400px;
  height: 2500px;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) var(--dot-size), transparent var(--dot-size));
  background-size: 16px 16px;
}

.board-hero {
  --hero-title: clamp(2.4rem, 4vw, 4rem);
  position: absolute;
  left: 1700px;
  top: calc(1343px - (var(--hero-title) * 1.05));
  text-align: center;
  width: max-content;
  z-index: 3;
  pointer-events: none;
  transform: translateX(-50%);
}

/* the title and the name sit inside a light-blue selection frame, like a layer picked in a design tool (see .select-box) */
.board-hero__title {
  position: relative;
}

.select-box {
  position: absolute;
  inset: -12px -26px -19px -26px;
  border: 2px solid #2f9bf0;
  background: transparent;
  pointer-events: none;
}

.select-box i {
  position: absolute;
  width: 11px;
  height: 11px;
  box-sizing: border-box;
  border: 2px solid #2f9bf0;
  border-radius: 3px;
  background: #fff;
}

.select-box i:nth-child(1) { left: -7px; top: -7px; }
.select-box i:nth-child(2) { right: -7px; top: -7px; }
.select-box i:nth-child(3) { left: -7px; bottom: -7px; }
.select-box i:nth-child(4) { right: -7px; bottom: -7px; }


.board-hero h1 {
  margin: 0 0 1.1rem;
  font-size: var(--hero-title);
  letter-spacing: -0.02em;
  line-height: 1.05;
  white-space: nowrap;
}

/* Highlighter swipe behind a word in the hero title */
.marker {
  position: relative;
  display: inline-block;
  isolation: isolate;
}

.marker::before {
  content: "";
  position: absolute;
  inset: 0.06em -0.2em -0.06em -0.14em;
  z-index: -1;
  background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 300 100%22 preserveAspectRatio=%22none%22%3E%3Cpath d=%22M9 24C58 12 138 17 206 11C246 8 283 13 293 21C297 42 291 68 296 84C259 93 182 87 121 92C71 95 30 90 5 83C1 60 7 42 9 24Z%22 fill=%22%23fbef72%22/%3E%3Cpath d=%22M2 78C40 70 90 76 130 72%22 fill=%22none%22 stroke=%22%23fbef72%22 stroke-width=%227%22 stroke-linecap=%22round%22/%3E%3Cpath d=%22M18 42C100 38 200 44 286 38%22 fill=%22none%22 stroke=%22%23fff9b0%22 stroke-width=%223.5%22 stroke-linecap=%22round%22 opacity=%22.75%22/%3E%3Cpath d=%22M24 66C110 62 205 69 280 63%22 fill=%22none%22 stroke=%22%23fff9b0%22 stroke-width=%223%22 stroke-linecap=%22round%22 opacity=%22.6%22/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  transform: rotate(-1.2deg);
  pointer-events: none;
}

/* "sense" in a serif: a softer, more editorial voice next to the sans-serif title */
.board-hero h1 .marker {
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.28em;
  letter-spacing: -0.005em;
  line-height: 1;
}

.board-hero p {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  font-weight: 700; /* bold: this line says who she is and what she does */
  color: var(--ink); /* the darkest text colour on the site */
}

.hero-sparks {
  display: none;
}

.hero-spark {
  display: none;
}

.board-hero__hints {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-top: 2.5rem; /* air between the framed title and the "Drag to explore" pill */
}

.drag-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(28, 27, 25, 0.08);
  font-size: 0.96rem;
  font-weight: var(--weight-ui);
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

.drag-badge__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.icon-move {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  overflow: visible;
}

.drag-badge__comment {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .drag-badge__comment {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
  }
}

.drag-badge__rule {
  width: 1px;
  height: 18px;
  background: #d8d8d4;
  flex-shrink: 0;
}

.drag-badge strong {
  font-weight: var(--weight-strong);
  color: var(--ink);
}

.sticky-note {
  position: absolute;
  width: 250px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  user-select: none;
  transform-origin: center center;
}

/* "Case study #1" above each card */
.sticky-note__index {
  position: absolute;
  left: 4px;
  bottom: calc(100% + 13px);
  z-index: 2;
  font-size: 0.68rem;
  font-weight: var(--weight-strong);
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  pointer-events: none;
}

/* the same yellow highlighter swipe as the word "sense" in the title, sized for small text */
.sticky-note__index .marker {
  padding: 0 0.15em;
}

.sticky-note__index .marker::before {
  inset: -0.32em -0.55em -0.26em -0.5em;
}

.sticky-note__card {
  position: relative;
  z-index: 1;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid #E2E8F0;
}

.sticky-note::before,
.sticky-note::after {
  --u-r: 10px; /* the rounded corners of the picture inside the card, like the cover of the front card */
  content: "";
  position: absolute;
  inset: auto;
  top: 8px;
  left: 18px;
  width: 64%;
  height: auto;
  aspect-ratio: 9 / 16;
  box-sizing: border-box;
  padding: 12px; /* the same even margin around the picture as the front card has around its cover */
  /* from the top: four paper-coloured corners (they round the picture), the picture itself, then the paper */
  background-image:
    radial-gradient(circle at 100% 100%, transparent calc(var(--u-r) - 0.5px), var(--paper) var(--u-r)),
    radial-gradient(circle at 0 100%, transparent calc(var(--u-r) - 0.5px), var(--paper) var(--u-r)),
    radial-gradient(circle at 100% 0, transparent calc(var(--u-r) - 0.5px), var(--paper) var(--u-r)),
    radial-gradient(circle at 0 0, transparent calc(var(--u-r) - 0.5px), var(--paper) var(--u-r)),
    var(--under-img, url("../assets/images/placeholder.svg")),
    linear-gradient(var(--paper), var(--paper));
  background-size: var(--u-r) var(--u-r), var(--u-r) var(--u-r), var(--u-r) var(--u-r), var(--u-r) var(--u-r), cover, 100% 100%;
  background-position: 0 0, 100% 0, 0 100%, 100% 100%, center, 0 0;
  background-repeat: no-repeat;
  background-origin: content-box, content-box, content-box, content-box, content-box, border-box;
  background-clip: content-box, content-box, content-box, content-box, content-box, border-box;
  border-radius: var(--radius);
  box-shadow: 0 6px 16px rgba(28, 27, 25, 0.08);
  pointer-events: none;
  transform-origin: 50% 80%;
}

.sticky-note::before {
  transform: rotate(-2.4deg);
  z-index: 0;
}

.sticky-note::after {
  top: 14px;
  left: auto;
  right: 14px;
  transform: rotate(2.1deg);
}

.note-1::before {
  --under-img: url("../assets/images/harel-under3.webp");
}

.note-1::after {
  --under-img: url("../assets/images/harel-under2.webp");
}

.note-2::before {
  --under-img: url("../assets/images/liba-cover-back-card1.webp");
}

.note-2::after {
  --under-img: url("../assets/images/liba-cover-back-card2.webp");
}

.note-3::before {
  --under-img: url("../assets/images/shufersal-under2.webp");
}

.note-3::after {
  --under-img: url("../assets/images/shufersal-under3.webp");
}

/* A teaser for an upcoming case study. Same component and size as the three case-study cards (including the two
   cards that fan out underneath on hover), but not a link. */
.note-soon {
  left: 1400px;
  top: 190px;
  transform: rotate(-2.5deg);
  z-index: 1;
  cursor: default;
}

.note-soon .sticky-note__card {
  height: 370px; /* the same height as the IDF and Shufersal cards */
}

.note-soon::before {
  --under-img: url("../assets/images/mindme-cover-under1.webp");
}

.note-soon::after {
  --under-img: url("../assets/images/mindme-cover-under2.webp");
}

.note-soon .sticky-note__media {
  aspect-ratio: 16 / 8.2; /* a little shorter than the other cards so the longer text breathes at the same overall size */
}

.note-soon .sticky-note__media img {
  object-position: center 40%;
}

.soon-note__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: var(--weight-ui);
}

.soon-note__badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff7a1a;
  animation: soon-pulse 2.4s ease-in-out infinite;
}

@keyframes soon-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

@media (prefers-reduced-motion: reduce) {
  .soon-note__badge::before {
    animation: none;
  }
}

.sticky-note__media {
  aspect-ratio: 16 / 10;
  background: #e8e6e1;
}

.sticky-note__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}

.note-1 .sticky-note__media {
  overflow: hidden;
  background: #e8edf4;
}

.note-1 .sticky-note__media img {
  object-fit: cover;
  object-position: 50% 50%;
}

/* the cover sits inside the card with an even margin all round, and has rounded corners of its own */
.sticky-note .sticky-note__card {
  padding: 12px;
}

.sticky-note__media {
  border-radius: 10px;
  overflow: hidden;
}

.sticky-note__body {
  padding: 1rem 2px 0.3rem;
}

.sticky-note p.sticky-note__project,
.page p.project-label {
  margin: 0 0 0.35rem;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: var(--weight-ui);
}

/* the company name closes the card, under the tags, set off by a dashed line */
.sticky-note p.sticky-note__project {
  margin: 1rem 0 0;
  padding-top: 0.8rem;
  border-top: 1px dashed #c9cdd8;
  font-size: 0.64rem;
  letter-spacing: 0.1em;
}

/* a small heading above the card's title */
.sticky-note .sticky-note__whats {
  margin: 0 0 0.3rem;
  font-size: 0.92rem;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink);
}

.sticky-note__tags,
.page-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.sticky-note__tags {
  margin-top: 0.85rem;
  gap: 0.3rem;
}

/* the tags on the home-page cards: a pale blue pill with dark navy text, no outline */
.sticky-note__tags .tag {
  letter-spacing: 0.03em;
  font-weight: 400;
  color: #4a5167;
  background: #edeff5;
  border: 0;
  padding: 4px 8px;
}

/* forces the tags after it onto a new line */
.tag-break {
  flex-basis: 100%;
  height: 0;
  margin: -0.15rem 0;
}

.page-tags {
  margin: 0.85rem 0 1.4rem;
}

.case-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.35rem;
  margin: 0 0 2rem;
}

.case-meta__item {
  min-width: 0;
}

.case-meta dt {
  margin: 0 0 0.35rem;
  font-size: 0.62rem;
  font-weight: var(--weight-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.case-meta dd {
  margin: 0;
  font-size: 1.05rem;
  font-weight: var(--weight-strong);
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink);
}

.tag {
  font-size: 0.62rem;
  font-weight: var(--weight-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2.4px 6px; /* was 2.4px 7.2px / previously 0.15rem 0.45rem */
}

.sticky-note h2 {
  margin: 0 0 0.35rem;
  font-size: 1.4rem;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.sticky-note p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--muted);
}

/* The calico cat (animated illustration) wandering the home page (see initWalkerCat) */
.walker-cat {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 12;
  width: 200px;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
}

/* she is drawn facing left; --flip: -1 turns her to face right */
.walker-cat__flip {
  width: 100%;
  transform: scaleX(var(--flip, 1));
  transform-origin: 50% 100%;
}

.walker-cat img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.walker-cat img.is-tall {
  margin-top: -9.4%; /* the get-up clip has extra room above (ears) and below (tail in the leap); */
  margin-bottom: -5.64%; /* these keep her feet on the same line as the other clips */
}

/* the startle clip is a wider canvas (she lunges sideways and up): same scale and ground line as the others, so it just overhangs to the side */
.walker-cat img.is-startle {
  width: 110%;
  max-width: none;
  margin-bottom: -2.5%;
}

.walker-cat__ghost {
  position: absolute;
  left: 0;
  top: 0;
  width: 110%;
  height: auto;
  pointer-events: none;
  transform-origin: 50% 100%;
  opacity: 1;
  transition: opacity 170ms ease-out;
}

.walker-cat__ghost.is-fading {
  opacity: 0;
}

/* breathing while she's curled up: a masked copy of her back rises and settles, so only the back moves (never her head or paws) */
.walker-cat__flip {
  position: relative;
}

.walker-cat__breath {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 36% 28% at 62% 74%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 36% 28% at 62% 74%, #000 35%, transparent 100%);
  transform-origin: 62% 100%;
  animation: walker-breathe 3.8s ease-in-out infinite;
}

@keyframes walker-breathe {
  0%, 100% { transform: scaleY(1); }
  45% { transform: scaleY(1.07); }
}

/* flat out: she leans into the run and stretches a little */
.walker-cat.is-sprinting .walker-cat__flip {
  transform: scaleX(var(--flip, 1)) rotate(-5deg) scale(1.05, 0.96);
  transition: transform 140ms ease-out;
}

.walker-cat.is-turning-soft .walker-cat__flip {
  animation: walker-soft-turn 160ms ease-out forwards;
}

@keyframes walker-soft-turn {
  0% { transform: scaleX(var(--turn-to, -1)) scale(1.02, 0.96); }
  100% { transform: scaleX(var(--turn-to, -1)); }
}

@media (max-width: 720px) {
  .walker-cat {
    width: 150px;
  }
}

/* Social links: tiles matching the home (logo) button, tucked away at the far left of the board */
.board-social {
  position: absolute;
  left: 16px; /* same left edge as the home button when the board is scrolled all the way left */
  top: 1050px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  user-select: none;
  -webkit-user-select: none;
}

.board-social__link {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 44px;
  border-radius: 8.5px;
  background: #fff;
  filter: drop-shadow(0 4px 8px rgba(28, 27, 25, 0.12)) drop-shadow(0 1px 2px rgba(28, 27, 25, 0.1));
  transition: transform 180ms cubic-bezier(0.22, 1.3, 0.4, 1);
}

.board-social__link svg {
  display: block;
  width: 26px;
  height: 26px;
}

.board-social__link:focus-visible {
  outline: 2px solid #1c1b19;
  outline-offset: 3px;
}

.board-social__tip {
  position: absolute;
  top: 50%;
  left: calc(100% + 16px);
  transform: translateY(-50%);
  padding: 5px 10px;
  border-radius: 8px;
  background: #1c1b19;
  color: #fff;
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .board-social__link:hover {
    transform: scale(1.1);
  }

  .board-social__link:hover .board-social__tip {
    opacity: 1;
  }
}

.board-social__link:focus-visible .board-social__tip {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .board-social__link {
    transition: none;
  }
}

/* Hidden sticker, far left of the board: swaps on hover and reveals a note */
.board-sticker {
  position: absolute;
  left: 60px;
  top: 1380px; /* far out on the left, well away from the first card: you have to drag the board a long way left to meet it */
  width: 240px;
  z-index: 2;
  transform: rotate(-5deg);
  transform-origin: 50% 60%;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
}

.board-sticker__art {
  position: relative;
  aspect-ratio: 1.1;
}

.board-sticker__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(28, 27, 25, 0.18));
  transform-origin: 50% 60%;
}

.board-sticker__img--b {
  opacity: 0;
  transform: scale(0.94) rotate(-2deg);
}

.board-sticker__note {
  position: absolute;
  left: 50%;
  top: calc(100% + 14px);
  width: 290px;
  margin: 0;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(28, 27, 25, 0.14), 0 1px 3px rgba(28, 27, 25, 0.08);
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.55;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px) rotate(5deg);
  transform-origin: 50% 0;
  transition: opacity 180ms ease, transform 220ms ease;
}

.board-sticker:hover .board-sticker__img--a,
.board-sticker:focus-visible .board-sticker__img--a {
  opacity: 0;
  transform: scale(0.94);
}

.board-sticker:hover .board-sticker__img--b,
.board-sticker:focus-visible .board-sticker__img--b {
  opacity: 1;
  transform: scale(1.06) rotate(2deg);
}

.board-sticker:hover .board-sticker__note,
.board-sticker:focus-visible .board-sticker__note {
  opacity: 1;
  transform: translate(-50%, 0) rotate(5deg);
}

@media (prefers-reduced-motion: reduce) {
  .board-sticker__note {
    transition: none;
  }
}

.note-1 {
  left: 624px;
  top: 350px;
  transform: rotate(-4deg);
  z-index: 1;
}

.note-2 {
  left: 1666px;
  top: 632px;
  transform: rotate(3deg);
  z-index: 2;
}

.note-3 {
  left: 563px;
  top: 900px;
  transform: rotate(-3deg);
  z-index: 1;
}

/* A soft sticky note: a deeper strip on top (a grip and a menu, as on a real board note), a lighter body of the same hue,
   and text in a dark tone of that hue. */
.contact-note {
  --note-bar: #b4cff7; /* the strip: a deeper shade of the "Daily" blue in the flow map */
  --note-body: #cfe3ff; /* the same blue as the "Daily" step */
  --note-ink: #1f4a85; /* the same blue, darkened: text */
  --note-ink-soft: rgba(31, 74, 133, 0.45);
  position: absolute;
  left: 3020px;
  top: 1500px; /* far to the right, level with the case-study row, well clear of the case-study row and the flow map: found by dragging the board right */
  width: 262px;
  z-index: 4;
  padding: 0 18px 18px;
  overflow: hidden;
  background: var(--note-body);
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(28, 27, 25, 0.12), 0 2px 4px rgba(28, 27, 25, 0.06);
  transform: rotate(-1.6deg);
  color: var(--note-ink);
  cursor: auto;
  user-select: text;
}

.contact-note__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
  margin: 0 -18px 14px;
  padding: 0 14px;
  background: var(--note-bar);
}

/* six dots: the grip */
.contact-note__grip {
  width: 8px;
  height: 12px;
  background:
    radial-gradient(circle, rgba(31, 74, 133, 0.4) 1.1px, transparent 1.5px) 0 0 / 4px 4px;
}

/* three dots: the menu */
.contact-note__menu {
  width: 4px;
  height: 14px;
  background:
    radial-gradient(circle, rgba(31, 74, 133, 0.55) 1.5px, transparent 1.9px) 0 0 / 4px 5px;
}

.contact-note h2 {
  margin: 0 0 8px;
  font-size: 1.06rem;
  line-height: 20px;
  letter-spacing: -0.01em;
  font-weight: 500;
  color: var(--note-ink);
}

.contact-note__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.contact-note__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-note__field {
  position: relative;
}

.contact-note textarea {
  display: block;
  width: 100%;
  height: 92px;
  margin: 0;
  padding: 0 0 22px;
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--note-ink);
  background: transparent;
  border: none;
  border-radius: 6px;
  resize: none;
  cursor: text;
}

.contact-note textarea::placeholder {
  color: var(--note-ink-soft);
  opacity: 1;
}

.contact-note textarea:focus {
  outline: none;
}

.contact-note textarea:focus-visible {
  outline: 2px solid rgba(31, 74, 133, 0.3);
  outline-offset: 4px;
}

.contact-note__count {
  position: absolute;
  right: 0;
  bottom: 2px;
  font-size: 0.76rem;
  line-height: 1;
  color: var(--note-ink-soft);
  pointer-events: none;
}

.contact-note button {
  width: 100%;
  height: 36px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0 1rem;
  border: 0;
  border-radius: 10px;
  background: #1c1b19;
  color: #fff;
  cursor: pointer;
  transition: background 160ms ease;
}

.contact-note button:hover {
  background: #000;
}

.contact-note button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.contact-note__status:empty {
  display: none;
}

.contact-note__status {
  min-height: 1.25em;
  margin: -8px 0 0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.contact-note__status[data-state="ok"] {
  color: #1f5c3a;
}

.contact-note__status[data-state="error"] {
  color: #8a2b2b;
}

.scribble {
  font-family: var(--scribble);
  font-weight: var(--weight-strong);
  letter-spacing: 0.01em;
}

@media (hover: hover) and (pointer: fine) {
  .sticky-note {
    transition: transform 0.22s ease;
  }

  .sticky-note::before,
  .sticky-note::after {
    transition: transform 0.18s ease;
  }

  .sticky-note:hover::before {
    transform: rotate(-10deg) translate(-32px, 16px);
  }

  .sticky-note:hover::after {
    transform: rotate(9deg) translate(36px, 18px);
  }

  .sticky-note .sticky-note__card {
    transition: box-shadow 0.22s ease;
  }

  .note-1:hover {
    z-index: 6;
    transform: rotate(-4deg) scale(1.035);
  }

  .note-2:hover {
    z-index: 6;
    transform: rotate(3deg) scale(1.035);
  }

  .note-3:hover {
    z-index: 6;
    transform: rotate(-3deg) scale(1.035);
  }

  .note-soon:hover {
    z-index: 6;
    transform: rotate(-2.5deg) scale(1.035);
  }

  .sticky-note:hover .sticky-note__card {
    box-shadow: 0 18px 40px rgba(28, 27, 25, 0.18);
  }

  .board-viewport.is-panning .sticky-note:hover {
    z-index: auto;
  }

  .board-viewport.is-panning .note-1:hover {
    transform: rotate(-4deg);
  }

  .board-viewport.is-panning .note-2:hover {
    transform: rotate(3deg);
  }

  .board-viewport.is-panning .note-3:hover {
    transform: rotate(-3deg);
  }

  .board-viewport.is-panning .note-soon:hover {
    transform: rotate(-2.5deg);
  }

  .board-viewport.is-panning .sticky-note:hover::before {
    transform: rotate(-2.4deg);
  }

  .board-viewport.is-panning .sticky-note:hover::after {
    transform: rotate(2.1deg);
  }

  .board-viewport.is-panning .sticky-note:hover .sticky-note__card {
    box-shadow: var(--shadow);
  }
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.25rem);
}

.page {
  padding: calc(var(--header-h) + 2.5rem) 1.25rem 4rem;
  max-width: 760px;
  margin: 0 auto;
}

.page--case {
  max-width: 1200px;
}

.page-card {
  background: var(--paper);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 2rem 2.85rem 2.2rem;
}

.case-hero {
  margin: 0 0 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  background: #e8e6e1;
  aspect-ratio: 16 / 9;
}

.case-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page--case .page-media img {
  cursor: zoom-in;
}

.page--case [data-no-lightbox] img {
  cursor: default;
}

.page h1 {
  margin: 0 0 0.75rem;
  letter-spacing: -0.015em;
}

.lede,
.page p {
  color: var(--muted);
  line-height: 1.6;
}

.page--case .lede {
  max-width: 640px;
  font-weight: var(--weight-strong);
  font-size: 1.25rem;
  color: var(--ink);
}

.page--case .case-section > p {
  font-weight: 300;
  font-size: 0.875rem;
}

.page--case article p {
  margin-bottom: 1.2em;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 300;
  text-decoration: none;
}

.back-link .icon-arrow {
  width: 0.95em;
  height: 0.95em;
}

.icon-arrow--stat {
  width: 0.72em;
  height: 0.72em;
}

.icon-arrow--down-green {
  transform: rotate(90deg);
  color: #2e7d32;
}

@media (hover: hover) and (pointer: fine) {
  .back-link:hover {
    font-weight: var(--weight-strong);
    text-decoration: none;
  }
}

.page-media {
  margin: 1.4rem 0 0;
  border-radius: 12px;
  overflow: hidden;
  background: #e8e6e1;
  width: 100%;
}

.page-media img {
  width: 100%;
  display: block;
}

.case-section .page-media {
  margin: 1.4rem 0;
}

.case-section > .page-media {
  aspect-ratio: 16 / 9;
}

.case-section > .page-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-media-stack {
  margin: 1.4rem 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #e8e6e1;
}

.case-section > .page-media + .page-media-stack,
.page-media-stack + .page-media-stack {
  margin-top: 0;
}

.case-section .page-media-stack .page-media {
  margin: 0;
  border-radius: 0;
}

.page-media-stack .page-media img {
  width: 100%;
  display: block;
}

.page-media-stack--gif-frame {
  border-radius: 12px 12px 24px 24px;
  background: transparent;
}

.case-section .page-media-stack--gif-frame .page-media--gif-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  background: #fff;
  border: 1px solid #edf1f7;
  border-top: none;
  border-radius: 0 0 24px 24px;
}

.case-section .page-media-stack--gif-frame .page-media--gif-frame img {
  width: auto;
  max-width: min(654px, 80%);
  height: auto;
}

.case-gallery-wrap {
  position: relative;
  margin: 1.4rem 0;
  width: 100%;
}

.case-gallery-wrap::before,
.case-gallery-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 15%;
  pointer-events: none;
  z-index: 1;
}

.case-gallery-wrap::before {
  left: 0;
  background: linear-gradient(to left, rgba(255, 255, 255, 0), var(--paper));
  opacity: 0;
  transition: opacity 200ms ease;
}

.case-gallery-wrap.is-scrolled::before {
  opacity: 1;
}

.case-gallery-wrap::after {
  right: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), var(--paper));
}

.case-gallery {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.case-gallery::-webkit-scrollbar {
  display: none;
}

.case-gallery-btn {
  display: none;
}

.case-gallery-btn .icon-arrow {
  width: 18px;
  height: 18px;
  vertical-align: 0;
}

@media (hover: hover) and (pointer: fine) {
  .case-gallery-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    box-shadow: 0 6px 16px rgba(28, 27, 25, 0.16);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%);
    transition: opacity 200ms ease;
  }

  .case-gallery-btn--prev {
    left: 0.45rem;
  }

  .case-gallery-btn--next {
    right: 0.45rem;
  }

  .case-gallery-wrap:hover .case-gallery-btn,
  .case-gallery-wrap:focus-within .case-gallery-btn {
    opacity: 1;
    pointer-events: auto;
  }

  .case-gallery-wrap:hover .case-gallery-btn:disabled,
  .case-gallery-wrap:focus-within .case-gallery-btn:disabled {
    opacity: 0.28;
    pointer-events: none;
    cursor: default;
  }
}

.case-gallery .page-media {
  margin: 0;
  flex: 0 0 min(320px, 82%);
  width: min(320px, 82%);
  scroll-snap-align: start;
}

.case-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14rem;
  gap: 5.5rem;
  align-items: start;
  margin-top: 0.5rem;
}

.case-body {
  padding-right: 2rem;
}

.case-nav {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.case-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
  padding: 0.3rem 0;
  white-space: nowrap; /* every anchor stays on one line, active or not, so nothing jumps */
}

.case-nav a.is-active {
  color: var(--ink);
  font-weight: var(--weight-strong);
}

.case-section {
  scroll-margin-top: calc(var(--header-h) + 1.25rem);
  padding-bottom: 2.75rem;
}

.case-section:last-of-type {
  padding-bottom: 1rem;
}

.case-view-project {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
  padding: 0.6rem 1.2rem;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 300;
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

.case-view-project .icon-arrow {
  width: 0.95em;
  height: 0.95em;
}

@media (hover: hover) and (pointer: fine) {
  .case-view-project:hover {
    background: var(--ink);
    color: #fff;
    text-decoration: none;
  }
}

.case-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
  margin-top: 1.75rem;
}

.case-pager__card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--paper);
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  padding: 1rem 1rem 1.05rem;
}

.case-pager__label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: var(--weight-ui);
}

.case-pager__card--next .case-pager__label {
  justify-content: flex-end;
}

.case-pager__media {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  background: #e8e6e1;
  aspect-ratio: 16 / 10;
}

.case-pager__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-pager__body {
  margin-top: 0.85rem;
}

.case-pager__title {
  display: block;
  margin: 0;
  font-size: 1.05rem;
  font-weight: var(--weight-strong);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.case-pager__tags {
  display: block;
  margin: 0.28rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.case-pager__arrow {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
}

.case-pager__arrow .icon-arrow {
  width: 0.85em;
  height: 0.85em;
}

@media (hover: hover) and (pointer: fine) {
  .case-pager__card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .case-pager__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(28, 27, 25, 0.12);
  }
}

.page--case .case-section > p.case-eyebrow {
  font-size: 12px;
  font-weight: var(--weight-ui);
  margin: 0 0 0.4rem;
}

.page--case .case-section > a.case-source-pill,
.page--case article a.case-source-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  max-width: 100%;
  margin: 0.15rem 0 1.2em;
  padding: 0.28rem 0.72rem 0.28rem 0.55rem;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--muted);
  background: #efeeea;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.page--case .case-section > a.case-source-pill:hover,
.page--case article a.case-source-pill:hover {
  background-color: #e4e4e0;
  text-decoration: none;
}

.case-source-pill .icon-doc {
  width: 13px;
  height: 13px;
}

.case-section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.case-section h3 {
  margin: 3em 0 0.55rem;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink);
}

.case-section h3.case-challenge {
  font-size: 20px;
}

.page--case article h3 {
  margin-top: 3em;
}

.case-section h2 + h3 {
  margin-top: 0.35rem;
}

.case-section p strong {
  color: var(--ink);
  font-weight: var(--weight-strong);
}

.page p.case-flow {
  color: var(--ink);
}

.page p.case-outcome-headline {
  margin: 0.15rem 0 0.85rem;
  font-size: clamp(1.8rem, 3.4vw, 2.45rem);
  font-weight: var(--weight-strong);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}

.case-highlight {
  position: relative;
  display: inline-block;
  background: none;
  border-radius: 4px;
  padding: 0 0.2em;
  color: inherit;
  font: inherit;
  z-index: 0;
}

.case-highlight::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #f7d465;
  border-radius: 4px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 550ms ease-out;
}

.case-highlight.is-marked::before {
  transform: scaleX(1);
}

[data-count] {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

.page p.case-outcome-headline .case-outcome-count {
  font-variant-numeric: lining-nums;
  font-feature-settings: "tnum" 0;
}

.case-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.case-stats + p {
  margin-top: 1.4rem;
}

.case-stats__item {
  background-color: #f4f6fb;
  border-radius: 4px;
  padding: 12px;
  text-align: center;
}

.page p.case-stats__value {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  margin: 0 0 0.3rem;
  font-size: 1.35rem;
  font-weight: var(--weight-strong);
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.2;
}

.page p.case-stats__label {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--ink);
  font-weight: var(--weight-ui);
}

.page p.case-stats__footnote {
  font-size: 0.575rem;
  font-style: italic;
  color: var(--muted);
  margin-top: 0.3rem;
  font-weight: var(--weight-ui);
  line-height: 1.35;
}

@media (max-width: 720px) {
  .case-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .case-body {
    padding-right: 0;
  }

  .case-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 1rem;
  }

  .case-pager {
    grid-template-columns: 1fr;
  }

  .case-stats {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }
}

.form {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.4rem;
}

.form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: var(--weight-strong);
}

.form input,
.form textarea {
  font: inherit;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #faf9f7;
}

.form textarea {
  min-height: 140px;
  resize: vertical;
}

.form button {
  justify-self: start;
  font: inherit;
  font-weight: var(--weight-strong);
  padding: 0.7rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

.form-status {
  min-height: 1.4em;
  margin: 0.4rem 0 0;
  font-size: 0.92rem;
}

.form-status[data-state="ok"] {
  color: #2d6a4f;
}

@media (max-width: 720px) {
  :root {
    --header-h: 64px;
  }

  .site-header {
    padding: 0.65rem 0.75rem;
    flex-wrap: nowrap;
  }

  .site-logo {
    height: 40px;
    margin: 0;
  }

  .site-nav {
    height: 40px;
    padding: 0 0.3rem 0 0.25rem;
    gap: 0.35rem;
  }

  .site-presence {
    top: calc((40px - 32px) / 2);
    right: 0.3rem;
  }

  .site-header__right:has(.site-presence) .site-nav {
    padding-right: calc(0.3rem + 22px);
  }

  .board-viewport {
    top: 0;
  }
}

html.lightbox-open,
html.lightbox-open body {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 3.25rem 4.75rem; /* room at the bottom for the zoom controls */
  background: rgba(28, 27, 25, 0.78);
  touch-action: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  transform-origin: 50% 50%;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: zoom-in;
}

.lightbox__img.is-animating {
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.lightbox.is-zoomed .lightbox__img {
  cursor: grab;
}

.lightbox.is-dragging .lightbox__img {
  cursor: grabbing;
}

/* zoom controls: a small pill at the bottom */
.lightbox__zoom {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 18px rgba(28, 27, 25, 0.2);
  transform: translateX(-50%);
}

.lightbox__zbtn,
.lightbox__zlabel {
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.lightbox__zbtn {
  display: grid;
  place-items: center;
  width: 36px;
}

.lightbox__zlabel {
  min-width: 56px;
  padding: 0 6px;
  font-size: 0.8rem;
  font-weight: var(--weight-strong);
  font-variant-numeric: tabular-nums;
}

.lightbox__zbtn:hover:not(:disabled),
.lightbox__zlabel:hover {
  background: #f0eeea;
}

.lightbox__zbtn:disabled {
  opacity: 0.32;
  cursor: default;
}

.lightbox__zbtn:focus-visible,
.lightbox__zlabel:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

@media (max-width: 720px) {
  .lightbox {
    padding: 3.25rem 0.75rem 4.75rem;
  }
}

.lightbox__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(28, 27, 25, 0.16);
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .lightbox,
  .lightbox__img.is-animating {
    transition: none;
  }
}

/* Scroll reveal: hidden only after JS adds html.js-reveal (fail open without JS). */
html.js-reveal .reveal:not(.is-revealed) {
  opacity: 0;
  transform: translateY(16px);
}

html.js-reveal .reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

html.js-reveal .reveal.is-revealed.reveal--instant {
  transition: none;
  transition-delay: 0ms;
}

@media (prefers-reduced-motion: reduce) {
  html.js-reveal .reveal,
  html.js-reveal .reveal:not(.is-revealed),
  html.js-reveal .reveal.is-revealed {
    opacity: 1;
    transform: none;
    transition: none;
    transition-delay: 0ms;
  }
}

/* ==========================================================================
   Simple home page for phones, tablets and any touch device (anything that is not a real desktop): the music player,
   the title, then the case studies one under the other. Nothing else: no stickers, wheel, flow, poll, note, cat,
   video or toolbar. All of those are desktop-only. The desktop board is untouched.
   ========================================================================== */
@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  /* the pannable board becomes a normal page that scrolls */
  body.home .board-viewport {
    position: static;
    overflow: visible;
    cursor: auto;
  }

  body.home .dot-field {
    display: none;
  }

  body.home .board {
    width: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 38px; /* air between one case study and the next (each has its "Case study #N" label) */
    padding: 92px 16px 56px; /* clears the fixed header with the music player */
    background: none;
  }

  /* everything that is not the title or a case study */
  body.home .board-social,
  body.home .board-sticker,
  body.home .flow-map,
  body.home .tabs-sticker,
  body.home .movie-wheel,
  body.home .contact-note,
  body.home .board-hero__hints,
  body.home .walker-cat,
  body.home .figma-cursor,
  body.home .figma-comment-toast,
  body.home .board-comment,
  body.home .site-toolbar {
    display: none;
  }

  /* 2. the title */
  body.home .board-hero {
    position: static;
    left: auto;
    top: auto;
    order: 0;
    width: auto;
    margin: 6px 0 6px;
    transform: none;
  }

  body.home .select-box {
    display: none;
  }

  body.home .board-hero h1 {
    margin: 0 0 0.8rem;
    font-size: clamp(2rem, 10vw, 2.7rem);
    white-space: normal;
  }

  body.home .board-hero p {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-wrap: balance;
  }

  /* 4. the case studies, one under the other */
  body.home .board .sticky-note {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    transform: none;
    z-index: auto;
  }

  body.home .board .sticky-note::before,
  body.home .board .sticky-note::after {
    display: none; /* the two cards that fan out behind each one on desktop */
  }

  body.home .board .note-1 { order: 1; }
  body.home .board .note-2 { order: 2; }
  body.home .board .note-3 { order: 3; }
  body.home .board .note-soon { order: 4; }

  /* the music card is desktop only */
  body.home .music-glass,
  body.home .music-now,
  body.home .music-embed {
    display: none;
  }

  /* more air between one case study and the next */
  body.home .board .note-2,
  body.home .board .note-3,
  body.home .board .note-soon {
    margin-top: 42px;
  }

  body.home .board .sticky-note__index {
    position: static;
    display: block;
    margin: 0 0 13px 8px;
  }

  /* the cards show no grey description here either (same as on desktop) */
  body.home .board .sticky-note__body > p:not(.sticky-note__project) {
    display: none;
  }

  body.home .board .sticky-note__sub .marker::before {
    display: none;
  }

  body.home .board .sticky-note__sub .marker {
    display: inline;
  }

  body.home .board .sticky-note__sub {
    display: block;
    margin-top: 7px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
  }

  body.home .note-soon .sticky-note__card {
    height: auto;
  }

  body.home .note-soon .sticky-note__media {
    aspect-ratio: 16 / 10;
  }
}

/* ---- phones: email + social links under the case studies; the About panel as a bottom drawer ---- */
.mobile-connect {
  display: none;
}

@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  body.home .mobile-connect {
    order: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 6px 0 0;
  }

  .mobile-connect__email,
  .mobile-connect__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    border: 0;
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 4px 14px rgba(28, 27, 25, 0.1), 0 1px 3px rgba(28, 27, 25, 0.06);
    text-decoration: none;
  }

  .mobile-connect__email {
    gap: 8px;
    min-width: 150px; /* keeps the row from jumping when the label changes to "Copied!" */
    padding: 0 16px 0 14px;
    white-space: nowrap;
    font: inherit;
    font-size: 0.9rem;
    font-weight: var(--weight-strong);
    cursor: pointer;
  }

  .mobile-connect__icon {
    width: 22px;
    height: 22px;
    flex: none;
  }

  .mobile-connect__email.is-copied {
    background: #e9f7ee;
    color: #1f5c3a;
  }

  .mobile-connect__link {
    width: 46px;
  }

  .mobile-connect__link svg {
    display: block;
    width: 26px;
    height: 26px;
  }
}

/* About: a drawer that comes up from the bottom on phones, not a panel from the right */
@media (max-width: 720px) {
  .about-panel__note {
    display: none; /* "Got a song? Share it!" is for the desktop board's note */
  }

  .about-panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    max-height: 88vh;
    max-height: 88dvh;
    padding: 60px 28px calc(32px + env(safe-area-inset-bottom, 0px));
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -12px 40px rgba(28, 27, 25, 0.18);
    transform: translateY(100%);
  }

  .about-panel.is-open {
    transform: translateY(0);
  }

  /* the little grab handle */
  .about-panel::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 50%;
    width: 40px;
    height: 4px;
    margin-left: -20px;
    border-radius: 999px;
    background: #d9d6cf;
  }

  .about-panel__close {
    top: 14px;
    left: auto;
    right: 14px;
  }

  .about-panel__photo {
    height: auto; /* the height attribute on the image would otherwise win over the aspect ratio */
    aspect-ratio: 4 / 5;
    object-position: 50% 50%;
  }
}

/* ---- Home (desktop): one tidy row of four case studies under a single-line title ---- */
.case-row {
  display: contents; /* phones and tablets: the cards are stacked by the simple layout below */
}

.board-frame {
  display: none;
}

/* the little pink character that waves from above the top edge: desktop only (see below) */
.wave-buddy {
  display: none;
}

.sticky-note__sub {
  display: none;
}

@media (min-width: 1025px) and (not ((hover: none) and (pointer: coarse))) {
  /* the area the first screen is centred on: the title and the whole row of cards */
  .board-frame {
    display: block;
    position: absolute;
    left: 1020px;
    top: 1090px;
    width: 1360px;
    height: 780px; /* centred on y=902: on a 13" laptop the title lands well inside the screen and the cards are fully visible */
    pointer-events: none;
    visibility: hidden;
  }

  .board-hero {
    --hero-title: 4rem;
    top: 1176px; /* the title block sits a little higher to make room for the pill's air and its size; the pill-to-cards gap stays the same */
  }

  /* waits to the left of the first screen: you have to drag the board to the right to meet it */
  .wave-buddy {
    display: block;
    position: absolute;
    left: 700px; /* waits at the far left of the board, level with the open space between the Cut the Crap card and the case studies: found by dragging the board to the right */
    top: 1178px;
    width: 190px;
    height: 190px;
    z-index: 2;
    pointer-events: none; /* only the picture itself (below) reacts to the pointer */
    user-select: none;
    -webkit-user-drag: none;
  }

  .wave-buddy__img {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: auto;
    -webkit-user-drag: none;
  }

  /* "Hi!" pops up above its head when the pointer is on it */
  .wave-buddy__tip {
    position: absolute;
    left: 50%;
    top: 14px; /* just over its head */
    padding: 6px 12px;
    border-radius: 10px;
    background: #1c1b19;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    transform: translate(-50%, calc(-100% + 8px)) scale(0.85);
    transform-origin: 50% 100%;
    pointer-events: none;
    transition: opacity 0.14s ease, transform 0.2s cubic-bezier(0.3, 1.5, 0.5, 1);
  }

  /* the little tail pointing down at the character */
  .wave-buddy__tip::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border: 5px solid transparent;
    border-top-color: #1c1b19;
  }

  .wave-buddy:has(.wave-buddy__img:hover) .wave-buddy__tip {
    opacity: 1;
    transform: translate(-50%, -100%);
  }

  .board-hero h1 br {
    display: none; /* "Making sense of Complexity." on one line */
  }

  .case-row {
    position: absolute;
    left: 1150px;
    top: 1469px; /* the top of the cards: the yellow labels sit above it */
    z-index: 2;
    display: flex;
    justify-content: space-between; /* three cards, spread evenly across the row */
    gap: 120px; /* the least air between cards, and room for the two cards that fan out underneath on hover */
    width: 1100px;
    align-items: stretch;
  }

  .case-row .sticky-note {
    position: relative;
    left: auto;
    top: auto;
    flex: 0 0 250px;
    width: 250px;
    display: flex;
    flex-direction: column;
    transform: none;
    z-index: auto;
    transition: transform 0.22s ease;
  }

  /* the yellow label above each card: "Case study #N" and the name of the approach */
  /* the two cards that fan out underneath: shorter than the card, so their corners never poke out below it at rest */
  .case-row .sticky-note::before,
  .case-row .sticky-note::after {
    aspect-ratio: auto;
    height: calc(100% - 44px);
  }

  .case-row .sticky-note__index {
    position: absolute;
    left: 0;
    bottom: calc(100% + 18px);
    display: block;
    margin: 0;
    padding: 0 0 0 4px;
    font-size: calc(0.78rem - 2px); /* 10.5px */
    line-height: 1.3;
    letter-spacing: 0.06em;
    font-weight: 400;
    text-transform: uppercase;
    color: var(--ink);
  }

  /* "Case study #N" gets the hand-painted highlighter swipe, the same one as behind "sense"; the line under it is plain text */
  .case-row .sticky-note__index > .marker {
    display: inline-block;
    padding: 0 0.2em;
    font-weight: 400;
  }

  .case-row .sticky-note__index > .marker::before {
    inset: -0.3em -0.5em -0.24em -0.45em;
  }

  .case-row .sticky-note__sub {
    display: block;
    margin-top: 8px;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
  }

  .case-row .sticky-note__card {
    flex: 1 1 auto;
    height: auto;
    display: flex;
    flex-direction: column;
  }

  .case-row .sticky-note__media,
  .case-row .note-soon .sticky-note__media {
    flex: none;
    aspect-ratio: 16 / 9.6;
  }

  .case-row .sticky-note__body {
    flex: 1 1 auto;
  }

  .case-row .sticky-note h2 br {
    display: none; /* the titles simply wrap inside the card */
  }

  /* an experiment: the cards show no grey description (it lives on the case-study page itself). To bring it back, delete this rule. */
  .case-row .sticky-note__body > p:not(.sticky-note__project) {
    display: none;
  }

  .case-row .sticky-note:hover {
    z-index: 6;
    transform: scale(1.035);
  }

  .board-viewport.is-panning .case-row .sticky-note:hover {
    z-index: auto;
    transform: none;
  }
}

/* ---- Home: on the first visit the pieces appear one after another, each with a soft little "pop" (html.intro-play) ---- */
@keyframes intro-pop {
  0% { opacity: 0; scale: 0.93; }
  55% { opacity: 1; scale: 1.015; }
  100% { opacity: 1; scale: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  html.intro-play body.home .board-viewport {
    transition-duration: 120ms; /* the empty board is there at once; the pieces below pop onto it */
  }

  html.intro-play body.home .board-hero h1,
  html.intro-play body.home .board-hero__title > p,
  html.intro-play body.home .select-box,
  html.intro-play body.home .board-hero__hints,
  html.intro-play body.home .case-row .sticky-note,
  html.intro-play body.home .site-toolbar,
  html.intro-play body.home .board-sticker,
  html.intro-play body.home .pink-sticker,
  html.intro-play body.home .movie-wheel--board,
  html.intro-play body.home .contact-note {
    animation: intro-pop 1s var(--intro-d, 0s) cubic-bezier(0.3, 0.7, 0.3, 1) backwards;
  }

  html.intro-play body.home .board-hero h1 { --intro-d: 0.2s; }
  html.intro-play body.home .board-hero__title > p { --intro-d: 0.6s; }
  html.intro-play body.home .select-box { --intro-d: 0.8s; }
  html.intro-play body.home .board-hero__hints { --intro-d: 0.9s; }
  html.intro-play body.home .case-row .sticky-note { --intro-d: 1.2s; }
  html.intro-play body.home .case-row .sticky-note:nth-child(2) { --intro-d: 1.5s; }
  html.intro-play body.home .case-row .sticky-note:nth-child(3) { --intro-d: 1.8s; }
  html.intro-play body.home .case-row .sticky-note:nth-child(4) { --intro-d: 2.1s; }
  html.intro-play body.home .site-toolbar { --intro-d: 2.4s; }
  html.intro-play body.home .board-sticker { --intro-d: 2.5s; }
  html.intro-play body.home .movie-wheel--board { --intro-d: 2.6s; }
  html.intro-play body.home .pink-sticker { --intro-d: 2.7s; }
  html.intro-play body.home .contact-note { --intro-d: 2.8s; }
  html.intro-play body.home .mobile-connect { animation: intro-pop 1s var(--intro-d, 0s) cubic-bezier(0.3, 0.7, 0.3, 1) backwards; }
}

/* phones and tablets: the same entrance, a little quicker, since the first case study sits right under the title */
@media (max-width: 1024px) and (prefers-reduced-motion: no-preference), (hover: none) and (pointer: coarse) and (prefers-reduced-motion: no-preference) {
  html.intro-play body.home .board-hero h1 { --intro-d: 0.15s; }
  html.intro-play body.home .board-hero__title > p { --intro-d: 0.5s; }
  html.intro-play body.home .case-row .sticky-note { animation: none; } /* the cards pop in as you scroll to them instead */
  html.intro-play body.home .mobile-connect { animation: none; }
}

/* phones and tablets: each case study pops into view as it scrolls in (see initCardScrollReveal) */
@media (max-width: 1024px) and (prefers-reduced-motion: no-preference), (hover: none) and (pointer: coarse) and (prefers-reduced-motion: no-preference) {
  html body.home .case-row .sticky-note.reveal-hidden {
    opacity: 0;
    scale: 0.93;
  }

  html body.home .case-row .sticky-note.reveal-pop {
    animation: intro-pop 0.9s cubic-bezier(0.3, 0.7, 0.3, 1) backwards;
  }

  /* on the first visit the first card waits for the title to settle */
  html.intro-play body.home .case-row .sticky-note.reveal-pop {
    animation-delay: 0.85s;
  }
}

/* ---- phones: dim the page behind the About drawer ---- */
@media (max-width: 720px) {
  .about-backdrop {
    background: rgba(28, 27, 25, 0.42);
  }
}

/* Case-study TL;DR: three lines at the top of every case */
.case-tldr {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  max-width: 640px;
  margin: 0 0 2.2rem;
  padding: 1.35rem 1.5rem;
  background: #f3f8fe;
  border-radius: 8px;
}
.case-tldr__row {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  align-items: baseline;
}
.case-tldr dt {
  margin: 0;
  font-size: 0.62rem;
  font-weight: var(--weight-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.case-tldr dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: #3b3935;
}
@media (max-width: 600px) {
  .case-tldr__row { grid-template-columns: 1fr; gap: 0.25rem; }
}

.case-meta__sub {
  display: block;
  max-width: 34rem;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.45;
  color: var(--muted);
}

/* "Made with Claude Code" credit: fixed bottom-left on desktop, last item in the stacked page on phones */
.made-with {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-ui, inherit);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--muted);
  text-decoration: none;
  background: #fff;
  border-radius: 999px;
  padding: 7px 13px 7px 11px;
  transition: color 0.2s ease, box-shadow 0.2s ease;
}
.made-with:hover { color: var(--ink); }
.made-with__spark { width: 12px; height: 12px; flex: none; color: #d97757; }
.made-with--fixed {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 19;
  opacity: 0;
  box-shadow: 0 4px 20px rgba(28, 27, 25, 0.1), 0 1px 3px rgba(28, 27, 25, 0.06);
  transition: opacity var(--page-fade) ease, color 0.2s ease;
}
body.is-ready .made-with--fixed { opacity: 1; }
.made-with--flow { display: none; }
@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  body.home .made-with--fixed { display: none; }
  body.home .made-with--flow {
    order: 6;
    display: inline-flex;
    align-self: center;
    margin: 18px 0 12px;
    border: 1px solid var(--line);
    box-shadow: none;
  }
}

/* ---- Home (desktop): the extras sit just outside the first screen, whatever its size ----
   The first screen always shows only the title and the three case studies. Every other piece waits just beyond the edge of the
   window: above it, below it, or to the left or right. These offsets measure the window (50vw / 50vh from the middle of the title,
   at x 1700, y 1480), so on a laptop they sit closer to the centre than on a big monitor. Each line says how far from the edge. */
@media (min-width: 1025px) and (not ((hover: none) and (pointer: coarse))) {
  .board {
    --ex: 1700px; /* the middle of the title and cards */
    --ey: 1480px;
    height: 2600px;
  }

  /* above the screen: slide down until the piece's bottom edge is that far above the top of the screen */
  .tabs-sticker { translate: 0 calc(var(--ey) - 50vh - 200px - 410px); }
  .pink-sticker { translate: 0 calc(var(--ey) - 50vh - 60px - 675px); }
  .rare-footage { translate: 0 calc(var(--ey) - 50vh - 90px - 715px); }
  .movie-wheel--board { translate: 0 calc(var(--ey) - 50vh - 140px - 540px); }
  .bag-stash { translate: 0 calc(var(--ey) - 50vh - 130px - 1070px); } /* (its bottom edge, the bag's base, 130px above the top of the screen; the things pop up out of it) */

  /* to the left of the screen: slide right until the piece's right edge is that far left of the screen.
     (The social icons are not moved: they stay at the far left of the board, lined up with the home button when it is scrolled all the way left.) */
  .cut-crap { translate: max(calc(var(--ex) - 50vw - 300px - 735px), -366px) 0; } /* (never further left than x 94, so it stays clear of the social icons on very wide screens) */
  .board-sticker { translate: calc(var(--ex) - 50vw - 100px - 312px) 0; }
  .wave-buddy { translate: max(calc(var(--ex) - 50vw + 80px - 890px), -496px) 0; } /* (its right edge 80px inside the left edge of the first screen, so a bit of its arm peeks in; never further left than x 204) */
  .tq { translate: max(min(calc(var(--ex) - 50vw + 110px - 860px), 260px), -450px) 0; } /* (110px inside the left edge of the first screen, in the empty space left of the case studies, but never closer than 30px to the first card (x 1150); never further left than x 10) */

  /* to the right of the screen: slide left until the piece's left edge is that far right of the screen */
  .mini-terminal { translate: calc(var(--ex) + 50vw + 60px - 3020px) 0; }
  .contact-note { translate: calc(var(--ex) + 50vw + 100px - 3020px) 0; }

  /* below the screen: slide up until the piece's top edge is that far below the bottom of the screen */
  .flow-map { translate: 0 calc(var(--ey) + 50vh + 70px - 2250px); }
  .music-glass { translate: 0 calc(var(--ey) + 50vh + 70px - 1990px); }
  .skill-tags { translate: 0 calc(var(--ey) + 50vh + 80px - 1880px); }
}

/* ---- Home (desktop): the order things appear in, every time the page loads ----
   1. the typed line above the title (js/hero-typing.js: starts at 0.15s, takes about 1.3s)
   2. right after it, the title: the words rise in one after another, the yellow marker swipes across "sense", the blue frame is drawn
      with its four corner handles, and the name line and the "Drag to explore" pill fade in
   3. then the three case studies, one after another (and, on a first visit, the toolbar)
   --hero-d is when the title starts: the moment the typed line is finished. */
:root {
  --hero-d: 1.5s;
}

@keyframes hero-word {
  from { opacity: 0; transform: translateY(16px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes hero-swipe {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes hero-frame {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes hero-handle {
  from { opacity: 0; transform: scale(0); }
  to { opacity: 1; transform: none; }
}

@keyframes hero-frame-draw {
  from { right: calc(100% + 26px); bottom: calc(100% + 12px); }
  to { right: -26px; bottom: -19px; }
}

@keyframes hero-glint {
  0% { background-position: 100% 0; }
  100% { background-position: 0% 0; }
}

@keyframes hero-twinkle {
  0% { opacity: 0; transform: scale(0) rotate(0deg); }
  12% { opacity: 1; transform: scale(1.3) rotate(30deg); }
  28% { opacity: 0.95; transform: scale(0.9) rotate(60deg); }
  50% { opacity: 1; transform: scale(1.1) rotate(95deg); }
  74% { opacity: 0; transform: scale(0) rotate(160deg); }
  100% { opacity: 0; transform: scale(0) rotate(160deg); }
}

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 1025px) and (not ((hover: none) and (pointer: coarse))) and (prefers-reduced-motion: no-preference) {
  /* (these four replace the plain "pop" the first-visit entrance gives them) */
  html:root body.home .board-hero h1 { animation: none; }
  /* the line under the title: it rises in, then catches the light once (the glint), every time the home page opens */
  html:root body.home .board-hero__title > p {
    animation: hero-rise 0.6s calc(var(--hero-d) + 1.35s) ease-out backwards, hero-glint 2.4s ease-in-out calc(var(--hero-d) + 2.4s) 1;
  }
  html:root body.home .select-box { animation: hero-frame 0.45s calc(var(--hero-d) + 1s) ease-out backwards; }
  html:root body.home .board-hero__hints { animation: hero-rise 0.6s calc(var(--hero-d) + 1.8s) ease-out backwards; }

  .board-hero h1 .hw {
    display: inline-block;
    animation: hero-word 0.65s calc(var(--hero-d) + var(--wi, 0) * 0.14s) cubic-bezier(0.3, 0.7, 0.2, 1) backwards;
  }

  .board-hero h1 .marker::before {
    animation: hero-swipe 0.6s calc(var(--hero-d) + 0.8s) ease-out backwards;
  }

  .select-box i {
    animation: hero-handle 0.35s calc(var(--hero-d) + 1.1s + var(--ii, 0) * 0.07s) cubic-bezier(0.3, 1.6, 0.5, 1) backwards;
  }

  .select-box i:nth-child(1) { --ii: 0; }
  .select-box i:nth-child(2) { --ii: 1; }
  .select-box i:nth-child(3) { --ii: 2; }
  .select-box i:nth-child(4) { --ii: 3; }

  /* the line under the title catches the light now and then: a soft glint in the colours of AI (purple, sky blue, pink, orange) sweeps across the letters once, and three little stars twinkle next to "AI" once, each time the home page opens */
  .board-hero__title > p {
    background-image: linear-gradient(100deg, var(--ink) 0 41%, #7a64e0 45.5%, #46b6ea 48.8%, #f06cb0 52.2%, #f29a45 55.5%, var(--ink) 59.5% 100%);
    background-size: 320% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  /* a point with no size at the end of "AI": the stars are placed around it (it holds no text, so the glint still colours all the letters) */
  .hero-sparks {
    display: inline-block;
    position: relative;
    width: 0;
    height: 0;
  }

  .hero-spark {
    display: block;
    position: absolute;
    width: 16px;
    height: 16px;
    background: #7a64e0;
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
    pointer-events: none;
    opacity: 0;
    animation: hero-twinkle 3.2s ease-in-out calc(var(--hero-d) + 2.5s + var(--sd, 0s)) 1;
  }

  .hero-spark:nth-child(1) { left: -1px; top: -28px; }
  .hero-spark:nth-child(2) { left: -30px; top: -27px; width: 11px; height: 11px; background: #f06cb0; --sd: 1.2s; }
  .hero-spark:nth-child(3) { left: 5px; top: -6px; width: 11px; height: 11px; background: #46b6ea; --sd: 2.4s; }

  /* the case studies come last, after the title: one after another (this replaces the first-visit "pop" timing too) */
  html:root body.home .case-row .sticky-note { animation: intro-pop 0.9s calc(var(--hero-d) + 1.3s) cubic-bezier(0.3, 0.7, 0.3, 1) backwards; }
  html:root body.home .case-row .sticky-note:nth-child(2) { animation-delay: calc(var(--hero-d) + 1.55s); }
  html:root body.home .case-row .sticky-note:nth-child(3) { animation-delay: calc(var(--hero-d) + 1.8s); }

  /* on a first visit (html.hero-draw) the blue frame is drawn as if someone were dragging it out with the mouse, from the top-left corner to the bottom-right one, and the four handles pop onto the corners when it is done */
  html.hero-draw:root body.home .select-box {
    animation: hero-frame-draw 1s calc(var(--hero-d) + 0.9s) cubic-bezier(0.5, 0, 0.2, 1) backwards;
  }

  html.hero-draw .select-box i {
    animation-delay: calc(var(--hero-d) + 1.95s + var(--ii, 0) * 0.07s);
  }

  /* on a first visit the toolbar follows the cards */
  html.intro-play body.home .site-toolbar { --intro-d: calc(var(--hero-d) + 2.4s); }
}

/* the name line: on a computer the typed line says who I am, so it only carries the rest; phones keep the full line */
.hero-id {
  display: none;
}

@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  .hero-id {
    display: inline;
  }
}

