/* Shared surfaces and controls for the V2 portfolio. */
.portfolio-page {
  --page-gutter: clamp(1.25rem, 4vw, 4.25rem);
  --content-width: 1573px;
  --approach-space: clamp(2.25rem, 5.5vw, 6rem);
  --approach-text-size: clamp(1.875rem, 3.5vw, 3.5rem);
  --section-title-size: clamp(2.625rem, 5.1vw, 4.5rem);
  --section-space: clamp(5rem, 10vw, 11rem);
  --card-surface: #1e293b;
  --homepage-card-radius: 5px;
  --light-ink: #f8fafc;
  --structural-line: #534F4C;
  --input-border: #898989;
  --border-standard: 1px solid var(--structural-line);
  --panel-surface: #111111;
  --body-size: 1rem;
  --body-leading: 1.5;
  --dialog-surface: var(--panel-surface);
  --modal-backdrop-opacity: 62.4%;
  --dark-focus: #93c5fd;
  --v2-control-height: 46px;
  --glass-tint: rgb(195 195 195 / 22%);
  background: #000;
}
#hero-outer, .v2-main, .v2-contact, #case-study-password-modal, .case-study-modal { --quiet-ink: #7D7D7D; }
.v2-main, .v2-contact { background: #000; color: var(--light-ink); overflow-wrap: anywhere; }
.portfolio-page :is(.company-feature, .orgvue-study, .so-testimonial-card, .case-study-modal,
  .history-dialog, .v2-button-primary, .v2-button-secondary, input, textarea, select) {
  border-radius: var(--homepage-card-radius);
}
.gallery-shell { max-width: var(--content-width); margin-inline: auto; width: calc(100% - 2 * var(--page-gutter)); }
.process-stages p,
.quote-grid blockquote > p,
.contact-name p + p {
  font-family: var(--so-font-family);
  font-weight: var(--font-weight-normal);
  font-size: 1rem;
}
#hero-outer .gh-sub, .section-intro p, .process-stages p,
#testimonials :is(blockquote p, blockquote footer, blockquote footer > span, .quote-snippet, .quote-author),
.contact-details, .contact-signoff { line-height: var(--body-leading); }
.v2-section { padding-block-start: var(--section-space); }
.v2-section, .v2-contact { scroll-margin-block-start: 4rem; }
#how-i-work { scroll-margin-block-start: 0; padding-block-start: max(6.25rem, var(--section-space)); }
.section-title {
  margin: 0;
  font-size: var(--section-title-size);
  font-weight: var(--font-weight-bold);
  line-height: 1.05;
  text-wrap: balance;
}
.section-intro { margin-block-end: clamp(1.75rem, 3.5vw, 3.75rem); }
/* The reference pause includes the white space inside both text lines.
   The panel margins account for the ink below the heading or final copy line. */
#testimonials-title {
  margin-block-end: calc(var(--approach-space) + .125 * var(--section-title-size) + .5rem);
}
#case-studies .section-intro { margin-block-end: calc(var(--approach-space) + .72rem); }
@media (max-width: 767px) {
  #case-studies .section-intro { margin-block-end: calc(var(--approach-space) + .3125rem); }
}
#hero-outer .gh-sub, .section-intro p { font-size: clamp(1rem, 1.45vw, 1.25rem); }
.section-intro p {
  max-width: 72ch;
  text-wrap: pretty;
  margin: 1rem 0 0;
  color: var(--quiet-ink);
}
.portfolio-page :is(.v2-main, .v2-contact, .history-dialog) :is(button, a, [tabindex="0"]):focus-visible,
#hero-outer a:focus-visible, #site-header :is(a, button):focus-visible, .v2-outline-button:focus-visible {
  outline: 2px solid var(--dark-focus);
  outline-offset: 3px;
}
.v2-outline-button {
  border: var(--border-standard);
  background-color: transparent;
  color: #fff;
  cursor: pointer;
}
.v2-outline-button--icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  vertical-align: middle;
  inline-size: var(--v2-control-height);
  block-size: var(--v2-control-height);
  padding: 0;
  border-radius: var(--radius-lg);
}
.v2-text-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 1.75rem;
  color: var(--light-ink);
  font-family: var(--so-font-family);
  font-weight: var(--font-weight-normal);
  font-size: 1rem;
  text-decoration: underline;
  text-decoration-color: var(--structural-line);
  text-underline-offset: .22em;
  overflow-wrap: anywhere;
}
.v2-text-link:hover { color: var(--dark-focus); }
.v2-text-link > :is(img, svg), .study-link > .v2-text-link::after {
  flex: none;
  width: 1rem;
  height: 1rem;
}
@media (width < 48rem) {
  #site-header[data-hero-visible] { visibility: hidden; transition: none; }
}
#site-header { color: var(--light-ink); background: #000; border-bottom: var(--border-standard); }
#site-header > div { width: calc(100% - 2 * var(--page-gutter)); max-width: var(--content-width); padding-inline: 0; }
#portfolio-navbar-toggle svg[data-nav-icon="menu"] > line {
  stroke: #fff;
  vector-effect: non-scaling-stroke;
}
#site-header a, #site-header a span { color: inherit; }
#site-header nav a:focus-visible { background-color: var(--card-surface); }
@media (width < 768px) {
  #portfolio-navbar { overflow: visible; }
  #site-header nav a {
    font-family: var(--font-sans);
    font-size: var(--approach-text-size);
    font-weight: var(--homepage-display-weight);
  }
  #site-header nav a:focus-visible { background-color: var(--glass-tint); box-shadow: none; }
}
@media (hover: hover) {
  .v2-outline-button:hover, #site-header nav a:hover { background-color: var(--glass-tint); }
}
#hero-outer {
  --gh-copy-gap: clamp(1rem, 2.53vw, 2.75rem);
  color: #fff;
  background: #000;
}
#hero-inner {
  position: relative;
  min-height: var(--gh-stable-viewport, 100svh);
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-block: max(1.5rem, env(safe-area-inset-top)) max(1.5rem, env(safe-area-inset-bottom));
  padding-inline: min(4vw, var(--page-gutter));
}
#hero-outer[data-layout="sticky"] {
  height: calc(var(--gh-stable-viewport, 100svh) + min(50svh, 28rem));
}
#hero-outer[data-layout="sticky"] #hero-inner { position: sticky; top: 0; }
#hero-outer .gh-layout {
  display: grid;
  justify-items: center;
  gap: clamp(2.5rem, 9.66vw, 10.5rem);
  width: min(100%, 64rem);
  text-align: center;
}
@media (min-width: 1024px) and (max-height: 56rem) {
  #hero-outer .gh-layout { row-gap: min(7vw, 10.5rem); }
}
#hero-outer .gh-copy {
  display: grid;
  width: 100%;
  row-gap: var(--gh-copy-gap);
}
#hero-s1, #hero-s2 { grid-area: 1 / 1; align-self: start; min-width: 0; }
#hero-s2 { visibility: hidden; }
#hero-outer[data-layout="flow"] :is(#hero-s1, #hero-s2) { grid-area: auto; visibility: visible; }
#hero-outer :is(h1, h2, .gh-sub) { text-wrap: balance; }
#hero-outer .gh-sub { margin: var(--gh-copy-gap) auto 0; color: var(--quiet-ink); }
#hero-s2 h2 {
  display: grid;
  justify-items: center;
  gap: calc(var(--gh-copy-gap) / 2);
  padding-block-end: calc(var(--gh-copy-gap) / 2);
}
#hero-s2 h2 > span { color: var(--quiet-ink); }
#gh-link { color: inherit; }
#gh-link:is(:hover, :focus-visible) { text-decoration: underline; text-underline-offset: .12em; }
#hero-outer .gh-portrait-stack {
  position: relative;
  width: clamp(12rem, 25.12vw, 27.3125rem);
  max-width: 100%;
}
#hero-outer .gh-portrait-stack img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}
#hero-outer .gh-glasses { position: absolute; inset: 0; pointer-events: none; }
@keyframes gh-arrive {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) and (scripting: enabled) {
  #hero-s1:not(.gh-intro-settled) .gh-intro {
    animation: gh-arrive 500ms cubic-bezier(.33, .67, .67, 1) backwards;
    animation-play-state: var(--gh-intro-play, running);
  }
}
@media (prefers-reduced-motion: no-preference) {
  #hero-outer[data-layout="sticky"] #hero-s1 {
    opacity: calc(1 - var(--gh-text-exit, 0));
    transform: translateY(calc(-24px * var(--gh-text-exit, 0)));
  }
  #hero-outer[data-layout="sticky"] #hero-s2 {
    opacity: var(--gh-crossfade, 0);
    transform: translateY(calc(16px * (1 - var(--gh-crossfade, 0))));
  }
  #hero-outer[data-layout="sticky"] .gh-glasses {
    opacity: calc(1 - var(--gh-crossfade, 0));
    transform-origin: 50% 45%;
    transform: translateY(calc(-70% * var(--gh-glasses-travel, 0))) rotate(calc(6deg * var(--gh-glasses-travel, 0)));
  }
}
@media (prefers-reduced-motion: reduce), (scripting: none) {
  #hero-s1, #hero-s2 { grid-area: auto; visibility: visible; }
}
@media (min-width: 1024px) {
  #hero-s1 .gh-heading-line { display: block; }
}
@media (min-width: 1280px) {
  .preview-large-hero #hero-outer h1 {
    font-size: clamp(3.625rem, 4.5vw, 4.5rem);
    line-height: 1.08;
  }
}

#how-i-work {
  --stage-gap: clamp(1.75rem, 3.8vw, 4.5rem);
  --stage-indent: 1.75rem;
}
.approach { display: grid; gap: 1.5rem; margin-block-end: var(--approach-space); }
#how-i-work .section-label { font-size: 1rem; font-weight: var(--font-weight-medium); color: var(--quiet-ink); }
.approach-copy {
  min-width: 0;
  color: #fff;
}
#how-i-work .approach .approach-copy > p {
  font-family: var(--font-sans);
  font-size: var(--approach-text-size);
  font-weight: var(--homepage-display-weight);
  line-height: var(--body-leading);
}
.approach-copy p span { line-height: 1.2; }
/* The display paragraph and rotating name share tighter tracking. */
@layer base {
  #how-i-work .approach-copy :where(p, span) { letter-spacing: -.025em !important; }
}
.approach-copy p + p { margin-block-start: .95em; }
.approach-copy .approach-lead + p { margin-block-start: .64em; }
.approach-word-end { white-space: nowrap; }
.approach-company {
  position: relative;
  display: inline-grid;
  vertical-align: baseline;
  margin-inline-end: .14em;
  transform: rotate(-1.5deg);
  background: #fff;
  color: #000;
}
/* All five names occupy one cell, so the widest sizes the box in the active font. */
.approach-word-mask { display: grid; overflow: clip; text-align: center; }
.approach-word-mask > span {
  grid-area: 1 / 1;
  padding: .14em .4em;
  font-weight: var(--font-weight-semibold);
  transform: translateY(-100%);
  opacity: 0;
}
.approach-word-mask > [data-word-state="current"] { transform: translateY(0); opacity: 1; }
.approach-word-mask > [data-word-state="leaving"] { transform: translateY(100%); opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .approach-word-mask > [data-word-state] {
    transition-property: transform, opacity;
    transition-duration: 600ms;
    transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  }
}
.approach-word-toggle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.process-label { margin-block-end: clamp(1.5rem, 3vw, 3rem); }
.process-stages {
  --marker-center: .75rem;
  position: relative;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--stage-gap);
  letter-spacing: .005em;
  color: #fff;
}
/* A single decorative connector runs from the first dot to the end of Evolve. */
.process-stages::before {
  content: "";
  position: absolute;
  inset: var(--marker-center) auto 0 4px;
  width: 1px;
  background: var(--structural-line);
  transform-origin: left top;
}
@media screen and (prefers-reduced-motion: no-preference) {
  .process-stages::before { transform: scaleY(var(--process-progress, 1)); }
}
.process-stages li { min-width: 0; position: relative; padding-inline-start: var(--stage-indent); }
.process-stages li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: calc(var(--marker-center) - 4.5px);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
}
@media (forced-colors: active) {
  .process-stages::before, .process-stages li::before { background: CanvasText; }
}
.process-index {
  display: block;
  color: #fff;
  font-size: 1rem;
  font-weight: var(--font-weight-medium);
  line-height: 1.5rem;
}
.process-stages h4 { margin: .55rem 0 1rem; font-size: clamp(1.25rem, 1.6vw, 1.5rem); line-height: 1.2; font-weight: var(--font-weight-semibold); }
.process-stages p { max-width: 38ch; font-size: var(--body-size); }
@media (min-width: 768px) {
  .approach {
    align-items: baseline;
    margin-block-end: calc(var(--approach-space) + .75rem);
  }
}
@media (768px <= width < 1024px) {
  .approach, .process-stages li {
    display: grid;
    grid-template-columns: minmax(9rem, 1fr) minmax(0, 3fr);
    column-gap: var(--stage-gap);
  }
  .approach { padding-inline-start: var(--stage-indent); }
  .process-stages li { align-content: start; }
  /* Measure both 62ch caps in process body type, independently of the larger statements. */
  .approach-copy, .process-stages p {
    grid-column: 2;
    max-width: 62ch;
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
  }
  .process-stages h4 { grid-column: 1; margin-block: .25rem 0; }
  .process-stages p { grid-row: 1 / 3; }
}
@media (min-width: 1024px) {
  .approach, .process-stages {
    grid-template-columns: repeat(4, minmax(0, 19.625rem));
    column-gap: var(--stage-gap);
    justify-content: space-between;
  }
  .approach-copy { grid-column: 2 / -1; }
  .process-stages { --marker-center: 2.9375rem; }
  .process-stages::before {
    inset: calc(var(--marker-center) - .5px) 0 auto 4.5px;
    width: auto;
    height: 1px;
  }
  .process-stages li { padding-inline-start: 0; }
  .process-index { padding-bottom: calc(var(--marker-center) - 1.5rem); }
  .process-stages h4 { margin-block-start: 2.1875rem; }
  .process-stages p { max-width: none; }
}
@media screen and (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
  .process-stages::before { transform: scaleX(var(--process-progress, 1)); }
}

@media screen and (width < 952px) and (prefers-reduced-motion: no-preference) {
  [data-stack-reveal="pending"] { opacity: 0; }
  [data-stack-reveal="entering"] { animation: stack-reveal 500ms ease-out; }
}
@keyframes stack-reveal {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

#case-studies { --row-gap: clamp(2rem, 6.5vw, 7.5rem); }
.client-rows { display: grid; gap: var(--row-gap); }
@media (min-width: 952px) and (prefers-reduced-motion: no-preference) {
  .client-rows[data-pinned] {
    display: flex;
    flex-direction: column;
    isolation: isolate;
  }
  /* Keep naturally scrolling cards in paint order above earlier sticky cards. */
  .client-rows[data-pinned] > .company-feature { position: relative; }
  .client-rows[data-pinned] > [data-pin-row] {
    position: sticky;
    top: var(--row-pin-top);
    opacity: var(--row-opacity, 1);
  }
  /* Give the last card room to hold before the next section's normal padding. */
  .client-rows[data-pinned]:not([data-keyboard-flow]):has(> [data-pin-row]:last-child)::after {
    content: "";
  }
  .client-rows[data-pinned] > [data-covered] { pointer-events: none; }
  html:has(.client-rows[data-pinned][data-keyboard-flow]) { scroll-behavior: auto; }
  .client-rows[data-pinned][data-keyboard-flow] > .company-feature {
    position: relative;
    top: auto;
    opacity: 1;
    pointer-events: auto;
  }
}
.company-heading { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: .5rem; margin-bottom: clamp(.75rem, 2.7vw, 3rem); }
.company-heading h3 { max-width: 100%; min-width: 0; font-size: clamp(1.5rem, 2.15vw, 2.125rem); font-weight: var(--font-weight-bold); letter-spacing: -.03em; line-height: 1.05; }
/* Manrope's painted O is .75em high, centred .36em above the alphabetic baseline. */
.company-logo {
  --logo-size: 1.21em;
  display: inline-block;
  width: var(--logo-size);
  height: var(--logo-size);
  margin-inline-end: 16px;
  vertical-align: calc(.36em - var(--logo-size) / 2);
  overflow: hidden;
}
.company-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* The two wide wordmarks have extra background around their lettering. */
#company-adp .company-logo img, #company-abcam .company-logo img { transform: scale(1.125); }
.company-period {
  justify-self: end;
  text-align: end;
  color: var(--quiet-ink);
  font-size: 1rem;
  line-height: 1rem;
  letter-spacing: .005em;
  font-weight: var(--font-weight-medium);
}
.company-period span { font-weight: inherit; white-space: nowrap; }
@media (width < 640px) {
  :is(#case-studies-title, #testimonials-title, #contact-title) { font-size: 2.375rem; }
  .company-heading .company-period { font-size: .875rem; }
  .orgvue-row .company-feature-body { row-gap: 1.6rem; }
}
.company-feature, :is(.quote-grid, .case-study-quotes) .so-testimonial-card { background: var(--panel-surface); }
.company-feature, .orgvue-study {
  position: relative;
  isolation: isolate;
}
.company-feature {
  --feature-space: clamp(1.25rem, 4vw, 4.5rem);
  padding: var(--feature-space);
}
.company-feature .company-heading { margin-bottom: var(--feature-space); }
.company-feature-body {
  display: grid;
  gap: var(--feature-space);
  align-items: center;
}
.company-feature-copy h4 {
  color: white;
  font-size: clamp(1.75rem, calc(1.2314rem + 2.1277vw), 2.25rem);
  font-weight: var(--font-weight-semibold);
  line-height: 1.12;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.study-link {
  display: inline-grid;
  margin-block-start: clamp(1.5rem, 3vw, 3rem);
  cursor: pointer;
}
/* The link sits above the card-wide hit area so only the link itself turns blue. */
.study-link > .v2-text-link { z-index: 2; }
.study-link > .v2-text-link::after {
  content: "";
  background-color: currentColor;
  mask: url("../images/contact-arrow.svg") center / contain no-repeat;
}
.study-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--homepage-card-radius);
}
.orgvue-study .study-link::after { inset: -1px; } /* Include the study card's border. */
.study-link:focus-visible::after {
  outline: inherit;
  outline-offset: inherit;
}
@media (min-width: 1024px) {
  .company-feature-body {
    grid-template-columns: minmax(min(17rem, 33%), 1.15fr) minmax(0, 3fr);
    column-gap: clamp(1.5rem, 4vw, 4.875rem);
  }
  .company-feature-copy { grid-area: 1 / 1; }
  .company-feature-body > .teaser-art { grid-area: 1 / 2; }
  .company-feature-copy h4 { font-size: clamp(2rem, 2.8vw, 3rem); }
}
/* The homepage PNGs include the transparent space around their screens. */
.teaser-art, .teaser-art > .case-study-image { display: block; width: 100%; }
.teaser-art > .case-study-image { height: auto; }
.project-title { grid-column: 1 / -1; align-self: start; font-size: clamp(1rem, 1.18vw, 1.125rem); font-weight: var(--font-weight-semibold); letter-spacing: -.018em; line-height: 1.25; }
.project-period { color: var(--quiet-ink); font-size: clamp(.875rem, 1vw, 1rem); line-height: 1.5; }
.orgvue-row { container: orgvue-card / inline-size; }
.orgvue-row .company-feature-body { grid-template-columns: minmax(0, 1fr); }
.orgvue-studies {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1rem, 1.35vw, 1.5rem);
}
.orgvue-study {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 1.4vw, 1.5rem);
  padding: clamp(1rem, 1.5vw, 1.625rem);
  border: var(--border-standard);
  background: transparent;
}
.various-row .teaser-art {
  display: flex;
  align-items: flex-end;
  aspect-ratio: 3 / 2;
}
.various-row .community-websites-art { aspect-ratio: auto; }
.orgvue-study-details {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
}
.orgvue-study .project-title { flex: 1; }
.orgvue-study .project-period {
  margin-block-start: .375rem;
  font-weight: var(--font-weight-medium);
  font-size: 1rem;
  line-height: 1.5;
}
.orgvue-study .study-link { margin-block-start: 16px; }
@media (min-width: 768px) {
  .orgvue-study .study-link { margin-block-start: 24px; }
}
@media (min-width: 1280px) {
  .orgvue-study .study-link { margin-block-start: 32px; }
}
@container orgvue-card (min-width: 50rem) {
  .orgvue-studies { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .various-row .community-websites-art { aspect-ratio: 3 / 2; }
  .community-websites-art > .case-study-image {
    aspect-ratio: 1.58;
    object-fit: cover;
    object-position: 49% 50%;
  }
}

.quote-grid {
  display: grid;
  align-items: start;
  gap: clamp(1rem, 1.25vw, 1.3125rem);
  grid-template-columns: minmax(0, 1fr);
}
:is(.quote-grid, .case-study-quotes) .so-testimonial-card {
  min-width: 0;
  margin: 0;
  padding: clamp(1rem, 1.3vw, 1.375rem);
  border: 0;
  box-shadow: none;
  color: var(--light-ink);
}
:is(.quote-grid, .case-study-quotes) blockquote > p { color: inherit; }
:is(.quote-grid, .case-study-quotes) blockquote > footer { margin-top: 1.5rem; color: inherit; }
:is(.quote-grid, .case-study-quotes) blockquote > footer > span { color: var(--quiet-ink); margin-top: .25rem; }
.quote-grid > #more-homepage-quotes:not([hidden]) { display: contents; }
.quote-grid[hidden], .quote-grid [hidden], .quote-wall[hidden] { display: none; }
.quote-toggle {
  grid-column: 1 / -1;
  justify-self: start;
  text-align: start;
  cursor: pointer;
}
.quote-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
@media (width > 639px) {
  .quote-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .quote-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quote-toggle {
    display: block;
    min-height: 2.75rem;
    padding: .5rem 0;
    font-weight: var(--font-weight-semibold);
    text-underline-offset: .25em;
  }
  .quote-toggle:hover { text-decoration-color: currentColor; }
  .quote-toggle svg { display: none; }
}

/* The shell reserves the whole composition before any card leaves the stack. */
@media (min-width: 1280px) {
  html:has(#testimonials:target) { scroll-behavior: auto; }
}
html[data-testimonial-hold] {
  scroll-behavior: auto;
  overflow-anchor: none;
  overflow-y: hidden;
  scrollbar-gutter: stable;
  overscroll-behavior-y: none;
}
#testimonials[data-wall] {
  --wall-top: clamp(1rem, 3dvh, 2.25rem);
  --wall-bottom: clamp(1.25rem, 3.5dvh, 2.75rem);
  --tile-padding: clamp(.625rem, 1.5dvh, 1.125rem);
  /* Keep the section gap above the heading and the existing inset when the wall holds. */
  margin-block-start: calc(var(--section-space) - var(--wall-top));
  scroll-margin-block-start: var(--wall-header);
  padding-block: var(--wall-top) var(--wall-bottom);
}
#testimonials[data-wall] .gallery-shell {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--wall-header) - var(--wall-top) - var(--wall-bottom));
}
#testimonials[data-wall] .section-title { margin-block-end: clamp(.875rem, 2.4dvh, 2rem); }
.quote-wall {
  display: grid;
  flex: 1;
  align-items: center;
  column-gap: clamp(.75rem, 1.3vw, 1.5rem);
  isolation: isolate;
}
.quote-tile {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: var(--homepage-card-radius);
  text-align: start;
  cursor: zoom-in;
}
.quote-tile:first-child { z-index: 1; }
.quote-wall[data-measuring] { visibility: hidden; }
.quote-wall[data-stacked] .quote-tile:not(:first-child) { visibility: hidden; }
.quote-face {
  display: grid;
  gap: .375rem;
  padding: clamp(.5rem, 1.2dvh, 1rem) var(--tile-padding);
  border-radius: var(--homepage-card-radius);
  background: var(--panel-surface);
  color: var(--light-ink);
}
#testimonials .quote-face .quote-snippet {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--excerpt-lines, 3);
  overflow: hidden;
  font-size: 1rem;
  font-weight: var(--font-weight-medium);
}
.quote-face .quote-author { font-size: .875rem; font-weight: var(--font-weight-semibold); }
.quote-tile[aria-expanded="true"] { opacity: 0; }
@media (hover: hover) {
  .quote-tile:hover .quote-face { background: #202020; }
}
@media (prefers-reduced-motion: no-preference) {
  .quote-tile .quote-face {
    transform-origin: calc(50% + var(--to-centre-x)) calc(50% + var(--to-centre-y));
    transition: transform 350ms cubic-bezier(.22, 1, .36, 1);
  }
  #testimonials[data-reading] .quote-tile .quote-face { transform: scale(.97); transition-duration: 450ms; }
}
.quote-reader {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 1.5rem;
  border: 0;
  background: transparent;
  color: var(--light-ink);
  overflow: visible;
}
.quote-reader[open] { display: grid; place-items: center; }
.quote-reader::backdrop { background: transparent; }
#testimonials[data-reading] .quote-reader::backdrop { background: rgb(0 0 0 / 55%); }
@media (prefers-reduced-motion: no-preference) {
  .quote-reader::backdrop { transition: background-color 350ms; }
}
.quote-sheet {
  position: relative;
  width: min(42rem, 100%);
  border-radius: var(--homepage-card-radius);
  overflow: hidden;
  background: var(--dialog-surface);
  transform-origin: top left;
}
.quote-reading {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: calc(100dvh - 3rem);
  padding: clamp(1.25rem, 3vw, 3rem);
}
.quote-close {
  align-self: flex-end;
  min-height: 2.75rem;
  padding-inline: .5rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: .25em;
}
.quote-close:not(:focus-visible) {
  position: absolute;
  clip-path: inset(50%);
  pointer-events: none;
}
.quote-scroll { min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; }
.quote-scroll .so-testimonial-card {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
}
.quote-scroll blockquote > p { font-size: clamp(1.375rem, 1.85vw, 1.875rem); font-weight: var(--font-weight-medium); color: inherit; }
.quote-scroll blockquote > footer { margin-top: 1.5rem; font-size: 1rem; color: inherit; }
.quote-scroll blockquote > footer > span { color: var(--quiet-ink); }
.quote-sheet > .quote-face { position: absolute; inset: 0 auto auto 0; transform-origin: top left; opacity: 0; pointer-events: none; }

.quote-cursor {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 60;
  width: 5.375rem;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: .875rem;
  font-weight: var(--font-weight-semibold);
  pointer-events: none;
  user-select: none;
}
.quote-cursor:not([hidden]) { display: grid; }
.quote-reader > .quote-cursor { --glass-tint: rgb(205 205 205 / 18%); }
.quote-cursor::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgb(66 66 66 / 92%);
  border: var(--border-standard);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .quote-cursor::before {
    background: var(--glass-tint);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
}
.quote-cursor > span { position: relative; }
.quote-tile[data-quote-cursor], .quote-reader[data-quote-cursor] { cursor: none; }
.quote-reader .quote-sheet { cursor: auto; }

.v2-contact {
  --contact-value-columns: min(5rem, 29%) minmax(0, 1fr);
  --contact-value-gap: .75rem;
  padding: var(--section-space) 0 clamp(3rem, 6vw, 6rem);
}
.contact-details, .contact-signoff { display: grid; gap: 1.5rem; }
.contact-details {
  --contact-spacing: clamp(2rem, 5.75vw, 6.5rem);
  margin-block: var(--contact-spacing);
}
.contact-name p:first-child { font-size: clamp(1.35rem, 1.75vw, 1.875rem); font-weight: var(--font-weight-semibold); }
.contact-name p + p { margin-top: .65rem; color: #fff; }
.contact-details dl { display: grid; gap: .55rem; }
.contact-details dl > div { display: grid; grid-template-columns: var(--contact-value-columns); align-items: baseline; column-gap: var(--contact-value-gap); }
.contact-details dt { color: var(--quiet-ink); font-weight: var(--font-weight-medium); }
.contact-details dd { min-width: 0; }
.contact-signoff { align-items: end; font-size: .875rem; color: #fff; }
.contact-signoff a { width: fit-content; }
.contact-signoff img { display: block; width: 3.8125rem; height: auto; }
@media (width < 1024px) {
  .contact-tagline { display: none; }
}
@media (width < 767px) {
  .contact-signoff {
    grid-template-columns: var(--contact-value-columns);
    column-gap: var(--contact-value-gap);
    align-items: center;
  }
}
@media (width < 765px) {
  .contact-details { row-gap: var(--contact-spacing); }
}
@media (min-width: 768px) {
  .contact-details, .contact-signoff { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1.25rem, 2.5vw, 3.5rem); }
}

#case-study-password-modal {
  --password-error-color: #FF7171;
  background-color: rgb(0 0 0 / var(--modal-backdrop-opacity));
}
#case-study-password-modal [role="dialog"] {
  border-radius: var(--homepage-card-radius);
  color-scheme: dark;
  background: var(--dialog-surface);
  border: var(--border-standard);
}
#case-study-password-description .v2-text-link { display: inline; font: inherit; }
#case-study-password-modal .password-heading { border-bottom: var(--border-standard); }
#case-study-password {
  background-color: var(--dialog-surface);
  border: 1px solid var(--input-border);
  padding-inline-end: 3.5rem;
}
#case-study-password::-ms-reveal { display: none; }
#case-study-password-error[data-incorrect-password] {
  color: var(--password-error-color);
  letter-spacing: 0;
}
#case-study-password-form:has(#case-study-password-error[data-incorrect-password]:not(.hidden)) #case-study-password {
  border-color: var(--password-error-color);
}
.password-field { position: relative; }
.password-visibility {
  position: absolute;
  inset-inline-end: .25rem;
  inset-block: 0;
  margin-block: auto;
  inline-size: 2.75rem;
  block-size: 2.5rem;
  border-radius: var(--radius-lg);
  color: var(--quiet-ink);
}
.password-visibility:not([hidden]) { display: grid; place-items: center; }
.password-visibility:is(:hover, :focus-visible) { color: var(--color-white); }
.password-visibility:not(.active) .password-hide,
.password-visibility.active .password-show { display: none; }
/* Keep native button semantics and the Preline control typography. */
.v2-button-primary, .v2-button-secondary {
  border: var(--border-standard);
  color: var(--color-white);
  font: 500 .875rem/1.5 var(--default-font-family);
}
.v2-button-primary { background-color: var(--color-neutral-800); }
.v2-button-secondary { background-color: var(--dialog-surface); }
.v2-button-primary:enabled:is(:hover, :focus-visible, :active) { background-color: var(--color-neutral-700); }
.v2-button-secondary:enabled:is(:hover, :focus-visible, :active) { background-color: var(--color-neutral-800); }
:is(.v2-button-primary, .v2-button-secondary):disabled { opacity: .5; pointer-events: none; }
.portfolio-page .drawer :is(blockquote, .so-icon-button) { border: var(--border-standard); }
#case-study-password-modal .password-close { color: var(--color-neutral-400); }
#case-study-password-modal .password-close:is(:hover, :focus-visible, :active) {
  background-color: var(--color-neutral-700);
  color: var(--color-white);
}
:is(.v2-button-primary, .v2-button-secondary):focus-visible,
#case-study-password-modal :is(button, input, a):focus-visible {
  outline: 2px solid var(--dark-focus);
  outline-offset: 2px;
}

.history-dialog {
  background: var(--card-surface); color: var(--light-ink); border: var(--border-standard);
  overflow-wrap: anywhere;
  width: min(28rem, calc(100% - 2.5rem)); max-height: 85svh; overflow: auto;
  padding: clamp(1.5rem, 3vw, 2.5rem); margin: auto;
}
.history-dialog::backdrop { background: rgb(0 0 0 / 78%); }
html:has(.history-dialog[open]) { overflow: hidden; }
.history-dialog h2 { font-size: 1.75rem; line-height: 1.15; letter-spacing: -.025em; font-weight: 600; }
.history-dialog p { margin: .75rem 0; color: #cbd5e1; }
.history-return { margin-top: 1rem; padding: .55rem 1rem; min-height: 2.75rem; cursor: pointer; }

/* The drawer's existing grid and band classes continue to own section spacing. */
.case-study-modal {
  --study-body-size: var(--text-base);
  --study-caption-gap: calc(var(--spacing) * 4);
  --font-sans: var(--v2-font-family);
  --so-font-family: var(--v2-font-family);
  --so-color-heading: var(--color-white);
  --so-color-body: var(--color-white);
  --caption-ink: color-mix(in srgb, var(--structural-line), var(--color-white));
  font-family: var(--v2-font-family);
}
@media (min-width: 48rem) {
  .case-study-modal {
    --study-body-size: var(--text-lg);
    --study-caption-gap: calc(var(--spacing) * 5);
  }
}
@media (min-width: 1280px) {
  .case-study-modal { --study-caption-gap: calc(var(--spacing) * 7); }
}
/* Apply the drawer reading rhythm even to text with legacy responsive leading utilities. */
.portfolio-page .case-study-modal :where(h1, h2, h3, h4, h5, h6, p, ul, ol, li, figcaption, blockquote,
  footer, span, dt, dd, th, td, a, button, strong, em) { line-height: var(--body-leading) !important; }
@media (width < 768px) {
  .case-study-modal .case-study-hero-title h2 { line-height: normal !important; }
}
.case-study-modal button { font-family: var(--default-font-family); }
.case-study-modal .case-study-employment {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-block-end: .75rem;
}
.case-study-employment .case-study-logo { --logo-size: clamp(2.25rem, 5vw, 3.125rem); flex: none; width: var(--logo-size); height: var(--logo-size); object-fit: contain; }
.case-study-employment .company-period { text-align: start; letter-spacing: normal; }
.case-study-modal :is(.case-study-content, .case-study-section) { background-color: var(--panel-surface); }
.case-study-modal :where(.text-slate-600),
:is(#drawer-adp, .case-study-modal) .case-study-section-heading { color: var(--color-white); }
:is(#drawer-adp, .case-study-modal) h3.case-study-section-heading { font-weight: var(--homepage-display-weight); }
.case-study-modal .case-study-content h4 {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-medium);
  letter-spacing: normal;
  color: var(--so-color-heading);
}
@media (min-width: 1536px) {
  .case-study-modal .case-study-content h4 { font-size: var(--text-2xl); }
}
.case-study-modal .case-study-content :where(p:not(.ai-key-metric), figcaption, ul, ol, li, td) {
  font-family: var(--v2-font-family);
  font-size: var(--study-body-size);
  font-weight: var(--font-weight-normal);
  letter-spacing: normal;
}
.case-study-modal figcaption { margin-block-start: var(--study-caption-gap); color: var(--caption-ink); }
/* Compact copy groups already supply four spacing units between their children. */
.case-study-copy .flex-col.gap-4 > :is(p, ul, ol) + :is(img, figure, picture, video, iframe, .aspect-video),
.case-study-copy .flex-col.gap-4 > :is(img, figure, picture, video, iframe, .aspect-video) + :is(p, ul, ol) {
  margin-block-start: calc(var(--study-block-gap) - 4 * var(--spacing));
}
/* Measure from the copy to full-width media even if the left heading is taller. */
.case-study-grid:has(+ :is(.case-study-wide, .adp-artwork, .generator-design-gallery)) > .case-study-copy {
  padding-block-end: var(--study-block-gap);
}
:is(#drawer-adp, .case-study-modal) .case-study-grid:has(> .case-study-copy) + :is(.case-study-wide, .adp-artwork, .generator-design-gallery) {
  margin-block-start: 0;
}
.case-study-modal .case-study-wide + .case-study-grid {
  margin-block-start: var(--study-block-gap);
}
.case-study-modal .case-study-tabs nav { background: var(--dialog-surface); border-radius: var(--homepage-card-radius); }
.case-study-modal [role="tab"] { border-radius: var(--homepage-card-radius); color: white; }
.case-study-modal [role="tab"][aria-selected="true"] { background-color: var(--color-neutral-800); color: white; }
.case-study-modal [role="tab"]:is(:hover, :focus-visible) { background-color: var(--color-neutral-700); color: white; }
.case-study-modal .case-study-content a { color: var(--light-ink); text-decoration: underline var(--structural-line); text-underline-offset: .22em; }
.case-study-modal .case-study-content a:hover { color: var(--dark-focus); }

.case-study-testimonials .case-study-section-heading { grid-column: 1 / -1; }
.case-study-quotes .so-testimonial-card > p { color: inherit; }
.case-study-quotes .so-testimonial-card > footer { font-weight: 500; letter-spacing: normal; }
.case-study-quotes .so-testimonial-card > footer > span { font-weight: 300; }
