/* Agencies landing page — case-study v2 shell + page-specific blocks */

.agencies-hero .cs2-hero__title {
  max-width: 12ch;
  font-size: clamp(36px, 5.6vw, 64px);
}

.agencies-hero--wide .cs2-hero__title {
  max-width: 18ch;
}

.agencies-hero--boardroom .cs2-hero__bg img {
  object-position: 58% 40%;
}

.agencies-hero--civic .cs2-hero__title,
.agencies-hero--teams .cs2-hero__title {
  max-width: 22ch;
}

.agencies-hero--teams .cs2-hero__bg img {
  object-position: 72% 48%;
}

.agencies-hero .cs2-hero__deck {
  max-width: 36rem;
}

.agencies-hero .cs2-hero__inner {
  grid-template-columns: 1fr;
}

.agencies-hero .cs2-hero__bg img {
  object-position: center 45%;
}

/* White-section eyebrows: same cyan pill as the dark sections */
.cs2-eyebrow--on-light {
  background: var(--cs2-cyan);
  color: var(--cs2-navy);
}
.cs2-story--uncrop .cs2-story__media {
  background: var(--cs2-navy);
}

.cs2-story--uncrop .cs2-story__media img {
  aspect-ratio: auto;
  object-fit: contain;
  object-position: right center;
}

.cs2-story--flip .cs2-story__inner {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.cs2-story--flip .cs2-story__copy {
  order: 1;
}

.cs2-story--flip .cs2-story__media {
  order: 2;
}

.cs2-story__copy .agencies-punch {
  font-weight: 700;
  color: var(--azul-electric-cyan);
}

.agencies-made__grid {
  margin: 0;
}

.agencies-made .cs2-made__intro {
  margin-bottom: clamp(28px, 4vw, 40px);
}

.agencies-made .cs2-made__intro h2 {
  margin: 0;
  font-family: Montserrat, system-ui, sans-serif;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.agencies-made .services-item:nth-child(n + 4) {
  border-bottom: 1px solid rgba(40, 77, 105, 0.14);
}

.agencies-made .services-item:nth-child(7) {
  grid-column: 2;
  border-bottom: none;
  border-left: 1px solid rgba(40, 77, 105, 0.14);
}

.agencies-made .services-item:nth-child(n + 4) .services-item__wash {
  background: linear-gradient(to top, rgba(217, 234, 244, 0.85), transparent);
}

.agencies-made .services-item:nth-child(7) .services-item__wash {
  background: linear-gradient(to bottom, rgba(217, 234, 244, 0.85), transparent);
}

.agencies-made--six .services-item:nth-child(n + 4) {
  border-bottom: none;
}

.agencies-made--six .services-item:nth-child(n + 4) .services-item__wash {
  background: linear-gradient(to bottom, rgba(217, 234, 244, 0.85), transparent);
}

/* Render-to-reality strip */
.agencies-r2r {
  padding: clamp(64px, 9vw, 110px) var(--gutter);
  background: var(--cs2-soft);
}

.agencies-r2r__inner {
  width: min(100%, var(--max-w));
  margin: 0 auto;
}

.agencies-r2r__head {
  max-width: 46rem;
  margin-bottom: clamp(28px, 4vw, 40px);
}

.agencies-r2r__head h2 {
  margin: 0 0 0.55em;
  font-family: Montserrat, system-ui, sans-serif;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--cs2-navy);
}

.agencies-r2r__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 14px;
}

.agencies-r2r__grid .compare {
  max-width: none;
  margin: 0;
}

.agencies-r2r__grid .compare-frame {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(14, 26, 36, 0.12);
}

.agencies-r2r__grid .compare-badge {
  top: 8px;
  padding: 4px 8px;
  font-size: 10px;
  letter-spacing: 0.03em;
}

.agencies-r2r__grid .compare-badge--render { left: 8px; }
.agencies-r2r__grid .compare-badge--reality { right: 8px; }

.agencies-r2r__grid .compare-handle-knob {
  width: 32px;
  height: 32px;
}

.agencies-r2r__grid .compare-handle-knob svg {
  width: 16px;
  height: 16px;
}

.agencies-r2r__grid .compare-caption {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--on-surface-muted);
}

.agencies-r2r__note {
  margin: clamp(36px, 5vw, 56px) 0 0;
  max-width: 46rem;
  font-size: 16px;
  line-height: 1.65;
  color: var(--azul-graphite);
}

/* Timeline, then a three-up photo row */
.agencies-feel.cs2-timeline {
  padding-top: clamp(56px, 8vw, 88px);
  padding-bottom: clamp(28px, 4vw, 40px);
}

.agencies-feel__layout {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.agencies-feel__copy .cs2-timeline__head {
  max-width: none;
  margin-bottom: clamp(24px, 4vw, 36px);
}

.agencies-feel .cs2-timeline__track--3 .cs2-stop:last-child::before {
  right: 0;
}

.agencies-feel__photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(36px, 5vw, 56px);
}

.agencies-feel__photos figure {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(217, 234, 244, 0.08);
}

.agencies-feel__photos img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.agencies-feel .agencies-feel__photos figure:first-child img {
  object-position: center right;
}

.client-photos {
  padding: 0 var(--gutter) clamp(48px, 7vw, 80px);
  background: #fff;
}

.client-photos .agencies-feel__photos {
  width: min(100%, var(--max-w));
  margin: 0 auto;
}

.client-photos--four .agencies-feel__photos {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Close + Ricardo quote */
.agencies-close {
  padding-top: clamp(28px, 4vw, 40px);
}

.agencies-close--solo {
  padding-top: clamp(64px, 9vw, 110px);
}

.agencies-close .cs2-close__inner {
  width: min(100%, 860px);
  text-align: center;
}

.agencies-close .cs2-close__inner h2 {
  text-align: center;
}

.agencies-quote {
  overflow: hidden;
  margin: 0 0 clamp(48px, 6vw, 72px);
  text-align: left;
}

.agencies-close__btn {
  padding: 1.1em 2.2em;
  font-size: 17px;
  min-width: 220px;
}

.agencies-quote .bridge-quote {
  margin: 0;
  width: 100%;
  max-width: none;
  min-width: 0;
  padding-left: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0;
  color: #fff;
}

.agencies-quote .bridge-quote__avatar-wrap {
  position: relative;
  width: clamp(96px, 10vw, 128px);
  height: clamp(96px, 10vw, 128px);
}

.agencies-quote .bridge-quote__avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  -webkit-mask-image: radial-gradient(circle, #000 58%, transparent 72%);
  mask-image: radial-gradient(circle, #000 58%, transparent 72%);
}

.agencies-quote .bridge-mask-line {
  position: absolute;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.22);
}

.agencies-quote .bridge-mask-line--v {
  top: -50%;
  bottom: -50%;
  width: 1px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
}

.agencies-quote .bridge-mask-line--h {
  left: -50%;
  right: -120%;
  height: 1px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 18%, #000 82%, transparent);
}

.agencies-quote .bridge-mask-line--left { left: 0; }
.agencies-quote .bridge-mask-line--right { right: 0; }
.agencies-quote .bridge-mask-line--top { top: 0; }
.agencies-quote .bridge-mask-line--bottom { bottom: 0; }

.agencies-quote .bridge-quote__caption {
  padding: clamp(16px, 2vw, 24px) clamp(18px, 2.2vw, 28px);
  text-align: left;
}

.agencies-quote .bridge-quote__caption blockquote {
  margin: 0 0 1.1rem;
}

.agencies-quote .bridge-quote__caption blockquote p {
  margin: 0;
  font-family: Montserrat, system-ui, sans-serif;
  font-size: clamp(15px, 1.35vw, 18px);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.62);
}

.agencies-quote .bridge-quote__highlight {
  font-weight: 600;
  color: #ffffff;
}

.agencies-quote .bridge-quote__meta cite {
  display: block;
  font-family: Montserrat, system-ui, sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.3;
  color: #ffffff;
}

.agencies-quote .bridge-quote__role {
  margin: 0.2em 0 0;
  font-family: Montserrat, system-ui, sans-serif;
  font-size: 10px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 960px) {
  .cs2-story--flip .cs2-story__inner {
    grid-template-columns: 1fr;
  }

  .cs2-story--flip .cs2-story__media,
  .cs2-story--flip .cs2-story__copy {
    order: 0;
  }

  .agencies-feel .cs2-timeline__track--3 {
    grid-template-columns: 1fr;
  }

  .agencies-feel .cs2-timeline__track--3 .cs2-stop::before {
    display: none;
  }
}

@media (max-width: 900px) {
  .agencies-made .services-item:nth-child(n + 5) {
    border-bottom: 1px solid rgba(40, 77, 105, 0.14);
  }

  .agencies-made .services-item:nth-child(7) {
    grid-column: 1 / -1;
    max-width: 50%;
    justify-self: center;
    width: 100%;
    border-bottom: none;
  }

  .agencies-made--six .services-item:nth-child(n + 5) {
    border-bottom: none;
  }

  .client-photos--six .agencies-feel__photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .agencies-r2r__grid,
  .agencies-feel__photos {
    grid-template-columns: 1fr;
  }

  .agencies-made .services-item:nth-child(7) {
    grid-column: auto;
    max-width: none;
  }
}

@media (max-width: 900px) {
  .agencies-quote .bridge-quote {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .agencies-quote .bridge-quote__caption {
    text-align: center;
    padding: 1.25rem 0.5rem 0;
  }

  .agencies-quote .bridge-quote__caption blockquote p {
    text-align: center;
  }

  .agencies-quote .bridge-mask-line--h {
    left: -40%;
    right: -40%;
  }

  .agencies-close .cs2-close__inner,
  .agencies-close .cs2-close__inner h2 {
    text-align: center;
  }
}
