/* ==========================================================================
   Services — Study A, round 6 + responsive (tablet: 01 side by side; phones: the three services in one swipe row)
   Slate opening → one continuous Bone section (three propositions + capabilities) → approved closing CTA.
   Packages × Directional Field: generic packs drawn as quiet outlines; the field organises inside them.
     01 Focus      a row of packs in an unsettled field; one pack's marks align and its outline comes forward.
     02 Substance  scattered information straightens as it reaches the pack and stacks inside it;
                   one continuous line crosses the pack's face and carries on beyond it.
     03 Connect    several routes, broken at the left, continuous at the right (no packs).
   ========================================================================== */

.site-header--solid { position: relative; background: var(--slate); }
.primary a[aria-current="page"] { text-decoration-color: var(--sage); }

.dfield { display: block; width: 100%; height: 100%; overflow: visible; }
.terr-num { display: block; margin-bottom: 14px; font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--slate); }
.terr h2 { margin: 0; font-family: var(--display); font-stretch: 92%; font-weight: 460; font-size: clamp(30px, 3vw, 42px); line-height: 1.06; letter-spacing: -0.02em; text-wrap: balance; }
.terr p { margin: 18px 0 0; max-width: 27em; font-size: 17px; line-height: 1.6; color: rgba(32, 37, 38, .78); }

/* ---- opening (unchanged composition) ---- */
.svc-open { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 40px; padding: 96px var(--m) 80px; background: var(--slate); }
.svc-open h1 { grid-column: 1 / span 9; margin: 0; font-family: var(--display); font-stretch: 90%; font-weight: 450; font-size: clamp(36px, 4.7vw, 68px); line-height: 1.02; letter-spacing: -0.026em; text-wrap: balance; }
.svc-open__body { grid-column: 5 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 40px; }
.svc-open__body p { margin: 0; font-size: 18px; line-height: 1.6; color: rgba(246, 244, 239, .82); text-wrap: pretty; }

/* ---- the services: one Bone surface, three propositions in different arrangements ---- */
.svc { padding: 88px var(--m) 88px; background: var(--bone); color: var(--ink); }
.terr { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 40px; }

/* 01 — the widest graphic: text left, packs and field to the right, sitting on the same baseline as the text block */
.t1 { align-items: end; }
.t1 .copy { grid-column: 1 / span 4; padding-bottom: 6px; }
.t1 .fig { grid-column: 5 / -1; height: 318px; }

/* 02 — compact and offset: the pack sits in the left half, the text crosses to the right, higher on the page */
.t2 { margin-top: 96px; align-items: center; }
.t2 .fig { grid-column: 1 / span 7; height: 300px; }
.t2 .copy { grid-column: 9 / -1; }

/* 03 — text above, routes running the full width beneath, flowing into the capabilities */
.t3 { margin-top: 96px; align-items: end; }
.t3 .head { grid-column: 1 / span 5; }
.t3 .copy-p { grid-column: 7 / span 5; }
.t3 .copy-p p { margin: 0; }
.t3 .fig { grid-column: 1 / -1; height: 168px; margin: 32px calc(-1 * var(--m)) 0; }

/* capabilities: same surface, after a fine rule */
.caps { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 40px; margin-top: 40px; padding-top: 36px; border-top: 1px solid rgba(43, 75, 90, .2); }
.caps h2 { grid-column: 1 / span 4; margin: 0; font-family: var(--display); font-stretch: 92%; font-weight: 480; font-size: 22px; line-height: 1.2; letter-spacing: -0.008em; color: var(--slate); }
.caps ul { grid-column: 5 / -1; margin: 0; padding: 0; list-style: none; columns: 3; column-gap: 40px; }
.caps li { break-inside: avoid; padding: 0 0 12px; font-size: 16px; line-height: 1.4; font-weight: 500; }

@media (prefers-reduced-motion: no-preference) {
  .dfield line { transition: opacity .7s var(--ease) var(--d, 0s); }
  .fig:not(.in) .dfield line { opacity: 0; }
}

@media (max-width: 1000px) {
  .svc-open h1, .svc-open__body { grid-column: 1 / -1; }
  .t1 { align-items: center; }
  .t1 .copy { grid-column: 1 / span 5; padding-bottom: 0; }
  .t1 .fig { grid-column: 6 / -1; height: 250px; }
  .t2, .t3 { margin-top: 80px; }
  .t2 .fig { grid-column: 1 / span 6; height: 270px; }
  .t2 .copy { grid-column: 7 / -1; }
  .t3 .head { grid-column: 1 / span 8; }
  .t3 .copy-p { grid-column: 1 / span 9; margin-top: 16px; }
  .caps h2 { grid-column: 1 / -1; margin-bottom: 22px; }
  .caps ul { grid-column: 1 / -1; }
}
/* the three services on one Bone surface; on desktop and tablet the wrapper adds no box of its own */
.svc-props { display: contents; }
.svc .carousel-nav { --nav-line: rgba(43, 75, 90, .3); --nav-hover: rgba(43, 75, 90, .08); color: var(--slate); }

/* phones: the three services become one swipeable row — graphic above, then number, heading and description;
   the next service peeks in at the edge. Capabilities stay below, outside the row. */
@media (max-width: 640px) {
  .svc-open { display: block; padding: 64px var(--m) 60px; }
  .svc-open h1 { font-size: clamp(32px, 9vw, 40px); line-height: 1.05; }
  .svc-open__body { display: block; margin-top: 28px; }
  .svc-open__body p { font-size: 17px; }
  .svc-open__body p + p { margin-top: 16px; }
  .svc { padding: 56px var(--m) 64px; }
  .svc-props { display: grid; grid-auto-flow: column; grid-auto-columns: calc(100% - 44px); gap: 24px; align-items: start;
    margin: 0 calc(-1 * var(--m)); padding: 0 var(--m); scroll-padding-inline: var(--m);
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .svc-props::-webkit-scrollbar { display: none; }
  .terr { display: flex; flex-direction: column; margin: 0 !important; scroll-snap-align: start; }
  .terr .fig { order: -1; height: 196px !important; margin: 0 0 24px !important; width: 100%; }
  .t1 .copy, .t2 .copy { padding: 0; }
  .t3 .copy-p { margin-top: 18px; }
  .terr h2 { font-size: 28px; }
  .terr p { font-size: 16px; }
  .svc .carousel-nav { display: flex; margin-top: 28px; }
  .caps { display: block; margin-top: 40px; padding-top: 28px; }
  .caps h2 { margin-bottom: 18px; }
  /* two columns, filled top to bottom in list order; the second column is a little wider because it holds the
     longest names, so nothing wraps past two lines */
  .caps ul { columns: auto; display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); grid-template-rows: repeat(6, auto); grid-auto-flow: column; column-gap: 20px; }
  .caps li { font-size: 14.5px; line-height: 1.35; padding-bottom: 9px; }
  /* the next service peeks in with its graphic only; its text appears as it becomes the current slide */
  .terr .copy, .terr .head, .terr .copy-p { transition: opacity .3s var(--ease); }
  .svc-set.is-sliding .terr:not(.is-current) :is(.copy, .head, .copy-p) { opacity: 0; }
}
/* very narrow phones: one column, kept economical */
@media (max-width: 359px) {
  .caps ul { display: block; }
  .caps li { padding-bottom: 7px; }
}

/* closing CTA: proportioned to the shorter Services page (Services only; homepage unchanged) */
.ending .invite { padding-top: 96px; padding-bottom: 104px; }
.ending .invite p { margin-top: 24px; }
.ending .invite .btn { margin-top: 32px; }
@media (max-width: 1000px) { .ending .invite { padding-top: 88px; padding-bottom: 96px; } }
@media (max-width: 760px) { .ending .invite { padding-top: 72px; padding-bottom: 128px; } }

/* Desktop: the two opening paragraphs hold a fixed measure (400px each at 18px) so each runs to three lines at
   every desktop width; the pair is set against the right margin (at 1440 it starts on column 5). */
@media (min-width: 1001px) {
  .svc-open__body { grid-column: 1 / -1; justify-self: end; grid-template-columns: repeat(2, 400px); }
}
