/* Services page — large alternating editorial showcase
   Distinct from homepage stacked list; same brand tokens. */

.services-page {
  background: var(--background);
}

/* ── Hero ── */
.sp-hero {
  background: var(--background);
  padding: calc(var(--header-h) + 72px) 0 56px;
  position: relative;
}

.sp-hero .breadcrumb {
  color: var(--text-light);
  margin-bottom: 48px;
}

.sp-hero .breadcrumb a {
  color: var(--navy);
}

.sp-hero .breadcrumb a:hover {
  color: var(--brass-dark);
  text-decoration: none;
}

.sp-hero-inner {
  max-width: 720px;
}

.sp-hero .eyebrow {
  margin-bottom: 20px;
}

.sp-hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(48px, 8vw, 88px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--heading);
  margin: 0 0 28px;
}

.sp-hero-lead {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
  max-width: 52ch;
}

.sp-hero-rule {
  width: 64px;
  height: 3px;
  background: var(--brass);
  margin-top: 40px;
}

/* ── Jump navigation ── */
.sp-jump {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-warm);
  padding: 20px 0;
  position: sticky;
  top: var(--header-h);
  z-index: 40;
}

.sp-jump-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px 28px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.sp-jump-list a {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.sp-jump-list a span {
  color: var(--brass-dark);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.sp-jump-list a:hover,
.sp-jump-list a:focus-visible {
  color: var(--navy);
  border-bottom-color: var(--navy);
  outline: none;
}

/* ── Showcase features ── */
.sp-showcase {
  padding: 16px 0 0;
}

.sp-feature {
  position: relative;
  padding: 88px 0;
  scroll-margin-top: calc(var(--header-h) + 56px);
  transform: translateY(0);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.sp-feature + .sp-feature {
  border-top: 1px solid var(--line);
}

.sp-feature:hover,
.sp-feature:focus-within {
  transform: translateY(-3px);
}

.sp-feature-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  grid-template-areas:
    "copy media"
    "cta media";
  column-gap: 72px;
  row-gap: 0;
  align-items: center;
}

.sp-feature-grid::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--brass);
  box-shadow: 5px 0 0 var(--brass);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.sp-feature-grid::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -88px;
  height: 2px;
  background: var(--navy);
  box-shadow: 0 5px 0 var(--navy);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.sp-feature:hover .sp-feature-grid::before,
.sp-feature:focus-within .sp-feature-grid::before {
  transform: scaleY(1);
}

.sp-feature:hover .sp-feature-grid::after,
.sp-feature:focus-within .sp-feature-grid::after {
  transform: scaleX(1);
}

.sp-feature--flip .sp-feature-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  grid-template-areas:
    "media copy"
    "media cta";
}

.sp-feature-copy {
  grid-area: copy;
  max-width: 440px;
  align-self: end;
  padding-bottom: 28px;
}

.sp-feature--flip .sp-feature-copy {
  justify-self: end;
}

.sp-feature-media {
  grid-area: media;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--navy);
  aspect-ratio: 5 / 4;
  min-height: 360px;
  align-self: stretch;
}

.sp-feature-cta {
  grid-area: cta;
  justify-self: start;
  align-self: start;
  box-sizing: border-box;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  width: fit-content;
  max-width: 100%;
}

.sp-feature--flip .sp-feature-cta {
  justify-self: end;
}

.sp-feature-num {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--text-light);
  margin-bottom: 22px;
  transition: color 0.35s ease;
}

.sp-feature-num::before {
  content: '';
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  background: var(--brass);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  opacity: 0.95;
  transition: background 0.35s ease, transform 0.35s ease;
}

.sp-feature:hover .sp-feature-num,
.sp-feature:focus-within .sp-feature-num {
  color: var(--brass-dark);
}

.sp-feature:hover .sp-feature-num::before,
.sp-feature:focus-within .sp-feature-num::before {
  background: var(--brass-dark);
  transform: rotate(12deg);
}

.sp-feature-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--heading);
  margin: 0 0 18px;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.35s ease;
}

.sp-feature:hover .sp-feature-title,
.sp-feature:focus-within .sp-feature-title {
  color: var(--navy);
  transform: translateX(6px);
}

.sp-feature--flip:hover .sp-feature-title,
.sp-feature--flip:focus-within .sp-feature-title {
  transform: translateX(-6px);
}

.sp-feature-desc {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
  max-width: 40ch;
}

.sp-feature-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  margin: 0;
  min-height: 44px;
  width: fit-content;
  max-width: 100%;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: none;
  color: var(--button-text);
  background: var(--button);
  border: 2px solid var(--button);
  border-radius: var(--radius);
  box-shadow: none;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    gap 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.2s ease;
}

.sp-feature-cta-label {
  display: inline-block;
  position: static;
  padding-bottom: 0;
}

.sp-feature-cta-label::after {
  content: none;
}

.sp-feature-cta::after {
  content: '→';
  font-size: 14px;
  line-height: 1;
  color: inherit;
  margin-bottom: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.sp-feature-cta:hover,
.sp-feature-cta:focus-visible {
  background: var(--button-hover);
  border-color: var(--button-hover);
  color: var(--button-text);
  gap: 14px;
  outline: none;
}

.sp-feature-cta:focus-visible {
  box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--navy);
}

.sp-feature-cta:active {
  transform: scale(0.98);
}

.sp-feature-cta:hover::after,
.sp-feature-cta:focus-visible::after {
  transform: translateX(4px);
  color: inherit;
}

.sp-feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.sp-feature-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 70%, rgba(34, 38, 40, 0.12) 100%);
  pointer-events: none;
  opacity: 0.6;
}

.sp-feature:hover .sp-feature-media img,
.sp-feature:focus-within .sp-feature-media img {
  transform: scale(1.04);
}

/* ── Load more / less ── */
html.has-js .sp-showcase.is-paged .sp-feature:nth-child(n + 6):not(.is-shown) {
  display: none;
}

.sp-feature.is-loading-in {
  animation: sp-feature-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sp-feature.is-loading-in:hover,
.sp-feature.is-loading-in:focus-within {
  transform: none;
}

.sp-feature.is-collapsing {
  pointer-events: none;
  border-top-color: transparent;
  transform: none;
  transition:
    height 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease,
    padding 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes sp-feature-in {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sp-pager {
  position: relative;
  z-index: 2;
  padding: 8px 0 72px;
}

.sp-pager[hidden] {
  display: none;
}

.sp-pager-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.sp-pager-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: none;
  color: var(--button-text);
  background: var(--button);
  border: 2px solid var(--button);
  border-radius: var(--radius);
  box-shadow: none;
  cursor: pointer;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    gap 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.2s ease,
    box-shadow 0.25s ease;
}

.sp-pager-btn span {
  display: inline-block;
  font-size: 14px;
  line-height: 1;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.sp-pager-btn:hover,
.sp-pager-btn:focus-visible {
  background: var(--button-hover);
  border-color: var(--button-hover);
  color: var(--button-text);
  gap: 14px;
  outline: none;
  box-shadow: 0 8px 20px rgba(253, 201, 0, 0.28);
}

.sp-pager-btn:focus-visible {
  box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--navy);
}

.sp-pager-btn:hover span,
.sp-pager-btn:focus-visible span {
  transform: translateY(2px);
}

.sp-pager-btn:active {
  transform: scale(0.98);
}

#spLoadLess:hover span,
#spLoadLess:focus-visible span {
  transform: translateY(-2px);
}

.sp-pager-btn[hidden] {
  display: none;
}

/* ── Closing CTA ── */
.sp-discuss {
  border-top: 1px solid var(--line);
  padding: 72px 0 96px;
}

.sp-discuss-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px 48px;
  flex-wrap: wrap;
}

.sp-discuss-q {
  margin: 0;
  font-family: 'Syne', sans-serif;
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--heading);
}

.sp-discuss-link {
  position: relative;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 6px;
  transition:
    color 0.3s ease,
    gap 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.sp-discuss-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.sp-discuss-link span {
  display: inline-block;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.sp-discuss-link:hover,
.sp-discuss-link:focus-visible {
  color: var(--navy);
  gap: 14px;
  outline: none;
}

.sp-discuss-link:hover::after,
.sp-discuss-link:focus-visible::after {
  transform: scaleX(1);
}

.sp-discuss-link:hover span,
.sp-discuss-link:focus-visible span {
  transform: translateX(4px);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .sp-hero {
    padding: calc(var(--header-h) + 56px) 0 48px;
  }

  .sp-hero h1 {
    font-size: clamp(42px, 9vw, 64px);
  }

  .sp-feature {
    padding: 64px 0;
  }

  .sp-feature-grid::after {
    bottom: -64px;
  }

  .sp-feature-grid,
  .sp-feature--flip .sp-feature-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
  }

  .sp-feature-media {
    min-height: 280px;
  }

  .sp-feature-copy,
  .sp-feature--flip .sp-feature-copy {
    max-width: none;
    width: auto;
  }

  .sp-feature-cta,
  .sp-feature--flip .sp-feature-cta {
    width: fit-content;
    max-width: 100%;
  }

  .sp-pager {
    padding: 8px 0 56px;
  }

  .sp-discuss {
    padding: 64px 0 80px;
  }
}

@media (max-width: 768px) {
  .sp-hero {
    padding: calc(var(--header-h) + 40px) 0 40px;
  }

  .sp-hero .breadcrumb {
    margin-bottom: 32px;
  }

  .sp-hero-rule {
    margin-top: 28px;
  }

  .sp-jump {
    padding: 14px 0;
  }

  .sp-jump-list {
    gap: 6px 20px;
  }

  .sp-feature {
    padding: 56px 0;
    scroll-margin-top: calc(var(--header-h) + 48px);
  }

  .sp-feature:hover,
  .sp-feature:focus-within {
    transform: none;
  }

  .sp-feature-grid::after {
    bottom: -56px;
  }

  .sp-feature-grid,
  .sp-feature--flip .sp-feature-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "media"
      "cta";
    row-gap: 24px;
    column-gap: 0;
  }

  .sp-feature-copy {
    align-self: start;
    padding-bottom: 0;
    justify-self: stretch;
  }

  .sp-feature--flip .sp-feature-copy {
    justify-self: stretch;
  }

  .sp-feature-cta,
  .sp-feature--flip .sp-feature-cta {
    justify-self: start;
  }

  .sp-feature:hover .sp-feature-title,
  .sp-feature:focus-within .sp-feature-title,
  .sp-feature--flip:hover .sp-feature-title,
  .sp-feature--flip:focus-within .sp-feature-title {
    transform: none;
  }

  .sp-feature-num {
    margin-bottom: 16px;
    font-size: 11px;
  }

  .sp-feature-title {
    font-size: clamp(26px, 7vw, 34px);
    margin-bottom: 14px;
  }

  .sp-feature-desc {
    font-size: 16px;
  }

  .sp-feature-media {
    min-height: 0;
    aspect-ratio: 16 / 11;
  }

  .sp-pager {
    padding: 4px 0 48px;
  }

  .sp-discuss {
    padding: 48px 0 72px;
  }

  .sp-discuss-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .sp-discuss-q {
    font-size: clamp(20px, 6vw, 26px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sp-feature,
  .sp-feature-grid::before,
  .sp-feature-grid::after,
  .sp-feature-num,
  .sp-feature-title,
  .sp-feature-media img,
  .sp-feature-cta,
  .sp-feature-cta::after,
  .sp-discuss-link,
  .sp-discuss-link::after,
  .sp-discuss-link span,
  .sp-pager-btn,
  .sp-pager-btn span,
  .sp-feature.is-collapsing,
  .sp-jump-list a {
    transition: none;
  }

  .sp-feature.is-loading-in {
    animation: none;
  }

  .sp-feature:hover,
  .sp-feature:focus-within,
  .sp-feature:hover .sp-feature-title,
  .sp-feature:focus-within .sp-feature-title,
  .sp-feature--flip:hover .sp-feature-title,
  .sp-feature--flip:focus-within .sp-feature-title,
  .sp-feature:hover .sp-feature-media img,
  .sp-feature:focus-within .sp-feature-media img,
  .sp-feature-cta:hover::after,
  .sp-feature-cta:focus-visible::after,
  .sp-pager-btn:hover span,
  .sp-pager-btn:focus-visible span,
  .sp-discuss-link:hover span,
  .sp-discuss-link:focus-visible span {
    transform: none;
  }

  .sp-feature:hover .sp-feature-grid::before,
  .sp-feature:focus-within .sp-feature-grid::before {
    transform: scaleY(1);
  }

  .sp-feature:hover .sp-feature-grid::after,
  .sp-feature:focus-within .sp-feature-grid::after,
  .sp-discuss-link:hover::after,
  .sp-discuss-link:focus-visible::after {
    transform: scaleX(1);
  }
}
