:root {
  --text: #1f1d24;
  --text-2: #5a5663;
  --line: #eeecf0;
  --white: #ffffff;
  --ivory: #ffffff; /* was #fcfaf5; set back to try ivory again */
  --accent: #5a2d4c;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;

  /* Fluid sizes: grow smoothly from laptop to large monitors */
  --gutter: clamp(20px, 4vw, 64px);
  --header-h: 72px;
}

* { box-sizing: border-box; }
/* Decorative graphics may bleed past the edges; clip them so the page never
   scrolls sideways. (clip, unlike hidden, doesn't create a second scroll area) */
html { overflow-x: clip; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }

/* Homepage: the header is see-through over the landing dots, then frosted
   once you scroll past the first screen */
.is-home:not(.is-scrolled) .header {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.header { transition: background .4s ease; }



.container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.03em;
  color: #000;
}
.header nav { display: flex; align-items: center; gap: 6px; }
.header nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  padding: .55em 1.1em;
  border-radius: 999px;
  transition: color .2s, background .2s;
}
.header nav a:hover { color: var(--text); background: #f5f4f5; }
.header nav a.nav-cta {
  margin-left: 8px;
  color: var(--white);
  background: var(--text);
}
.header nav a.nav-cta:hover { background: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(40px, 5vw, 96px);
  align-items: center;
  /* Fill the first screen so the hero sits centered on any monitor */
  min-height: calc(100svh - var(--header-h));
  padding-top: clamp(72px, 8vh, 120px);
  /* Room for the play control and up to three caption lines below the circle */
  padding-bottom: 168px;
}
.hero-text > *, .video-card { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.hero-text > *:nth-child(2) { animation-delay: .06s; }
.hero-text > *:nth-child(3) { animation-delay: .12s; }
.hero-text > *:nth-child(4) { animation-delay: .18s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.hero h1 {
  font-size: clamp(18px, 1.25vw, 24px);
  white-space: nowrap;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0 0 .7em;
}
/* Name set in deep plum */
.highlight { color: var(--accent); }

/* The main statement: the biggest text on the page */
.lede {
  /* Always exactly three lines: each line stays whole, and the size follows the
     width of the text column (cqi) so the longest line always fits */
  font-size: min(80px, 9cqi);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--text);
  margin: 0 0 .45em;
}
.lede .line { display: block; white-space: nowrap; }
.hero-text { container-type: inline-size; }
.sub {
  font-size: clamp(16px, 1vw, 19px);
  line-height: 1.6;
  color: var(--text-2);
  margin: 0 0 32px;
}

/* Text link, e.g. Digitate in the hero */
.inline-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  transition: text-decoration-color .2s;
}
.inline-link:hover { text-decoration-color: currentColor; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  height: clamp(48px, 2.9vw, 54px);
  padding: 0 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform .2s, background .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--text); color: var(--white); }
.btn-primary:hover { background: var(--accent); }
.btn-secondary { border: 1.5px solid #cfc9cf; background: var(--white); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* Landing particle field: spans the full width of the first screen (header
   included) and sits behind the hero content */
.hero { position: relative; isolation: isolate; }
.dust {
  position: absolute;
  z-index: -1;
  top: calc(var(--header-h) * -1);
  bottom: 0;
  left: 50%;
  width: 100vw;
  height: calc(100% + var(--header-h));
  transform: translateX(-50%);
  pointer-events: none;
}

/* ---------- Video (circle) ---------- */
.video-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Intro animation: dots scatter, form a ring, then curves flow into the circle and stay */
.intro-canvas {
  position: absolute;
  top: -60px;
  left: -60px;
  width: calc(100% + 120px);
  height: calc(100% + 120px);
  pointer-events: none;
  z-index: 0;
}
.video-card {
  position: relative;
  z-index: 1;
  width: 64%;
  aspect-ratio: 1 / 1;
  padding: 8px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid #e6e2e5;
  box-shadow: 0 1px 2px rgba(22, 20, 26, .04), 0 40px 80px -36px rgba(22, 20, 26, .28);
}
.js .video-card { animation: none; opacity: 0; }
.js .video-card.is-in { opacity: 1; animation: pop .9s cubic-bezier(.34, 1.45, .64, 1) both; }
@keyframes pop {
  from { opacity: 0; transform: scale(.4); }
  to { opacity: 1; transform: scale(1); }
}
.video-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(160deg, #f7f6f7 0%, #ecebee 100%);
}
.video-inner video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 78%;
}
/* Photo over the video: visible whenever it isn't playing (the column gets
   .is-playing on play and loses it on pause or end) */
.video-photo {
  position: absolute;
  top: 0;
  left: 3.6%;
  width: 90%;
  height: 100%;
  object-fit: cover;
  /* Face centered in the circle: crop a little lower in the photo (so the face
     sits higher) and a slight zoom gives room to nudge it left to center */
  object-position: 50% 30%;
  /* Zoomed out a little: 90% as wide as the circle but still full height (so
     no gap above or below). The sides fade into a blurred copy of the same
     photo (.video-photo-fill); left is nudged so the face stays centered. */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 9%, #000 91%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 9%, #000 91%, transparent 100%);
  transition: opacity .3s ease;
}
.video-photo-fill {
  position: absolute;
  inset: -12%;
  background: url("images/hero-portrait.jpg") 50% 30% / cover;
  filter: blur(18px) saturate(1.1);
  transition: opacity .3s ease;
}
.video-col.is-playing .video-photo-fill { opacity: 0; }
.video-col.is-playing .video-photo { opacity: 0; }
/* Spoken captions: centered under the play control, only while playing */
.hero-caption {
  position: absolute;
  top: calc(100% + 78px);
  left: 50%;
  width: max-content;
  max-width: min(440px, 92vw);
  margin: 0;
  padding: 10px 18px;
  border-radius: 14px;
  /* Solid backing so the words read clearly over the dotted ring */
  background: rgba(255, 255, 255, .96);
  border: 1px solid #e6e2e5;
  box-shadow: 0 12px 30px -16px rgba(22, 20, 26, .35);
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.video-col.is-playing .hero-caption.has-cue { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .hero-caption, .video-photo, .video-photo-fill { transition: none; } }
/* Desktop: a bigger circle, and the hero text runs from the top of the circle
   to its bottom. The stage is only as tall as the circle, so both columns
   share one height; the ring canvas gets extra room above and below. */
@media (min-width: 901px) {
  .hero { align-items: stretch; align-content: center; }
  .video-col { justify-content: center; }
  .video-stage { aspect-ratio: auto; }
  .video-card { width: 80%; }
  .intro-canvas { top: -110px; height: calc(100% + 220px); }
  .hero-text { display: flex; flex-direction: column; justify-content: space-between; }
  /* Text sits a little lower than the circle */
  .hero-text { position: relative; top: 32px; }
  .hero-text > * { margin-bottom: 0; }
}
/* Play control + caption sit in a pill below the circle, so nothing covers the photo */
/* The circle is centered against the text; the play pill hangs just below it
   without affecting that alignment */
.video-col { position: relative; display: flex; flex-direction: column; align-items: center; }
.video-col .video-controls { position: absolute; top: 100%; left: 50%; translate: -50% 0; margin-top: 8px; }
.video-controls {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 6px 20px 6px 6px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid #e6e2e5;
  box-shadow: 0 12px 30px -16px rgba(22, 20, 26, .35);
  font-size: 15px;
  white-space: nowrap;
}
.js .video-controls { opacity: 0; transform: translateY(8px); transition: opacity .5s ease .35s, transform .5s ease .35s; }
.js .video-controls.is-in { opacity: 1; transform: none; }
.play-toggle {
  flex: none;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--text);
  color: var(--white);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.play-toggle:hover { background: var(--accent); transform: scale(1.05); }
.play-toggle svg { width: 16px; height: 16px; fill: currentColor; margin-left: 2px; }
.play-toggle .icon-pause { display: none; margin-left: 0; }
.is-playing .icon-play { display: none; }
.is-playing .icon-pause { display: block; }
.caption-title { font-weight: 600; }
.caption-time { color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ---------- Credentials strip ---------- */
.creds {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: clamp(32px, 4vw, 72px);
  align-items: start;
  position: relative;
  padding-top: 36px;
  padding-bottom: 56px;
  /* Solid so the background dots don't show through the text */
  background: var(--ivory);
}
/* Divider lines above and below the strip, aligned with the content */
.creds::before,
.creds::after {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background: rgba(31, 29, 36, .08);
}
.creds::after { top: auto; bottom: 0; }
.cred-label {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #6c6670;
}
.cred-value {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.45;
  color: #4a4651;
}
.cred-expertise .cred-value { white-space: nowrap; }
.cred-experience .cred-value { white-space: nowrap; }
/* Company tiles in one row, tinted with the palette from the dots */
.logo-row {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.logo-slot {
  --c: 90, 45, 76;
  min-width: 0;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 12px;
  background: rgba(var(--c), .08);
  border: 1px solid rgba(var(--c), .16);
  color: rgb(var(--c));
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  line-height: 1.15;
  transition: background .2s, transform .2s, border-color .4s, color .4s;
}
.logo-slot:nth-child(4n + 2) { --c: 163, 80, 106; }
.logo-slot:nth-child(4n + 3) { --c: 60, 71, 102; }
.logo-slot:nth-child(4n + 4) { --c: 110, 100, 108; }
.logo-slot:hover { background: rgba(var(--c), .14); transform: translateY(-2px); }
/* Each tile links to the company's site; the link fills the whole tile */
.logo-slot a {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  color: inherit;
}
.logo-slot a:focus-visible { outline: 2px solid rgb(var(--c)); outline-offset: 2px; }

/* ---------- Work ---------- */
.work { padding-top: clamp(56px, 7vw, 112px); padding-bottom: clamp(64px, 8vw, 128px); }
.section-head { margin-bottom: 32px; }
.section-head .cred-label { margin-bottom: 0; }

/* Resume: the page shown as an image, with a download button */
.resume { padding-top: clamp(32px, 4vw, 56px); padding-bottom: clamp(56px, 7vw, 112px); }
/* Kept for screen readers and the tab title only */
.resume-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.resume-head { display: flex; justify-content: center; }
.resume-head .btn { display: inline-flex; align-items: center; gap: 8px; }
.resume-head .btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.resume-sheet { display: block; max-width: 880px; margin: 0 auto; border-radius: 12px; overflow: hidden; border: 1px solid #eceef2; background: #fff; box-shadow: 0 24px 60px -30px rgba(20, 20, 40, .35); transition: transform .3s ease, box-shadow .3s ease; }
.resume-sheet:hover { transform: translateY(-3px); box-shadow: 0 32px 70px -30px rgba(20, 20, 40, .45); }
.resume-sheet img { display: block; width: 100%; height: auto; }
/* Space between project cards */
.project-app + .project-app { margin-top: clamp(28px, 3vw, 48px); }

/* Project: the design takes center stage. A large showcase crossfades between
   key screens; a small floating tab bar switches them (and auto-advances). */
.project-app {
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease;
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(260px, 1fr);
  gap: clamp(20px, 2.4vw, 40px);
  padding: clamp(12px, 1vw, 16px);
  border-radius: 28px;
  background: var(--white);
  border: 1px solid #efeaed;
  box-shadow: 0 2px 6px rgba(22, 20, 26, .06), 0 30px 60px -30px rgba(22, 20, 26, .28);
}
.showcase {
  position: relative;
  aspect-ratio: 16 / 10;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: #f3f0f2;
}
.screen {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 25% 20%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
    radial-gradient(ellipse at 80% 85%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
    #f3f1f2;
  font-size: 15px;
  font-weight: 600;
  color: #6c6670;
  opacity: 0;
  /* The outgoing screen stays put until the new one has fully faded in over it,
     so the switch is a clean crossfade with no dip to the background */
  transition: opacity 0s linear .9s;
}
.screen:nth-child(2) { background-position: 70% 0, 10% 100%, 0 0; }
.screen:nth-child(3) { background-position: 50% 100%, 90% 0, 0 0; }
.screen.is-active { z-index: 1; opacity: 1; transition: opacity .9s cubic-bezier(.4, 0, .2, 1); }
/* A single logo instead of rotating screens */
.showcase-logo {
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 30% 25%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 60%),
    #f7f6f8;
}
.showcase-logo img { width: min(52%, 420px); height: auto; }
.screen img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
/* Live screens: a 1440×900 page scaled to the card; clicks go to the card, not the page */
.screen.is-live { display: block; overflow: hidden; background: #f6f7fa; }
.screen.is-live iframe { position: absolute; top: 0; left: 0; width: 1440px; height: 900px; border: 0; transform-origin: 0 0; transform: scale(var(--s, .5)); pointer-events: none; }


/* Floating frosted tab bar at the bottom of the showcase */
.app-tabs {
  position: absolute;
  left: 50%;
  bottom: 18px;
  translate: -50% 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(22, 20, 26, .55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px -12px rgba(22, 20, 26, .4);
}
/* Screen dots: round buttons; the active one stretches into a pill that fills up */
.app-tabs button {
  position: relative;
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, .35);
  cursor: pointer;
  overflow: hidden;
  transition: width .3s cubic-bezier(.2, .7, .2, 1), background .2s;
}
.app-tabs button:hover { background: rgba(255, 255, 255, .6); }
.app-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.app-tabs button[aria-selected="true"] { width: 30px; background: rgba(255, 255, 255, .35); }
/* Progress fill inside the active dot, then the next screen shows */
.tab-progress {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
}
.app-tabs button[aria-selected="true"] .tab-progress { animation: tab-fill 5s linear forwards; }
/* Pause while the cursor is anywhere on the card, or when it's off screen.
   !important so it wins over the rule above that starts the animation. */
.project-app:hover .tab-progress,
.project-app.is-paused .tab-progress { animation-play-state: paused !important; }
@keyframes tab-fill { to { transform: scaleX(1); } }

.panel-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
/* Info column beside the screen: text at the top, metric + link at the bottom */
.project-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(12px, 1.4vw, 24px) clamp(8px, 1.4vw, 24px) clamp(8px, 1vw, 16px) 0;
}
.project-info-text p:last-child { margin: 14px 0 0; max-width: 46ch; font-size: 16px; line-height: 1.5; color: var(--text-2); }
.project-title {
  margin: 0;
  font-size: clamp(24px, 1.9vw, 32px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
/* Trademark mark: small and raised */
.project-title sup, .case-hero h1 sup, .next-title sup { font-size: .42em; font-weight: 600; vertical-align: super; margin-left: .06em; line-height: 0; }
.project-info-side { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
/* Key result, set apart with a thin divider */
.metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding-top: 20px;
  border-top: 1px solid #ece6ea;
}
.metric-num { font-size: clamp(28px, 2.2vw, 36px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; color: var(--accent); }
.metric-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
/* A status instead of a number, e.g. "In progress" */
.metric-num.metric-status {
  font-size: clamp(20px, 1.5vw, 26px);
  letter-spacing: -0.02em;
}
/* Trailing dots that fade in one after another */
.metric-status .dots span { animation: dot-blink 1.4s infinite both; }
.metric-status .dots span:nth-child(2) { animation-delay: .2s; }
.metric-status .dots span:nth-child(3) { animation-delay: .4s; }
@keyframes dot-blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
.app-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}
.app-link span { display: inline-block; transition: transform .2s; }

/* The whole info side opens the case study: the link's hit area stretches over it */
.project-info { position: relative; cursor: pointer; }
.project-info .app-link::after { content: ""; position: absolute; inset: 0; }
.app-link:focus-visible { outline: none; }
.project-info:has(.app-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 16px; }

/* The whole card opens the case study (projects.js) */
.project-app:has(.app-link) { cursor: pointer; }

/* Hovering anywhere on the card lifts it with a deeper shadow */
.project-app:hover {
  transform: translateY(-6px);
  box-shadow: 0 4px 10px rgba(22, 20, 26, .08), 0 50px 90px -30px color-mix(in srgb, var(--accent) 55%, transparent);
}
.project-app:has(.project-info:active) {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(22, 20, 26, .07), 0 32px 64px -30px color-mix(in srgb, var(--accent) 55%, transparent);
}
.project-app:hover .app-link span { transform: translateX(4px); }

/* ---------- About ---------- */
/* On its own page: no divider at the top, and a little more room under the header */
.about-page .about::before { display: none; }
.about-page .about { padding-top: clamp(48px, 6vw, 104px); }
/* Selected nav item: mauve text on a soft mauve pill */
.header nav a[aria-current] {
  color: #5a2d4c;
  background: rgba(90, 45, 76, .09);
}
.header nav a[aria-current]:hover { color: #5a2d4c; background: rgba(90, 45, 76, .14); }
.about { position: relative; padding-top: clamp(56px, 6vw, 96px); padding-bottom: clamp(24px, 3vw, 48px); }
.about::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background: rgba(31, 29, 36, .08);
}
.about-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 112px);
  align-items: center;
}
.about-row + .about-row { margin-top: clamp(64px, 7vw, 120px); }
.about-row-reverse { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.about-hi {
  margin: 0 0 28px;
  font-size: clamp(44px, 4.2vw, 76px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
/* Labels in the About text use the label style, not body text */
.about-text .cred-label.cred-label { margin: 0 0 18px; max-width: none; font-size: 12px; line-height: normal; color: #6c6670; }
.about-text p { margin: 0 0 16px; max-width: 54ch; font-size: 17px; line-height: 1.7; color: var(--text-2); }
.about-lead.about-lead {
  margin-bottom: 20px;
  max-width: 26ch;
  font-size: clamp(24px, 2vw, 32px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--text);
}
.about-heading {
  margin: 0 0 18px;
  font-size: clamp(30px, 2.6vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.about-photo { position: relative; margin: 0; }
.about-photo img { position: relative; z-index: 1; }
.portrait-frame { position: relative; }
.about-photo figcaption { position: relative; z-index: 1; }
/* Soft network around the portrait, echoing the one around the video */
.about-network {
  position: absolute;
  z-index: 0;
  top: -12%;
  left: -14%;
  width: 128%;
  height: 124%;
  pointer-events: none;
}
/* Drumming video with a sound toggle */
.drum-video {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  overflow: hidden;
  background: #1f1d24;
  box-shadow: 0 2px 6px rgba(22, 20, 26, .06), 0 22px 40px -18px color-mix(in srgb, var(--sh, #5a2d4c) 26%, transparent), 0 50px 90px -36px color-mix(in srgb, var(--sh, #5a2d4c) 20%, transparent);
}
.drum-video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Keep the drummer, not the wall above the glass, in frame */
  object-position: 50% 62%;
}
.sound-toggle {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .4);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.sound-toggle:hover { background: var(--white); transform: translateY(-1px); }
.sound-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sound-toggle svg { width: 18px; height: 18px; fill: currentColor; }
.sound-toggle .stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.sound-toggle .icon-sound { display: none; }
.sound-toggle[aria-pressed="true"] { color: var(--accent); }
.sound-toggle[aria-pressed="true"] .icon-sound { display: block; }
.sound-toggle[aria-pressed="true"] .icon-muted { display: none; }

/* About intro: three photos stacked vertically, staggered left / right / left */
.about-stack { margin: 0; display: flex; flex-direction: column; gap: 0; width: 100%; max-width: 440px; justify-self: end; }
.stack-item { width: 52%; }
.stack-item.s1, .stack-item.s3 { align-self: flex-start; }
.stack-item.s2 { align-self: flex-end; margin-top: -26%; }
.stack-item.s3 { margin-top: -26%; }
.stack-ph, .stack-item img {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  object-fit: cover;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(163, 80, 106, .14), transparent 60%),
    radial-gradient(ellipse at 80% 90%, rgba(60, 71, 102, .14), transparent 60%),
    #f3f0f2;
  border: 1px solid #efeaed;
  box-shadow: 0 2px 6px rgba(22, 20, 26, .06), 0 22px 40px -18px color-mix(in srgb, var(--sh, #5a2d4c) 26%, transparent), 0 50px 90px -36px color-mix(in srgb, var(--sh, #5a2d4c) 20%, transparent);
  color: #6c6670;
  font-size: 14px;
  font-weight: 600;
}
/* Network behind the photo stack */
.about-stack { position: relative; }
.stack-network {
  position: absolute;
  z-index: 0;
  top: -6%;
  bottom: -6%;
  left: -14%;
  width: 128%;
  height: auto;
  pointer-events: none;
}
/* The network gently floats, and loose dots drift on their own paths */
.net-float { animation: net-float 12s ease-in-out infinite; }
@keyframes net-float { 0%, 100% { translate: 0 0; } 33% { translate: 4px -6px; } 66% { translate: -3px 4px; } }
.drift { animation: drift 9s ease-in-out infinite; }
.drift.d1 { animation-duration: 11s; }
.drift.d2 { animation-duration: 13s; animation-direction: reverse; }
.drift.d3 { animation-duration: 10s; animation-direction: alternate-reverse; }
@keyframes drift { 0%, 100% { translate: 0 0; opacity: .5; } 50% { translate: 6px -10px; opacity: 1; } }
/* Location line under the About intro text */
.about-text .about-location {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #6c6670;
}
.about-stack figcaption { position: relative; z-index: 2; align-self: flex-start; padding: 6px 12px 6px 0; background: var(--white); }
/* Soft rose shadow on every image */
.stack-item.s1 { --sh: #8e6a78; }
.stack-item.s2 { --sh: #8e6a78; }
.stack-item.s3 { --sh: #8e6a78; }
.drum-video { --sh: #8e6a78; }
/* Single-photo version: one larger portrait */
.about-stack.single { max-width: 460px; }
.about-stack.single .stack-item { width: 100%; align-self: stretch; margin-top: 0; }
/* Spread the network further out so more of it shows around the photo */
.about-stack.single .stack-network { top: -14%; bottom: auto; height: 126%; left: -42%; width: 184%; }
/* The middle photo sits in front of the other two */
.stack-item { position: relative; z-index: 1; }
.stack-item.s2 { z-index: 3; }
.stack-item img { height: auto; object-fit: cover; object-position: 50% 25%; border: none; }
/* Each photo floats gently up and down, slightly out of step with the others */
.stack-item { animation: float 8s ease-in-out infinite; }
.stack-item.s2 { animation-duration: 9s; animation-delay: -3s; }
.stack-item.s3 { animation-duration: 8.5s; animation-delay: -5s; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
.about-stack figcaption { display: flex; align-items: center; gap: 12px; margin-top: 22px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #6c6670; }

/* "Outside of design" sits on a softly tinted panel */
.about-panel {
  padding: clamp(24px, 3vw, 48px);
  border-radius: 32px;
  background:
    radial-gradient(ellipse 60% 80% at 100% 0%, rgba(163, 80, 106, .08), transparent 70%),
    radial-gradient(ellipse 50% 70% at 0% 100%, rgba(60, 71, 102, .07), transparent 70%),
    #faf7f8;
}
/* Equalizer (driven by drums.js): bars drift independently, then come
   together into one flowing wave, then drift apart again. */
.eq {
  max-width: 460px;
  margin-top: 32px;
  padding: 18px 20px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid #efe7ec;
}
.eq-bars {
  display: grid;
  grid-template-columns: repeat(28, 1fr);
  align-items: end;
  gap: 4px;
  height: 64px;
}
.eq-bar {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(to top, #5a2d4c, #a3506a 55%, #c9a3b4);
  transform: scaleY(.08);
  transform-origin: bottom;
  will-change: transform;
  transition: background .6s;
}
/* Cooler tones on the right (high frequencies) */
.eq-bar:nth-child(n + 15) { background: linear-gradient(to top, #3c4766, #6d6a8a 55%, #b9b4c7); }
.eq-bar:nth-child(n + 23) { background: linear-gradient(to top, #6e646c, #9a9298 55%, #d2ccd0); }
.eq-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.eq-bpm { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #6c6670; }
.about-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
  box-shadow: 0 40px 80px -56px rgba(22, 20, 26, .45);
}
.about-portrait { max-width: 420px; justify-self: end; }
.about-drums { max-width: 460px; }
.about-photo figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #6c6670;
}
.caption-rule { width: 28px; height: 1px; background: var(--accent); }

/* ---------- Testimonials (About page) ---------- */
.testimonials { padding-top: clamp(64px, 7vw, 120px); padding-bottom: clamp(24px, 3vw, 48px); }
.testimonials-head { margin-bottom: 32px; }
.testimonials-head .cred-label { margin-bottom: 10px; }
.testimonials-title { margin: 0; font-size: clamp(28px, 2.4vw, 42px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.testimonial-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); align-items: start; }
.testimonial {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: clamp(24px, 2.6vw, 40px);
  border-radius: 24px;
  background: var(--white);
  border: 1px solid #efeaed;
  box-shadow: 0 30px 60px -48px rgba(22, 20, 26, .22);
}
.testimonial blockquote { margin: 0; }
.testimonial blockquote p { margin: 0 0 14px; font-size: 16px; line-height: 1.7; color: var(--text-2); }
.testimonial .pull.pull {
  margin-bottom: 20px;
  font-size: clamp(20px, 1.5vw, 26px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--accent);
}
/* Collapsed body: a few lines with a soft fade; "Read more" opens the rest.
   testimonials.js gives both pull quotes the same height so the "Read more"
   buttons line up across the cards. */
.t-body { max-height: 8.6em; overflow: hidden; transition: max-height .5s ease; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.testimonial.is-open .t-body { -webkit-mask-image: none; mask-image: none; }
.t-more {
  align-self: flex-start;
  margin: 14px 0 24px;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}
.t-more::after { content: "↓"; display: inline-block; margin-left: 6px; transition: transform .25s; }
.t-more[aria-expanded="true"]::after { transform: rotate(180deg); }
.t-more:hover { text-decoration: underline; text-underline-offset: 4px; }
/* Names always show, under the button */
.testimonial figcaption { padding-top: 20px; border-top: 1px solid #f0ebee; }
.who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.who strong { font-size: 16px; color: var(--text); }
.who span { font-size: 13px; line-height: 1.45; color: var(--text-2); }
.who em { font-size: 12px; font-style: normal; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #6c6670; margin-top: 2px; }

/* ---------- Closing call to action (open, no card) ---------- */
.cta,
.site-footer { position: relative; }
/* Land just below the header when jumping to Contact */
#contact, #work { scroll-margin-top: var(--header-h); }
/* Hairlines aligned with the content edges, like the credentials strip */
.cta::before,
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background: rgba(31, 29, 36, .08);
}
.cta {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 112px);
  align-items: center;
  padding-top: clamp(56px, 6vw, 96px);
  padding-bottom: clamp(56px, 6vw, 96px);
}
.availability {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #6c6670;
}
.avail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3f9b6b;
  box-shadow: 0 0 0 4px rgba(63, 155, 107, .15);
  animation: avail-pulse 2.4s ease-in-out infinite;
}
@keyframes avail-pulse { 50% { box-shadow: 0 0 0 7px rgba(63, 155, 107, 0); } }
.cta h2 {
  margin: 0 0 18px;
  max-width: 18ch;
  font-size: clamp(34px, 3.2vw, 56px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
}
.cta-text p:not(.availability) { margin: 0 0 14px; max-width: 52ch; font-size: 17px; line-height: 1.7; color: var(--text-2); }
.cta-text .btn { margin-top: 14px; }

/* Contact rows: label, value, then a copy button or an arrow */
.contact-list { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.contact-row {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 18px;
  background: var(--white);
  border: 1px solid #efeaed;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.contact-row:hover {
  border-color: color-mix(in srgb, var(--accent) 25%, white);
  box-shadow: 0 20px 40px -30px color-mix(in srgb, var(--accent) 45%, transparent);
  transform: translateY(-2px);
}
.contact-label { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #6c6670; }
.contact-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}
/* The value link covers the whole row (the copy button sits above it) */
.contact-value::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.contact-row:hover .contact-value { color: var(--accent); }
.row-arrow {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #6c6670;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .2s, transform .2s;
}
.contact-row:hover .row-arrow { stroke: var(--accent); transform: translate(2px, -2px); }
.copy-btn {
  position: relative;
  z-index: 1;
  padding: 7px 14px;
  border: 1px solid #e6e0e4;
  border-radius: 999px;
  background: var(--white);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.copy-btn.is-copied { border-color: #3f9b6b; color: #3f9b6b; background: #f2faf5; }

.site-footer { padding-top: 24px; padding-bottom: 32px; }
.site-footer p { margin: 0; font-size: 14px; color: var(--text-2); }

/* ---------- Case study pages ---------- */
.case-hero { padding-top: clamp(40px, 5vw, 80px); padding-bottom: 40px; }
.back-link {
  display: inline-block;
  margin-bottom: clamp(28px, 3vw, 48px);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
  transition: color .2s;
}
.back-link:hover { color: var(--accent); }
.case-hero h1 {
  margin: 0 0 18px;
  max-width: 18ch;
  font-size: clamp(40px, 3.8vw, 68px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.case-lede { margin: 0; max-width: 52ch; font-size: clamp(18px, 1.3vw, 22px); line-height: 1.55; color: var(--text-2); }

/* Role / Team / Timeline / Platform strip, same style as the homepage strip */
.case-meta {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-top: 28px;
  padding-bottom: 40px;
}
.case-meta::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background: rgba(31, 29, 36, .08);
}

/* Screens: 16:10, with a soft tinted placeholder until an image is added */
.media {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #efeaed;
  background:
    radial-gradient(ellipse at 25% 20%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    radial-gradient(ellipse at 80% 85%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    #f3f1f2;
  font-size: 15px;
  font-weight: 600;
  color: #6c6670;
}
.media img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.media-hero { border-radius: 24px; box-shadow: 0 40px 80px -56px rgba(22, 20, 26, .35); }

/* Project overview: text on the left, a smaller hero screen on the right that
   stays in view while the overview text scrolls past */
.case-overview {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(0, 1.5fr);
  gap: clamp(32px, 4vw, 72px);
  align-items: start;
  padding-top: 24px;
  padding-bottom: clamp(32px, 4vw, 64px);
  scroll-margin-top: calc(var(--header-h) + 32px);
}
/* Same type as the homepage Expertise / Experience / Companies strip */
.overview-text .case-sub { margin-top: 32px; }
.overview-text .case-num + .case-sub { margin-top: 28px; }
.overview-text .case-sub h3 {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #6c6670;
}
/* Same body text as the story sections below */
.overview-text .case-sub p {
  margin: 0;
  max-width: 40ch;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-2);
}
.overview-text .case-impact { gap: 10px; }
.overview-text .impact { padding: 16px; }
.overview-text .impact .metric-num { font-size: clamp(24px, 2vw, 32px); }
.overview-text .impact .metric-label { font-size: 13px; }
.overview-media { position: sticky; top: calc(var(--header-h) + 32px); }

/* Flow diagram image: no forced aspect ratio, framed like the other media */
.flow-figure {
  margin: 32px 0 0;
  padding: clamp(16px, 2vw, 28px);
  border-radius: 20px;
  background: var(--white);
  border: 1px solid #efeaed;
  box-shadow: 0 24px 48px -40px color-mix(in srgb, var(--accent) 50%, transparent);
}
.flow-figure img { display: block; width: 100%; height: auto; }
/* Current flow diagram, built in HTML so it stays crisp at any size */
.flow-steps { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 18px; list-style: none; margin: 0; padding: 26px 0 4px; }
.flow-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 128px;
  padding: 14px 10px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 7%, white);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, white);
}
.flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -16px;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid #6c6670;
  border-right: 1.5px solid #6c6670;
  transform: translateY(-50%) rotate(45deg);
}
.flow-n { font-size: 11px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.flow-t { font-size: clamp(11px, .72vw, 13px); font-weight: 600; line-height: 1.4; color: var(--text); }
.flow-step.is-pain { background: #fff6e8; border-color: #e7a43c; box-shadow: 0 10px 24px -16px rgba(231, 164, 60, .7); }
.flow-step.is-pain .flow-n { color: #9a5f12; }
.flow-flag { position: absolute; top: -11px; left: 10px; padding: 2px 8px; border-radius: 999px; background: #e7a43c; color: var(--white); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.flow-caption { margin-top: 18px; padding-top: 14px; border-top: 1px solid #f0ebee; font-size: 14px; line-height: 1.6; color: var(--text-2); }

/* Interviews: persona card beside the key quote */
.interview-row { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: clamp(24px, 3vw, 48px); align-items: center; margin-top: 28px; }
.persona-card {
  margin: 0;
  padding: 24px;
  border-radius: 20px;
  background: var(--white);
  border: 1px solid #efeaed;
  box-shadow: 0 24px 48px -40px color-mix(in srgb, var(--accent) 55%, transparent);
  text-align: center;
}
.persona-art { display: block; width: 104px; height: 104px; margin: 0 auto 16px; }
.pa-bg { fill: color-mix(in srgb, var(--accent) 10%, white); }
.pa-body { fill: color-mix(in srgb, var(--accent) 70%, white); }
.pa-head { fill: #e9c9b1; }
.pa-hair { fill: #3a2a30; }
.pa-doc { fill: var(--white); stroke: var(--accent); stroke-width: 1.5; }
.pa-doc-line { stroke: color-mix(in srgb, var(--accent) 60%, white); stroke-width: 1.6; stroke-linecap: round; }
.persona-card figcaption { display: flex; flex-direction: column; gap: 4px; }
.persona-tag {
  align-self: center;
  margin-bottom: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}
.persona-card strong { font-size: 18px; color: var(--text); }
.persona-card figcaption > span:last-child { font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.case-section .interview-quote { margin: 0; }

/* Friction: three problems as illustrated cards, then a highlighted focus line */
.friction-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 8px 0 28px; }
.friction-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  border-radius: 18px;
  background: var(--white);
  border: 1px solid #efeaed;
  box-shadow: 0 24px 48px -40px color-mix(in srgb, var(--accent) 50%, transparent);
  overflow: hidden;
}
.fc-art { display: block; width: 100%; height: auto; padding: 18px 18px 8px; background: color-mix(in srgb, var(--accent) 5%, white); border-bottom: 1px solid color-mix(in srgb, var(--accent) 10%, #efeaed); }
.fc-box rect { fill: var(--white); stroke: color-mix(in srgb, var(--accent) 35%, #d9dde5); stroke-width: 1.2; }
.fc-lab text, .fc-chiplab text { font: 600 9px var(--font); fill: #5a5663; text-anchor: middle; }
.fc-lab.small text { font-size: 8px; }
.fc-dash path { fill: none; stroke: color-mix(in srgb, var(--accent) 45%, transparent); stroke-width: 1.4; stroke-dasharray: 3 4; }
.fc-hub { fill: var(--white); stroke: #c0563f; stroke-width: 1.5; }
.fc-q { fill: none; stroke: #c0563f; stroke-width: 1.8; stroke-linecap: round; }
.fc-line path { fill: none; stroke: color-mix(in srgb, var(--accent) 55%, transparent); stroke-width: 1.4; }
.fc-warn circle { fill: #fff1ec; stroke: #c0563f; stroke-width: 1.2; }
.fc-warn text { font: 700 11px var(--font); fill: #c0563f; text-anchor: middle; }
.fc-break path { stroke: #c0563f; stroke-width: 2; stroke-linecap: round; }
.fc-chips rect { fill: #fff1ec; stroke: #e7b3a5; stroke-width: 1; }
.fc-chiplab text { font-size: 8px; fill: #a5452f; }
.friction-card figcaption { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 22px; }
.fc-num { font-size: 12px; font-weight: 700; color: var(--accent); }
.friction-card strong { font-size: 17px; color: var(--text); }
.friction-card figcaption > span:last-child { font-size: 15px; line-height: 1.6; color: var(--text-2); }
/* The design focus: a pull-quote style statement */
.case-section p.friction-focus {
  max-width: 30ch;
  margin: 40px 0 8px;
  padding-left: 24px;
  border-left: 3px solid var(--accent);
  font-size: clamp(24px, 2vw, 32px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* ---------- Solutions stepper: four screens, one at a time ---------- */
.stepper { margin-top: 36px; }
.stepper-tabs {
  position: relative;
  display: flex;
  gap: 40px;
  margin-bottom: 32px;
  border-bottom: 1px solid #ece8ec;
}
/* Steps: minimal text tabs. A hairline runs under all of them; the selected
   step gets a short accent underline. Hover darkens the text. */
.stepper-tab {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 0 14px;
  border: none;
  background: none;
  font: inherit;
  text-align: left;
  color: #6c6670;
  cursor: pointer;
  transition: color .2s;
}
.stepper-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.stepper-progress { display: none; }
.stepper-num { font-size: 12px; font-weight: 600; color: #a39da4; font-variant-numeric: tabular-nums; transition: color .2s; }
.stepper-name { font-size: 15px; font-weight: 600; line-height: 1.3; }
.stepper-tab:hover { color: var(--text); }
.stepper-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.stepper-tab[aria-selected="true"] { color: var(--text); }
.stepper-tab[aria-selected="true"] .stepper-num { color: var(--accent); }
.stepper-tab[aria-selected="true"]::after { transform: scaleX(1); }

/* All four panels share one grid cell, so the area keeps the same height and
   the page never jumps when you switch; the selected one crossfades in */
.stepper-panels { display: grid; }
.stepper-panel {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 2fr);
  gap: clamp(24px, 3vw, 48px);
  align-items: center;
  align-content: start;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility 0s linear .3s;
}
.stepper-panel.is-active { opacity: 1; visibility: visible; transition: opacity .3s ease; }
.stepper-copy .case-num { margin-bottom: 10px; }
.stepper-copy h3 { margin: 0 0 12px; font-size: clamp(20px, 1.6vw, 26px); font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; }
.case-section .stepper-copy p:last-child { margin: 0; font-size: 16px; }
.stepper-screen, .stepper-panel img {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid color-mix(in srgb, var(--accent) 12%, #ebeef3);
  background:
    radial-gradient(ellipse at 25% 20%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
    #f6f7fa;
  box-shadow: 0 2px 6px rgba(22, 20, 26, .05), 0 30px 60px -40px color-mix(in srgb, var(--accent) 45%, transparent);
  color: #6c6670;
  font-size: 14px;
  font-weight: 600;
}

/* Screen-only panels: a live page scaled into the frame, one line underneath */
.stepper-panel:has(.stepper-screen.is-live) { grid-template-columns: minmax(0, 1fr); gap: 18px; }
.stepper-screen.is-live { position: relative; display: block; overflow: hidden; background: #f6f7fa; }
.stepper-screen.is-live iframe { position: absolute; top: 0; left: 0; width: 1440px; height: 900px; border: 0; transform-origin: 0 0; transform: scale(var(--s, .5)); pointer-events: none; }
.stepper-screen.is-live img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; box-shadow: none; object-fit: cover; object-position: top; }
/* Scrollable screens: the whole page is rendered and the frame scrolls it; clicks stay off */
/* Placeholder text in an empty screen */
.stepper-screen.is-live > span:only-child { position: absolute; inset: 0; display: grid; place-items: center; }
/* Video screen: fills the frame, anchored to the bottom so the dark strip
   along the top of the footage sits just outside the frame */
.stepper-screen.is-video { background: #04161b; }
.stepper-screen.is-video video { position: absolute; left: 0; bottom: 0; width: 100%; height: 107%; object-fit: cover; object-position: center bottom; }
.stepper-screen.is-scroll { overflow-y: auto; scrollbar-width: thin; }
.stepper-screen.is-scroll iframe { height: var(--h, 900px); }
.stepper-screen.is-scroll .stepper-sizer { display: block; height: calc(var(--h, 900px) * var(--s, .5)); }
.stepper-screen.is-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.stepper-hint { position: sticky; z-index: 1; float: right; top: calc(100% - 44px); margin: 0 12px -32px 0; padding: 6px 12px; border-radius: 999px; background: var(--text); color: var(--white); font-size: 12px; font-weight: 600; pointer-events: none; transition: opacity .3s ease; }
.stepper-screen.is-scrolled .stepper-hint { opacity: 0; }
.case-section p.stepper-caption { margin: 0; max-width: 62ch; font-size: 15.5px; line-height: 1.65; color: var(--text-2); }

/* Tabs with a jump link to the Platform section, right-aligned on the same rule */
.stepper-head { display: flex; align-items: center; gap: 24px; margin-bottom: 32px; border-bottom: 1px solid #ece8ec; }
.stepper-head .stepper-tabs { flex: 1; margin-bottom: 0; border-bottom: 0; }
.case-jump { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
.case-jump svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.case-jump:hover { text-decoration: underline; text-underline-offset: 3px; }
.case-jump:hover svg { transform: translateX(3px); }

/* Validation: two screens side by side with a small arrow centered between the screens.
   Each figure is a subgrid (screen row + caption row), so the arrow centers on the screens, not the captions. */
.compare { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; margin-top: 32px; }
.compare-item { margin: 0; display: grid; grid-row: 1 / 3; grid-template-rows: subgrid; }
.compare-item:first-child { grid-column: 1; }
.compare-item:last-child { grid-column: 3; }
.compare-item .proto-frame { border-radius: 14px; }
.compare-screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #f6f7fa; }
.compare-screen iframe { position: absolute; top: 0; left: 0; width: 1440px; height: 900px; border: 0; transform-origin: 0 0; transform: scale(var(--s, .3)); pointer-events: none; }
.compare-screen iframe:not([src]) { display: none; }
.compare-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.compare-arrow { grid-column: 2; grid-row: 1; align-self: center; display: grid; place-items: center; width: 28px; height: 28px; margin-top: 49px; border-radius: 50%; background: var(--white); border: 1px solid #e3e6ec; color: var(--accent); box-shadow: 0 4px 12px -6px rgba(22, 20, 26, .2); }
.compare-arrow svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.compare-item figcaption { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; }
.compare-item figcaption strong { font-size: 15px; color: var(--text); }
.compare-item figcaption span { font-size: 15px; line-height: 1.6; color: var(--text-2); }
/* Expanded: the figure lifts into a centered overlay, like the prototypes */
.compare-item.is-expanded { position: fixed; z-index: 51; top: 50%; left: 50%; translate: -50% -50%; display: block; width: min(1240px, calc(100vw - 48px), calc((100vh - 220px) * 1.6)); padding: 20px 24px 18px; border-radius: 22px; background: var(--white); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .45); animation: pop-in .3s cubic-bezier(.2, .7, .2, 1); }
.compare-item.is-expanded .proto-frame { box-shadow: none; }
.compare-item.is-expanded .ic-open { display: none; }
.compare-item.is-expanded .ic-close { display: block; }
@media (max-width: 720px) {
  .compare { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: 12px; }
  .compare-item, .compare-item:first-child, .compare-item:last-child { display: block; grid-row: auto; grid-column: 1; }
  .compare-arrow { grid-row: auto; grid-column: 1; justify-self: center; margin-top: 0; rotate: 90deg; }
}

/* Reflection: two columns, each with a simple graphic above its text */
.reflect-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 3vw, 44px); margin-top: 8px; }
.reflect-col h3 { margin: 22px 0 10px; }
.reflect-kicker { margin: 22px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.reflect-kicker + h3 { margin-top: 6px; }
.reflect-col p:last-child { margin: 0; font-size: 16px; }
.reflect-art { display: grid; place-items: center; height: 120px; padding: 0 20px; border-radius: 16px; border: 1px solid #eceef2; background: #f8f9fb; }
/* Automation | Human judgment, split by a dashed handoff line */
.split { display: flex; align-items: center; gap: 12px; }
.split-pill { padding: 8px 14px; border-radius: 999px; background: var(--white); border: 1px solid #e3e6ec; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
.split-pill.is-human { border-color: var(--accent); background: var(--accent); color: var(--white); }
.split-line { width: 2px; height: 44px; border-left: 2px dashed color-mix(in srgb, var(--accent) 50%, #d6d9e0); }
/* Today's handoff (filled) inside a dashed frame, with the pieces that would join it */
.unify { position: relative; width: 100%; padding: 16px 14px 14px; border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, #d6d9e0); border-radius: 14px; }
.unify-label { position: absolute; top: 0; left: 14px; translate: 0 -50%; padding: 0 6px; background: #f8f9fb; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.unify-chips { display: grid; grid-template-columns: repeat(2, max-content); justify-content: center; gap: 8px; }
.unify-chips span { text-align: center; }
.unify-chips span { padding: 6px 11px; border-radius: 999px; background: var(--white); border: 1px dashed #c9ced8; font-size: 12px; font-weight: 600; color: #6c6670; white-space: nowrap; }
.unify-chips span.is-now { border: 1px solid var(--accent); background: var(--accent); color: var(--white); }
/* Phones and tablets: the reflection graphics grow to fit and wrap their pills */
@media (max-width: 1100px) {
  .reflect-art { height: auto; min-height: 120px; padding: 24px 16px 18px; }
  .split { flex-wrap: wrap; justify-content: center; }
  .unify-chips { display: flex; flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 720px) {
  .reflect-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Previous / next controls under the screen */
.stepper-nav { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 20px; }
.stepper-count { font-size: 14px; font-weight: 600; color: #6c6670; font-variant-numeric: tabular-nums; }
.stepper-count b { color: var(--text); }
.stepper-arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid #cfc9cf;
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.stepper-arrow:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.stepper-arrow:disabled { opacity: .35; cursor: default; }
.stepper-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Case study landing: facts strip + wide media + 2x2 overview ---------- */
.case-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, auto));
  justify-content: start;
  gap: 20px clamp(32px, 4vw, 72px);
  margin: 40px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(31, 29, 36, .08);
}
.case-facts .cred-label { margin: 0 0 6px; }
.case-facts dd { margin: 0; font-size: 16px; font-weight: 600; color: #4a4651; }
.overview-wide { display: block; padding-top: 8px; }
.overview-wide .overview-media { position: static; margin-bottom: clamp(48px, 5vw, 80px); }
.wireframe-slot {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 30%, #dfe2e8);
  background: color-mix(in srgb, var(--accent) 3%, white);
  color: #6c6670;
  font-size: 15px;
  font-weight: 600;
}
.overview-wide .overview-text {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px clamp(40px, 6vw, 112px);
}
.overview-wide .overview-text .case-num { grid-column: 1 / -1; margin-bottom: -12px; }
.overview-wide .overview-text .case-sub,
.overview-wide .overview-text .case-num + .case-sub { margin: 0; padding-top: 20px; border-top: 1px solid rgba(31, 29, 36, .08); }
.overview-wide .overview-text .case-sub p { max-width: 52ch; }

/* ---------- ProcureFlow hero: workflow visual ---------- */
.pf-visual {
  display: flex;
  flex-direction: column;
  aspect-ratio: 16 / 10;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 70% at 15% 10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%),
    radial-gradient(ellipse 50% 60% at 95% 100%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%),
    #f7f8fb;
  border: 1px solid color-mix(in srgb, var(--accent) 12%, #ebeef3);
  box-shadow: 0 2px 6px rgba(22, 20, 26, .05), 0 40px 80px -48px color-mix(in srgb, var(--accent) 45%, transparent);
}
/* Inside a case study section: shorter, so the flow fills the card */
.case-sub .pf-visual { aspect-ratio: 16 / 7.5; }
.pf-head { display: flex; align-items: center; gap: 6px; padding: 14px 18px; border-bottom: 1px solid color-mix(in srgb, var(--accent) 10%, #edf0f4); background: rgba(255, 255, 255, .7); }
.pf-dot { width: 8px; height: 8px; border-radius: 50%; background: #dfe3ea; }
.pf-title { margin-left: 10px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #6c6670; }

.pf-flow {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  padding: 0 clamp(12px, 2vw, 28px);
}
/* Dashed track behind the steps, with a signal travelling along it */
.pf-track {
  position: absolute;
  left: 10%;
  right: 10%;
  top: calc(50% - 14px);
  height: 2px;
  background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--accent) 35%, transparent) 0 6px, transparent 6px 12px);
}
.pf-signal {
  position: absolute;
  top: 50%;
  left: 0;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 18%, transparent);
  animation: pf-signal 5s cubic-bezier(.6, 0, .4, 1) infinite;
}
@keyframes pf-signal {
  0% { left: 0; opacity: 0; }
  6% { opacity: 1; }
  45%, 55% { left: 50%; }
  94% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}
.pf-step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.pf-label { display: flex; flex-direction: column; gap: 2px; font-size: clamp(11px, .8vw, 13px); font-weight: 700; color: var(--text); line-height: 1.25; }
.pf-label em { font-style: normal; font-weight: 500; color: #6c6670; }

.pf-doc {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: clamp(64px, 6.2vw, 96px);
  padding: 10px;
  border-radius: 10px;
  background: var(--white);
  border: 1px solid #e6e9ef;
  box-shadow: 0 10px 24px -16px rgba(22, 20, 26, .35);
  text-align: left;
}
.pf-doc-id { font-size: 10px; font-weight: 700; color: var(--accent); letter-spacing: .02em; }
.pf-line { height: 4px; border-radius: 4px; background: #e9ecf2; }
.pf-line.short { width: 60%; }
.pf-chip { margin-top: 3px; align-self: flex-start; padding: 2px 6px; border-radius: 999px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.pf-chip.ok { color: #2f8a5c; background: #e7f5ec; }
.pf-chip.match { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, white); }

.pf-agent {
  display: grid;
  place-items: center;
  width: clamp(48px, 4.4vw, 64px);
  height: clamp(48px, 4.4vw, 64px);
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 12%, transparent), 0 14px 28px -14px var(--accent);
  animation: pf-pulse 5s ease-out infinite;
}
.pf-agent.a1 { animation-delay: .9s; }
.pf-agent.a2 { animation-delay: 3.4s; }
@keyframes pf-pulse {
  0%, 12%, 100% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 12%, transparent), 0 14px 28px -14px var(--accent); }
  5% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--accent) 18%, transparent), 0 14px 28px -14px var(--accent); }
}
.pf-agent svg { width: 45%; height: 45%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* The handoff: a gate with a human checkpoint on it */
.pf-gate { position: relative; display: grid; place-items: center; width: 40px; height: clamp(72px, 7vw, 100px); }
.pf-gate-bar { width: 3px; height: 100%; border-radius: 3px; background: color-mix(in srgb, var(--accent) 45%, transparent); }
.pf-human {
  position: absolute;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid var(--accent);
  color: var(--accent);
}
.pf-human svg { width: 60%; height: 60%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.pf-orders { position: relative; }
.pf-doc.small { width: clamp(60px, 5.8vw, 90px); }
.pf-doc.back { position: absolute; top: -10px; left: 10px; opacity: .55; transform: rotate(5deg); }
.pf-doc.back .pf-doc-id { visibility: hidden; }
.pf-orders .pf-doc:not(.back) { position: relative; }
.pf-doc-id { white-space: nowrap; }

.pf-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid color-mix(in srgb, var(--accent) 10%, #edf0f4);
  background: rgba(255, 255, 255, .7);
  font-size: 12px;
  color: #5a5663;
}
.pf-foot b { color: var(--text); font-weight: 700; }
.pf-trace { font-weight: 600; color: var(--accent); white-space: nowrap; }

/* ---------- Click-through prototype ---------- */
.proto { margin-top: 20px; }
.proto-steps { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 20px; border-bottom: 1px solid #ece8ec; }
.proto-step {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 0 12px;
  border: none;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  color: #6c6670;
  cursor: pointer;
}
.proto-step span { font-size: 11px; color: #a39da4; }
.proto-step::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.proto-step:hover { color: var(--text); }
.proto-step[aria-selected="true"] { color: var(--text); }
.proto-step[aria-selected="true"] span { color: var(--accent); }
.proto-step[aria-selected="true"]::after { transform: scaleX(1); }

.proto-frame { border-radius: 16px; overflow: hidden; background: var(--white); border: 1px solid #e6e8ee; box-shadow: 0 2px 6px rgba(22, 20, 26, .05), 0 40px 80px -50px color-mix(in srgb, var(--accent) 55%, transparent); }
.proto-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid #eef0f4; background: #fafbfc; }
.proto-bar > span:not(.live-badge) { width: 8px; height: 8px; border-radius: 50%; background: #dfe3ea; }
.live-badge { white-space: nowrap; }
.proto-expand {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #e3e6ec;
  border-radius: 50%;
  background: var(--white);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #5a5663;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.proto-expand:hover { border-color: var(--accent); color: var(--accent); }
.proto-expand svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.proto-expand .ic-close { display: none; }

/* Expanded: the prototype opens in a large overlay above the page */
.proto-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(20, 16, 22, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade-in .25s ease; }
@keyframes fade-in { from { opacity: 0; } }
.proto.is-expanded {
  position: fixed;
  z-index: 51;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  width: min(1240px, calc(100vw - 48px), calc((100vh - 200px) * 1.6));
  margin: 0;
  padding: 20px 24px 18px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .45);
  animation: pop-in .3s cubic-bezier(.2, .7, .2, 1);
}
@keyframes pop-in { from { opacity: 0; scale: .96; } }
.proto.is-expanded .proto-frame { box-shadow: none; }
.proto.is-expanded .ic-open { display: none; }
.proto.is-expanded .ic-close { display: block; }
body.proto-open { overflow: hidden; }
.proto-screens { position: relative; aspect-ratio: 16 / 10; background: #f6f7fa; }
.proto-screen { position: absolute; inset: 0; background: #f6f7fa; opacity: 0; visibility: hidden; transform: scale(1.015); transition: opacity .35s ease, transform .45s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .35s; }
.proto-screen.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .35s ease, transform .45s cubic-bezier(.2, .7, .2, 1); }
.proto-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.proto-tag { position: absolute; top: 12px; right: 12px; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .9); border: 1px dashed #c9ccd4; font-size: 11px; font-weight: 600; color: #6c6670; }

/* Live click-through: each screen is the real prototype in an iframe,
   rendered at 1440px wide and scaled to fit. Taller pages can pan down to
   the part that matters (data-pan). */
.proto-live .proto-screens, .proto-live .proto-screen { overflow: hidden; }
.proto-live .proto-screen iframe { position: absolute; top: 0; left: 0; width: 1440px; height: var(--h, 900px); border: 0; transform-origin: 0 0; transform: scale(var(--s, .5)) translateY(calc(var(--pan-from, 0) * -1px)); transition: transform var(--pan-dur, 1.1s) cubic-bezier(.45, 0, .2, 1); }
.proto-live .proto-screen.is-panned iframe { transform: scale(var(--s, .5)) translateY(calc(var(--pan, 0) * -1px)); }
.proto-live .proto-screen[data-pan] .proto-hot { opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.proto-live .proto-screen[data-pan].is-panned .proto-hot { opacity: 1; pointer-events: auto; transition-delay: 1s; }
.proto-live .proto-hot { z-index: 2; }
/* The guided flow drives navigation, so the embedded pages don't take clicks */
.proto-live .proto-screen iframe { pointer-events: none; }
.proto-zone { position: absolute; z-index: 1; border-radius: 6px; cursor: pointer; transition: background .2s ease; }
.proto-zone:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.proto-live .proto-screen[data-pan] .proto-zone { pointer-events: none; }
.proto-live .proto-screen[data-pan].is-panned .proto-zone { pointer-events: auto; }
/* Checkbox step: the confirm action appears once the box is ticked */
.proto-overlay { position: absolute; top: 0; left: 0; width: 1440px; height: 900px; transform-origin: 0 0; transform: scale(var(--s, .5)); pointer-events: none; }
.proto-overlay > * { position: absolute; opacity: 0; transition: opacity .25s ease; }
.fake-check { width: 20px; height: 20px; border-radius: 5px; background: #0b4f7a; display: grid; place-items: center; }
.fake-check svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.fake-btn { display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 6px; background: #0b4f7a; color: #fff; font-family: Inter, system-ui, -apple-system, sans-serif; font-size: 14px; font-weight: 500; }
.fake-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.proto-screen.is-checked .proto-overlay > * { opacity: 1; }
.proto-screen:has([data-check]) .proto-hot[data-next], .proto-zone.for-next { opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.proto-screen.is-checked .proto-hot[data-next], .proto-screen.is-checked .proto-zone.for-next { opacity: 1; pointer-events: auto; }
.proto-screen.is-checked .proto-hot[data-check], .proto-screen.is-checked .proto-zone.for-check { opacity: 0; pointer-events: none; }
.proto-hot.is-hover { background: color-mix(in srgb, var(--accent) 40%, transparent); }
.proto-scroll { position: absolute; z-index: 2; left: 50%; bottom: 18px; translate: -50% 0; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px 9px 18px; border: 0; border-radius: 999px; background: var(--text); color: var(--white); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .45); animation: scroll-nudge 1.8s ease-in-out infinite; }
.proto-scroll svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.proto-scroll:hover { background: var(--accent); }
.proto-scroll.is-pressed { animation: none; scale: .95; }
@keyframes scroll-nudge { 50% { transform: translateY(4px); } }

/* Hotspot: pulsing ring on the thing to click, with a small label */
.proto-hot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  padding: 0;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  cursor: pointer;
}
.proto-hot::before { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--accent); animation: hot-pulse 1.8s ease-out infinite; }
@keyframes hot-pulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(2.2); opacity: 0; } }
.proto-hot:hover { background: color-mix(in srgb, var(--accent) 40%, transparent); }
.proto-hot:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.proto-hot.is-pressed { animation: hot-press .3s ease; }
@keyframes hot-press { 50% { transform: scale(.8); } }
.proto-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  translate: -50% 0;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--text);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
}
.proto-tip::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -5px; border: 5px solid transparent; border-top-color: var(--text); }
.proto-restart {
  position: absolute;
  left: 50%;
  bottom: 14%;
  translate: -50% 0;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid #cfc9cf;
  background: var(--white);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
/* On a checkbox screen, Start over appears once the box is ticked; the corner variant stays clear of a centered modal */
.proto-restart.is-corner { left: auto; right: 3%; bottom: 4%; translate: none; }
.proto-screen:has([data-check]):not(.is-checked) .proto-restart { opacity: 0; pointer-events: none; }
.proto-screen:has([data-check]) .proto-restart { transition: opacity .25s ease; }
.proto-restart:hover { border-color: var(--accent); color: var(--accent); }

.proto-foot { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 18px; }
/* Screen captions read as a note, not a pull quote: no accent bar */
.case-section p.proto-caption { margin: 0; max-width: 62ch; font-size: 15.5px; font-weight: 400; line-height: 1.65; color: var(--text-2); }
.proto-nav { display: flex; align-items: center; gap: 14px; flex: none; }

/* Placeholder sketches (until real screenshots are added) */
.sk { position: absolute; inset: 0; padding: 5% 6%; display: flex; flex-direction: column; gap: 4%; }
.sk i, .sk u, .sk b { display: block; border-radius: 6px; background: #e3e6ec; }
.sk-row { display: flex; gap: 12px; align-items: center; }
.sk-row i { height: 14px; }
.sk-row.head i:first-child { height: 18px; background: #d6dae2; }
.sk-row.center { justify-content: center; }
.sk-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sk-kpis b { height: 56px; border-radius: 10px; background: var(--white); border: 1px solid #e6e8ee; }
.sk-table, .sk-lines { display: flex; flex-direction: column; gap: 8px; }
.sk-tr, .sk-line { display: grid; grid-template-columns: 1.4fr 1fr .8fr 70px; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 10px; background: var(--white); border: 1px solid #e6e8ee; }
.sk-line { grid-template-columns: 2fr 1fr 80px; padding: 16px; }
.sk-tr i, .sk-line i { height: 10px; }
.sk-tr u, .sk-line u { height: 18px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 18%, white); }
.sk-tr u.warn { background: #fde9cf; }
.sk .target { border-color: color-mix(in srgb, var(--accent) 45%, white); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent); }
.sk-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sk-meta i { height: 36px; border-radius: 8px; }
.sk-review { flex-direction: row; gap: 4%; }
.sk-col { flex: 1.6; display: flex; flex-direction: column; gap: 14px; }
.sk-col.side { flex: 1; padding: 14px; border-radius: 12px; background: var(--white); border: 1px solid #e6e8ee; }
.sk-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 12px; background: var(--white); border: 1px solid #e6e8ee; }
.sk-card i { height: 10px; }
.sk-check { display: flex; align-items: center; gap: 10px; }
.sk-check b { width: 16px; height: 16px; border-radius: 50%; background: #cfe9d9; }
.sk-check i { flex: 1; height: 10px; }
.sk-btn { margin-top: auto; padding: 10px; border-radius: 10px; background: var(--accent); color: var(--white); font-size: 12px; font-weight: 700; text-align: center; }
.sk-done { align-items: center; justify-content: center; gap: 16px; }
/* Extra sketch parts for the other flows */
.sk-chips { display: flex; gap: 8px; }
.sk-chips b { padding: 6px 12px; border-radius: 999px; background: var(--white); border: 1px solid #e6e8ee; font-size: 11px; font-weight: 600; color: #6c6670; }
.sk-chips b.target { color: var(--accent); }
.sk-alert { border-color: #efc88f; background: #fffaf2; }
.sk-check.warn b { background: #fde2bd; }
.sk-pos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sk-po { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 12px; background: var(--white); border: 1px solid #e6e8ee; min-height: 110px; }
.sk-po i { height: 10px; }
.sk-total { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 10px; background: var(--white); border: 1px solid #e6e8ee; }
.sk-total i { height: 10px; }
.sk-total u { width: 80px; height: 18px; border-radius: 999px; background: #cfe9d9; }
.sk-ok { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #e7f5ec; color: #2f8a5c; }
.sk-ok svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sk-done .sk-row { width: 100%; }

/* ---------- Live prototype embed ---------- */
.live { margin-top: 20px; }
/* The site renders at a full desktop size and is scaled to fit (live.js) */
.live-stage { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #f6f7fa; }
.live-stage iframe { position: absolute; top: 0; left: 0; width: 1440px; height: 900px; border: 0; transform-origin: 0 0; transform: scale(var(--s, .5)); }
.live-loading { position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; font-weight: 600; color: #6c6670; }
.live.is-loaded .live-loading { display: none; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; font-size: 12px; font-weight: 600; color: #5a5663; }
.live-badge i { width: 7px; height: 7px; border-radius: 50%; background: #2f8a5c; box-shadow: 0 0 0 3px rgba(47, 138, 92, .15); }
.case-section .live p.proto-caption { margin-top: 20px; }
.live-hero { margin-top: 0; }
.live.is-expanded {
  position: fixed;
  z-index: 51;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  width: min(1320px, calc(100vw - 48px), calc((100vh - 140px) * 1.6));
  margin: 0;
  padding: 18px 20px 16px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .45);
  animation: pop-in .3s cubic-bezier(.2, .7, .2, 1);
}
.live.is-expanded .ic-open { display: none; }
.live.is-expanded .ic-close { display: block; }

/* ---------- ProcureFlow agent architecture diagram ---------- */
.case-section p.arch-note { margin-top: 20px; max-width: 64ch; font-size: 16px; line-height: 1.7; color: var(--text-2); }
.arch {
  margin: 0;
  padding: clamp(18px, 2vw, 28px);
  border-radius: 22px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 4%, white), #f8f9fb);
  border: 1px solid color-mix(in srgb, var(--accent) 14%, #ebeef3);
  box-shadow: 0 30px 60px -48px color-mix(in srgb, var(--accent) 50%, transparent);
}
.arch-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 3fr) minmax(0, .85fr); gap: 28px; align-items: stretch; }
.arch-col { position: relative; display: flex; flex-direction: column; gap: 10px; }
.case-section .arch .arch-label { margin: 0 0 4px; max-width: none; line-height: 1.3; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #6c6670; }
.arch-chip {
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--white);
  border: 1px solid #e3e6ec;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.arch-chip.out { border-color: color-mix(in srgb, var(--accent) 30%, white); }
/* Source system under each item */
.arch-chip { display: flex; flex-direction: column; gap: 3px; }
.arch-sys { font-size: 11.5px; font-weight: 500; color: #6c6670; }
.arch-sys::before { content: "from "; }
.arch-chip.out .arch-sys::before { content: "in "; }
.arch-outputs { justify-content: center; }
.arch-outputs .arch-label { margin-top: 0; }
/* Arrows from sources into the core, and from the core out */
.arch-sources::after, .arch-core::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -20px;
  width: 9px;
  height: 9px;
  border-top: 1.5px solid var(--accent);
  border-right: 1.5px solid var(--accent);
  transform: translateY(-50%) rotate(45deg);
}
.arch-core {
  padding: 14px;
  border-radius: 16px;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 35%, white);
  background: var(--white);
}
.arch-trigger {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 9%, white);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}
.arch-lane { display: grid; grid-template-columns: 1fr .8fr 1fr; gap: 26px; flex: 1; }
.arch-agent, .arch-human {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: 14px;
}
.arch-agent { background: color-mix(in srgb, var(--accent) 6%, white); border: 1px solid color-mix(in srgb, var(--accent) 22%, white); }
.arch-human { background: #fff7ec; border: 1px solid #efc88f; justify-content: center; text-align: center; align-items: center; }
.arch-agent:not(:last-child)::after, .arch-human::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -18px;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid #6c6670;
  border-right: 1.5px solid #6c6670;
  transform: translateY(-50%) rotate(45deg);
}
.arch-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--white); }
.arch-icon.human { background: var(--white); color: #b9741a; border: 1.5px solid #e7a43c; }
.arch-icon svg { width: 55%; height: 55%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.arch strong { font-size: 13.5px; color: var(--text); line-height: 1.3; }
.arch-human span:last-child { font-size: 12px; line-height: 1.45; color: #5a5663; }
.arch-agent ul { margin: 2px 0 0; padding: 0 0 0 14px; font-size: 12px; line-height: 1.55; color: #5a5663; }
.arch-rail { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.arch-rail div { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 12px; background: var(--white); border: 1px solid #e3e6ec; border-left: 3px solid var(--accent); }
.arch-rail strong { font-size: 13px; }
.arch-rail span { font-size: 12.5px; line-height: 1.5; color: #5a5663; }

/* Story layout: sticky section menu + content */
.case-layout {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: clamp(40px, 5vw, 96px);
  align-items: start;
  padding-top: clamp(56px, 6vw, 96px);
  padding-bottom: clamp(40px, 5vw, 80px);
}
/* Section menu: a quiet card with a header, numbered items, a progress line
   beside the items and a progress bar at the bottom */
.case-toc { position: sticky; top: calc(var(--header-h) + 32px); }
.toc-head { padding: 0 0 16px; }
/* Solid marker beside the item you're reading */
.toc-marker {
  position: absolute;
  left: -1px;
  top: var(--mark-top, 0px);
  width: 3px;
  height: var(--mark-h, 0px);
  border-radius: 3px;
  background: var(--accent);
  transition: top .35s cubic-bezier(.2, .7, .2, 1), height .35s cubic-bezier(.2, .7, .2, 1);
  z-index: 1;
}
.toc-head .cred-label { margin: 0; }
.toc-pct { font-size: 12px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.case-toc > ol {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0 0 0 18px;
  counter-reset: toc;
}
/* Track and accent fill showing progress through the story */
.case-toc > ol::before,
.case-toc > ol::after {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  border-radius: 1px;
  background: #ece8ec;
}
.case-toc > ol::after {
  bottom: auto;
  width: 1px;
  height: var(--fill, 0px);
  background: color-mix(in srgb, var(--accent) 40%, transparent);
  transition: height .45s cubic-bezier(.2, .7, .2, 1);
}
.case-toc a {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 0;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.35;
  color: #6c6670;
  transition: color .2s;
}
/* Numbers on the main items */
.case-toc > ol > li { counter-increment: toc; }
.case-toc > ol > li + li { margin-top: 4px; }
.case-toc > ol > li > a::before {
  content: counter(toc, decimal-leading-zero);
  flex: none;
  width: 20px;
  font-size: 11px;
  font-weight: 600;
  color: #a8a2a9;
  font-variant-numeric: tabular-nums;
}
.case-toc a:hover { color: var(--text); }
.case-toc a.is-active { color: var(--accent); font-weight: 600; }
.case-toc > ol > li > a.is-active::before { color: var(--accent); }
/* The main item you're inside of shows its number (not a check) in the accent */
.case-toc > ol > li.is-current > a.is-done { color: var(--text); }
.case-toc > ol > li.is-current > a::before { color: var(--accent); }
/* Sections you've already passed read as done */
.case-toc a.is-done { color: var(--text-2); }
/* Main tab whose subtab is being read */
.case-toc .is-current > a:not(.is-active) { color: var(--text); }
/* Subtabs: always shown under their main tab, with small dots */
.case-toc .toc-sub { list-style: none; margin: 2px 0 6px; padding: 0 0 0 30px; }
.case-toc .toc-sub a { padding: 4px 0; font-size: 13.5px; font-weight: 400; color: #7a747c; }
.case-toc .toc-sub a:hover { color: var(--text); }
.case-toc .toc-sub a.is-active { color: var(--accent); font-weight: 500; }

.case-content { display: flex; flex-direction: column; gap: clamp(72px, 7vw, 120px); }
.case-section { scroll-margin-top: calc(var(--header-h) + 32px); }
.case-num {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.case-section h2 {
  margin: 0 0 20px;
  max-width: 24ch;
  font-size: clamp(26px, 2.1vw, 36px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
}
.case-section p { margin: 0 0 18px; max-width: 64ch; font-size: 17px; line-height: 1.7; color: var(--text-2); }
/* Keep section labels small (they're <p> too) */
.case-section p.case-num { margin: 0 0 12px; font-size: 12px; line-height: normal; color: var(--accent); }
.case-section .media { margin-top: 32px; }
.case-sub { margin-top: 56px; scroll-margin-top: calc(var(--header-h) + 32px); }
.role-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 4px 0 24px;
  padding: 22px 0;
  border-top: 1px solid #f0ebee;
  border-bottom: 1px solid #f0ebee;
}
.role-grid .cred-label { margin-bottom: 8px; }
.role-grid .cred-value { margin: 0; font-size: 16px; }
.case-sub h3 { margin: 0 0 14px; font-size: clamp(20px, 1.5vw, 24px); font-weight: 800; letter-spacing: -0.02em; }

.case-impact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.case-impact.is-two { grid-template-columns: repeat(2, 1fr); margin-top: 28px; }
.impact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--accent) 5%, white);
  border: 1px solid color-mix(in srgb, var(--accent) 12%, white);
}
.impact .metric-num { font-size: clamp(32px, 2.6vw, 44px); }
.impact .metric-label { font-size: 14px; }

.insights { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; counter-reset: insight; }
.insights li {
  counter-increment: insight;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 18px;
  padding: 22px 24px;
  border-radius: 16px;
  border: 1px solid #f0ebee;
  background: var(--white);
}
.insights li::before {
  content: counter(insight, decimal-leading-zero);
  grid-row: span 2;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
}
.insights strong { font-size: 18px; }
.insights span { font-size: 16px; line-height: 1.6; color: var(--text-2); }

/* Process: connected nodes, echoing the network in the homepage hero */
.flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
  margin: 12px 0 32px;
  padding: 0;
}
.flow::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 9px;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, #5a2d4c, #a3506a, #3c4766, #9a9298);
  opacity: .5;
}
.flow li { position: relative; display: flex; flex-direction: column; gap: 6px; padding-right: 16px; }
.flow .node {
  width: 18px;
  height: 18px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--c, #5a2d4c);
  box-shadow: 0 0 0 5px rgba(90, 45, 76, .06);
}
.flow li:nth-child(2) .node { --c: #a3506a; }
.flow li:nth-child(3) .node { --c: #3c4766; }
.flow li:nth-child(4) .node { --c: #9a9298; }
.flow strong { font-size: 18px; }
.flow li > span:last-child { font-size: 15px; color: var(--text-2); }

.feature { margin: 48px 0 0; }
.feature .media { margin-top: 0; }
.feature figcaption { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; }
.feature figcaption strong { font-size: 18px; }
.feature figcaption span { font-size: 16px; line-height: 1.6; color: var(--text-2); }

.quote {
  margin: 32px 0 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--accent);
  font-size: clamp(20px, 1.6vw, 26px);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.01em;
}
.quote cite { display: block; margin-top: 12px; font-size: 14px; font-style: normal; font-weight: 600; color: var(--text-2); }

.next-project { padding-bottom: clamp(56px, 6vw, 96px); }
.next-project a {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(28px, 3vw, 48px);
  border-radius: 24px;
  border: 1px solid #efeaed;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.next-project a:hover { border-color: color-mix(in srgb, var(--accent) 25%, white); box-shadow: 0 30px 60px -44px color-mix(in srgb, var(--accent) 45%, transparent); transform: translateY(-3px); }
.next-title { font-size: clamp(26px, 2.4vw, 40px); font-weight: 800; letter-spacing: -0.03em; }
.next-title span { display: inline-block; color: var(--accent); transition: transform .25s; }
.next-project a:hover .next-title span { transform: translateX(6px); }

/* ---------- Scroll reveal ----------
   Elements ease up into place as they enter the screen and back down as they
   leave, so the motion plays both scrolling down and back up. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--d, 0s);
}
.js .project-app[data-reveal] { transform: translateY(56px) scale(.97); }
.js .project-app[data-reveal] {
  transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease;
}
.js .project-app[data-reveal].is-visible:hover { transition-duration: .8s, .35s, .35s; }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
/* Keep the card's hover lift working once it has revealed */
.js .project-app[data-reveal].is-visible:hover { transform: translateY(-6px); }
.js .project-app[data-reveal].is-visible:has(.project-info:active) { transform: translateY(-2px); }

/* ---------- Logo network burst ---------- */
.logo-burst { position: fixed; top: 0; left: 0; width: 100vw; z-index: 11; pointer-events: none; }
/* Larger click area without moving the logo */
.logo { display: inline-block; padding: 10px 14px; margin: -10px -14px; transition: transform .2s ease, color .2s ease; }
/* Hover: PL turns mauve and grows slightly */
.logo:hover { color: #5a2d4c; transform: scale(1.1); }
/* PL pops up slightly, then settles */
.logo.is-bursting { animation: logo-pop .32s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes logo-pop { 45% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* Ambient network behind the page (ambient.js). Content sections and cards
   sit on their own layer above it. */
main, section, footer, .project-app, .testimonial, .contact-row { position: relative; z-index: 1; }
.ambient-net { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; transition: opacity .3s linear, filter .5s ease; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: clamp(16px, 2.4vw, 36px);
  bottom: clamp(16px, 2.4vw, 36px);
  z-index: 20;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px -12px rgba(22, 20, 26, .35);
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px) scale(.9);
  pointer-events: none;
  transition: opacity .35s ease, transform .35s cubic-bezier(.2, .7, .2, 1), color .2s;
}
.to-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { color: var(--accent); transform: translateY(-3px); }
.to-top-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.to-top-ring circle { fill: none; stroke-width: 2; }
.to-top-track { stroke: #eee8ec; }
.to-top-progress { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .1s linear, stroke .3s ease; }
.to-top-arrow { position: relative; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Contact on a full-width black band ---------- */
.cta { color: var(--white); }
.cta::before {
  /* Full-bleed dark band behind the section (replaces the top hairline) */
  top: 0;
  bottom: 0;
  left: 50%;
  right: auto;
  width: 100vw;
  height: auto;
  transform: translateX(-50%);
  z-index: -1;
  background: #170c14;
  transition: background .4s ease;
}
.cta .highlight { color: #d9c2d3; transition: color .4s ease; }
.cta .availability { color: rgba(255, 255, 255, .55); }
.cta-text p:not(.availability) { color: rgba(255, 255, 255, .68); }
.cta .btn-secondary { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .35); }
.cta .btn-secondary:hover { border-color: var(--white); color: var(--white); background: rgba(255, 255, 255, .06); }
.cta .contact-row { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .1); }
.cta .contact-row:hover { border-color: rgba(255, 255, 255, .28); box-shadow: none; }
.cta .contact-label { color: rgba(255, 255, 255, .5); }
.cta .contact-value, .cta .contact-row:hover .contact-value { color: var(--white); }
.cta .row-arrow { stroke: rgba(255, 255, 255, .55); }
.cta .contact-row:hover .row-arrow { stroke: var(--white); }
.cta .copy-btn { background: transparent; border-color: rgba(255, 255, 255, .25); color: rgba(255, 255, 255, .8); }
.cta .copy-btn:hover { border-color: var(--white); color: var(--white); }
.cta .copy-btn.is-copied { background: rgba(63, 155, 107, .15); border-color: #5fc08a; color: #7fd6a4; }
/* No hairline above the footer now that the band ends right above it */
.site-footer::before { display: none; }

/* ---------- Tablets & phones ---------- */
/* Large desktop monitors: use more of the screen and step the type up so the
   page doesn't look small. Laptops (MacBooks included) are unaffected. */
@media (min-width: 1800px) {
  .container { max-width: 1600px; }
  :root { --header-h: 84px; }
  .logo { font-size: 26px; }
  .header nav a { font-size: 17px; }
  .hero h1 { font-size: 28px; }
  .sub { font-size: 21px; }
  .btn { height: 58px; padding: 0 30px; font-size: 17px; }
  .cred-label { font-size: 13px; }
  .cred-value { font-size: 21px; }
  .testimonial blockquote p { font-size: 18px; }
  .testimonials-title { font-size: 48px; }
  .logo-slot { height: 54px; font-size: 14px; }
  .project-title { font-size: 38px; }
  .project-info-text p:last-child, .about-text p, .cta-text p:not(.availability) { font-size: 19px; }
  .metric-num { font-size: 42px; }
  .about-lead.about-lead { font-size: 36px; }
  .about-heading, .cta h2 { font-size: 60px; }
  .about-portrait { max-width: 500px; }
  .about-drums { max-width: 540px; }
  .contact-value { font-size: 19px; }
  .case-hero h1 { font-size: 80px; }
  .case-section p, .overview-text .case-sub p { font-size: 19px; }
  .case-section h2 { font-size: 42px; }
}
@media (min-width: 2400px) {
  .container { max-width: 1800px; }
  .hero h1 { font-size: 30px; }
  .lede { font-size: min(96px, 9cqi); }
}

/* Narrower screens: the current-flow diagram becomes a 4 + 3 grid */
@media (max-width: 1180px) and (min-width: 901px) {
  .arch-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .arch-sources, .arch-outputs { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .arch-sources .arch-label, .arch-outputs .arch-label { width: 100%; }
  .arch-sources::after, .arch-core::after { top: auto; right: auto; bottom: -16px; left: 50%; transform: translateX(-50%) rotate(135deg); }
  .flow-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 28px; }
  .flow-step:nth-child(4)::after { display: none; }
}

/* Small laptops: companies get their own full-width row so all eight fit */
@media (max-width: 1360px) {
  .creds { grid-template-columns: auto 1fr; }
  .cred-companies { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .logo-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  :root { --gutter: 20px; --header-h: 64px; }
  .header nav { gap: 2px; }
  .header nav a { padding: 6px 10px; font-size: 14px; }
  .header nav a.nav-cta { margin-left: 4px; }
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    min-height: 0;
    padding-top: 40px;
    padding-bottom: 176px;
  }
  .hero h1 { white-space: normal; font-size: clamp(17px, 4.6vw, 22px); }
  /* Let the line wrap naturally on narrow screens */
  .br-wide { display: none; }
  .sub { font-size: 17px; }
  .video-stage { max-width: 560px; margin: 0 auto; }
  .intro-canvas { top: -24px; left: -20px; width: calc(100% + 40px); height: calc(100% + 48px); }
  .video-card { width: 68%; }
  .video-controls { font-size: 14px; }
  .showcase { aspect-ratio: 16 / 10; }
  .app-tabs { bottom: 12px; }
  .project-app { grid-template-columns: 1fr; gap: 0; }
  .testimonial-grid { grid-template-columns: minmax(0, 1fr); }
  .cta { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .contact-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 16px; }
  .contact-label { grid-column: 1 / -1; font-size: 11px; }
  .contact-value { font-size: 16px; }
  .about-row, .about-row-reverse { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .about-portrait { justify-self: start; order: -1; max-width: 340px; }
  .about-drums { max-width: 380px; }
  .about-stack { justify-self: start; order: -1; max-width: 360px; }
  .about-network { left: -6%; width: 112%; }
  .about-panel { padding: 20px; border-radius: 24px; }
  .eq { padding: 14px; }
  .eq-bars { gap: 3px; height: 52px; }
  .case-meta { grid-template-columns: 1fr 1fr; row-gap: 20px; }
  .case-impact { grid-template-columns: 1fr; }
  .case-overview { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .friction-cards { grid-template-columns: minmax(0, 1fr); }
  .interview-row { grid-template-columns: minmax(0, 1fr); }
  .proto-steps { gap: 8px; }
  .proto-step { flex-direction: column; gap: 2px; font-size: 11.5px; white-space: normal; }
  .proto-foot { flex-direction: column; align-items: flex-start; }
  .proto-tip { display: none; }
  .sk { padding: 4%; gap: 3%; }
  .sk-kpis b { height: 28px; }
  .sk-tr, .sk-line { padding: 6px 8px; gap: 8px; grid-template-columns: 1.4fr 1fr 40px; }
  .sk-tr i:nth-child(3) { display: none; }
  .sk-meta i { height: 18px; }
  .sk-card, .sk-col.side { padding: 8px; gap: 6px; }
  .sk-check { gap: 6px; }
  .proto-tag { display: none; }
  .live-badge { font-size: 11px; }
  .arch-grid, .arch-lane, .arch-rail { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .arch-sources::after, .arch-core::after, .arch-agent:not(:last-child)::after, .arch-human::after { top: auto; right: auto; bottom: -16px; left: 50%; transform: translateX(-50%) rotate(135deg); }
  .flow-steps { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-top: 14px; }
  .flow-step { min-height: 0; flex-direction: row; align-items: baseline; gap: 12px; }
  .flow-step:not(:last-child)::after { top: auto; right: auto; bottom: -13px; left: 24px; transform: rotate(135deg); }
  .flow-flag { top: -10px; left: auto; right: 10px; }
  .stepper-tabs { gap: 18px; overflow-x: auto; }
  .stepper-tab { flex-direction: column; gap: 2px; padding: 8px 0 10px; }
  .stepper-name { font-size: 12px; }
  .stepper-panel { grid-template-columns: minmax(0, 1fr); }
  .stepper-copy { order: 2; }
  .case-facts { grid-template-columns: 1fr 1fr; }
  .overview-wide .overview-text { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .wireframe-slot { aspect-ratio: 4 / 3; }
  .pf-visual { aspect-ratio: auto; }
  .pf-flow { padding: 26px 8px; gap: 4px; }
  .pf-label em { display: none; }
  .pf-doc, .pf-doc.small { width: 54px; padding: 7px; }
  .pf-doc-id { font-size: 8px; }
  .pf-chip { display: none; }
  .pf-agent { width: 40px; height: 40px; }
  .pf-label { font-size: 10px; }
  .pf-foot { flex-direction: column; gap: 4px; }
  .overview-media { position: static; order: -1; }
  .overview-text .case-impact { grid-template-columns: 1fr 1fr 1fr; }
  .role-grid { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr 1fr; row-gap: 28px; }
  .flow::before { display: none; }
  /* Section menu becomes a sticky bar of pills under the header */
  .case-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 32px; }
  .case-toc { min-width: 0; }
  .case-toc {
    top: var(--header-h);
    z-index: 5;
    margin: 0 calc(var(--gutter) * -1);
    padding: 10px var(--gutter);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #f0ebee;
  }
  .case-toc .cred-label, .toc-head, .toc-marker { display: none; }
  .case-toc { border-bottom: 1px solid #f0ebee; }
  .case-toc > ol > li > a::before { display: none; }
  .case-toc > ol { flex-direction: row; gap: 6px; padding: 0; overflow-x: auto; scrollbar-width: none; }
  .case-toc > ol::-webkit-scrollbar { display: none; }
  .case-toc > ol::before, .case-toc > ol::after { display: none; }
  .case-toc a { padding: 7px 14px; border-radius: 999px; font-size: 14px; white-space: nowrap; }
  .case-toc .toc-sub, .case-toc .is-current > .toc-sub { display: none; }
  .case-toc a.is-active,
  .case-toc .is-current > a { color: var(--white); background: var(--accent); }
  .case-sub { scroll-margin-top: calc(var(--header-h) + 72px); }
}
@media (max-width: 560px) {
  .creds { grid-template-columns: 1fr; }
  .cred-expertise .cred-value { white-space: normal; }
  .logo-slot { font-size: 11px; }
}
@media (max-width: 400px) {
  .header nav a:not(.nav-cta) { padding: 6px 7px; font-size: 13px; }
  .btn { height: 50px; padding: 0 22px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .proto-hot::before { animation: none !important; }
  .pf-signal, .pf-agent { animation: none !important; }
  .net-float, .drift { animation: none !important; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  * { animation: none !important; transition: none !important; }
}

/* ---------- Page-colored chrome (ProcureFlow) ----------
   On pages with .accent-theme the logo, nav and contact band use the page's
   project color instead of mauve. The prototypes keep their original blue. */
.accent-theme .logo:hover { color: var(--accent); }
.accent-theme .header nav a[aria-current] { color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.accent-theme .header nav a[aria-current]:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.accent-theme .cta::before { background: var(--cta-bg, #0b1f33); }
.accent-theme .cta .highlight { color: var(--cta-highlight, #a9c1dc); }
.accent-theme .proto, .accent-theme .live { --accent: var(--proto-accent, #2d5b8c); }
.fake-check.is-outline { width: 16px; height: 16px; border-radius: 4px; background: #fff; border: 1.5px solid #1f2a33; box-sizing: border-box; }
.fake-check.is-outline svg { width: 12px; height: 12px; stroke: #1f2a33; }
.fake-btn.is-approve { background: #18784e; font-size: 13px; font-weight: 650; }
.proto-steps.is-compact { justify-content: flex-start; gap: 40px; }
@media (max-width: 420px) { .proto-steps.is-compact { gap: 20px; } }
/* Two impact cards stack on narrow phones */
@media (max-width: 480px) { .case-impact.is-two { grid-template-columns: 1fr; } }
.proto-tip.is-right, .proto-tip.is-left { bottom: auto; top: 50%; translate: 0 -50%; }
.proto-tip.is-right { left: calc(100% + 10px); }
.proto-tip.is-left { left: auto; right: calc(100% + 10px); }
.proto-tip.is-right::after, .proto-tip.is-left::after { top: 50%; margin: -5px 0 0; border-top-color: transparent; }
.proto-tip.is-right::after { left: auto; right: 100%; border-right-color: var(--text); }
.proto-tip.is-left::after { left: 100%; border-left-color: var(--text); }
.fake-check.is-light { background: transparent; border-color: #fff; }
.fake-check.is-light svg { stroke: #fff; }
.fake-btn.is-issue { border-radius: 4px; background: #07864f; font-size: 13px; font-weight: 650; }

/* TV mockup: a single screen in a bezel on a stand, over a light backdrop tinted with the design's teal */
.screen.is-tv, .tv-stage {
  padding: 4% 10%;
  background:
    radial-gradient(ellipse 60% 35% at 50% 92%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%),
    radial-gradient(ellipse at 20% 10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 55%),
    linear-gradient(180deg, #f4f8f9 0%, #e3eef0 100%);
}
/* The same TV on a case study page, as the overview's wide visual */
.tv-stage { padding: clamp(32px, 5vw, 80px) 16%; border-radius: 24px; }
.tv { width: 100%; display: flex; flex-direction: column; align-items: center; }
.tv-body {
  width: 100%;
  padding: 1.2%;
  background: #0b0d0f;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(4, 22, 27, .12), 0 20px 45px -10px rgba(4, 22, 27, .35), 0 30px 70px -20px color-mix(in srgb, var(--accent) 50%, transparent);
}
.tv-body img, .screen .tv-body img { display: block; width: 100%; height: auto; max-width: none; border-radius: 3px; }
.tv-neck { width: 6%; aspect-ratio: 2 / 1; background: linear-gradient(#1a1d20, #0b0d0f); }
/* TV that links to a video: a caption below it */
.tv-caption {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
.tv-caption svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .25s ease; }
.tv-watch:hover .tv-caption svg { transform: translate(2px, -2px); }
.tv-watch:focus-visible { outline: 2px solid var(--accent); outline-offset: 8px; border-radius: 12px; }
.tv-base { width: 28%; height: 6px; border-radius: 6px; background: #0b0d0f; box-shadow: 0 8px 16px -4px rgba(4, 22, 27, .3); }

/* Homepage: while a project card is hovered, focused or tapped, the page
   previews that project's case study: the background network goes gray, and
   everything else on the page (header, other cards, contact band, back-to-top
   ring) takes the project's colors. projects.js sets the --project-* values
   from the card. */
html:has(.project-app:is(:hover, :has(:focus-visible))) .ambient-net { filter: grayscale(1); }
html:has(.project-app:is(:hover, :has(:focus-visible))) body,
html:has(.project-app:is(:hover, :has(:focus-visible))) .project-app { --accent: var(--project-accent) !important; }
html:has(.project-app:is(:hover, :has(:focus-visible))) .cta::before { background: var(--project-cta-bg); }
html:has(.project-app:is(:hover, :has(:focus-visible))) .cta .highlight { color: var(--project-cta-highlight); }
html:has(.project-app:is(:hover, :has(:focus-visible))) .logo-slot {
  background: color-mix(in srgb, var(--project-accent) 8%, transparent);
  border-color: color-mix(in srgb, var(--project-accent) 16%, transparent);
  color: var(--project-accent);
}
html:has(.project-app:is(:hover, :has(:focus-visible))) .header nav a[href="#work"] {
  color: var(--project-accent);
  background: color-mix(in srgb, var(--project-accent) 9%, transparent);
}
html:has(.project-app:is(:hover, :has(:focus-visible))) .to-top-progress { stroke: var(--project-accent); }

/* Project summary dialog: for a project without a case study page, its card
   opens this instead (projects.js) */
button.app-link { padding: 0; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
body:has(dialog.project-modal[open]) { overflow: hidden; }
.project-modal {
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: clamp(28px, 4vw, 44px);
  border: 0;
  border-radius: 24px;
  background: var(--white);
  color: var(--text);
  box-shadow: 0 40px 120px -20px rgba(20, 16, 22, .45);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.project-modal[open] { animation: pop-in .3s cubic-bezier(.2, .7, .2, 1); }
.project-modal::backdrop { background: rgba(20, 16, 22, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.project-modal[open]::backdrop { animation: fade-in .25s ease; }
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f3f2f4;
  color: var(--text);
  cursor: pointer;
  transition: background .2s;
}
.modal-close:hover { background: #e8e6ea; }
.modal-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.modal-title { margin: 0; font-size: clamp(32px, 3.4vw, 44px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.modal-title sup { font-size: .4em; }
.modal-lede { margin: 10px 0 0; font-size: 18px; line-height: 1.5; color: var(--text-2); }
.modal-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}
.modal-status .avail-dot { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.modal-intro { margin: 28px 0 0; font-size: 16px; color: var(--text-2); }
.modal-list { margin: 16px 0 0; padding: 0; list-style: none; counter-reset: initiative; display: grid; gap: 14px; }
.modal-list li {
  counter-increment: initiative;
  position: relative;
  padding: 18px 20px 18px 60px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 14%, #ebeef3);
  background: color-mix(in srgb, var(--accent) 3%, white);
}
.modal-list li::before {
  content: counter(initiative, decimal-leading-zero);
  position: absolute;
  top: 18px;
  left: 20px;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
}
.modal-list h3 { margin: 0 0 6px; font-size: 16.5px; font-weight: 700; line-height: 1.35; }
.modal-list p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.modal-cta { margin-top: 28px; }

/* ComplyOne context diagram: IT, HR and Compliance as a triangle with broken
   links between them, around a hub that no one could see. Cards sit on a
   fixed-ratio stage so the lines (drawn in the same 100×60 space) meet the
   card centres. */
.triad-stage { position: relative; aspect-ratio: 5 / 3; }
.triad-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.triad-lines line { stroke: #d9837d; stroke-width: 1.5; stroke-dasharray: 2 7; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.triad-card {
  position: absolute;
  width: 29%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 16px 18px;
  border-radius: 16px;
  background: var(--white);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, white);
  border-top: 3px solid var(--accent);
  transform: translate(-50%, -50%);
  box-shadow: 0 20px 36px -26px color-mix(in srgb, var(--accent) 70%, transparent);
}
.triad-head { display: flex; align-items: center; gap: 10px; }
.triad-head strong { font-size: 16px; font-weight: 700; color: var(--text); }
.triad-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 10%, white); color: var(--accent); }
.triad-icon svg, .pg-icon svg, .triad-hub-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.triad-card > span { font-size: 13px; line-height: 1.55; color: var(--text-2); }
.triad-card.is-it { left: 50%; top: 23.33%; }
.triad-card.is-hr { left: 20%; top: 63%; transform: translate(-50%, 0); }
.triad-card.is-compliance { left: 80%; top: 63%; transform: translate(-50%, 0); border-color: #efc3bf; border-top-color: #c8423a; box-shadow: 0 20px 36px -26px rgba(200, 66, 58, .7); }
.triad-card.is-compliance .triad-icon { background: #fdf1f0; color: #c8423a; }
.triad-hub {
  position: absolute;
  left: 50%;
  top: 56.67%;
  width: 19%;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px;
  border-radius: 50%;
  border: 1.5px dashed #d9837d;
  background: #fffafa;
  text-align: center;
  transform: translate(-50%, -50%);
}
.triad-hub-icon { color: #c8423a; margin-bottom: 4px; }
.triad-hub strong { font-size: 13px; font-weight: 700; color: #7d2722; line-height: 1.25; }
.triad-hub > span:last-child { font-size: 11px; line-height: 1.35; color: var(--text-2); }
.triad-break-at { position: absolute; transform: translate(-50%, -50%); }
.triad-break-at.is-left { left: 35%; top: 50.83%; }
.triad-break-at.is-right { left: 65%; top: 50.83%; }
.triad-break-at.is-bottom { left: 50%; top: 78.33%; }
.triad-break {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #c8423a;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 0 0 4px var(--white), 0 0 0 5px #efc3bf;
}
@media (max-width: 900px) {
  .triad-stage { aspect-ratio: auto; display: grid; gap: 14px; }
  .triad-lines, .triad-break-at { display: none; }
  .triad-card, .triad-hub, .triad-stage .triad-card { position: static; width: auto; transform: none; }
  .triad-hub { order: 4; aspect-ratio: auto; flex-direction: row; gap: 8px; border-radius: 12px; padding: 12px; }
  .triad-hub-icon { margin: 0; }
}

/* ComplyOne interview participants: a filled total tile, then one tile per
   function with its icon, count and label */
.pg-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.pg-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 20px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--accent) 16%, white); background: color-mix(in srgb, var(--accent) 4%, white); }
.pg-tile strong { margin-top: 10px; font-size: clamp(36px, 3.4vw, 48px); font-weight: 800; line-height: 1; letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.pg-tile > span:last-child { font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--text-2); }
.pg-tile.is-total { border-color: var(--accent); background: var(--accent); }
.pg-tile.is-total strong, .pg-tile.is-total > span:last-child { color: var(--white); }
.pg-kicker { display: flex; align-items: center; height: 30px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: color-mix(in srgb, var(--white) 75%, var(--accent)); }
.pg-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--white); color: var(--accent); }
@media (max-width: 900px) {
  .pg-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ComplyOne key learnings: each research finding, an arrow, and the product
   priority it became. Then the "How might we" statement. */
.kl-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 18px; }
.case-section .kl-title { margin: 0; font-size: 15px; font-weight: 700; color: var(--text); }
.kl-cols { display: none; }
.kl-rows { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: kl; }
.kl-row { display: grid; grid-template-columns: minmax(0, 1.7fr) 24px minmax(0, 1fr); align-items: stretch; gap: 14px; }
.kl-learning {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px 16px 52px;
  border-radius: 14px;
  background: #faf8f5;
  border: 1px solid #efeae3;
}
.kl-learning::before {
  counter-increment: kl;
  content: counter(kl, decimal-leading-zero);
  position: absolute;
  top: 17px;
  left: 18px;
  font-size: 11px;
  font-weight: 700;
  color: #c8423a;
  font-variant-numeric: tabular-nums;
}
.kl-learning strong { font-size: 15px; font-weight: 700; color: var(--text); }
.kl-learning span { font-size: 13px; line-height: 1.55; color: var(--text-2); }
.kl-arrow { align-self: center; width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kl-priority {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 8%, white);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, white);
}
.kl-tag { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.kl-priority strong { font-size: 14px; font-weight: 700; line-height: 1.35; color: var(--text); }

.hmw {
  position: relative;
  margin: 24px 0 0;
  padding: clamp(28px, 4vw, 48px) clamp(24px, 4vw, 52px);
  border-radius: 20px;
  background: var(--accent);
  color: var(--white);
  overflow: hidden;
}
.hmw::after {
  content: "?";
  position: absolute;
  right: clamp(12px, 3vw, 36px);
  bottom: -.28em;
  font-size: clamp(140px, 16vw, 220px);
  font-weight: 800;
  line-height: 1;
  color: rgba(255, 255, 255, .07);
  pointer-events: none;
}
.hmw-label { display: block; margin-bottom: 14px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.case-section .hmw p { position: relative; margin: 0; max-width: 30ch; font-size: clamp(22px, 2.3vw, 32px); font-weight: 700; line-height: 1.3; letter-spacing: -.015em; color: var(--white); }
.hmw u { text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .55); text-decoration-thickness: 2px; text-underline-offset: 6px; }
@media (max-width: 900px) {
  .kl-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .kl-arrow { justify-self: center; transform: rotate(90deg); }
}

/* ComplyOne click-through: ticks drawn in the prototype's own green and size */
.fake-check.is-comply { width: 17px; height: 17px; border-radius: 3px; background: #13664b; }
.fake-check.is-comply svg { width: 12px; height: 12px; }
/* A tick carried over from the previous step shows straight away */
.proto-overlay > .fake-check.is-kept { opacity: 1; }
/* On a scrolled screen, a ticked checkbox hotspot still hides once used */
.proto-live .proto-screen[data-pan].is-checked .proto-hot[data-check],
.proto-live .proto-screen[data-pan].is-checked .proto-zone.for-check { opacity: 0; pointer-events: none; }
/* ...and its next action stays hidden until the box is ticked */
.proto-live .proto-screen[data-pan]:has([data-check]):not(.is-checked) .proto-hot[data-next],
.proto-live .proto-screen[data-pan]:has([data-check]):not(.is-checked) .proto-zone.for-next { opacity: 0; pointer-events: none; }

/* Case hero screenshot that scrolls inside the browser frame */
.shot-scroll { position: relative; aspect-ratio: 16 / 10; overflow-y: auto; background: #f6f7fa; }
.shot-scroll img { display: block; width: 100%; height: auto; }
.shot-scroll.is-scrolled .stepper-hint { opacity: 0; }

/* Very large monitors: scale the site up a little so it doesn't sit in a
   narrow column with small text (normal 1920x1080 screens are unchanged) */
@media (min-width: 2300px) and (min-height: 1250px) { html { zoom: 1.12; } }
@media (min-width: 3200px) and (min-height: 1700px) { html { zoom: 1.35; } }
