/* =============================================================================
   Services: the index (services.html) and one page per practice
   (services-*.html). Built by ../../_build/services/build.py.

   The index heading reuses page-work.css (.work-page__head) and the journal
   rows reuse page-journal.css (.notes); this file is everything else.
   One rhythm throughout: a 1fr | 2fr grid (the same split as .head-grid), so
   every list on the page lines up under the heading above it, and hairline
   rules instead of boxes.
   ============================================================================= */

/* ---------- shared: a label with its count, "(06)" ---------- */
.sv-count {
  font-family: var(--font-label);
  font-size: 0.875rem;
  letter-spacing: 0.07em;
  font-variant-numeric: tabular-nums;
  color: var(--grey-300);
}

.sv-count--light {
  color: var(--grey-300);
}

/* =============================================================================
   INDEX: eight rows, the whole row is the link
   ============================================================================= */
.sv-index {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--grey-100);
}

.sv-index__row {
  border-top: 1px solid var(--grey-100);
}

.sv-index__link {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1.25fr) minmax(0, 0.9fr) minmax(0, 17rem);
  gap: 2rem;
  align-items: start;
  padding-block: 2.5rem;
  color: inherit;
}

.sv-index__num {
  padding-top: 0.6rem;
  font-family: var(--font-label);
  font-size: 0.875rem;
  letter-spacing: 0.07em;
  font-variant-numeric: tabular-nums;
  color: var(--grey-300);
  transition: color 0.2s var(--ease);
}

.sv-index__main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

.sv-index__name {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 600;
  line-height: 1;
  transition: color 0.2s var(--ease);
}

.sv-index__desc {
  max-width: 30rem;
  line-height: 1.5;
  color: var(--grey-500);
}

.sv-index__more {
  font-size: 0.875rem;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: var(--grey-200);
  text-underline-offset: 0.25em;
  transition: text-decoration-color 0.2s var(--ease);
}

.sv-index__topics {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding-top: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
}

.sv-index__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: clip;
  background-color: var(--grey-50);
}

.sv-index__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.sv-index__link:hover .sv-index__name,
.sv-index__link:focus-visible .sv-index__name,
.sv-index__link:hover .sv-index__num,
.sv-index__link:focus-visible .sv-index__num {
  color: var(--accent);
}

.sv-index__link:hover .sv-index__more,
.sv-index__link:focus-visible .sv-index__more {
  text-decoration-color: var(--accent);
}

.sv-index__link:hover .sv-index__img {
  transform: scale(1.04);
}

/* ---------- "On every project": three things that never change ---------- */
.sv-always {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.sv-always__item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--grey-100);
}

.sv-always__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.15;
}

.sv-always__desc {
  max-width: 24rem;
  line-height: 1.5;
  color: var(--grey-500);
}

/* =============================================================================
   DETAIL: hero
   ============================================================================= */
.sv-hero__crumb a {
  text-decoration: underline;
  text-decoration-color: var(--grey-200);
  text-underline-offset: 0.3em;
  transition: text-decoration-color 0.2s var(--ease);
}

.sv-hero__crumb a:hover {
  text-decoration-color: var(--accent);
}

.sv-hero__crumb-sep {
  margin-inline: 0.5rem;
  color: var(--grey-200);
}

.sv-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: end;
  padding-top: 2.5rem;
}

.sv-hero__title {
  font-family: var(--font-display);
  font-size: clamp(3.75rem, 9.2vw, 8.5rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: 0;
}

/* long names ("Content & Communications") step down so two lines still hold */
.sv-hero__title--long {
  font-size: clamp(3rem, 6.9vw, 6.5rem);
  line-height: 0.94;
}

.sv-hero__side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
  padding-bottom: 0.5rem;
}

.sv-hero__lede {
  max-width: 27rem;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.3;
}

.sv-hero__media {
  position: relative;
  aspect-ratio: 21 / 9;
  width: 100%;
  margin-top: 4rem;
  border-radius: var(--radius-md);
  overflow: clip;
  background-color: var(--grey-50);
}

.sv-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* the picture settles into its frame once, as the page arrives */
@media (prefers-reduced-motion: no-preference) {
  .js .sv-hero__img {
    transform: scale(1.06);
    transition: transform 1.6s var(--ease-out-quint);
  }

  .js .sv-hero__media.is-in .sv-hero__img {
    transform: none;
  }
}

/* =============================================================================
   DETAIL: what's included. Name on the left, what it means on the right.
   ============================================================================= */
.sv-inc__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--grey-100);
}

.sv-inc__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 2rem;
  align-items: baseline;
  padding-block: 2rem;
  border-top: 1px solid var(--grey-100);
}

.sv-inc__head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.sv-inc__num {
  flex: none;
  width: 1.75rem;
  font-family: var(--font-label);
  font-size: 0.875rem;
  letter-spacing: 0.07em;
  font-variant-numeric: tabular-nums;
  color: var(--grey-300);
}

.sv-inc__name {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.2vw, 1.875rem);
  font-weight: 500;
  line-height: 1.15;
}

.sv-inc__desc {
  max-width: 40rem;
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--grey-500);
}

.sv-note {
  max-width: 40rem;
  margin-top: 1.5rem;
  margin-left: calc((100% + 2rem) / 3);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--grey-400);
}

/* =============================================================================
   DETAIL: how it runs. The one dark panel on the page.
   ============================================================================= */
.sv-steps__panel {
  border-radius: var(--radius-md);
  background-color: var(--black);
  color: var(--paper);
  padding: 3rem 3rem 4rem;
}

.sv-steps__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 2rem;
  align-items: start;
  padding-bottom: 4rem;
}

.sv-steps__lede {
  max-width: 40rem;
  color: #e5e3dc;
}

.sv-steps__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sv-steps__item {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px dotted var(--white-20);
}

.sv-steps__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background-color: var(--accent);
  color: #fff;
  font-family: var(--font-label);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
}

.sv-steps__title {
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.15;
  color: #e5e3dc;
}

.sv-steps__desc {
  line-height: 1.5;
  color: var(--grey-200);
}

/* =============================================================================
   DETAIL: what you leave with
   ============================================================================= */
.sv-out__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--grey-100);
}

.sv-out__item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-block: 1.25rem;
  border-top: 1px solid var(--grey-100);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.9vw, 1.625rem);
  font-weight: 500;
  line-height: 1.25;
}

.sv-out__item::before {
  content: "";
  flex: none;
  width: 0.3125rem;
  height: 0.3125rem;
  border-radius: 50%;
  background-color: var(--accent);
  transform: translateY(-0.2em);
}

/* =============================================================================
   DETAIL: proof. Real work or our own product, never a placeholder.
   ============================================================================= */
.sv-proof__list {
  border-bottom: 1px solid var(--grey-100);
}

.sv-proof__link {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  padding-block: 1.5rem;
  border-top: 1px solid var(--grey-100);
  color: inherit;
}

.sv-proof__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: clip;
}

.sv-proof__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.sv-proof__img--contain {
  object-fit: contain;
  padding: 0.5rem;
}

.sv-proof__texts {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.sv-proof__name {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.2vw, 1.875rem);
  font-weight: 500;
  line-height: 1.15;
  transition: color 0.2s var(--ease);
}

.sv-proof__desc {
  max-width: 36rem;
  line-height: 1.5;
  color: var(--grey-400);
}

.sv-proof__go {
  font-size: 0.875rem;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: var(--grey-200);
  text-underline-offset: 0.25em;
  transition: text-decoration-color 0.2s var(--ease);
}

.sv-proof__link:hover .sv-proof__name,
.sv-proof__link:focus-visible .sv-proof__name {
  color: var(--accent);
}

.sv-proof__link:hover .sv-proof__go,
.sv-proof__link:focus-visible .sv-proof__go {
  text-decoration-color: var(--accent);
}

.sv-proof__link:hover .sv-proof__img {
  transform: scale(1.04);
}

/* =============================================================================
   DETAIL: from the journal (rows are .notes from page-journal.css)
   ============================================================================= */
.sv-notes__more {
  padding-top: 2.5rem;
}

/* =============================================================================
   DETAIL: on to the next practice
   ============================================================================= */
.sv-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 2rem;
  align-items: center;
  padding-block: 3rem;
  border-top: 1px solid var(--grey-100);
  border-bottom: 1px solid var(--grey-100);
  color: inherit;
}

.sv-next__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.sv-next__name {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.6vw, 5rem);
  font-weight: 600;
  line-height: 1;
  transition: color 0.2s var(--ease);
}

.sv-next__arrow {
  flex: none;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.6vw, 5rem);
  font-weight: 500;
  line-height: 1;
  transition: transform 0.35s var(--ease), color 0.2s var(--ease);
}

.sv-next:hover .sv-next__name,
.sv-next:focus-visible .sv-next__name,
.sv-next:hover .sv-next__arrow,
.sv-next:focus-visible .sv-next__arrow {
  color: var(--accent);
}

.sv-next:hover .sv-next__arrow {
  transform: translateX(0.75rem);
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */
/* "Services." is a wide word: between phone and laptop the year gives up its
   column, so the description keeps a readable measure beside the heading */
@media (min-width: 768px) and (max-width: 1200px) {
  .sv-head {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 3rem;
  }

  .sv-head .work-page__year { display: none; }
}

@media (max-width: 991px) {
  /* clear the fixed navbar before adding any air (same as .work-page) */
  .sv-hero > .section-pad { padding-top: 7.5rem; }

  .sv-index__link {
    grid-template-columns: 2.5rem minmax(0, 1fr) minmax(0, 14rem);
    gap: 1.5rem;
  }

  /* the topics are listed in full on the page itself */
  .sv-index__topics { display: none; }

  .sv-hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .sv-hero__media { margin-top: 3rem; aspect-ratio: 16 / 9; }

  .sv-steps__panel { padding: 2rem 1.5rem 3rem; }
  .sv-steps__head { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding-bottom: 3rem; }
  .sv-steps__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 2rem; }

  .sv-note { margin-left: 0; }
}

@media (max-width: 767px) {
  .sv-index__link {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    padding-block: 2rem;
  }

  .sv-index__num { padding-top: 0; }
  .sv-index__media { order: -1; aspect-ratio: 16 / 9; }
  .sv-index__main { gap: 1rem; }

  .sv-always { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sv-always__item { padding-block: 1.5rem; }

  .sv-hero__grid { padding-top: 2rem; }
  .sv-hero__title { font-size: clamp(3.25rem, 17vw, 4.5rem); }
  .sv-hero__title--long { font-size: clamp(2.125rem, 10.4vw, 3.5rem); }
  .sv-hero__lede { font-size: 1.25rem; }
  .sv-hero__media { margin-top: 2.5rem; aspect-ratio: 4 / 3; }

  .sv-inc__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
    padding-block: 1.5rem;
  }

  .sv-inc__desc { padding-left: 2.75rem; font-size: 1rem; }

  .sv-steps__list { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .sv-steps__title { margin-top: 0.5rem; }

  .sv-proof__link {
    grid-template-columns: 6.5rem minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
  }

  .sv-proof__go { grid-column: 2; }

  .sv-next {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    padding-block: 2rem;
  }

  /* "Communications" and the arrow have to share one phone line */
  .sv-next__main { gap: 1rem; }
  .sv-next__name,
  .sv-next__arrow { font-size: clamp(1.75rem, 8.4vw, 2.5rem); }
}

/* links inside an FAQ answer (to a sister practice) */
.faq__answer a {
  text-decoration: underline;
  text-decoration-color: var(--grey-200);
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.2s var(--ease);
}

.faq__answer a:hover {
  text-decoration-color: var(--accent);
}

/* journal rows here sit on the page's own 1fr | 2fr split, so the titles line
   up under every other right-hand column; "Read" rides in the top corner */
@media (min-width: 768px) {
  .sv-notes .notes__link {
    position: relative;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 2rem;
  }

  .sv-notes .notes__body {
    padding-right: 4rem;
  }

  .sv-notes .notes__read {
    position: absolute;
    top: 2rem;
    right: 0;
  }
}
