/*
 * Service hub and service-detail pages
 * Scoped to these pages so the existing home, Journal and About layouts stay unchanged.
 */

.services-page,
.service-detail-page {
  --services-accent: #ff6b75;
  --services-light: var(--text-primary);
  --services-light-text: var(--text-dark);
  --services-light-muted: var(--text-dark-muted);
  --services-dark: var(--bg-black);
  --services-dark-text: var(--text-primary);
  --services-dark-muted: var(--text-secondary);
  background: var(--services-dark);
  color: var(--services-dark-muted);
}

.services-page main,
.service-detail-page main {
  background: var(--services-dark);
}

.services-page [id],
.service-detail-page [id] {
  scroll-margin-top: 92px;
}

.services-page .site-footer,
.service-detail-page .site-footer {
  margin-top: 0;
}

.services-band {
  position: relative;
  overflow: hidden;
}

.services-band--dark {
  background: var(--services-dark);
  color: var(--services-dark-muted);
}

.services-band--light {
  background: var(--services-light);
  color: var(--services-light-muted);
}

.services-band--light h1,
.services-band--light h2,
.services-band--light h3,
.services-band--light p,
.services-band--light li,
.services-band--light .service-eyebrow,
.services-band--light .service-number,
.services-band--light .service-link {
  color: var(--services-light-text);
}

.services-band--dark h1,
.services-band--dark h2,
.services-band--dark h3,
.services-band--dark .service-eyebrow,
.services-band--dark .service-number,
.services-band--dark .service-link {
  color: var(--services-dark-text);
}

.services-band--dark .service-copy,
.services-band--dark .service-lead,
.services-band--dark .service-preview__copy,
.services-band--dark .service-detail-copy,
.services-band--dark .service-row__copy,
.services-band--dark .service-process__copy {
  color: var(--services-dark-muted);
}

.services-band--light .service-copy,
.services-band--light .service-lead,
.services-band--light .service-preview__copy,
.services-band--light .service-detail-copy,
.services-band--light .service-row__copy,
.services-band--light .service-process__copy {
  color: var(--services-light-muted);
}

.services-hero {
  min-height: min(740px, calc(100svh - 80px));
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-dark);
}

.services-hero__grid,
.service-detail-hero__grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(180px, 0.34fr) minmax(0, 1fr);
  gap: clamp(48px, 8vw, 144px);
  align-items: end;
  padding: clamp(92px, 12vw, 176px) 0 clamp(84px, 10vw, 144px);
}

.services-hero__copy {
  grid-column: 2;
  max-width: 790px;
}

.service-eyebrow,
.service-number,
.service-meta,
.service-list,
.service-row__number,
.service-process__number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.35;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.service-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.4rem;
  font-weight: 700;
}

.service-eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  flex: 0 0 auto;
  background: var(--services-accent);
}

.services-hero h1,
.service-detail-hero h1 {
  max-width: 820px;
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: clamp(3.7rem, 7vw, 7.8rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.91;
}

.services-hero__support {
  max-width: 480px;
  margin: clamp(28px, 4vw, 52px) 0 0;
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  line-height: 1.65;
}

.service-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.35rem 2rem;
  margin-top: clamp(32px, 4vw, 54px);
}

.service-actions .btn {
  white-space: nowrap;
}

.service-text-link,
.service-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  width: fit-content;
  border-bottom: 1px solid currentColor;
  color: inherit;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
  transition: color 180ms ease, border-color 180ms ease;
}

.service-text-link:hover,
.service-text-link:focus-visible,
.service-link:hover,
.service-link:focus-visible {
  border-color: var(--services-accent);
  color: var(--services-accent);
}

.services-intro {
  padding: clamp(90px, 12vw, 172px) 0;
}

.services-intro__grid,
.service-detail-band__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.68fr) minmax(0, 1fr);
  gap: clamp(48px, 7vw, 112px);
  align-items: center;
}

.services-intro__body {
  max-width: 840px;
}

.services-intro h2,
.service-detail-band h2,
.service-closing h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 4.4vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: balance;
}

.service-copy,
.service-detail-copy {
  max-width: 700px;
  margin: 0;
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.72;
}

.service-copy + .service-copy,
.service-detail-copy + .service-detail-copy {
  margin-top: 1.25rem;
}

.services-intro__body .service-copy:first-of-type {
  margin-top: clamp(28px, 4vw, 52px);
}

.services-offer {
  padding: 0;
}

.service-preview {
  padding: clamp(84px, 10vw, 148px) 0;
  border-top: 1px solid var(--border-dark);
}

.service-preview--light {
  border-color: var(--border-light);
}

.service-preview__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(320px, 1.06fr);
  gap: clamp(48px, 7vw, 116px);
  align-items: center;
}

.service-preview--reverse .service-preview__media {
  order: 2;
}

.service-preview--reverse .service-preview__content {
  order: 1;
}

.service-preview__media,
.service-detail-hero__media {
  margin: 0;
  background: var(--bg-card);
  overflow: hidden;
}

.service-preview__media img,
.service-detail-hero__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1586 / 992;
  object-fit: cover;
}

.service-preview__content {
  max-width: 680px;
}

.service-number {
  display: block;
  margin-bottom: 1.1rem;
  color: var(--services-accent) !important;
  font-weight: 700;
}

.services-page .service-preview--light .service-number,
.service-detail-page .services-band--light .service-row__number,
.service-detail-page .services-band--light .service-process__number {
  color: var(--red-text) !important;
}

.service-preview h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.65rem, 5vw, 5.3rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.service-preview__copy {
  max-width: 600px;
  margin: 1.75rem 0 0;
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  line-height: 1.7;
}

.service-list {
  max-width: 600px;
  margin: clamp(28px, 4vw, 44px) 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}

.service-list li {
  padding: 0.9rem 0;
  border-top: 1px solid var(--border-dark);
}

.service-preview--light .service-list li {
  border-color: var(--border-light);
}

.service-list li:last-child {
  border-bottom: 1px solid var(--border-dark);
}

.service-preview--light .service-list li:last-child {
  border-color: var(--border-light);
}

.service-link {
  margin-top: clamp(26px, 3vw, 40px);
}

.service-closing {
  padding: clamp(100px, 13vw, 192px) 0;
  border-top: 1px solid var(--border-dark);
}

.service-closing__body {
  max-width: 800px;
  margin-left: auto;
}

.service-closing h2 {
  max-width: 790px;
}

.service-closing .service-copy {
  max-width: 610px;
  margin-top: clamp(28px, 4vw, 48px);
}

/* Detail pages */

.service-detail-hero {
  border-bottom: 1px solid var(--border-dark);
}

.service-detail-hero--light {
  border-color: var(--border-light);
}

.service-detail-hero__grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  align-items: center;
  gap: clamp(52px, 7vw, 124px);
  padding: clamp(76px, 9vw, 132px) 0;
}

.service-detail-hero__content {
  max-width: 760px;
}

.service-detail-hero h1 {
  max-width: 760px;
  font-size: clamp(3.2rem, 6.6vw, 7rem);
}

.service-detail-hero__lead {
  max-width: 610px;
  margin: clamp(28px, 4vw, 48px) 0 0;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.7;
}

.service-detail-hero__media {
  border: 1px solid var(--border-dark);
}

.service-detail-hero--light .service-detail-hero__media {
  border-color: var(--border-light);
}

.service-detail-hero--light h1,
.service-detail-hero--light .service-eyebrow,
.service-detail-hero--light .service-detail-hero__lead {
  color: var(--services-light-text);
}

.service-detail-hero--light .service-eyebrow::before {
  background: var(--services-accent);
}

.service-detail-band {
  padding: clamp(88px, 11vw, 164px) 0;
  border-top: 1px solid var(--border-dark);
}

.services-band--light.service-detail-band {
  border-color: var(--border-light);
}

.service-detail-band--light {
  border-color: var(--border-light);
}

.service-detail-band__intro {
  position: sticky;
  top: 110px;
}

.service-detail-band__intro h2 {
  max-width: 710px;
}

.service-detail-band__body {
  max-width: 780px;
}

.service-detail-band__body > .service-detail-copy:first-child {
  margin-top: 0;
}

.service-detail-band__body > .service-detail-copy:not(:first-child) {
  margin-top: 1.35rem;
}

.service-detail-band__body .service-link {
  margin-top: 2.2rem;
}

.service-detail-band__body a:not(.service-link) {
  border-bottom: 1px solid currentColor;
  color: inherit;
  transition: color 180ms ease, border-color 180ms ease;
}

.service-detail-band__body a:not(.service-link):hover,
.service-detail-band__body a:not(.service-link):focus-visible {
  border-color: var(--services-accent);
  color: var(--services-accent);
}

.service-rows,
.service-process {
  margin-top: clamp(32px, 5vw, 64px);
  border-top: 1px solid var(--border-dark);
}

.service-detail-band--light .service-rows,
.service-detail-band--light .service-process {
  border-color: var(--border-light);
}

.services-band--light.service-detail-band .service-rows,
.services-band--light.service-detail-band .service-process {
  border-color: var(--border-light);
}

.service-row {
  display: grid;
  grid-template-columns: 48px minmax(160px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(18px, 3vw, 46px);
  align-items: start;
  padding: clamp(22px, 3vw, 34px) 0;
  border-bottom: 1px solid var(--border-dark);
}

.service-detail-band--light .service-row {
  border-color: var(--border-light);
}

.services-band--light.service-detail-band .service-row {
  border-color: var(--border-light);
}

.service-row__number,
.service-process__number {
  color: var(--services-accent) !important;
  font-weight: 700;
}

.service-row h3,
.service-process h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.service-row__copy,
.service-process__copy {
  max-width: 500px;
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
}

.service-process__item {
  display: grid;
  grid-template-columns: 48px minmax(160px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(18px, 3vw, 46px);
  padding: clamp(22px, 3vw, 34px) 0;
  border-bottom: 1px solid var(--border-dark);
}

.service-detail-band--light .service-process__item {
  border-color: var(--border-light);
}

.services-band--light.service-detail-band .service-process__item {
  border-color: var(--border-light);
}

.service-detail-band__measure {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem 2.5rem;
  margin-top: clamp(30px, 4vw, 48px);
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
  color: var(--services-light-text);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.service-detail-band--dark .service-detail-band__measure {
  border-color: var(--border-dark);
  color: var(--services-dark-text);
}

.service-detail-cta {
  padding: clamp(100px, 13vw, 190px) 0;
  border-top: 1px solid var(--border-dark);
}

.service-detail-cta__body {
  max-width: 800px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.service-detail-cta h2 {
  max-width: 900px;
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: clamp(2.9rem, 5.8vw, 6.4rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.96;
}

.service-detail-cta .service-copy {
  max-width: 580px;
  margin-right: auto;
  margin-left: auto;
  margin-top: clamp(28px, 4vw, 48px);
}

.service-detail-cta .service-actions {
  align-items: center;
  justify-content: center;
}

.services-band--light .btn-primary,
.service-detail-hero--light .btn-primary {
  background: var(--services-light-text);
  color: var(--services-light);
}

.services-band--light .btn-outline,
.service-detail-hero--light .btn-outline {
  border-color: var(--services-light-text);
  color: var(--services-light-text);
}

@media (max-width: 1024px) {
  .services-hero__grid,
  .service-detail-hero__grid,
  .services-intro__grid,
  .service-detail-band__grid {
    gap: clamp(34px, 6vw, 72px);
  }

  .services-hero h1,
  .service-detail-hero h1 {
    font-size: clamp(3.2rem, 7vw, 6rem);
  }

  .service-preview__grid {
    gap: clamp(34px, 5vw, 64px);
  }
}

@media (max-width: 760px) {
  .services-hero {
    min-height: auto;
  }

  .services-hero__grid,
  .service-detail-hero__grid,
  .services-intro__grid,
  .service-detail-band__grid,
  .service-preview__grid {
    grid-template-columns: 1fr;
  }

  .services-hero__grid,
  .service-detail-hero__grid {
    padding: 82px 0 76px;
  }

  .services-hero__copy {
    grid-column: 1;
  }

  .services-hero h1,
  .service-detail-hero h1 {
    font-size: clamp(3.05rem, 14vw, 5.2rem);
    line-height: 0.94;
  }

  .services-intro,
  .service-detail-band {
    padding: 78px 0;
  }

  .service-preview {
    padding: 72px 0;
  }

  .service-preview--reverse .service-preview__media,
  .service-preview--reverse .service-preview__content {
    order: initial;
  }

  .service-preview__media {
    order: -1;
  }

  .service-detail-band__intro {
    position: static;
  }

  .service-detail-band h2,
  .services-intro h2,
  .service-closing h2 {
    font-size: clamp(2.7rem, 12vw, 4.3rem);
  }

  .service-row,
  .service-process__item {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px 18px;
  }

  .service-row__copy,
  .service-process__copy {
    grid-column: 2;
  }

  .service-detail-cta {
    padding: 86px 0;
  }

  .service-detail-cta h2 {
    font-size: clamp(2.8rem, 12vw, 4.7rem);
  }
}

@media (max-width: 380px) {
  .services-hero__grid,
  .service-detail-hero__grid {
    padding-top: 70px;
  }

  .service-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .service-row h3,
  .service-process h3 {
    font-size: 1.35rem;
  }
}

/* Final hub refinements: centered editorial columns and intentional light bands. */
.services-page .services-hero__grid {
  max-width: 1120px;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin-inline: auto;
  justify-items: center;
}

.services-page .services-hero__copy {
  grid-column: 1;
  max-width: 820px;
  text-align: center;
}

.services-page .services-hero__copy .service-eyebrow,
.services-page .services-intro .service-eyebrow,
.services-page .service-closing .service-eyebrow {
  justify-content: center;
}

.services-page .services-hero__support {
  margin-right: auto;
  margin-left: auto;
}

.services-page .services-hero .service-actions,
.services-page .service-closing .service-actions {
  justify-content: center;
}

.services-page .services-intro {
  background: var(--services-dark);
  color: var(--services-dark-muted);
  border-color: var(--border-dark);
}

.services-page .services-intro__grid {
  max-width: 1120px;
  grid-template-columns: minmax(0, 920px);
  justify-content: center;
  margin-inline: auto;
  justify-items: center;
  text-align: center;
}

.services-page .services-intro__grid > div {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
}

.services-page .services-intro__body {
  width: 100%;
  max-width: 920px;
  margin-inline: auto;
}

.services-page .services-intro h2,
.services-page .services-intro .service-eyebrow {
  color: var(--services-dark-text);
}

.services-page .services-intro .service-copy {
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
  color: var(--services-dark-muted);
}

.services-page .services-intro__body .service-copy:first-of-type {
  margin-top: clamp(28px, 4vw, 52px);
}

.services-page .service-preview--light {
  background: var(--services-light);
  color: var(--services-light-muted);
  border-color: var(--border-light);
}

.services-page .service-preview--light h2,
.services-page .service-preview--light .service-link {
  color: var(--services-light-text);
}

.services-page .service-preview--light .service-preview__copy {
  color: var(--services-light-muted);
}

.services-page .service-preview--dark {
  background: var(--services-dark);
  color: var(--services-dark-muted);
  border-color: var(--border-dark);
}

.services-page .service-preview--dark h2,
.services-page .service-preview--dark .service-link {
  color: var(--services-dark-text);
}

.services-page .service-preview--dark .service-preview__copy {
  color: var(--services-dark-muted);
}

.services-page .service-preview--dark .service-list li,
.services-page .service-preview--dark .service-list li:last-child {
  border-color: var(--border-dark);
}

.services-page .service-closing__body {
  max-width: 920px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.services-page .service-closing h2,
.services-page .service-closing .service-copy {
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 761px) {
  .services-page .service-preview__grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: clamp(40px, 5vw, 88px);
  }

  .services-page .service-preview--reverse .service-preview__grid {
    grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.08fr);
  }
}

@media (max-width: 760px) {
  .services-page .services-hero__copy,
  .services-page .services-intro__grid,
  .services-page .service-closing__body {
    text-align: center;
  }

  .services-page .services-intro__grid {
    justify-items: center;
  }

  .services-page .services-hero .service-actions,
  .services-page .service-closing .service-actions {
    align-items: center;
  }
}
