/* Case studies overview (app/templates/case-studies.php): editorial introduction, featured project and a two-column portfolio.
 * Light mode first; dark mode at the end. */
.pf {
  --pf-ink: #1a1a1a;
  --pf-text: #34324a;
  --pf-muted: #5a5870;
  --pf-line: #e4e8ee;
  --pf-tint: #f4f6f8;
  --pf-link: #0a6aa8;
}
.pf p,
.pf li {
  margin: 0;
  color: var(--pf-text);
}

/* ------------------------------------------------------------------ introduction */
.pf-hero {
  padding: clamp(7.25rem, 11vw, 10rem) 1rem clamp(2.25rem, 4vw, 3rem);
  background-color: var(--pf-tint);
  text-align: center;
}
/* The desktop header is taller: keep the breadcrumbs clear of it. */
@media only screen and (min-width: 64rem) {
  .pf-hero {
    padding-top: clamp(9.25rem, 11vw, 10rem);
  }
}
.pf-hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 56rem;
  margin: 0 auto;
}
.pf-hero .cs-breadcrumbs {
  margin-bottom: 1.25rem;
}
.pf-hero .cs-breadcrumbs ol {
  justify-content: center;
}
.pf-hero .cs-breadcrumbs li,
.pf-hero .cs-breadcrumbs a {
  font-size: 0.8125rem;
}
.pf p.pf-eyebrow {
  margin-bottom: 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pf-link);
}
.pf-title {
  margin: 0;
  font-size: clamp(2.25rem, 1.3rem + 3.6vw, 3.625rem);
  font-weight: 700;
  line-height: 1.14;
  color: var(--pf-ink);
  text-wrap: balance;
}
.pf p.pf-intro {
  max-width: 40rem;
  margin-top: 1.25rem;
  font-size: clamp(1.0625rem, 0.97rem + 0.4vw, 1.25rem);
  line-height: 1.6;
  color: var(--pf-muted);
  text-wrap: balance;
}

/* ------------------------------------------------------------------ shared project parts */
.pf-section {
  max-width: 80rem;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) 1rem 0;
  box-sizing: content-box;
}
.pf-project {
  position: relative; /* the case study link stretches over the whole project */
}
.pf-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: clamp(0.75rem, 1.4vw, 1.125rem);
  background-color: var(--pf-tint);
}
.pf-media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
/* A website screenshot set on the project's own colour, running off the foot of the frame. */
.pf-media--window img {
  inset: auto;
  top: 8%;
  left: 6%;
  width: 88%;
  height: auto;
  border-radius: 0.5rem 0.5rem 0 0;
  box-shadow: 0 1.25rem 2.5rem -0.75rem rgba(20, 20, 30, 0.35);
}
.pf-project--claddingking .pf-media--window {
  background: linear-gradient(145deg, #55524d 0%, #33312e 100%);
}
.pf-project--perkfection .pf-media--window {
  background: linear-gradient(145deg, #e8bcc2 0%, #c9707f 100%);
}
.pf-project:has(.pf-link:hover) .pf-media img {
  transform: scale(1.02);
}
.pf-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}
.pf p.pf-industry {
  margin-bottom: 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pf-link);
}
.pf-name {
  margin: 0;
  font-size: clamp(1.75rem, 1.3rem + 1.3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--pf-ink);
  overflow-wrap: break-word;
}
.pf p.pf-headline {
  margin-top: 0.625rem;
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--pf-ink);
  text-wrap: balance;
}
.pf p.pf-text {
  margin-top: 0.75rem;
  max-width: 36rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--pf-muted);
}
.pf-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  margin-top: auto; /* with equal-height cards, capabilities and links line up across a row */
  padding-top: 1.25rem;
}
.pf-caps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
}
.pf .pf-caps li {
  position: relative;
  padding-right: 1.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--pf-ink);
}
.pf-caps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.65rem;
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 50%;
  background-color: var(--secondary);
}
.pf-caps li:last-child {
  padding-right: 0;
}
.pf-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--pf-link);
  text-decoration: none;
}
.pf-link::after {
  content: "";
  position: absolute;
  inset: 0;
}
.pf-arrow {
  transition: transform 0.25s;
}
.pf-project:has(.pf-link:hover) .pf-link {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.pf-project:has(.pf-link:hover) .pf-arrow {
  transform: translateX(4px);
}
.pf-project:has(.pf-link:focus-visible) {
  outline: 3px solid #0a74b5;
  outline-offset: 0.5rem;
  border-radius: 0.75rem;
}
.pf-link:focus-visible {
  outline: none;
}
.pf-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ featured project */
.pf-feature {
  display: grid;
  gap: 1.5rem;
}
.pf-feature .pf-media {
  background-color: #0f1f30;
}
.pf p.pf-label {
  margin-bottom: 1.5rem;
  padding-top: 0.875rem;
  border-top: 3px solid var(--secondary);
  font-family: var(--headerFont);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pf-ink);
}
.pf-feature .pf-name {
  font-size: clamp(2.25rem, 1.2rem + 3vw, 3.5rem);
  line-height: 1.08;
}
.pf-feature p.pf-headline {
  margin-top: 0.875rem;
  font-family: var(--headerFont);
  font-size: clamp(1.375rem, 1.1rem + 0.8vw, 1.75rem);
  font-weight: 400;
  line-height: 1.3;
}
.pf-feature p.pf-text {
  font-size: clamp(1.0625rem, 0.99rem + 0.3vw, 1.125rem);
}
.pf-feature .pf-foot {
  margin-top: 0;
  padding-top: 1.5rem;
}
@media only screen and (min-width: 40rem) and (max-width: 63.999rem) {
  .pf-feature {
    max-width: 46rem;
    margin: 0 auto;
  }
}
@media only screen and (min-width: 64rem) {
  .pf-feature {
    grid-template-columns: minmax(0, 60fr) minmax(0, 40fr);
    align-items: center;
    gap: clamp(2rem, 3.5vw, 3.5rem);
  }
}

/* ------------------------------------------------------------------ the portfolio grid */
.pf-heading {
  margin: 0 0 clamp(1.75rem, 3vw, 2.5rem);
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  line-height: 1.25;
  text-align: center;
}
.pf-section--feature + .pf-section {
  padding-top: clamp(3.5rem, 7vw, 5.5rem);
}
.pf-section--feature + .pf-section .pf-heading {
  padding-top: clamp(2rem, 4vw, 2.75rem);
  border-top: 1px solid var(--pf-line);
}
.pf-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
  max-width: 40rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.pf-item {
  display: flex;
  min-width: 0;
}
.pf-card {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.pf-card .pf-body {
  flex: 1;
  padding-top: 1.25rem;
}
@media only screen and (min-width: 48rem) {
  .pf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(3rem, 5vw, 4.5rem) clamp(1.5rem, 2.5vw, 2rem);
    max-width: none;
  }
  .pf-grid--one {
    grid-template-columns: minmax(0, 1fr);
    max-width: 44rem;
  }
}
.pf p.pf-empty {
  max-width: 34rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  border-radius: 1rem;
  background-color: var(--pf-tint);
  text-align: center;
}

/* The signboard follows with no top padding of its own, so give it room here. */
.pf + #cta-1693 {
  padding-top: clamp(4rem, 8vw, 6rem);
}

/* ------------------------------------------------------------------ dark mode */
html.dark-mode .pf {
  --pf-ink: #fafbfc;
  --pf-text: #d3dce5;
  --pf-muted: #a9b8c7;
  --pf-line: #1d3547;
  --pf-tint: #0a1a27;
  --pf-link: #6cc8ff;
}
html.dark-mode .pf p,
html.dark-mode .pf li {
  color: var(--pf-text);
}
html.dark-mode .pf h1,
html.dark-mode .pf h2,
html.dark-mode .pf h3,
html.dark-mode .pf p.pf-label,
html.dark-mode .pf p.pf-headline,
html.dark-mode .pf .pf-caps li {
  color: var(--pf-ink);
}
html.dark-mode .pf p.pf-eyebrow,
html.dark-mode .pf p.pf-industry {
  color: var(--pf-link);
}
html.dark-mode .pf p.pf-intro,
html.dark-mode .pf p.pf-text {
  color: var(--pf-muted);
}
html.dark-mode .pf-hero .cs-breadcrumbs li,
html.dark-mode .pf-hero .cs-breadcrumbs a {
  color: var(--pf-muted);
}
/* A fine edge keeps pictures distinct from the dark ground. */
html.dark-mode .pf-media {
  box-shadow: 0 0 0 1px #24415a;
}
html.dark-mode .pf-project:has(.pf-link:focus-visible) {
  outline-color: var(--secondary);
}

@media (prefers-reduced-motion: reduce) {
  .pf-media img,
  .pf-arrow {
    transition: none;
  }
  .pf-project:has(.pf-link:hover) .pf-media img,
  .pf-project:has(.pf-link:hover) .pf-arrow {
    transform: none;
  }
}
