/*
 * Services overview refinements (/services only, loaded after overview.css). Scoped to .so-page, so the Digital Marketing pillar
 * page, which shares overview.css, is unaffected. Covers: illustrations, category links, service cards, the one-partner journey and
 * the "Expertise in action" projects.
 */

/* ------------------------------------------------------------------ category navigation */
.so-page .so-jump a:focus-visible {
  outline: 3px solid #0a74b5;
  outline-offset: -3px;
}
html.dark-mode .so-page .so-jump a:focus-visible {
  outline-color: var(--secondary);
}

/* ------------------------------------------------------------------ illustrations */
.so-page .so-art {
  max-width: 36rem;
}
.so-ill {
  margin: 0;
}
.so-ill svg {
  display: block;
  height: auto;
  width: 100%;
  border-radius: 1.25rem;
  box-shadow: 0 1.5rem 3rem -1.5rem rgba(0, 31, 63, 0.45);
}
.so-ill figcaption {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.8125rem;
  line-height: 1.5em;
  color: #5b6b7d;
}
html.dark-mode .so-ill svg {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 1.5rem 3rem -1.5rem rgba(0, 0, 0, 0.7);
}
html.dark-mode .so-ill figcaption {
  color: rgba(255, 255, 255, 0.7);
}

/* ------------------------------------------------------------------ service link cards */
.so-page .so-rows {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.7rem;
}
.so-page .so-rows li {
  display: flex;
}
.so-page .so-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-sizing: border-box;
  width: 100%;
  min-height: 4.25rem;
  border: 1px solid #dde5ee;
  border-radius: 0.875rem;
  background-color: #fff;
  padding: 1rem 1rem 1rem 1.25rem;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.so-page .so-row__main {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}
.so-page .so-row__main b {
  font-size: 1.0625rem;
  line-height: 1.3em;
  font-weight: 700;
  color: var(--headerColor);
}
.so-page .so-row__main small {
  font-size: 0.875rem;
  line-height: 1.45em;
}
.so-page .so-row .so-arrow {
  flex: none;
  box-sizing: content-box;
  border-radius: 50%;
  background-color: #edf5fc;
  height: 1.05rem;
  width: 1.05rem;
  padding: 0.5rem;
  color: #0a74b5;
  transition: transform 0.2s, background-color 0.2s, color 0.2s;
}
.so-page .so-row:hover,
.so-page .so-row:focus-visible {
  transform: translateY(-2px);
  border-color: #43b7ff;
  box-shadow: 0 0.75rem 1.5rem -0.75rem rgba(0, 31, 63, 0.28);
}
.so-page .so-row:focus-visible {
  outline: 3px solid #0a74b5;
  outline-offset: 2px;
}
.so-page .so-row:hover .so-arrow,
.so-page .so-row:focus-visible .so-arrow {
  transform: translateX(3px);
  background-color: #43b7ff;
  color: #001f3f;
}
html.dark-mode .so-page .so-row {
  border-color: rgba(255, 255, 255, 0.16);
  background-color: rgba(255, 255, 255, 0.05);
}
html.dark-mode .so-page .so-row__main b {
  color: #fff;
}
html.dark-mode .so-page .so-row .so-arrow {
  background-color: rgba(67, 183, 255, 0.16);
  color: var(--secondary);
}
html.dark-mode .so-page .so-row:hover,
html.dark-mode .so-page .so-row:focus-visible {
  border-color: var(--secondary);
  background-color: rgba(67, 183, 255, 0.1);
  box-shadow: 0 0 1.5rem rgba(67, 183, 255, 0.2);
}
html.dark-mode .so-page .so-row:hover .so-arrow,
html.dark-mode .so-page .so-row:focus-visible .so-arrow {
  background-color: var(--secondary);
  color: #001f3f;
}
html.dark-mode .so-page .so-row:focus-visible {
  outline-color: var(--secondary);
}
/* Long lists (Digital Marketing) sit two across on wide screens so the cards stay compact. */
@media only screen and (min-width: 80rem) {
  .so-page .so-rows--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .so-page .so-rows--grid .so-row {
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.95rem 0.8rem 0.95rem 1rem;
  }
  .so-page .so-rows--grid .so-row__main b {
    font-size: 1rem;
  }
}

/* ------------------------------------------------------------------ one partner: five connected stages */
.so-benefits {
  display: grid;
  gap: 1rem 2rem;
  max-width: 62rem;
  margin: clamp(1.75rem, 3.5vw, 2.5rem) auto 0;
  padding: 0;
  list-style: none;
}
.so-page .so-benefits li {
  display: grid;
  gap: 0.25rem;
  align-content: start;
  margin: 0;
  border-top: 2px solid var(--secondary);
  padding-top: 0.75rem;
}
.so-benefits b {
  font-family: var(--headerFont);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
}
.so-benefits span {
  font-size: 0.9375rem;
  line-height: 1.5em;
  color: rgba(255, 255, 255, 0.82);
}
@media only screen and (min-width: 48rem) {
  .so-benefits {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    text-align: center;
  }
}
.so-page .so-journey {
  gap: 1rem;
  text-align: left;
}
.so-page .so-journey:before {
  top: 1.5rem;
  bottom: 1.5rem;
  left: 2.25rem;
  border-left: 2px solid rgba(67, 183, 255, 0.55);
}
.so-page .so-step {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  padding: 1.15rem 1.15rem 1.25rem 5rem;
}
.so-page .so-step__node {
  top: 1.15rem;
  left: 0.75rem;
  background-color: #0b3560;
}
.so-page .so-step__num {
  font-family: var(--headerFont);
  font-size: 1.75rem;
  letter-spacing: 0.04em;
}
.so-page .so-step__title {
  gap: 0.2rem;
  margin-bottom: 0.5rem;
}
.so-page .so-step__text a {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.35rem 0;
}
@media only screen and (min-width: 64rem) {
  .so-page .so-journey {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
    margin-top: clamp(3rem, 5vw, 4.5rem);
    text-align: center;
  }
  .so-page .so-journey:before {
    top: 0;
    right: 10%;
    bottom: auto;
    left: 10%;
    border-left: 0;
    border-top: 2px solid rgba(67, 183, 255, 0.55);
  }
  .so-page .so-step {
    display: flex;
    flex-direction: column;
    padding: 3rem 1rem 1.5rem;
  }
  .so-page .so-step__node {
    position: absolute;
    top: -2rem;
    left: 50%;
    margin: 0;
    transform: translateX(-50%);
  }
  .so-page .so-step:not(:last-child):after {
    content: none;
  }
  .so-page .so-step__title {
    align-items: center;
  }
  .so-page .so-step__text {
    display: flex;
    flex: 1;
    flex-direction: column;
  }
  .so-page .so-step__text p {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
  }
  .so-page .so-step__text a {
    margin-top: auto;
    padding-top: 0.9rem;
  }
}

/* ------------------------------------------------------------------ expertise in action */
.so-work {
  position: relative;
  background-color: #f7f7f7;
  padding: clamp(3.25rem, 6.5vw, 5.5rem) 1rem;
}
.so-work__head {
  max-width: 40rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.so-work__head .cs-topper {
  display: block;
  margin-bottom: 0.6rem;
}
.so-work__head .cs-title {
  margin: 0 0 0.9rem;
  max-width: none;
}
.so-work__head p {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.65em;
  color: var(--bodyTextColor);
}
.so-work__list {
  display: grid;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.so-proj {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #dde5ee;
  border-radius: 1rem;
  background-color: #fff;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.so-proj__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: #0b2a4a;
}
.so-proj__media img {
  display: block;
  height: 100%;
  width: 100%;
  object-fit: cover;
}
.so-proj__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.25rem 1.35rem 1.4rem;
}
.so-proj__name {
  margin: 0 0 0.4rem;
  font-size: 1.5rem;
  line-height: 1.15em;
  font-weight: 900;
  color: var(--headerColor);
}
.so-proj__scope {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5em;
  color: var(--bodyTextColor);
}
.so-proj__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1rem;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0a74b5;
}
.so-proj__link:after {
  content: "";
  position: absolute;
  inset: 0;
}
.so-proj__link .so-arrow {
  height: 1rem;
  width: 1rem;
  transition: transform 0.2s;
}
.so-proj--link:hover,
.so-proj--link:focus-within {
  transform: translateY(-3px);
  border-color: #43b7ff;
  box-shadow: 0 1rem 2rem -1rem rgba(0, 31, 63, 0.35);
}
.so-proj--link:focus-within {
  outline: 3px solid #0a74b5;
  outline-offset: 2px;
}
.so-proj__link:focus-visible {
  outline: none;
}
.so-proj--link:hover .so-arrow {
  transform: translateX(3px);
}
.so-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
html.dark-mode .so-work {
  background-color: #0a1824;
}
html.dark-mode .so-work__head p,
html.dark-mode .so-proj__scope {
  color: rgba(255, 255, 255, 0.78);
}
html.dark-mode .so-work__head .cs-title,
html.dark-mode .so-proj__name {
  color: #fff;
}
html.dark-mode .so-proj {
  border-color: rgba(255, 255, 255, 0.16);
  background-color: rgba(255, 255, 255, 0.05);
}
html.dark-mode .so-proj__link {
  color: var(--secondary);
}
html.dark-mode .so-proj--link:focus-within {
  outline-color: var(--secondary);
}
@media only screen and (min-width: 48rem) {
  .so-work__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  .so-page .so-row,
  .so-page .so-row .so-arrow,
  .so-proj {
    transition: none;
  }
  .so-page .so-row:hover,
  .so-proj--link:hover {
    transform: none;
  }
}

/* ------------------------------------------------------------------ expertise in action on phones: a native swipe row */
.so-dots {
  display: none;
}
@media only screen and (max-width: 39.999rem) {
  .so-work__rail {
    width: calc(100% + 2rem);
    margin: 0 -1rem; /* the row runs to the screen edges; the section's side padding is 1rem */
  }
  .so-work__list {
    display: flex;
    position: relative;
    gap: 0.75rem;
    padding: 0.35rem 1rem; /* room for the focus outline, which the scrolling row would otherwise clip */
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 1rem;
    scrollbar-width: none;
  }
  .so-work__list::-webkit-scrollbar {
    display: none;
  }
  .so-work__list:focus-visible {
    outline: 2px solid #0a74b5;
    outline-offset: -2px;
  }
  .so-proj {
    flex: 0 0 calc((100% + 0.25rem) / 1.15);
    scroll-snap-align: start;
  }
  .so-proj--link:hover,
  .so-proj--link:focus-within {
    transform: none;
  }
  .so-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.15rem;
    margin-top: 0.75rem;
  }
  .so-dots[hidden] {
    display: none;
  }
  .so-dot {
    display: grid;
    place-items: center;
    margin: 0;
    border: 0;
    background: none;
    padding: 0.75rem 0.5rem;
    cursor: pointer;
  }
  .so-dot span {
    display: block;
    border-radius: 99px;
    background-color: rgba(0, 31, 63, 0.28);
    height: 0.5rem;
    width: 0.5rem;
    transition: width 0.25s, background-color 0.25s;
  }
  .so-dot.is-active span {
    background-color: #0a76c2;
    width: 1.5rem;
  }
  .so-dot:focus-visible {
    outline: 2px solid #0a74b5;
    border-radius: 0.5rem;
  }
  html.dark-mode .so-work__list:focus-visible,
  html.dark-mode .so-dot:focus-visible {
    outline-color: var(--secondary);
  }
  html.dark-mode .so-dot span {
    background-color: rgba(255, 255, 255, 0.32);
  }
  html.dark-mode .so-dot.is-active span {
    background-color: var(--secondary);
  }
}
@media (prefers-reduced-motion: reduce) {
  .so-dot span {
    transition: none;
  }
}

/* ------------------------------------------------------------------ category row: its own band, so it can stick on phones */
.so-page .so-jump-wrap {
  padding-bottom: 0;
}
.so-jumpbar {
  position: relative;
  z-index: 1;
  background-color: #fff;
  padding: 0 1rem 0.25rem;
}
html.dark-mode .so-jumpbar {
  background-color: var(--dark);
}
@media only screen and (max-width: 39.999rem) {
  /* The base stylesheet sets overflow-x: hidden on the body, which would stop position: sticky working; clip does the same job
     without making the body a scroll container. Limited to this page and to phones. */
  body:has(.so-page) {
    overflow-x: clip;
  }
  .so-jumpbar {
    position: sticky;
    top: calc(3rem + 2 * clamp(0.75rem, 2vw, 1.5rem)); /* exactly the height of the mobile header */
    z-index: 100;
    border-bottom: 1px solid #e3e8ee;
    padding: 0;
    box-shadow: 0 0.5rem 1rem -0.75rem rgba(0, 31, 63, 0.35);
  }
  html.dark-mode .so-jumpbar {
    border-bottom-color: rgba(255, 255, 255, 0.14);
  }
  .so-page .so-jump ul {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start; /* centring would push the first items out of reach */
    position: relative;
    gap: 0.5rem;
    margin: 0;
    padding: 0.5rem 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-padding: 0 1rem;
    scrollbar-width: none;
  }
  .so-page .so-jump ul::-webkit-scrollbar {
    display: none;
  }
  /* more to scroll to (class set by services-nav.js) */
  .so-jumpbar.has-more:after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 2.25rem;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff 85%);
    pointer-events: none;
  }
  html.dark-mode .so-jumpbar.has-more:after {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0), var(--dark) 85%);
  }
  .so-page .so-jump li,
  .so-page .so-jump li:last-child {
    flex: 0 0 auto;
    grid-column: auto;
  }
  .so-page .so-jump a,
  .so-page .so-jump li:last-child a {
    justify-content: flex-start;
    gap: 0.5rem;
    width: auto;
    min-height: 2.75rem;
    border-radius: 3rem;
    padding: 0.3rem 0.9rem 0.3rem 0.35rem;
    white-space: nowrap;
    font-size: 0.9375rem;
  }
  .so-page .so-jump a:hover {
    transform: none;
  }
  .so-page .so-jump a[aria-current] {
    border-color: var(--primary);
    background-color: var(--primary);
    color: #fff;
  }
  .so-page .so-jump a[aria-current] .so-jump__icon {
    background-color: #43b7ff;
  }
  .so-page .so-jump a[aria-current] .so-jump__icon img {
    filter: brightness(0); /* dark icon on the cyan disc */
  }
  html.dark-mode .so-page .so-jump a[aria-current] {
    border-color: var(--secondary);
    background-color: rgba(67, 183, 255, 0.22);
    color: #fff;
  }
  html.dark-mode .so-page .so-jump a[aria-current] .so-jump__icon {
    background-color: var(--secondary);
  }
  /* In-page links land below both the header and the row. */
  .so-page .so-section {
    scroll-margin-top: calc(3rem + 2 * clamp(0.75rem, 2vw, 1.5rem) + 3.75rem);
  }
}
