/* =========================================================================
   SERVICE DETAIL PAGE TEMPLATE  (class prefix: sd-)
   Shared by every page generated from src/services. Loaded after
   customstyle.css and builds on its tokens: --primary, --title-color,
   --body-text-color-black, --body-font, the .btn-primary pill and the
   .btn-outline-primary white outline. Everything here is scoped to
   .sd-page / .sd-* so no other page is affected.
   ========================================================================= */

.sd-page {
  --sd-line: #e5e9f2;            /* same hairline as --why-line / --t-line */
  --sd-line-strong: #d3dae6;
  --sd-surface: #f5f7fa;         /* light band, style.css --light */
  --sd-ink: var(--title-color);  /* #111 */
  --sd-text: #3d4554;            /* secondary copy; AA on white and on --sd-surface */
  --sd-muted: #5b6474;           /* labels; darker than --label-color so it passes AA on --sd-surface */
  --sd-tint: rgba(27, 91, 167, 0.045);  /* --primary at low alpha */
  --sd-tint-line: rgba(27, 91, 167, 0.2);
  --sd-navy: #0b1b3f;            /* style.css --secondary; one step lighter than the footer navy */
  --sd-radius: 12px;
  --sd-section-y: 96px;
  --sd-ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Section heading scale, matching the site's "[ eyebrow ]" + heading
     pattern, as the other pages render it (customstyle.css .section-head h6 / h3):
     3rem from 1200px (see the min-width: 1200px query), fluid below. */
  --sd-heading-size: calc(1.425rem + 2.1vw);
  --sd-heading-lh: 1.2;
  background: var(--white);
}

/* Skip link (Bootstrap .visually-hidden-focusable shows it on focus) */
.sd-skip:focus {
  position: fixed !important;
  top: 12px;
  left: 12px;
  z-index: 10000;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--white);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(16, 24, 40, 0.18);
}

/* ---------------------------------------------------------------- shared */
/* Section eyebrow: same as the site's .section-head h6, "[ Label ]".
   Brackets are decorative, so they are hidden from screen readers. */
.sd-eyebrow {
  margin: 0 0 12px;
  font-family: var(--body-font);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  color: var(--primary);
}

.sd-eyebrow::before {
  content: "[ ";
  content: "[ " / "";
}

.sd-eyebrow::after {
  content: " ]";
  content: " ]" / "";
}

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

.sd-section--muted {
  background: var(--sd-surface);
}

.sd-section-head {
  margin-bottom: 40px;
}

.sd-section-head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
}

/* Section heading: same as the site's .section-head h3. Used by every
   section (At a glance, What we do, Related work, FAQ, final CTA); dark
   sections only override the colour. */
.sd-section-title {
  margin: 0;
  font-family: var(--body-font);
  font-size: var(--sd-heading-size);
  font-weight: 700;
  line-height: var(--sd-heading-lh);
  letter-spacing: normal;
  color: var(--body-text-color-black);
}

/* Main column + fixed-width right column */
.sd-split {
  display: grid;
  gap: 48px;
}

.sd-split__main {
  min-width: 0;
}

.sd-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.sd-link .material-icons-round {
  font-size: 18px;
  transition: transform 0.3s var(--sd-ease);
}

.sd-link:hover {
  color: #154a8a;
}

.sd-link:hover .material-icons-round {
  transform: translateX(3px);
}

.sd-page main a:focus-visible,
.sd-page main button:focus-visible {
  outline: 3px solid rgba(27, 91, 167, 0.4);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------------------------------------------------------------- buttons */
.sd-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.sd-page main .btn-primary,
.sd-btn-secondary,
.sd-btn-on-dark {
  align-items: center;
  justify-content: center;
}

.sd-page main .btn-primary .material-icons-round,
.sd-btn-secondary .material-icons-round,
.sd-btn-on-dark .material-icons-round {
  font-size: 18px;
}

/* Quiet companion to .btn-primary on white (same pill shape and height) */
.sd-btn-secondary {
  --bs-btn-padding-x: 29px;
  --bs-btn-padding-y: 14px;
  --bs-btn-font-weight: 600;
  --bs-btn-border-radius: 30px;
  --bs-btn-color: var(--primary);
  --bs-btn-border-color: var(--sd-tint-line);
  --bs-btn-hover-color: var(--primary);
  --bs-btn-hover-bg: var(--sd-tint);
  --bs-btn-hover-border-color: var(--primary);
  --bs-btn-active-color: var(--primary);
  --bs-btn-active-bg: rgba(27, 91, 167, 0.09);
  --bs-btn-active-border-color: var(--primary);
  display: inline-flex;
  gap: 8px;
}

/* Existing white-outline button, matched to .btn-primary's height */
.sd-btn-on-dark.btn-outline-primary {
  padding: 13px 28px;
  line-height: 1.5;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.sd-btn-on-dark.btn-outline-primary:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

/* ---------------------------------------------------------------- hero */
.sd-hero {
  padding: 64px 0 56px;
}

/* 40px; steps down to 32px on phones (see the 575.98px query) */
.sd-hero__title {
  max-width: 20em;
  margin: 0 0 16px;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--sd-ink);
}

/* 16px body size; narrower measure keeps lines around 75 characters */
.sd-hero__desc {
  max-width: 36rem;
  margin: 0;
  font-size: 1rem;
  line-height: var(--body-lh);
  color: var(--sd-text);
}

.sd-hero .sd-actions {
  margin-top: 32px;
}

/* Two-column variant: copy left, two image cards right (wide 8 / tall 4),
   the same layout as the existing internal heroes (ai-services.html).
   overflow keeps the entrance offsets from causing sideways scroll. */
.sd-hero--media {
  overflow: hidden;
}

.sd-hero__img {
  display: block;
  width: 100%;
  height: auto;
}

/* Fixed frames (the original artwork's proportions: wide 476×335, tall
   368×572) so photos of any shape line up at the same height. Photos fill
   and crop to the frame; --contain keeps a white-background illustration
   whole instead of cropping it. */
.sd-hero__media .col-8 .sd-hero__img {
  aspect-ratio: 476 / 335;
}

.sd-hero__media .col-4 .sd-hero__img {
  aspect-ratio: 368 / 572;
}

.sd-hero__media .sd-hero__img {
  border: 1px solid rgba(18, 48, 90, 0.08);
  border-radius: 8px;
  background-color: var(--white, #fff);
  box-shadow: 0 12px 28px -14px rgba(18, 48, 90, 0.28);
  object-fit: cover;
}

/* White-background illustrations: kept whole, with a little breathing room
   inside the frame so the artwork doesn't touch the border. */
.sd-hero__media .sd-hero__img--contain {
  padding: 10px;
  object-fit: contain;
}

/* Image entrance: see "Hero image entrance" after the scroll reveal rules. */

/* Same card sizes as the existing internal heroes: there the hero card
   shrinks to its content, which caps the image column at 555px (cards
   346×243 and 153×238 on desktop). Below that width the column governs. */
.sd-hero__media {
  max-width: 555px;
}

/* ---------------------------------------------------------------- at a glance
   Asymmetric company snapshot: navy experience panel (27%) + numbered
   fact grid on the cool-grey surface (73%), joined into one framed unit. */
.sd-glance {
  --sd-on-dark-line: rgba(255, 255, 255, 0.14); /* same as --gs-line */
  --sd-on-dark-accent: #449bff;                 /* hero .highlight blue, same as --gs-accent */
  padding-bottom: calc(var(--sd-section-y) / 2); /* half: with What we do below, one section gap in total */
}

.sd-glance__frame {
  display: grid;
  overflow: hidden;
  border-radius: var(--sd-radius);
}

/* Left: experience panel */
.sd-glance__panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: 32px;
  background: var(--sd-navy);
  color: var(--white);
}

.sd-glance__eyebrow {
  margin-bottom: 12px;
  color: var(--sd-on-dark-accent);
}

/* Typography from .sd-section-title, set to 26px so it fits the
   narrow navy panel; white on navy */
.sd-glance__heading {
  margin: 0 0 10px;
  font-size: 1.625rem; /* 26px */
  text-wrap: balance;
  color: var(--white);
}

.sd-glance__lead {
  max-width: 24rem;
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}

.sd-glance__metric {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.sd-glance__metric-value {
  font-size: clamp(3.5rem, 2.5rem + 2.5vw, 4.5rem); /* 56px phones, 72px desktop */
  font-weight: 600;
  line-height: 0.85;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--white);
}

.sd-glance__metric-unit {
  margin-left: 0.04em;
  color: var(--sd-on-dark-accent);
}

.sd-glance__metric-label {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--white);
}

.sd-glance__statement {
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--sd-on-dark-line);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}

/* Right: numbered fact grid */
.sd-glance__grid {
  display: grid;
  margin: 0;
  border: 1px solid var(--sd-line);
  border-top: 0;
  background: var(--sd-surface);
}

.sd-glance__item {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  transition: background-color 0.3s ease;
}

.sd-glance__item + .sd-glance__item {
  border-top: 1px solid var(--sd-line);
}

/* Accent rule that draws in on hover */
.sd-glance__item::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 28px;
  width: 40px;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--sd-ease);
}

.sd-glance__label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 24px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sd-muted);
}

.sd-glance__num {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--primary);
}

.sd-glance__slash {
  color: var(--sd-line-strong);
}

.sd-glance__body {
  margin: 0;
}

.sd-glance__title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--sd-ink);
  transition: color 0.3s ease;
}

.sd-glance__title:last-child {
  margin-bottom: 0;
}

.sd-glance__text {
  max-width: 26rem;
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--sd-text);
}

@media (hover: hover) and (pointer: fine) {
  .sd-glance__item:hover {
    background-color: var(--white);
  }

  .sd-glance__item:hover::before {
    transform: scaleX(1);
  }

  .sd-glance__item:hover .sd-glance__title {
    color: var(--primary);
  }
}

/* Scroll reveal (assets/js/service-detail.js). Only active when <html> has
   .sd-js, which is never set for reduced motion. Elements that enter the
   viewport together are staggered by the script (--sd-reveal-delay). The
   rest of the page motion is in the "motion" section near the end. */
.sd-js [data-sd-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.7s var(--sd-ease) var(--sd-reveal-delay, 0ms),
    transform 0.7s var(--sd-ease) var(--sd-reveal-delay, 0ms),
    background-color 0.3s ease;
}

.sd-js [data-sd-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* Hero image entrance: matches the existing heroes' AOS fade-down-right /
   fade-down-left (100px offsets, 1000ms, ease). Uses the same reveal, so it
   is skipped for reduced motion and without JS. The static media container
   is the observed trigger; the cards animate when it is revealed. */
.sd-js .sd-hero__media[data-sd-reveal] {
  opacity: 1;
  transform: none;
  transition: none;
}

.sd-js .sd-hero__media [data-sd-entrance] {
  opacity: 0;
  transition:
    opacity 1s ease,
    transform 1s ease;
}

.sd-js .sd-hero__media [data-sd-entrance="fade-down-right"] {
  transform: translate3d(-100px, -100px, 0);
}

.sd-js .sd-hero__media [data-sd-entrance="fade-down-left"] {
  transform: translate3d(100px, -100px, 0);
}

.sd-js .sd-hero__media.is-revealed [data-sd-entrance] {
  opacity: 1;
  transform: none;
}

/* Tablet and up: the three facts in a single row, hairline separators */
@media (min-width: 768px) {
  .sd-glance__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sd-glance__item {
    padding: 36px 28px;
  }

  .sd-glance__label {
    margin-bottom: 40px;
  }

  .sd-glance__item::before {
    left: 28px;
  }

  .sd-glance__item + .sd-glance__item {
    border-top: 0;
    border-left: 1px solid var(--sd-line);
  }
}

/* Tablet: panel spans the top; intro left, metric right */
@media (min-width: 768px) and (max-width: 991.98px) {
  .sd-glance__panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
    align-items: end;
    gap: 32px;
    padding: 32px;
  }
}

/* Desktop: panel and facts side by side. 30 / 70 on small desktops,
   27 / 73 from 1200px (see below). The panel is content height and
   top-aligned (never stretched); the facts keep their natural height and
   only grow if the panel is taller. */
@media (min-width: 992px) {
  .sd-glance__frame {
    grid-template-columns: minmax(0, 30fr) minmax(0, 70fr);
  }

  .sd-glance__grid {
    border-top: 1px solid var(--sd-line);
    border-left: 0;
    border-top-right-radius: var(--sd-radius);
    border-bottom-right-radius: var(--sd-radius);
  }

  .sd-glance__panel {
    align-self: start;
    height: fit-content;
    justify-content: flex-start;
    gap: 20px;
    padding: 32px 24px 28px; /* top matches the facts so the labels line up */
    border-bottom-left-radius: var(--sd-radius);
  }

  .sd-glance__heading {
    margin-bottom: 8px;
  }

  /* 20+ with its label beside it rather than underneath */
  .sd-glance__metric {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .sd-glance__metric-value {
    flex: none;
    font-size: 4rem; /* 64px */
  }

  .sd-glance__statement {
    margin-top: 14px;
    padding-top: 14px;
  }

  .sd-glance__item {
    padding: 32px 28px;
  }

  .sd-glance__item::before {
    left: 28px;
  }
}

@media (min-width: 1200px) {
  .sd-glance__frame {
    grid-template-columns: minmax(0, 27fr) minmax(0, 73fr);
  }

  .sd-glance__panel {
    padding: 36px 24px 28px;
  }

  .sd-glance__item {
    padding: 36px;
  }

  .sd-glance__item::before {
    left: 36px;
  }
}

/* Small desktop: three narrow columns beside the panel. Keep each label on
   one line so the three titles stay level. */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .sd-glance__item {
    padding-right: 24px;
    padding-left: 24px;
  }

  .sd-glance__item::before {
    left: 24px;
  }

  .sd-glance__label {
    white-space: nowrap;
  }
}

@media (max-width: 767.98px) {
  .sd-glance__panel {
    gap: 28px;
    padding: 28px 24px;
  }

  .sd-glance__item {
    padding: 28px 24px;
  }

  .sd-glance__item::before {
    left: 24px;
  }

  .sd-glance__label {
    margin-bottom: 16px;
  }
}

/* ---------------------------------------------------------------- what we do */
.sd-whatwedo {
  padding-top: calc(var(--sd-section-y) / 2); /* pairs with the At a glance bottom padding */
  border-top: 1px solid var(--sd-line);
}

/* Section heading (same as "Where we have done this."), same gap as .sd-section-head */
.sd-whatwedo__title {
  margin-bottom: 40px;
}

.sd-capabilities {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--sd-line);
}

/* Editorial capability rows: large light-blue number and title on the left,
   description on the right, all on one shared first baseline. Phones stack;
   small desktops (narrow main column) put title and description beside the
   number. Hover adds a faint tint and a thin blue rule on the left edge. */
.sd-capability {
  --sd-num-soft: #8fb2de; /* light tint of --primary; numbers are decorative (aria-hidden) */
  position: relative;
  isolation: isolate; /* keeps the hover tint behind the row's own content */
  display: grid;
  grid-template-areas:
    "num"
    "title"
    "desc";
  padding: 28px 0;
  border-bottom: 1px solid var(--sd-line);
}

.sd-capability__num {
  grid-area: num;
  margin-bottom: 14px;
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--sd-num-soft);
  transition: color 0.3s var(--sd-ease);
}

.sd-capability__title {
  grid-area: title;
  margin: 0 0 12px;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--sd-ink);
}

.sd-capability__desc {
  grid-area: desc;
  max-width: 38rem;
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--sd-text);
}

/* Hover tint and accent rule, drawn just outside the row so text alignment
   with the heading above is untouched */
.sd-capability::before,
.sd-capability::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: -1px;
  left: -20px;
  z-index: -1;
  pointer-events: none;
}

.sd-capability::before {
  right: -20px;
  background: var(--sd-tint);
  opacity: 0;
  transition: opacity 0.35s var(--sd-ease);
}

.sd-capability::after {
  width: 2px;
  background: var(--primary);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.45s var(--sd-ease);
}

@media (hover: hover) and (pointer: fine) and (min-width: 768px) {
  .sd-capability:hover::before {
    opacity: 1;
  }

  .sd-capability:hover::after {
    transform: scaleY(1);
  }

  .sd-capability:hover .sd-capability__num {
    color: var(--primary);
  }
}

/* Tablet and wide desktop: number | title | description */
@media (min-width: 768px) {
  .sd-capability {
    grid-template-columns: 4.5rem minmax(0, 5fr) minmax(0, 7fr);
    grid-template-areas: "num title desc";
    align-items: baseline;
    column-gap: 32px;
    padding: 40px 0;
  }

  .sd-capability__num {
    margin: 0;
    font-size: 2.25rem;
  }

  .sd-capability__title {
    margin: 0;
  }
}

/* Small desktop: the main column sits beside the sidebar and is narrow, so
   title and description stack to the right of the number */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .sd-capability {
    grid-template-columns: 4rem minmax(0, 1fr);
    grid-template-areas:
      "num title"
      ".   desc";
    column-gap: 24px;
    padding: 36px 0;
  }

  .sd-capability__num {
    font-size: 2rem;
  }

  .sd-capability__title {
    margin-bottom: 12px;
  }
}

/* ---------------------------------------------------------------- panels */
.sd-sidebar {
  display: grid;
  align-content: start;
  gap: 16px;
}

.sd-panel {
  padding: 24px;
  border: 1px solid var(--sd-line);
  border-radius: var(--sd-radius);
  background: var(--white);
}

/* "Start with" CTA card: the .btn-primary blues (#175AA8 deep -> #338BF2
   vibrant) on a diagonal, deep end behind the copy so white text stays
   legible. Hover shifts the gradient slightly and lifts the card. */
.sd-panel--accent {
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, #175aa8 0%, #1f6cc5 55%, #338bf2 100%);
  background-size: 160% 160%;
  background-position: 0% 0%;
  transition:
    background-position 0.6s var(--sd-ease),
    translate 0.3s var(--sd-ease),
    box-shadow 0.3s var(--sd-ease);
}

/* Keep the scroll reveal while adding the hover properties */
.sd-js .sd-panel--accent[data-sd-reveal] {
  transition:
    opacity 0.7s var(--sd-ease) var(--sd-reveal-delay, 0ms),
    transform 0.7s var(--sd-ease) var(--sd-reveal-delay, 0ms),
    background-position 0.6s var(--sd-ease),
    translate 0.3s var(--sd-ease),
    box-shadow 0.3s var(--sd-ease);
}

.sd-panel--accent .sd-panel__title {
  color: rgba(255, 255, 255, 0.82);
}

.sd-panel--accent .sd-panel__text {
  color: var(--white);
}

/* White button, Halcyon-blue label and arrow */
.sd-panel--accent .btn-primary {
  --bs-btn-active-bg: #eaf2fc;
  --bs-btn-active-color: #175aa8;
  --bs-btn-active-border-color: transparent;
  background: var(--white);
  color: var(--primary);
  animation: none;
}

.sd-panel--accent .btn-primary:hover {
  background: var(--white);
  color: #175aa8;
  box-shadow: 0 8px 18px -10px rgba(8, 30, 70, 0.5);
}

.sd-page .sd-panel--accent .btn:focus-visible {
  outline-color: rgba(255, 255, 255, 0.85);
}

@media (hover: hover) and (pointer: fine) {
  .sd-panel--accent:hover {
    background-position: 100% 100%;
    box-shadow: 0 18px 32px -24px rgba(23, 90, 168, 0.55);
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .sd-panel--accent:hover {
    translate: 0 -2px;
  }
}

.sd-panel__title {
  margin: 0 0 16px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sd-muted);
}

.sd-panel__text {
  margin: 0 0 20px;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--sd-ink);
}

.sd-panel__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sd-panel__list li {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--sd-ink);
}

.sd-panel__list li::before {
  content: "";
  flex: 0 0 6px;
  height: 6px;
  margin-top: 0.6em;
  border-radius: 1px;
  background: var(--primary);
}

.sd-panel__list li:first-child {
  padding-top: 0;
}

.sd-panel__list li:last-child {
  padding-bottom: 0;
}

.sd-panel__list li + li {
  border-top: 1px solid var(--sd-line);
}

/* ---------------------------------------------------------------- technology tags */
.sd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sd-tag {
  padding: 5px 11px;
  border: 1px solid var(--sd-line);
  border-radius: 6px;
  background: var(--sd-surface);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--sd-ink);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- related work */
.sd-work-grid {
  display: grid;
  gap: 24px;
}

.sd-work-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 32px;
  border: 1px solid var(--sd-line);
  border-radius: var(--sd-radius);
  background: var(--white);
  transition: border-color 0.3s var(--sd-ease), box-shadow 0.3s var(--sd-ease);
}

.sd-work-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 32px;
  margin-bottom: 24px;
}

/* Client name on a case-study card: a card label, not a section eyebrow */
.sd-work-card__client {
  margin: 0;
  font-family: var(--body-font);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

.sd-work-card__logo {
  width: auto;
  height: 26px;
  max-width: 110px;
  object-fit: contain;
}

/* Square logos carry their own padding, so they need more height to read at
   the same size; the negative margin keeps the card's top row height */
.sd-work-card__logo--square {
  height: 54px;
  margin: -14px -4px;
}

/* Joint case studies: logos side by side */
.sd-work-card__logos {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
}

.sd-work-card__title {
  margin: 0 0 12px;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--sd-ink);
}

.sd-work-card__desc {
  margin: 0 0 28px;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--sd-text);
}

/* Metrics sit on the card's bottom edge so both cards line up */
.sd-metrics {
  display: grid;
  margin: auto 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--sd-line);
}

.sd-metric {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
}

.sd-metric + .sd-metric {
  border-top: 1px solid var(--sd-line);
}

.sd-metric:last-child {
  padding-bottom: 0;
}

.sd-metric__value {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
  white-space: nowrap;
}

.sd-metric__label {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--sd-text);
}

.sd-work-card__link {
  align-self: flex-start;
  margin-top: 24px;
}

@media (hover: hover) and (pointer: fine) {
  .sd-work-card:hover {
    border-color: var(--sd-line-strong);
    box-shadow: 0 16px 32px -24px rgba(16, 24, 40, 0.28);
  }
}

/* ---------------------------------------------------------------- FAQ
   Editorial and deliberately quiet: hairline rows and a small plus/minus.
   No panels, numbers or tints. Type reuses the page system:
   header = .sd-eyebrow / .sd-section-title, supporting line and answers =
   body copy (as the hero description), questions = the capability title style. */

/* Supporting line under a section title (hero description style and spacing) */
.sd-section-lead {
  max-width: 36rem;
  margin: 16px 0 0;
  font-size: 1rem;
  line-height: var(--body-lh);
  color: var(--sd-text);
}

.sd-faq__list {
  border-top: 1px solid var(--sd-line);
}

.sd-faq__item {
  border-bottom: 1px solid var(--sd-line);
}

.sd-faq__question {
  margin: 0;
}

.sd-faq__toggle {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  width: 100%;
  padding: 28px 0;
  border: 0;
  background: none;
  font-family: inherit;
  text-align: left;
  color: var(--sd-ink);
  cursor: pointer;
}

/* Same as .sd-capability__title */
.sd-faq__text {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  transition: color 0.25s ease;
}

/* Plus / minus from two hairlines; centred on the question's first line */
.sd-faq__icon {
  position: relative;
  flex: 0 0 14px;
  height: 14px;
  margin-top: 7px;
  color: var(--sd-ink);
  transition: color 0.25s ease;
}

.sd-faq__icon::before,
.sd-faq__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1.5px;
  margin-top: -0.75px;
  background: currentColor;
  transition: transform 0.3s var(--sd-ease);
}

.sd-faq__icon::after {
  transform: rotate(90deg);
}

.sd-faq__toggle[aria-expanded="true"] .sd-faq__icon::after {
  transform: rotate(0deg);
}

/* Same as the hero description / body copy */
.sd-faq__answer {
  max-width: 44rem;
  padding: 0 46px 32px 0;
  font-size: 1rem;
  line-height: var(--body-lh);
  color: var(--sd-text);
}

.sd-faq__answer p {
  margin: 0 0 12px;
}

.sd-faq__answer p:last-child {
  margin-bottom: 0;
}

/* Answer fades in alongside Bootstrap's height transition. Keyed off
   aria-expanded (set as soon as a toggle starts); browsers without :has()
   simply show the answer without the fade. */
@supports selector(:has(*)) {
  .sd-faq__answer {
    opacity: 0;
    transition: opacity 0.35s ease;
  }

  .sd-faq__item:has(> .sd-faq__question [aria-expanded="true"]) .sd-faq__answer {
    opacity: 1;
    transition-delay: 0.05s;
  }
}

@media (hover: hover) and (pointer: fine) {
  .sd-faq__toggle:hover .sd-faq__text,
  .sd-faq__toggle:hover .sd-faq__icon {
    color: var(--primary);
  }
}

.sd-faq__toggle:focus-visible {
  outline-offset: 6px;
}

/* ---------------------------------------------------------------- related services
   Compact navigation card under the questions: light-blue surface, thin blue
   border, eyebrow on the left and the links in one row with hairline
   dividers. The label moves above the links on tablets; on phones the links
   stack as full-width rows. */
.sd-related {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  margin-top: 48px;
  padding: 14px 16px 14px 28px;
  border: 1px solid var(--sd-tint-line);
  border-radius: 14px;
  background: #eff6ff;
}

/* Same as .sd-panel__title */
.sd-related__title {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sd-muted);
}

.sd-related__list {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sd-related__list li {
  position: relative;
  padding: 0 6px;
}

/* Hairline divider between links */
.sd-related__list li + li::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 1px;
  height: 20px;
  background: var(--sd-tint-line);
  transform: translateY(-50%);
}

.sd-related__link {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--sd-navy);
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 0.25s ease,
    background-color 0.25s ease;
}

/* Last word + arrow never split */
.sd-related__tail {
  white-space: nowrap;
}

.sd-related__arrow {
  margin-left: 8px;
  font-size: 18px;
  vertical-align: -4px;
  color: var(--primary);
  transition: transform 0.3s var(--sd-ease);
}

a.sd-related__link:hover,
a.sd-related__link:focus-visible {
  background-color: rgba(27, 91, 167, 0.08); /* --primary, light */
  color: var(--primary);
}

a.sd-related__link:hover .sd-related__arrow,
a.sd-related__link:focus-visible .sd-related__arrow {
  transform: translateX(3px);
}

/* Tablet and small desktop: label above, links stay in one row. Each link keeps its natural
   width and only wraps inside its own space when the row is too long, so the
   dividers always sit between items. */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .sd-related {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 16px 12px 22px;
  }

  .sd-related__list {
    max-width: calc(100% + 14px);
    margin-left: -14px; /* first link's text lines up with the label */
  }

  .sd-related__list li {
    flex: 0 1 auto;
    min-width: 0;
    padding: 0 4px;
  }

  .sd-related__link {
    padding: 8px 10px;
    white-space: normal;
  }

  .sd-related__arrow {
    margin-left: 6px;
  }
}

@media (max-width: 767.98px) {
  .sd-faq__toggle {
    gap: 20px;
    padding: 22px 0;
  }

  /* Same as .sd-capability__title on phones */
  .sd-faq__text {
    font-size: 1.25rem;
  }

  .sd-faq__icon {
    margin-top: 6px;
  }

  .sd-faq__answer {
    padding: 0 0 26px;
  }

  .sd-related {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-top: 36px;
    padding: 18px 20px 6px;
  }

  .sd-related__list {
    flex-direction: column;
    align-items: stretch;
  }

  .sd-related__list li {
    padding: 0;
  }

  /* Dividers become horizontal hairlines between stacked rows */
  .sd-related__list li + li::before {
    top: 0;
    width: 100%;
    height: 1px;
    transform: none;
  }

  .sd-related__link {
    display: block;
    padding: 14px 0;
    white-space: normal;
  }

  /* Arrow sits at the right end of each full-width row */
  .sd-related__arrow {
    float: right;
    margin: 3px 0 0 12px;
  }

  a.sd-related__link:hover,
  a.sd-related__link:focus-visible {
    background-color: transparent;
  }
}

/* ---------------------------------------------------------------- final CTA
   Same artwork as the homepage "Get in touch" band (.getintouch). The image's
   own rounded corners are cropped by `cover` on narrow screens, so the curve
   is drawn with border-radius instead; the bottom stays square to meet the footer. */
.sd-cta {
  display: flex;
  align-items: center;
  min-height: 320px; /* homepage .getintouch height */
  padding: var(--sd-section-y) 0;
  border-radius: 24px 24px 0 0;
  background: #070b3a url("../images/patterenbackgrounds/getintouch.png") center / cover no-repeat;
  color: var(--white);
}

.sd-cta > .container {
  width: 100%;
}

.sd-cta__inner {
  display: grid;
  align-items: center;
  gap: 32px;
}

/* Typography from .sd-section-title; white on the CTA band */
.sd-cta__title {
  font-size: 2rem; /* 32px */
  margin: 0 0 12px;
  color: var(--white);
}

.sd-cta__desc {
  max-width: 36rem;
  margin: 0;
  font-size: 1rem; /* 16px */
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85); /* a touch brighter for legibility over the dot pattern */
}

/* ---------------------------------------------------------------- pending content & draft preview */
.sd-pending {
  display: inline-block;
  padding: 4px 10px;
  border: 1px dashed #d4a32f;
  border-radius: 6px;
  background: #fff8e6;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  color: #6b4a00;
}

p.sd-pending {
  display: block;
  margin: 0;
}

.sd-draft-banner {
  padding: 10px 0;
  border-bottom: 1px solid #f0d58c;
  background: #fff4d6;
  font-size: 0.875rem;
  color: #6b4a00;
}

/* ---------------------------------------------------------------- responsive */
@media (min-width: 576px) {
  .sd-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sd-metric {
    grid-template-columns: none;
    align-content: start;
    gap: 8px;
    padding: 24px 20px 0;
  }

  .sd-metric:first-child {
    padding-left: 0;
  }

  .sd-metric:last-child {
    padding-right: 0;
  }

  .sd-metric + .sd-metric {
    border-top: 0;
    border-left: 1px solid var(--sd-line);
  }

  .sd-metric__label {
    font-size: 0.8125rem;
  }
}

@media (min-width: 992px) {
  .sd-split {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 56px;
  }

  .sd-sidebar {
    /* First panel lines up with the first capability row: the "What we do"
       heading block (eyebrow line + 12px gap, heading line height,
       40px bottom margin). */
    padding-top: calc(1.2rem + 12px + var(--sd-heading-lh) * var(--sd-heading-size) + 40px);
  }

  .sd-work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sd-cta__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 64px;
  }

  .sd-actions--cta {
    justify-content: flex-end;
  }
}

@media (min-width: 1200px) {
  .sd-split {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 96px;
  }

  .sd-page {
    --sd-heading-size: 2.5rem; /* 48px, same as .section-head h3 */
  }

  .sd-metric__value {
    font-size: 1.625rem;
  }
}

@media (max-width: 991.98px) {
  .sd-page {
    --sd-section-y: 72px;
  }

  .sd-hero {
    padding-top: 48px;
  }
}

/* Tablet: sidebar panels in two columns under the capabilities */
@media (min-width: 768px) and (max-width: 991.98px) {
  .sd-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sd-sidebar .sd-panel--accent {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767.98px) {
  .sd-page {
    --sd-section-y: 56px;
  }

  .sd-hero {
    padding: 36px 0 40px;
  }

  .sd-section-head,
  .sd-whatwedo__title {
    margin-bottom: 28px;
  }

  .sd-capability__title {
    font-size: 1.25rem;
  }

  .sd-capability__desc {
    font-size: 1rem;
  }

  .sd-work-card {
    padding: 24px;
  }
}

@media (max-width: 575.98px) {
  .sd-hero__title {
    font-size: 2rem;
  }

  /* Full-width, thumb-friendly buttons */
  .sd-actions > * {
    flex: 1 1 100%;
  }

  .sd-section-head--split {
    align-items: flex-start;
  }
}

/* ---------------------------------------------------------------- motion
   One quiet system for the whole page: opacity + short translate, one easing
   (--sd-ease), 250-700ms. Scroll reveals run once (service-detail.js); the
   navbar and hero copy play on load. Load animations sit behind .sd-js, so
   they never run for reduced motion; hover movement is limited to fine
   pointers that allow motion. */

@keyframes sd-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@keyframes sd-drop {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
}

/* Header: the injected navbar settles in from above */
.sd-js #navbar .custom-navbar {
  animation: sd-drop 0.6s var(--sd-ease) backwards;
}

/* Hero copy: heading, description, then buttons; the images run their own
   entrance alongside (see "Hero image entrance") */
.sd-js .sd-hero__title {
  animation: sd-rise 0.7s var(--sd-ease) 0.1s backwards;
}

.sd-js .sd-hero__desc {
  animation: sd-rise 0.7s var(--sd-ease) 0.18s backwards;
}

.sd-js .sd-hero .sd-actions {
  animation: sd-rise 0.7s var(--sd-ease) 0.26s backwards;
}

/* 20+ counts up on first view (assets/js/stat-counter.js). Inline-block so the
   width it locks (min-width in ch) applies and the + and label never shift. */
.sd-glance__metric-value [data-count-to] {
  display: inline-block;
}

/* Case-study metrics follow their card in, left to right */
.sd-js .sd-work-grid__item .sd-metric {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.5s var(--sd-ease),
    transform 0.5s var(--sd-ease);
  transition-delay: calc(var(--sd-reveal-delay, 0ms) + 0.3s + var(--sd-metric-step, 0ms));
}

.sd-js .sd-work-grid__item .sd-metric:nth-child(2) { --sd-metric-step: 80ms; }
.sd-js .sd-work-grid__item .sd-metric:nth-child(3) { --sd-metric-step: 160ms; }

.sd-js .sd-work-grid__item.is-revealed .sd-metric {
  opacity: 1;
  transform: none;
}

/* FAQ: answer height eases like everything else; the plus turns into the
   minus with a half turn */
.sd-faq .collapsing {
  transition: height 0.4s var(--sd-ease);
}

.sd-faq__icon {
  transition:
    color 0.25s ease,
    transform 0.4s var(--sd-ease);
}

.sd-faq__toggle[aria-expanded="true"] .sd-faq__icon {
  transform: rotate(180deg);
}

/* Buttons: the arrow nudges toward its direction */
.sd-page .sd-actions .material-icons-round,
.sd-panel .btn .material-icons-round {
  transition: transform 0.3s var(--sd-ease);
}

/* Technology tags: on hover the site's primary button gradient
   (.btn-primary: #338BF2 -> #175AA8) fades in behind white text. The gradient
   sits on a layer so it can fade (gradients themselves cannot transition). */
.sd-tag {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition:
    border-color 0.25s ease,
    color 0.25s ease;
}

.sd-tag::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #338bf2, #175aa8);
  opacity: 0;
  transition: opacity 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
  .sd-tag:hover {
    border-color: #175aa8;
    color: var(--white);
  }

  .sd-tag:hover::before {
    opacity: 1;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .sd-page .sd-actions .btn,
  .sd-panel .btn,
  .sd-page .sd-actions .sd-btn-on-dark {
    transition:
      color 0.15s ease-in-out,
      background-color 0.15s ease-in-out,
      border-color 0.15s ease-in-out,
      box-shadow 0.25s var(--sd-ease),
      transform 0.25s var(--sd-ease);
  }

  .sd-page .sd-actions .btn:hover,
  .sd-panel .btn:hover,
  .sd-page .sd-actions .sd-btn-on-dark:hover {
    transform: translateY(-2px);
  }

  .sd-page .sd-actions a:hover .material-icons-round,
  .sd-panel .btn:hover .material-icons-round {
    transform: translate(2px, -2px);
  }

  /* Hero images lift slightly */
  .sd-hero__img {
    transition: transform 0.4s var(--sd-ease);
  }

  .sd-hero__img:hover {
    transform: translateY(-4px);
  }

  /* Case-study cards lift with the existing shadow */
  .sd-work-card {
    transition:
      border-color 0.3s var(--sd-ease),
      box-shadow 0.3s var(--sd-ease),
      transform 0.4s var(--sd-ease);
  }

  .sd-work-card:hover {
    transform: translateY(-4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sd-page *,
  .sd-page *::before,
  .sd-page *::after {
    animation: none !important;
    transition: none !important;
  }

  .sd-page .collapsing {
    transition: none !important;
  }
}

/* ---------------------------------------------------------------- technology stack
   Technologies page: categories as rows, label left, chips (.sd-tag) right.
   Spacing and top rule match "What we do", which it replaces on that page. */
.sd-stack {
  padding-top: calc(var(--sd-section-y) / 2);
  border-top: 1px solid var(--sd-line);
}

.sd-stack__table {
  margin: 0;
  border-top: 1px solid var(--sd-line);
}

.sd-stack__row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  column-gap: 32px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid var(--sd-line);
}

/* Same as .sd-panel__title; nudged to sit on the chips' text line */
.sd-stack__label {
  margin: 0;
  padding-top: 7px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sd-muted);
}

.sd-stack__items {
  margin: 0;
}

@media (max-width: 767.98px) {
  .sd-stack__row {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 10px;
    padding: 16px 0;
  }

  .sd-stack__label {
    padding-top: 0;
  }
}

/* ---------------------------------------------------------------- service cards
   "Hire by stack" on the Technologies page: linked cards with the approved
   summary. Same surface as the case-study cards. */
.sd-cards__grid {
  display: grid;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .sd-cards__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.sd-cards__grid > li {
  display: flex;
}

.sd-cards__card {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--sd-line);
  border-radius: var(--sd-radius);
  background: var(--white);
  color: inherit;
  text-decoration: none;
  transition:
    border-color 0.3s var(--sd-ease),
    box-shadow 0.3s var(--sd-ease),
    transform 0.4s var(--sd-ease);
}

/* Same as .sd-capability__title */
.sd-cards__title {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--sd-ink);
  transition: color 0.25s ease;
}

.sd-cards__text {
  flex: 1 1 auto;
  margin: 0 0 20px;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--sd-text);
}

/* Same as .sd-link */
.sd-cards__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--primary);
}

.sd-cards__more .material-icons-round {
  font-size: 18px;
  transition: transform 0.3s var(--sd-ease);
}

a.sd-cards__card:hover,
a.sd-cards__card:focus-visible {
  border-color: var(--sd-line-strong);
  box-shadow: 0 16px 32px -24px rgba(16, 24, 40, 0.28);
}

a.sd-cards__card:hover .sd-cards__title,
a.sd-cards__card:focus-visible .sd-cards__title {
  color: var(--primary);
}

a.sd-cards__card:hover .sd-cards__more .material-icons-round,
a.sd-cards__card:focus-visible .sd-cards__more .material-icons-round {
  transform: translateX(3px);
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  a.sd-cards__card:hover {
    transform: translateY(-4px);
  }
}

@media (max-width: 767.98px) {
  .sd-cards__card {
    padding: 24px;
  }
}
