/*
  main.css — global custom CSS for the child theme.
  ----------------------------------------------------------------------------
  All values reference tokens.css. Never hardcode colors, font sizes, or
  spacing values here.

  Organization:
  1. Resets & base elements
  2. Typography
  3. Layout primitives (container, section)
  4. Components (cards, buttons, etc.) — add as you go
  5. Utilities — add sparingly
*/


/* ===========================================================================
   0. Fonts — self-hosted (assets/fonts/), SIL Open Font License.
   Lexend 300–600 (headings). Rubik 300, 400, 600 + 300/600 italic (body).
   Weights or styles not listed here are imitated by the browser — avoid them.
=========================================================================== */

/* --- Lexend --- */

@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/lexend-300.woff2') format('woff2');
}

@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/lexend-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/lexend-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/lexend-600.woff2') format('woff2');
}

/* --- Rubik --- */

@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/rubik-300.woff2') format('woff2');
}

@font-face {
  font-family: 'Rubik';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/rubik-300italic.woff2') format('woff2');
}

@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/rubik-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/rubik-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Rubik';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/rubik-600italic.woff2') format('woff2');
}

/* ===========================================================================
   1. Resets & base
=========================================================================== */

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

html {
  font-size: 100%; /* override Bricks's 10px root — restores standard 1rem = 16px */
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-family-base);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-body);
  line-height: var(--line-height-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 767px) {
  body {
    font-size: var(--font-size-small);
  }
}

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

a {
  color: var(--color-text-link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  transition: color var(--duration-base) var(--ease-out);
}

a:hover {
  color: var(--color-text-link-hover);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

blockquote {
  margin: 0;
  padding: 0;
  border: none;
}

button {
  background-color: transparent;
}

/* ===========================================================================
   2. Typography
=========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-light); /* 300 — default for all headings */
  line-height: var(--line-height-heading);
  letter-spacing: var(--letter-spacing-normal);
  margin: 0 0 var(--space-4);
  color: var(--color-text);
}

h1 {
  font-size: var(--font-size-h1);
}
h2 {
  font-size: var(--font-size-h2);
}
h3 {
  font-size: var(--font-size-h3);
}
h4 {
  font-size: var(--font-size-h4);
}
h5 {
  font-size: var(--font-size-h5);
}

h6 {
  font-size: var(--font-size-h6);
}

h1 .text-accent {
  color: var(--brand-pink);
  font-weight: var(--font-weight-semibold);
}

h1 strong,
h2 strong,
h3 strong,
h4 strong,
h5 strong,
h6 strong {
  font-weight: var(--font-weight-semibold);
  color: inherit;
}

p {
  margin: 0 0 var(--space-4);
}

/* ─── Dark-surface heading colour ───────────────────────────────────────────
   Any h1/h2/h3 that lives inside a dark section is white by default.
   .text-accent (pink) overrides because it's a direct class on the span — no
   additional specificity needed.
   Add new dark containers to this selector list; never repeat the rule.
─────────────────────────────────────────────────────────────────────────── */
.hero__inner h1,
.hero__inner h2,
.page-hero h1,
.page-hero h2,
.site-footer h1,
.site-footer h2,
[class*="dark-bg"] h1,
[class*="dark-bg"] h2 {
  color: var(--true-white);
}

.hero__inner .text-accent,
.page-hero .text-accent,
.site-footer .text-accent,
[class*="dark-bg"] .text-accent {
  color: var(--brand-pink);
}

/* ===========================================================================
   3. Layout primitives
=========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--section-padding-x);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: var(--section-padding-y);
}

.section--alt {
  background-color: var(--color-bg-alt);
}

/* ===========================================================================
   4. Components
=========================================================================== */

/* Add component styles as you build each section. Examples:

.card { ... }
.card__title { ... }
.card--featured { ... }

.btn { ... }
.btn--primary { ... }
.btn--ghost { ... }
*/

/* ---------------------------------------------------------------------------
   Hero
--------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 600px;
  height: 95vh;
  max-height: 1150px;
  overflow: hidden;
  background: var(--brand-black);
}

@media (max-width: 767px) {
  .hero {
    min-height: 50vh;
  }
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  /* transition removed — GSAP handles crossfade */
}

.hero__slide.is-active {
  opacity: 1;
}

.hero__slide img,
.hero__slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  /* background-color: rgba(36, 19, 25, 0.85); */
  background-color: rgba(54, 19, 116, 0.85);
  z-index: 1;
}

.hero__inner {
  position: absolute;
  bottom: 6.25rem;
  bottom: 11.25rem;
  left: 0;
  right: 0;
  z-index: 2;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--section-padding-x);
}

.hero__inner h1 {
  color: var(--color-text-inverse);
  max-width: 20ch;
  margin-bottom: 0;
}

.hero__word-wrapper {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

#hero-word {
  display: inline-block;
  white-space: nowrap;
  color: var(--brand-pink);
  font-weight: var(--font-weight-medium);
}

.hero__letter {
  display: inline-block;
  opacity: 0;
}

/* Responsive  */

@media (max-width: 767px) {
  .hero {
    min-height: 60vh;
    max-height: 75vh;
  }

  .hero__inner {
    bottom: var(--space-12); /* 48px on mobile */
  }
}

/* ---------------------------------------------------------------------------
   Header
--------------------------------------------------------------------------- */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: calc(var(--space-2) * 10) 0;
  color: var(--color-text-inverse);
  z-index: var(--z-sticky);
  transition:
    background-color var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out),
    padding var(--duration-base) var(--ease-out);
}

@media (max-width: 767px) {
  .site-header {
    padding: var(--space-6) 0;
  }
}

.site-header.is-scrolled {
  position: fixed;
  background-color: var(--brand-black);
  box-shadow: var(--shadow-md);
  padding: var(--space-3) 0;
}

.site-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--section-padding-x);
  gap: var(--space-6);
  flex-direction: row;
}

.site-header__logo {
  display: block;
  height: var(--space-8); /* 32px */
  width: auto;
}

.site-header__logo img,
.site-header__logo svg {
  height: 100%;
  width: auto;
  display: block;
}

/* --- Logo variants --- */

.logo--dark {
  display: none;
}
.logo--light {
  display: block;
}

/* Light header: swap logo */
body.header-light .site-header:not(.is-scrolled) .logo--light {
  display: none;
}
body.header-light .site-header:not(.is-scrolled) .logo--dark {
  display: block;
}

/* Scrolled: always light logo regardless of page */
.site-header.is-scrolled .logo--light {
  display: block;
}
.site-header.is-scrolled .logo--dark {
  display: none;
}

/* --- Light header text colours --- */

body.header-light .site-header:not(.is-scrolled) .site-header__nav a {
  color: var(--color-text);
}

body.header-light .site-header:not(.is-scrolled) .site-header__nav a::after {
  background-color: var(--brand-pink);
}

body.header-light .site-header:not(.is-scrolled) .site-header__contact {
  color: var(--color-text);
}

body.header-light
  .site-header:not(.is-scrolled)
  .site-header__contact-wrap::after {
  background-color: var(--color-text);
}

body.header-light
  .site-header:not(.is-scrolled)
  .site-header__contact-wrap:hover::after {
  background-color: var(--brand-pink);
}

body.header-light .site-header:not(.is-scrolled) .nav-toggle__bar {
  background-color: var(--color-text);
}

.site-header__nav {
  display: flex;
  gap: var(--space-8);
}

.site-header__nav ul {
  gap: clamp(var(--space-4), 40px, var(--space-8));
}

.site-header__nav li {
  margin: 0;
}

.site-header__nav a {
  position: relative;
  color: var(--color-text-inverse);
  text-decoration: none;
  font-family: var(--font-family-heading);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  padding: var(--space-3);
}

@media (hover: hover) {
  .site-header__nav a:hover {
    color: var(--color-text-inverse);
    opacity: 1;
  }
}

.site-header__nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: var(--space-4);
  right: var(--space-4);
  height: 2px;
  background-color: var(--brand-pink);
  transform: scaleX(0);
  transition: transform var(--duration-base) var(--ease-out);
}

@media (hover: hover) {
  .site-header__nav a:hover::after {
    transform: scaleX(1);
  }
}

.site-header__contact-wrap {
  position: relative;
  display: inline-flex;
  width: fit-content;
  flex-direction: row;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  cursor: pointer;
}

.site-header__contact-wrap::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--color-text-inverse);
  transition: background-color var(--duration-base) var(--ease-out);
}

@media (hover: hover) {
  .site-header__contact-wrap:hover::after {
    background-color: var(--brand-pink);
  }
}

.site-header__contact {
  color: var(--color-text-inverse);
  text-underline-offset: 0.2em;
  font-family: var(--font-family-heading);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  transition: opacity var(--duration-base) var(--ease-out);
  text-decoration: none;
}

.site-header__contact-wrap {
  position: relative;
}

.site-header__contact {
  position: static;
}

.site-header__contact::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

@media (hover: hover) {
  .site-header__contact:hover {
    color: var(--color-text-inverse);
  }
}

.site-header__contact-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: inherit;
  display: inline;
}

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

/* Hide hamburger and overlay on desktop */
@media (min-width: 1024px) {
  .nav-toggle {
    display: none !important;
  }
  .nav-overlay {
    display: none !important;
  }
}

/* Hide desktop nav and contact on mobile */
@media (max-width: 1023px) {
  .site-header__nav {
    display: none;
  }
  .site-header__contact-wrap {
    display: none;
  }
}

/* --- Hamburger button --- */

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-text-inverse);
  border-radius: var(--radius-pill);
  transform-origin: center;
  transition:
    transform var(--duration-base) var(--ease-out),
    opacity var(--duration-base) var(--ease-out);
}

.nav-open .nav-toggle {
  position: relative;
  z-index: calc(var(--z-overlay) + 1);
}

/* Animate to X when open */
.nav-open .nav-toggle__bar:nth-child(1) {
  transform: translateY(8.25px) rotate(45deg);
}
.nav-open .nav-toggle__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-open .nav-toggle__bar:nth-child(3) {
  transform: translateY(-8.25px) rotate(-45deg);
}

/* --- Overlay --- */

.nav-overlay {
  position: fixed;
  inset: 0;
  background-color: var(--brand-black);
  z-index: var(--z-overlay);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-slow) var(--ease-out);
}

.nav-open .nav-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* Prevent body scroll when overlay is open */
.nav-open {
  overflow: hidden;
}

/* --- Overlay links --- */

.nav-overlay__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-overlay__nav ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-overlay__nav li {
  margin: 0;
}

.nav-overlay__nav a {
  position: relative;
  color: var(--color-text-inverse);
  text-decoration: none;
  font-family: var(--font-family-heading);
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-light);
  padding: var(--space-2) 0;
}

.nav-overlay__nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--brand-pink);
  transform: scaleX(0);
  transition: transform var(--duration-base) var(--ease-out);
}

@media (hover: hover) {
  .nav-overlay__nav a:hover::after {
    transform: scaleX(1);
  }
}

/* --- Overlay contact --- */

.nav-overlay__contact {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) 0;
  width: fit-content;
  margin-left: 1em;
}

.nav-overlay__contact::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--color-text-inverse);
  transition: background-color var(--duration-base) var(--ease-out);
}

@media (hover: hover) {
  .nav-overlay__contact:hover::after {
    background-color: var(--brand-pink);
  }
}

.nav-overlay__contact .site-header__contact {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-light);
}

.nav-overlay__contact a {
  color: var(--color-text-inverse) !important;
  text-decoration: none;
  font-family: var(--font-family-heading);
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-light);
}

.nav-overlay__contact .site-header__contact-icon {
  width: 1em;
  height: 1em;
}

/* ---------------------------------------------------------------------------
   The Quadratica Difference
--------------------------------------------------------------------------- */

.difference__intro,
.section-light__intro {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--section-padding-x);
  padding-block: var(--section-padding-y);
}

.difference__label-row,
.section-light__label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-8);
}

.difference__label,
.section-light__label {
  color: var(--brand-violet);
}

.difference__heading,
.section-light__heading {
  max-width: 28ch;
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .section-light__intro {
    gap: var(--space-6);
  }

  .section-light__intro .small-heading {
    width: 60%;
  }
}

/* --- Section light: supporting text + centred variant ---
   .section-light__text      optional paragraph under the heading.
   .section-light--centered  add to the Section to centre the label, heading
                             and text. No label row or arrow link in this variant.
*/

.section-light__text {
  text-wrap: balance;
  margin: 0;
}

.section-light--centered .section-light__intro {
  align-items: center;
  gap: var(--space-6);
  text-align: center;
}

.section-light--centered .section-light__label {
  width: auto;
}

.section-light--centered .section-light__heading {
  max-width: 34ch;
  text-wrap: balance;
}

.section-light--centered .section-light__text {
  margin-block-start: var(--space-4);
}

@media (min-width: 768px) {
  /* md */
  .section-light--centered .section-light__intro {
    gap: var(--space-8);
  }

  .section-light--centered .section-light__text {
    margin-block-start: var(--space-8);
  }
}

/* --- Rows --- */

.difference__row {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.difference__row:nth-child(odd) {
  border-top: 2px solid var(--color-text);
  border-bottom: 2px solid var(--color-text);
}

.difference__graphic {
  width: 40%;
  flex-shrink: 0;
  overflow: hidden;
}

.difference__graphic svg {
  width: 100%;
  height: 100%;
  display: block;
}

.difference__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-12) var(--space-16);
  gap: 40px;
  max-width: 830px;
}

.difference__number {
  font-size: 1.3rem;
  font-weight: var(--font-weight-medium);
  font-family: var(--font-family-heading);
  margin-bottom: var(--space-3);
}

.difference__text {
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-light);
  font-family: var(--font-family-heading);
  line-height: var(--line-height-heading);
  margin: 0;
  hyphens: none;
}

@media (max-width: 1300px) {
  .difference__content {
    padding-block: 0;
  }
}

@media (max-width: 1024px) {
  .difference__content {
    padding: var(--space-6);
  }

  .difference__text {
    font-size: var(--font-size-body);
  }

  .difference__number {
    font-size: var(--font-size-xs);
  }
}

@media (max-width: 767px) {
  .difference {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0;
    align-items: flex-start;
  }

  .difference__row {
    flex-direction: column;
    gap: var(--space-1);
  }

  .difference__graphic {
    width: 100%;
  }

  .difference__content {
    max-width: none;
    padding: var(--space-6);
    gap: var(--space-2);
    flex-direction: column !important;
  }

  .difference__row:nth-child(odd) {
    border-top: 0;
    border-bottom: 0;
  }

  .difference__row:nth-child(even) {
    border-left: 2px solid var(--color-text);
    border-right: 2px solid var(--color-text);
  }
}

@media (max-width: 500px) {
  .difference {
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
  }

  .difference__content {
    padding-bottom: var(--space-12);
  }

  .difference__row:nth-child(odd) {
    border-top: 2px solid var(--color-text);
    border-bottom: 2px solid var(--color-text);
  }

  .difference__row:nth-child(even) {
    border-left: 0;
    border-right: 0;
  }
}

/* ---------------------------------------------------------------------------
   Quadratica Difference — illustration hover animation
--------------------------------------------------------------------------- */

.diff-bg {
  transition: fill var(--duration-slow) var(--ease-out);
}

.diff-shape {
  transition:
    transform var(--duration-slow) var(--ease-out),
    fill var(--duration-slow) var(--ease-out);
}

/* --- Illustration 2 --- */

.diff2-bg {
  fill: #e4d4ff;
  transition: fill var(--duration-slow) var(--ease-out);
}

.diff2-top,
.diff2-bottom,
.diff2-left,
.diff2-right {
  transition:
    transform var(--duration-slow) var(--ease-out),
    fill var(--duration-slow) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .difference__row:hover .diff-bg {
    fill: var(--brand-violet);
  }

  .difference__row:hover .diff-shape--top {
    transform: translateY(40px);
    fill: var(--brand-cloud);
  }

  .difference__row:hover .diff-shape--bottom {
    transform: translateY(-40px);
    fill: var(--brand-cloud);
  }

  .difference__row:hover .diff-shape--right {
    transform: translateX(40px);
    fill: var(--brand-cloud);
  }

  .difference__row:hover .diff-shape--left {
    transform: translateX(-40px);
  }
}

/* --- Illustration 3 --- */

.diff3-bg {
  fill: var(--brand-purple);
  transition: fill var(--duration-slow) var(--ease-out);
}

.diff3-mid {
  fill: var(--brand-cloud);
  transition:
    transform var(--duration-slow) var(--ease-out),
    fill var(--duration-slow) var(--ease-out);
}

.diff3-top {
  fill: var(--brand-violet);
  transition: fill var(--duration-slow) var(--ease-out);
}

.diff3-bot {
  fill: var(--brand-cloud);
  transition:
    transform var(--duration-slow) var(--ease-out),
    fill var(--duration-slow) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .difference__row:hover .diff3-bg {
    fill: var(--brand-violet);
  }
  .difference__row:hover .diff3-mid {
    transform: translate(20px, -20px);
    fill: var(--brand-purple-dark);
  }
  .difference__row:hover .diff3-top {
    fill: var(--brand-cloud);
  }
  .difference__row:hover .diff3-bot {
    transform: translate(40px, -40px);
    fill: var(--brand-purple-dark);
  }
}

/* Difference rows — scroll-triggered state on touch/mobile */
@media (hover: none) {
  /* Illustration 1 */
  .difference__row.is-in-view .diff-bg {
    fill: var(--brand-violet);
  }
  .difference__row.is-in-view .diff-shape--top {
    transform: translateY(40px);
    fill: var(--brand-cloud);
  }
  .difference__row.is-in-view .diff-shape--bottom {
    transform: translateY(-40px);
    fill: var(--brand-cloud);
  }
  .difference__row.is-in-view .diff-shape--right {
    transform: translateX(40px);
  }
  .difference__row.is-in-view .diff-shape--left {
    transform: translateX(-40px);
  }

  /* Illustration 3 */
  .difference__row.is-in-view .diff3-bg {
    fill: var(--brand-violet);
  }
  .difference__row.is-in-view .diff3-mid {
    transform: translate(20px, -20px);
    fill: var(--brand-purple-dark);
  }
  .difference__row.is-in-view .diff3-top {
    fill: var(--brand-cloud);
  }
  .difference__row.is-in-view .diff3-bot {
    transform: translate(40px, -40px);
    fill: var(--brand-purple-dark);
  }
}

/* ---------------------------------------------------------------------------
   Testimonials
--------------------------------------------------------------------------- */

.testimonials {
  background-color: var(--brand-black);
  padding-block: var(--section-padding-z);
}

.testimonials__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--section-padding-x);
}

.testimonials__label {
  color: var(--brand-pink);
  text-align: center;
  margin-bottom: var(--space-12);
  width: 100%;
}

.testimonials__heading {
  color: var(--color-text-inverse);
  text-align: center;
  max-width: 38ch;
  margin-inline: auto;
  margin-bottom: var(--space-20);
}

/* --- Divider --- */

.testimonials__divider {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: var(--space-8);
  padding: 0;
}

.testimonials__divider::before,
.testimonials__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.2);
}

.testimonials__divider-inner {
  display: flex;
  align-items: center;
  overflow: hidden;
  gap: var(--space-8);
  margin-left: -68px; /* offset */
}

.testimonials__divider-line {
  flex: 1;
  height: 1px;
  background-color: var(--brand-purple-light);
  min-width: 408px;
}

.testimonials__quote-icon {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-body);
  color: var(--brand-violet);
  background-color: var(--brand-purple-light);
  width: 24px;
  height: 24px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}

@media (max-width: 1024px) {
  .testimonials {
    padding-block: var(--section-padding-y);
  }
  .testimonials__label {
    margin-bottom: var(--space-8);
  }
  .testimonials__divider-inner {
    margin-left: -84px;
  }
  .testimonials__divider-line {
    min-width: 310px;
  }
}

@media (max-width: 640px) {
  .testimonials__divider-inner {
    margin-left: -18vw;
  }
  .testimonials__divider-line {
    min-width: 60vw;
  }
}

/* --- Carousel --- */

.splide__track {
  overflow: hidden;
}

.splide__list {
  display: flex;
  align-items: flex-start;
}

.splide__arrows {
  display: none;
}

.testimonials__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  margin-top: var(--space-16);
}

.testimonials__prev,
.testimonials__next {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-inverse);
  padding: var(--space-2);
  line-height: 0;
  transition: opacity var(--duration-base) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .testimonials__prev:hover,
  .testimonials__next:hover {
    opacity: 0.6;
  }
}

/* --- Testimonial card --- */

.testimonial-card {
  background-color: var(--true-white);
  border-radius: var(--radius-mdlg);
  padding: var(--space-10);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  height: 100%;
  max-width: 500px;
}

.testimonial-card__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
}

.testimonial-card__logo img {
  max-height: 90px;
  width: auto;
  object-fit: contain;
}

.testimonial-card__quote {
  font-family: var(--font-family-base);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-body);
  line-height: var(--line-height-body);
  color: var(--color-text);
  margin: 0;
  flex: 1;
}

.testimonial-card__footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  text-align: center;
}

.testimonial-card__author {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  font-style: normal;
  color: var(--color-text);
}

.testimonial-card__role {
  font-size: var(--font-size-xs);
  /* color: var(--color-text-muted); */
}

.testimonial-card__action {
  display: flex;
  justify-content: center;
  padding-top: var(--space-4);
}

.testimonial-card__action .arrow-link:after {
  background-color: var(--brand-pink);
}

.testimonial-card__action .arrow-link:hover:after {
  background-color: var(--brand-black);
}

/* --- Testimonial modal --- */

.testimonial-modal,
.team-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  pointer-events: none;
}

.testimonial-modal[aria-hidden="false"],
.team-modal[aria-hidden="false"] {
  pointer-events: auto;
}

.testimonial-modal__overlay,
.team-modal__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(36, 19, 25, 0.6);
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out);
}

.testimonial-modal[aria-hidden="false"] .testimonial-modal__overlay {
  opacity: 1;
}

.testimonial-modal__panel,
.team-modal__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(780px, 90vw);
  width: clamp(40vw, 800px, 90vw);
  background-color: var(--color-bg);
  padding: var(--space-40) var(--space-12);
  padding-right: var(--space-32);
  padding: var(--space-40) 10vw var(--space-24) 5vw;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  transform: translateX(100%);
  transition: transform var(--duration-slow) var(--ease-out);
}

.testimonial-modal[aria-hidden="false"] .testimonial-modal__panel,
.team-modal[aria-hidden="false"] .team-modal__panel {
  transform: translateX(0);
}

.testimonial-modal__close,
.team-modal__close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text);
  padding: var(--space-2);
  line-height: 0;
}

.testimonial-modal__logo img {
  max-height: 84px;
  width: auto;
  object-fit: contain;
  margin-bottom: var(--space-12);
}

.testimonial-modal__quote {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-heading);
  color: var(--color-text);
  margin: 0;
}

.testimonial-modal__extended {
  font-size: var(--font-size-body);
  line-height: var(--line-height-loose);
  color: var(--color-text);
}

.testimonial-modal__footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.testimonial-modal__author {
  font-weight: var(--font-weight-semibold);
  font-style: normal;
  font-size: var(--font-size-small);
  color: var(--color-text);
}

.testimonial-modal__role {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}

.splide__pagination,
.testimonials__dots {
  bottom: calc(-1 * var(--space-8));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-8);
  list-style: none;
  padding: 0;
  margin: 0;
}

.splide__pagination {
  position: static !important;
  bottom: auto !important;
  transform: none !important;
}

.splide__pagination__page,
.testimonials__dot {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-pill);
  background-color: var(--brand-black);
  border: 1px solid var(--true-white);
  cursor: pointer;
  padding: 0;
  transition: background-color var(--duration-base) var(--ease-out);
}

.splide__pagination__page.is-active,
.testimonials__dot.is-active {
  background-color: var(--color-text-inverse);
  transform: none;
}

@media (max-width: 1024px) {
  .testimonials__nav {
    margin-top: var(--space-12);
  }
}

/* ---------------------------------------------------------------------------
   Case Studies Grid
--------------------------------------------------------------------------- */

/* Grid layout
   ------------------------------------------------------------------ */

.case-studies__grid-wrapper {
  padding-block-start: var(--section-padding-y);
}

.case-studies-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-22) var(--space-6);
}

.case-studies-grid .case-study-card {
  opacity: 0; /* Start hidden for animation */
}

@media (max-width: 1024px) {
  .case-studies-grid {
    gap: var(--space-16) var(--space-4);
  }
}

@media (min-width: 768px) {
  .case-studies-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .case-studies-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .homepage-case-studies .case-studies-grid .case-study-card:nth-child(3) {
    display: none;
  }
}

@media (max-width: 480px) {
  .case-studies-grid {
    grid-template-columns: repeat(1, 1fr);
  }
  .homepage-case-studies .case-studies-grid .case-study-card:nth-child(3) {
    display: flex;
  }
}

/* Card
   ------------------------------------------------------------------ */

.case-study-card,
.post-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
  position: relative;
}

/* Stretched link — title anchor expands to cover the whole card */
.case-study-card__title a::after,
.post-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Media — image + overlay + logo
   ------------------------------------------------------------------ */

.case-study-card__media-link,
.post-card__media-link {
  display: block;
  text-decoration: none;
}

.case-study-card__media,
.post-card__media {
  position: relative;
  overflow: hidden;
}

.case-study-card__image,
.post-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--duration-slow) var(--ease-out);
}

.case-study-card__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.case-study-card__logo {
  position: absolute;
  inset: 0;
  margin: auto;
  display: block;
  max-width: 55%;
  max-height: 35%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Body — title, summary, tags
   ------------------------------------------------------------------ */

.case-study-card__body,
.post-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding-inline: var(--space-8);
}

.case-study-card__title,
.post-card__title {
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  margin: 0;
  line-height: var(--line-height-tight);
}

.case-study-card__title a,
.post-card__title a {
  text-decoration: none;
  color: inherit;
}

.case-study-card__summary {
  max-width: 90%;
  margin-bottom: 0;
}

/* Service tags
   ------------------------------------------------------------------ */

.case-study-tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  position: relative;
  z-index: 1;
}

.case-study-tag {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  background: var(--brand-cloud);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xxs);
  font-family: var(--font-family-base);
  color: var(--brand-violet);
  text-decoration: none;
  transition: all 0.1s ease-out;
}

/* Hover
   ------------------------------------------------------------------ */

@media (hover: hover) and (pointer: fine) {
  .case-study-card:has(.case-study-card__title a:hover) .case-study-card__image,
  .post-card:has(.post-card__title a:hover) .post-card__image {
    transform: scale(1.3);
  }

  .case-study-tag:hover {
    background-color: var(--color-surface);
    /* border-color: var(--color-text-muted); */
  }
}

@media (max-width: 1024px) {
  .case-study-card,
  .post-card {
    gap: var(--space-6);
  }
  .case-study-card__body,
  .post-card__body {
    padding-inline: var(--space-2);
    gap: var(--space-4);
  }
  .case-study-card__title,
  .post-card__title {
    font-size: var(--font-size-small);
  }
}

/* ---------------------------------------------------------------------------
   Site Footer (CTA + footer info — appears on every page)
--------------------------------------------------------------------------- */

.site-footer {
  background: var(--brand-violet);
}

/* --- CTA --- */

.site-footer__cta {
  padding-block: var(--space-32);
  text-align: center;
}

.site-footer__cta-inner {
  margin-inline: auto;
  padding-inline: var(--section-padding-x);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-16);
}

.site-footer__heading {
  color: var(--brand-pink);
  font-size: var(--font-size-footer-cta);
  font-weight: var(--font-weight-light);
  max-width: 26ch;
  margin: 0;
  text-align: center;
}

.site-footer__heading strong {
  color: var(--brand-pink);
  font-weight: var(--font-weight-semibold);
}

/* --- CTA button --- */

.site-footer .btn.arrow-link .link-label {
  color: var(--color-text-inverse);
  font-size: var(--font-size-large-btn);
}

@media (max-width: 767px) {
  .site-footer .btn.arrow-link .link-label {
    font-size: var(--font-size-body);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-10);
  font-family: var(--font-family-heading);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.btn.arrow-link {
  padding-block: var(--space-6);
}

.btn--outline {
  border: 1px solid var(--color-text-inverse);
  color: var(--color-text-inverse);
  background-color: transparent;
}

.btn--outline .nudge-icon {
  color: var(--brand-pink);
  width: 24px;
  height: 24px;
}

@media (max-width: 767px) {
  .btn--outline .nudge-icon {
    width: 20px;
    height: 20px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .btn--outline:hover {
    color: var(--brand-black);
    border-color: transparent;
  }

  .btn--outline:hover .nudge-icon {
    color: var(--brand-black);
    transform: translate(2px, -2px);
  }
}

/* --- Footer info --- */

.site-footer__info {
  padding-block: var(--space-12);
  text-align: center;
}

.site-footer__info-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--section-padding-x);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
}

.site-footer__logo img {
  height: 32px;
  width: auto;
}

.site-footer__tagline {
  color: var(--color-text-inverse);
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-medium);
  margin: 0;
  opacity: 0.85;
}

.site-footer__contact-row {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  justify-content: center;
}

.site-footer__divider {
  width: 1px;
  height: var(--space-8);
  background-color: var(--color-text-inverse);
  display: block;
}

.site-footer__email {
  color: var(--color-text-inverse);
  text-decoration: none;
  font-family: var(--font-family-heading);
  font-size: var(--font-size-body);
}

@media (hover: hover) and (pointer: fine) {
  .site-footer__email:hover {
    color: var(--color-text-inverse);
    text-decoration: underline;
  }
}

.site-footer__legal {
  color: var(--color-text-inverse);
  font-size: var(--font-size-xs);
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-medium);
  margin-top: var(--space-6);
  text-decoration: none;
}

.site-footer__legal:hover {
  color: var(--color-text-inverse);
  text-decoration: underline;
}

@media (hover: hover) and (pointer: fine) {
  .site-footer__legal a:hover {
    color: var(--color-text-inverse);
  }
}

@media (max-width: 767px) {
  .site-footer__logo {
    width: 180px;
  }
}

/* ---------------------------------------------------------------------------
   Work page hero
--------------------------------------------------------------------------- */
.page-hero {
  padding-block: var(--space-24) var(--space-20);
  background-color: var(--brand-black);
}

.page-hero__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--section-padding-x);
}

.work-hero {
  padding-bottom: 320px;
}

.work-hero__heading {
  margin-bottom: var(--space-16);
}

.work-grid {
  margin-top: -320px;
  padding-bottom: var(--space-24);
}

@media (max-width: 1024px) {
  .work-hero {
    padding-bottom: var(--space-24);
  }

  .work-grid {
    margin-top: 0;
  }
}

@media (max-width: 767px) {
  .work-hero {
    padding-bottom: var(--space-8);
  }
}

/* ---------------------------------------------------------------------------
   Service filters
--------------------------------------------------------------------------- */

.service-filters {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.service-filters__label {
  color: var(--color-text-inverse);
  margin-bottom: 0;
}

.service-filters__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.service-filter {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill);
  background: var(--true-white);
  color: var(--color-text);
  font-family: var(--font-family-heading);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-normal);
  cursor: pointer;
  transition:
    background-color var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out);
}

.service-filter.is-active {
  background-color: var(--brand-purple-light);
  color: var(--brand-violet);
}

.service-filter__close {
  display: none;
  font-size: 0.75em;
}

.service-filter.is-active .service-filter__close {
  display: inline;
}

.case-study-card.is-hidden {
  display: none;
}

@media (max-width: 1024px) {
  .service-filter {
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-xxs);
  }
}

/* ---------------------------------------------------------------------------
   Contact page
--------------------------------------------------------------------------- */

.contact-hero__inner {
}

.contact-hero__lead {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  padding-top: var(--space-6);
  max-width: 70%;
}

.contact-hero__heading {
  margin-bottom: 0;
}

.contact-hero__subtext {
  color: var(--true-white);
  font-size: var(--font-size-hero-subheading);
  margin: 0;
  font-family: var(--font-family-heading);
  max-width: 80%;
}

/* --- Form --- */

.contact-form-wrapper {
  max-width: 708px;
  margin: 0 auto;
  margin-top: var(--space-22);
}

.contact-form-wrapper label {
  display: block;
  color: var(--color-text-inverse);
  font-family: var(--font-family-heading);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-regular);
  margin-bottom: var(--space-2);
  text-transform: capitalize;
}

.contact-form-wrapper input[type="text"],
.contact-form-wrapper input[type="email"],
.contact-form-wrapper textarea {
  width: 100%;
  background-color: var(--true-white);
  border: none;
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-family-base);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-body);
  color: var(--color-text);
  outline: none;
  transition: box-shadow var(--duration-base) var(--ease-out);
}

.contact-form-wrapper input[type="text"]:focus,
.contact-form-wrapper input[type="email"]:focus,
.contact-form-wrapper textarea:focus {
  box-shadow: inset 0 0 0 3px var(--brand-purple);
}

.contact-form-wrapper textarea {
  min-height: 160px;
  resize: vertical;
}

.contact-form-wrapper .brxe-form-field,
.contact-form-wrapper .bricks-form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--space-6);
}

/* Submit button — inherits btn--outline pattern */

.contact-form-wrapper button[type="submit"] {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-10);
  font-family: var(--font-family-heading);
  font-size: var(--font-size-large-btn);
  font-weight: var(--font-weight-regular);
  color: var(--color-text-inverse);
  background-color: transparent;
  border: 1px solid var(--color-text-inverse);
  cursor: pointer;
  margin-top: var(--space-4);
  transition: all var(--duration-base) var(--ease-out);
}

.contact-form-wrapper .submit-button-wrapper {
  width: 100%;
}

@media (hover: hover) and (pointer: fine) {
  .contact-form-wrapper button[type="submit"]:hover {
    border-color: var(--brand-pink);
    background-color: none !important;
    color: var(--true-white);
    border: 1px solid transparent;
    border-bottom-color: var(--brand-pink);
  }

  .contact-form-wrapper button[type="submit"] svg {
    transition: transform var(--duration-base) var(--ease-out);
  }

  .contact-form-wrapper button[type="submit"]:hover svg {
    transform: translate(2px, -2px);
  }
}

/* Responsive */

@media (max-width: 767px) {
  .contact-hero__inner {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .contact-hero__lead {
    max-width: 100%;
    gap: var(--space-8);
  }
  .contact-form-wrapper {
    margin-top: var(--space-2);
  }
}

/* ─── About hero ────────────────────────────────────────────────────────────── */

.about-hero {
  padding-block: var(--space-22);
}

.about-hero__heading {
  font-size: var(--font-size-h1);
  max-width: 16ch;
  margin-bottom: var(--space-8);
}

.about-hero__body {
  max-width: 85%;
  color: var(--color-text);
  font-size: var(--font-size-hero-subheading);
  font-family: var(--font-family-heading);
  margin-top: var(--space-8);
  line-height: var(--line-height-heading);
}

@media (max-width: 767px) {
  .about-hero {
    padding-top: 0;
  }
  .about-hero__body {
    margin-top: 0;
  }
}

/* ─── Team grid ─────────────────────────────────────────────────────────────── */

.team__bio-container {
  padding-bottom: calc(var(--section-padding-z) * 1.2);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-40);
  gap: clamp(var(--space-8), 10vw, var(--space-44));
}

/* Full card is clickable — ::before fills .team-card (its positioned ancestor) */
.team-card {
  position: relative;
  cursor: pointer;
}

/* Arrow icon — smooth transition + keep rendered above the ::before layer */
.team-card__trigger svg {
  position: relative;
  transition: transform var(--duration-base) var(--ease-out);
}

.team-card__trigger {
  position: relative;
  z-index: -10;
}

.team-card__trigger::after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 2px;
  background: var(--brand-black);
  bottom: 0;
  left: 0;
  pointer-events: none;
  z-index: -10;
}

@media (hover: hover) and (pointer: fine) {
  .team-card:hover .team-card__trigger svg {
    transform: translate(2px, -2px);
  }

  .team-card:hover .team-card__trigger::after {
    background: var(--brand-pink);
  }
}

.team-card__photo-wrap {
  overflow: hidden;
  margin-bottom: var(--space-10);
}

.team-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.6s var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .team-card:hover .team-card__photo {
    transform: scale(1.05);
  }
}

.team-card__info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
}

.team-card__meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.team-card__name {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-semibold);
  padding-bottom: var(--space-3);
}

.team-card__trigger {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--brand-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--space-1);
}

/* ─── Team modal ────────────────────────────────────────────────────────────── */

.team-modal__photo {
  margin-bottom: var(--space-6);
}

.team-modal__photo img {
  width: 100%;
  max-width: 324px;
}

.team-modal__name {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.team-modal__role {
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.team-modal__bio {
  font-size: var(--font-size-body);
  color: var(--color-text);
  line-height: var(--line-height-body);
}

.team-modal__highlights {
  margin-top: var(--space-6);
}

.team-modal__highlights-heading {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.team-modal__highlights-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.team-modal__highlights-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.team-modal__highlight-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.highlight-icon {
  flex-shrink: 0;
  width: 12px; /* adjust to match your SVG */
  height: 12px;
  margin-top: 3px; /* nudge for optical alignment with text */
  display: flex;
}

.highlight-icon svg {
  width: 100%;
  height: 100%;
}

.team-modal__highlight-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  padding-block: var(--space-6);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--color-text);
}

.team-modal__highlight-item:not(:last-of-type) {
  border-bottom: 1px solid var(--brand-black);
}

/* --- Team modal --- */
.team-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  pointer-events: none;
}

.team-modal[aria-hidden="false"] {
  pointer-events: auto;
}

.team-modal[aria-hidden="false"] .team-modal__overlay {
  opacity: 1;
}

/* ─── Stats row ─────────────────────────────────────────────────────────────── */

.stats {
  background-color: var(--brand-black);
  padding-bottom: calc(var(--section-padding-y) * 1.7);
}

.stats__row {
  display: flex;
  align-items: stretch;
  flex-direction: row;
}

.stats__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-inline: var(--space-12);
  align-items: center;
  opacity: 0;
}

.stats__item:first-child {
  padding-inline-start: 0;
}

.stats__item + .stats__item {
  border-inline-start: 1px solid var(--true-white);
}

.stats__value {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-inverse);
  line-height: 1;
}

.stats__label {
  color: var(--true-white);
  font-family: var(--font-family-heading);
  line-height: 1.4;
  font-size: 20px;
  text-align: center;
}

/* Mobile */
@media (max-width: 767px) {
  .section-bios .container,
  .team__bio-container {
    padding: 0;
  }
  .team-grid {
    grid-template-columns: 1fr;
    gap: 0 var(--space-12);
  }

  .team-card {
    display: flex;
    gap: 0 var(--space-6);
    border-top: 1px solid var(--brand-black);
  }

  .team-card__photo-wrap {
    width: 40%;
    margin-bottom: 0;
  }

  .team-card__info {
    width: 60%;
    padding-top: var(--space-8);
  }

  .team-card__trigger {
    margin-right: var(--space-4);
  }

  .team-modal__photo img {
    max-width: 250px;
  }

  .stats {
    padding-bottom: var(--space-12);
    padding-bottom: 0;
  }

  .stats > .container {
    padding: 0;
  }

  .stats__row {
    flex-direction: column;
    gap: 0;
  }

  .stats__value {
    font-size: 60px;
  }

  .stats__item {
    padding-inline: 0;
    padding-block: var(--space-8);
    border-inline-start: none;
  }

  .stats__item + .stats__item {
    border-inline-start: none;
    border-block-start: 1px solid var(--true-white);
  }
}

/* ---------------------------------------------------------------------------
   Services page — Hero
--------------------------------------------------------------------------- */

.services-hero {
  background-color: var(--brand-black);
  min-height: calc(
    100svh - 200px
  ); /* 200px = interior page padding-top offset */
  display: flex;
  align-items: center;
}

.services-hero__inner {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--section-padding-x);
  padding-block: var(--section-padding-y);
}

.services-hero__inner h1 {
  color: var(--color-text-inverse);
  max-width: 20ch;
  margin: 0;
}

/* Responsive */

@media (max-width: 767px) {
  .services-hero__inner h1 {
    max-width: none;
  }
}

/* ---------------------------------------------------------------------------
   Services Accordion
--------------------------------------------------------------------------- */

.services-accordion {
  width: 100%;

  overflow: clip;
}

/* --- Category group row --- */

.services-accordion__group {
  display: grid;
  grid-template-columns: 26% 1fr;
  max-width: var(--container-max);
  margin-inline: auto;
  position: relative;
}

.services-accordion__group:last-child {
  /* border-bottom: 2px solid var(--color-text); */
}

.services-accordion__group:last-child::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -50vw;
  right: -50vw;
  height: 2px;
  background-color: var(--brand-black);
  /* background-color: orange; */
}

/* Top border on first group only */
.services-accordion__group:first-child::before {
  content: "";
  position: absolute;
  top: 0;
  left: -50vw;
  right: -50vw;
  height: 2px;
  /* background-color: var(--brand-black); */
  /* background-color: red; */
}

/* Bottom border on every group (creates the between-group lines + final bottom border) */
.services-accordion__group::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -50vw;
  right: -50vw;
  height: 2px;
  background-color: var(--brand-black);
}

/* --- Label column (left) --- */

.services-accordion__label-col {
  padding: var(--space-24) var(--section-padding-x);
  display: flex;
  align-items: flex-start;

  position: relative;
}

.services-accordion__label-col::before {
  content: "";
  position: absolute;
  inset-block: 0;
  right: 100%;
  width: 50vw;
  background-color: inherit; /* picks up the category colour automatically */
}

.services-accordion__group:nth-of-type(3n + 1) .services-accordion__label-col {
  background-color: var(--brand-violet);
}

.services-accordion__group:nth-of-type(3n + 1)
  .services-accordion__label-col
  .small-heading {
  color: var(--true-white);
}

.services-accordion__group:nth-of-type(3n + 2) .services-accordion__label-col {
  background-color: var(--brand-purple-light);
}

.services-accordion__group:nth-of-type(3n + 3) .services-accordion__label-col {
  background-color: var(--brand-cloud);
}

.services-accordion__label-col .small-heading {
  margin: 0;
  /*   font-size: var(--font-size-hero-subheading); */
  font-size: var(--font-size-h3);
}

/* --- Items column (right) --- */

.services-accordion__items-col {
  padding: var(--space-18) var(--section-padding-y);
  padding-bottom: 5.2rem;
  position: relative;
}

.services-accordion__items-col::after {
  content: "";
  position: absolute;
  inset-block: 0;
  left: 100%;
  width: 50vw;
  background-color: var(--color-bg);
}

/* --- Individual item --- */

.services-accordion__item {
  border-bottom: 2px solid var(--brand-black);
  transition: all var(--duration-slow) var(--ease-out);
}

.services-accordion__item:not(.is-open):hover {
  background: rgba(243, 241, 254, 0.5);
}

.services-accordion__item:last-child {
  border-bottom: none;
}

.services-accordion__item.is-open .services-accordion__icon {
  transform: rotate(180deg);
}

/* --- Trigger button --- */

.services-accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-8) var(--space-2);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-family-heading);
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-regular);
  color: var(--color-text);
  transition: color var(--duration-base) var(--ease-out);
}

/* --- +/- icon --- */

.services-accordion__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background-color: var(--brand-purple-light);
  border-radius: var(--radius-pill);
  transition: transform var(--duration-slow) var(--ease-out);
}

.services-accordion__icon::before,
.services-accordion__icon::after {
  content: "";
  position: absolute;
  background-color: currentColor;
  transition:
    transform var(--duration-base) var(--ease-out),
    opacity var(--duration-base) var(--ease-out);
}

/* Horizontal bar — always visible */
.services-accordion__icon::before {
  width: 14px;
  height: 3px;
}

/* Vertical bar — collapses when open */
.services-accordion__icon::after {
  width: 3px;
  height: 14px;
}

.services-accordion__item.is-open .services-accordion__icon::after {
  transform: scaleY(0);
  opacity: 0;
}

/* --- Accordion body --- */

.services-accordion__body {
  overflow: hidden;
  max-height: 0;
  max-width: 85%;
  padding-inline: var(--space-2);
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  transition:
    max-height var(--duration-slow) var(--ease-out),
    padding-bottom var(--duration-slow) var(--ease-out);
}

.services-accordion__item.is-open .services-accordion__body {
  max-height: 800px; /* generous ceiling — animation speed is governed by duration, not this value */
  padding-bottom: var(--space-10);
}

/* --- Body text --- */

.services-accordion__body-text {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-body);
  line-height: var(--line-height-body);
  color: var(--color-text);
  margin: 0;
}

.services-accordion__text p {
  margin-bottom: var(--space-6);
}

/* --- Bullet list --- */

.services-accordion__bullets {
  margin-left: -20px;
  margin-top: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--space-8);
  list-style: disc;
}

.services-accordion__bullets li {
  padding-left: var(--space-2);
  margin-bottom: var(--space-2);
}

.services-accordion__bullet {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-body);
  line-height: var(--line-height-body);
  color: var(--color-text);
}

.services-accordion__bullet::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background-color: var(--brand-pink);
  margin-block-start: 0.45em;
}

.services-accordion__link-wrap {
  margin-top: var(--space-8);
}

/* --- Mobile --- */

@media (max-width: 767px) {
  .services-accordion__group {
    grid-template-columns: 1fr;
    border-top: 2px solid var(--color-text);
    border-top: none;
  }
  .services-accordion__group::after {
    background-color: transparent;
  }

  .services-accordion__item {
    border-bottom: 1px solid var(--brand-black);
  }

  .services-accordion__label-col {
    padding: var(--space-10) var(--space-6);
  }

  .services-accordion__items-col {
    border-inline-start: none;
    padding: 0;
  }

  /* Horizontal bar — always visible */
  .services-accordion__icon::before {
    width: 10px;
    height: 2px;
  }

  /* Vertical bar — collapses when open */
  .services-accordion__icon::after {
    width: 2px;
    height: 10px;
  }

  .services-accordion__trigger {
    padding: var(--space-6);
    font-size: var(--font-size-body);
  }

  .services-accordion__icon {
    padding: var(--space-3);
  }

  .services-accordion__body {
    padding-inline: var(--space-6);
    gap: var(--space-4);
    max-width: 100%;
  }

  .services-accordion__bullets {
    column-gap: var(--space-10);
  }

  .services-accordion__bullets li {
    margin-bottom: var(--space-4);
  }

  .services-accordion__link-wrap {
    margin-top: 0;
  }
}

/* ---------------------------------------------------------------------------
   Services page — Quadratica Difference
--------------------------------------------------------------------------- */

.services-difference {
  background-color: var(--color-bg);
  padding-block: var(--section-padding-w);
}

.services-difference__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--section-padding-x);
  display: flex;
  flex-direction: column;
  gap: var(--space-18);
  gap: var(--space-18);
}

/* --- Heading --- */

.services-difference__heading {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-light);
  margin: 0;
  text-align: center;
}

.services-difference__heading strong {
  font-weight: var(--font-weight-semibold);
}

/* --- Two-column layout --- */

.services-difference__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

/* --- Logo grid --- */

.services-difference__logo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-18);
  max-width: 460px;
  margin-inline: auto;
  aspect-ratio: 1;
}

.services-difference__quarter {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 0.25;
  cursor: pointer;
  transition:
    opacity var(--duration-slow) var(--ease-out),
    transform var(--duration-slow) var(--ease-out);
}

.services-difference__quarter.is-active {
  opacity: 1;
}

/* --- Numbered items --- */

.services-difference__items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  gap: 3.2rem;
}

.services-difference__item {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: var(--space-4);
  /* padding-block: var(--space-6); */
  cursor: pointer;
  opacity: 0.35;
  transition: opacity var(--duration-slow) var(--ease-out);
}

.services-difference__item.is-active {
  opacity: 1;
}

.services-difference__number {
  font-family: var(--font-family-heading);
  font-size: 20px;
  font-weight: var(--font-weight-regular);
  color: var(--color-text-muted);
  padding-top: 0.1em;
}

.services-difference__item.is-active .services-difference__number {
  color: var(--color-text);
}

.services-difference__text {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-small-heading);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-body);
  color: var(--color-text);
}

/* --- Footer link --- */

.services-difference__footer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: var(--space-24) auto var(--space-6);
}

/* --- Responsive --- */

@media (max-width: 1400px) {
  .services-difference__text {
    font-size: var(--font-size-body);
  }
}

@media (max-width: 1024px) {
  .services-difference__inner {
    gap: var(--space-12);
  }
  .services-difference__layout {
    grid-template-columns: 1fr 2fr;
    gap: var(--space-8);
    align-items: self-start;
  }

  .services-difference__items-viewport {
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }

  .services-difference__logo-grid {
    gap: var(--space-4);
    max-width: 140px;
  }

  .services-difference__items {
    display: flex;
    flex-direction: row;
    gap: 0;
    transition: transform var(--duration-slow) var(--ease-out);
  }

  .services-difference__item {
    opacity: 1;
    gap: var(--space-2);
    grid-template-columns: 1fr;
    /* text-align: center; */
  }

  .services-difference__item.is-active {
    opacity: 1;
  }
  .services-difference__number {
    font-size: var(--font-size-xxs);
  }
  .services-difference__number:after {
    content: " / 04";
    display: inline;
    color: var(--color-text-muted);
    /* opacity: 0.35; */
  }

  .services-difference__text {
    font-size: var(--font-size-body);
  }
  .services-difference__footer {
    margin-top: var(--space-12);
  }
}

@media (min-width: 1025px) {
  .services-difference__items {
    transform: none !important;
  }
}

/* Slider nav — hidden on desktop */
.services-difference__slider-nav {
  display: none;
}

@media (max-width: 1024px) {
  .services-difference__slider-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 1 / -1;
    gap: var(--space-4);
    margin-top: -1rem;
  }

  .services-difference__prev,
  .services-difference__next {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    padding: var(--space-2);
    line-height: 0;
    transition: opacity var(--duration-base) var(--ease-out);
  }
}

@media (hover: hover) and (pointer: fine) {
  .services-difference__prev:hover,
  .services-difference__next:hover {
    opacity: 0.5;
  }
}

/* ---------------------------------------------------------------------------
   Case study — Hero (single case study template)
   Logo left, headline + intro + service tags right. Stacks below md.

   Bricks structure:
   Section (.case-hero) → Container (.case-hero__inner)
     → Block (.case-hero__logo)    → Image
     → Block (.case-hero__content) → H1 (.case-hero__heading),
                                     Text (.case-hero__intro), [quad_service_tags]
--------------------------------------------------------------------------- */

.case-hero {
  padding-block: 0 var(--space-10);
}

.case-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-8);
  align-items: start;
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--section-padding-x);
}

.case-hero__logo img {
  width: 100%;
  max-width: var(--space-40);
  height: auto;
  max-height: var(--space-16);
  object-fit: contain;
  object-position: left center;
}

.case-hero__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.case-hero__heading {
  font-size: var(--font-size-h2);
  margin: 0;
}

.case-hero__intro {
  margin: 0;
  font-size: var(--font-size-small-heading);
}

.case-hero__content .case-study-tags {
  margin-block-start: var(--space-4);
  margin-block-end: var(--space-2);
}

@media (min-width: 768px) {
  /* md */
  .case-hero {
    padding-block: var(--space-18) var(--space-12);
  }

  .case-hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr);
  }

  .case-hero__logo img {
    max-width: var(--space-64);
    max-height: var(--space-20);
  }
}

@media (min-width: 768px) {
  .case-study-scope {
    padding-block-start: var(--space-6);
    padding-block-end: var(--space-16);
  }
}

/* ---------------------------------------------------------------------------
   Media band
   Full-bleed image band with no padding. One image by default;
   add .media-band--split for two images side by side at a shared ratio.

   Bricks structure:
   Section (.media-band)                    → Image (.media-band__image)
   Section (.media-band .media-band--split) → Image, Image (.media-band__image)
   Images sit directly in the Section — a Container would cap the width.
--------------------------------------------------------------------------- */

.media-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.media-band__image,
.media-band__image img {
  display: block;
  width: 100%;
  height: auto;
}

.media-band--split .media-band__image,
.media-band--split .media-band__image img {
  aspect-ratio: var(--ratio-media-split);
  object-fit: cover;
}

@media (min-width: 640px) {
  /* sm */
  .media-band--split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------------------------------------------------------------------------
   Prose
   Narrow, centred reading column made of headed blocks.
   Used on the single case study (Background / Process / Outcomes).

   Bricks structure:
   Section (.prose) → Container (.prose__inner)
     → Block (.prose__block) → Heading (.prose__heading), Text (.prose__text)
--------------------------------------------------------------------------- */

.prose {
  padding-block: var(--space-40);
}

/* Collapse the whole section when every block is hidden by its condition */
.prose:not(:has(.prose__block, .prose__content)) {
  display: none;
}

.prose__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  width: 100%;
  max-width: calc(var(--container-prose) + 2 * var(--section-padding-x));
  margin-inline: auto;
  padding-inline: var(--section-padding-x);
}

.prose__heading,
.prose__content h2 {
  margin: 0 0 var(--space-3);
  font-size: var(--font-size-small-heading);
  font-weight: var(--font-weight-medium);
}

.prose__text,
.prose__content {
  font-size: var(--font-size-body);
}

.prose__text > :last-child {
  margin-block-end: 0;
}

@media (min-width: 768px) {
  /* md */
  .prose__inner {
    gap: var(--space-22);
  }
}

@media (max-width: 767px) {
  .prose {
    padding-block: var(--space-20);
  }
}

/* --- Prose: rich text from the WordPress editor (blog posts) --- */

.prose__content > :first-child {
  margin-block-start: 0;
}

.prose__content > :last-child {
  margin-block-end: 0;
}

.prose__content h2,
.prose__content h3,
.prose__content h4 {
  margin-block: var(--space-16) var(--space-3);
}

.prose__content h3 {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
}

.prose__content h4 {
  font-size: var(--font-size-h5);
}

.prose__content strong,
.prose__content b {
  font-weight: var(--font-weight-semibold);
}

.prose__content ul,
.prose__content ol {
  margin: 0 0 var(--space-4);
  padding-inline-start: var(--space-5);
  list-style-position: outside;
}

.prose__content ul li,
.prose__content ol li {
  margin: 0 0 var(--space-4);
}

.prose__content figure {
  margin: var(--space-10) 0;
}

.prose__content img {
  width: 100%;
  height: auto;
}

.prose__content figcaption {
  margin-block-start: var(--space-4);
  font-size: var(--font-size-xs);
  font-style: italic;
  color: var(--brand-black);
  text-align: center;
}

.prose__content blockquote {
  margin: var(--space-10) 0;
  padding-inline-start: var(--space-6);
  border-inline-start: 2px solid var(--brand-pink);
  font-family: var(--font-family-body);
  font-size: var(--font-size-h4);
  line-height: 150%;
}

.prose__content blockquote p:last-of-type {
  margin-block-end: 0;
}

.prose__content blockquote cite {
  display: block;
  margin-block-start: var(--space-3);
  font-family: var(--font-family-base);
  font-size: var(--font-size-xs);
  font-style: normal;
  color: var(--color-text-muted);
}

/* ---------------------------------------------------------------------------
   Media statement
   Image on one half, label + large statement on the other.
   Background colour comes from --statement-bg, set per post on the Section
   (Bricks attribute: style="--statement-bg: {acf_outcome_bg_color};").
   Pair with .dark-bg so headings render white.

   Bricks structure:
   Section (.media-statement .dark-bg)
     → Block (.media-statement__media)   → Image (.media-statement__image)
     → Block (.media-statement__content) → Text (label), Heading (.media-statement__heading)
--------------------------------------------------------------------------- */

.media-statement {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  background-color: var(--statement-bg, var(--brand-black));
}

.media-statement__media {
  aspect-ratio: var(--ratio-media-statement);
  overflow: hidden;
}

.media-statement__image,
.media-statement__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-statement__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.media-statement__content > * {
  max-width: var(--container-prose);
}

.media-statement__heading {
  margin: 0;
  font-size: var(--font-size-h2);
}

/* No image: content aligns to the site container instead of a half */
.media-statement:not(:has(.media-statement__media)) .media-statement__content {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
}

@media (min-width: 768px) {
  /* md */
  .media-statement:has(.media-statement__media) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .media-statement__content {
    padding-inline: var(--space-4);
  }
}

@media (max-width: 767px) {
  .media-statement__content {
    padding: var(--space-20) var(--section-padding-x);
  }
}

/* ---------------------------------------------------------------------------
   Case study — Client feedback
   Builds on .section-light--centered (layout, spacing, violet label).
   Markup: template-parts/case-feedback.php via [quad_case_feedback].
--------------------------------------------------------------------------- */

.case-feedback .section-light__intro {
  display: grid;
  gap: var(--space-10);
}

.case-feedback__icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-feedback__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
  max-width: 60rem;
  margin: 0 auto;
}

.case-feedback__quote {
  /* font-family: var(--font-family-heading); */
  font-size: var(--font-size-small-heading);
  font-family: var(--font-family-heading);
}

.case-feedback__quote > :last-child {
  margin-block-end: 0;
}

.case-feedback figcaption {
  color: var(--brand-black);
}

.case-feedback__cite {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.case-feedback__name {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-xs);
  font-style: normal;
  font-weight: var(--font-weight-semibold);
}

.case-feedback__role {
  font-size: var(--font-size-xs);
}

@media (min-width: 768px) {
  /* md */
  .case-feedback__figure {
    gap: var(--space-12);
  }
}

@media (max-width: 767px) {
  .case-feedback .section-light__intro {
    gap: var(--space-4);
  }
}

/* ===========================================================================
   5. Utilities (use sparingly)
=========================================================================== */

::selection {
  background-color: var(--brand-purple);
  color: var(--true-white);
}

/* Push page content below the absolute-positioned header on all non-homepage pages */
body:not(.home) #brx-main,
body:not(.home) #brx-content {
  padding-top: 200px;
}

/* Default interior: dark background */
body:not(.home) .site-header:not(.is-scrolled) {
  background-color: var(--brand-black);
  /* box-shadow: var(--shadow-md); */
}

/* Light header pages: white background until scrolled */
body:not(.home).header-light .site-header:not(.is-scrolled) {
  background-color: var(--color-bg);
  /* box-shadow: var(--shadow-sm); */
}

/* Dark-hero pages: zero out the brx-main offset, move clearance inside the hero instead */
body.dark-hero #brx-main,
body.dark-hero #brx-content {
  padding-top: 0;
}

body.dark-hero .page-hero {
  padding-top: calc(200px + var(--space-16));
  padding-top: 200px;
}

@media (max-width: 767px) {
  body.dark-hero .page-hero {
    padding-top: 180px;
  }
}

/* Hidden until JS splits and animates them — prevents flash on load */
body:not(.home) h1,
.site-footer__heading {
  opacity: 0;
}

body.modal-open {
  overflow: hidden;
}

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

.text-accent {
  color: var(--brand-pink);
}

.small-heading {
  font-size: var(--font-size-small-heading);
  font-family: var(--font-family-heading);
}

@media (max-width: 767px) {
  .small-heading {
    font-size: var(--font-size-small);
  }
}

.small-heading__pink-centered {
  color: var(--brand-pink);
  text-align: center;
  margin-bottom: var(--space-12);
  width: 100%;
}

/* ---------------------------------------------------------------------------
   Arrow link
   Reusable link style with bottom underline + optional nudge icon.

   Usage in Bricks:
   - Wrapper block:   classes "arrow-link" — set text color on this element
   - Text link inside: class "link-label"
   - Icon inside:      class "nudge-icon"

   Underline uses currentColor, so it inherits whatever color is set on
   .arrow-link. Transitions to --brand-pink on hover automatically.
--------------------------------------------------------------------------- */

.arrow-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding-block: var(--space-3);
  text-decoration: none;
  width: fit-content;
  color: inherit;
}

.arrow-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: currentColor;
  transition: background-color var(--duration-base) var(--ease-out);
}

.arrow-link {
  position: relative; /* already set, just confirming */
}

.link-label::before {
  content: "";
  position: absolute;
  inset: 0;
}

.link-label {
  color: inherit;
  text-decoration: none;
  font-family: var(--font-family-heading);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
}

.link-label:hover {
  color: inherit;
}

.nudge-icon {
  transition: transform var(--duration-base) var(--ease-out);
}

.nudge-icon {
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .arrow-link:hover::after {
    background-color: var(--brand-pink);
  }

  .arrow-link:hover .nudge-icon,
  .has-nudge-icon:hover .nudge-icon {
    transform: translate(2px, -2px);
  }

  a.arrow-link:hover {
    color: var(--brand-black);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 767px) {
  .link-label {
    font-size: var(--font-size-small);
  }
}

/* ---------------------------------------------------------------------------
   Single post
   Narrow centred column for the header, featured image and post navigation.
   Article body uses .prose / .prose__content.

   Bricks structure (Single Post template):
   Section (.post-header) → Container (.post-header__inner) → Text (.post-header__date), H1 (.post-header__title)
   Section (.media-band .media-band--contained) → Image (.media-band__image)
   Section (.prose) → Container (.prose__inner) → Post Content (.prose__content)
   Shortcode [quad_post_nav] → template-parts/post-nav.php
--------------------------------------------------------------------------- */

.post-header__inner {
  width: 100%;
  max-width: calc(var(--container-narrow) + 2 * var(--section-padding-x));
  margin-inline: auto;
  padding-inline: var(--section-padding-x);
}

.media-band--contained,
.post-nav__inner {
  width: 100%;
  max-width: calc(var(--container-media) + 2 * var(--section-padding-x));
  margin-inline: auto;
  padding-inline: var(--section-padding-x);
}

.post-header {
  padding-block: 0 var(--space-10);
}

.post-header__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-10);
  text-align: center;
  max-width: var(--blog-header-container);
}

.post-header__date {
  font-size: var(--font-size-body);
}

.post-header__title {
  margin: 0;
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-semibold);
  text-wrap: balance;
}

/* --- Previous / next --- */

.post-nav {
  padding-block-end: var(--section-padding-w);
}

.post-nav__links {
  display: flex;
  justify-content: space-between;
  gap: var(--space-8);
  padding-block-start: var(--space-12);
  border-block-start: 1px solid var(--brand-black);
}

.post-nav__link {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  max-width: 40%;
  color: var(--color-text);
  text-wrap: balance;
  font-family: var(--font-family-heading);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-regular);
  text-decoration: none;
}

.post-nav__link--next {
  margin-inline-start: auto;
  text-align: end;
}

.post-nav__icon {
  flex-shrink: 0;
  display: flex;
  width: var(--space-2);
  color: var(--brand-pink);
  transition: transform var(--duration-base) var(--ease-out);
}

.post-nav__icon svg {
  width: 100%;
  height: auto;
}

.post-nav__link--prev .post-nav__icon svg {
  transform: scaleX(-1);
}

@media (hover: hover) and (pointer: fine) {
  .post-nav__link:hover {
    color: var(--color-text);
  }

  .post-nav__link--prev:hover .post-nav__icon {
    transform: translateX(-2px);
  }

  .post-nav__link--next:hover .post-nav__icon {
    transform: translateX(2px);
  }
}

@media (min-width: 768px) {
  /* md */
  .post-header {
    padding-block: var(--space-16);
  }
}

/* ---------------------------------------------------------------------------
   Blog listing
   Markup: template-parts/blog-hero.php ([quad_blog_hero]) and
           template-parts/blog-grid.php ([quad_blog_grid]).
   Cards share their base rules with .case-study-card (see Case Studies Grid).
--------------------------------------------------------------------------- */

.blog-hero__inner,
.blog-grid__inner {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--section-padding-x);
}

/* --- Hero: page title + featured post --- */

.blog-hero {
  padding-block: 0 var(--space-12);
}

.blog-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-10);
  align-items: start;
}

.blog-hero__content {
  display: contents;
}

.blog-hero__media {
  order: 1; /* mobile: between the heading and the post */
}

.blog-hero__post {
  order: 2;
}

.blog-hero__heading {
  margin: 0;
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-medium);
}

.blog-hero__post {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-6);
}

.blog-hero__date {
  font-size: var(--font-size-body);
}

.blog-hero__title {
  margin: 0;
  font-size: var(--font-size-h3);
}

.blog-hero__title a {
  color: inherit;
  text-decoration: none;
}

.blog-hero__excerpt {
  margin: 0;
  font-size: var(--font-size-body);
}

.blog-hero__post .arrow-link {
  margin-block-start: var(--space-4);
}

.blog-hero__post .nudge-icon {
  display: flex;
  color: var(--brand-pink);
}

.blog-hero__media {
  display: block;
  overflow: hidden;
  aspect-ratio: var(--ratio-blog-hero);
  background-color: var(--brand-black);
}

.blog-hero__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Grid --- */

.blog-grid {
  padding-block: var(--space-16) var(--section-padding-w);
}

.post-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-12) var(--space-5);
}

.post-card__media {
  aspect-ratio: var(--ratio-post-card);
  background-color: var(
    --brand-black
  ); /* placeholder when a post has no image */
}

/* ---------------------------------------------------------------------------
   Pagination (reusable)
   Markup: quad_pagination() in inc/helpers.php.
--------------------------------------------------------------------------- */

.pagination {
  margin-block-start: var(--section-padding-y);
}

.pagination__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--font-size-small);
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-medium);
}

.pagination__step {
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
  padding-inline: var(--space-6);
  color: var(--color-text);
  text-decoration: none;
}

.pagination__icon {
  display: flex;
  width: var(--space-2);
  color: var(--brand-pink);
  transition: transform var(--duration-base) var(--ease-out);
}

.pagination__icon svg {
  width: 100%;
  height: auto;
}

.pagination__step--prev .pagination__icon svg {
  transform: scaleX(-1);
}

.pagination .page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: var(--space-10);
  height: var(--space-10);
  padding-inline: var(--space-4);
  border: 1px solid var(--color-text);
  color: var(--color-text);
  text-decoration: none;
}

.pagination .page-numbers.current {
  background-color: var(--color-text);
  color: var(--color-text-inverse);
}

.pagination .page-numbers.dots {
  border-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
  .pagination a.page-numbers:hover {
    background-color: var(--brand-cloud);
    color: var(--color-text);
  }

  a.pagination__step:hover {
    color: var(--color-text);
  }

  a.pagination__step--prev:hover .pagination__icon {
    transform: translateX(-2px);
  }

  a.pagination__step--next:hover .pagination__icon {
    transform: translateX(2px);
  }
}

@media (min-width: 640px) {
  /* sm */
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  /* md */
  .blog-hero {
    padding-block: var(--space-18) var(--space-6);
  }

  .blog-hero__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-16);
  }

  .blog-hero__content {
    display: flex;
    flex-direction: column;
    gap: var(--space-16);
  }
}

@media (min-width: 1024px) {
  /* lg */
  .post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: var(--space-18);
  }
}
