/* ==========================================================================
   SERVICES · THE UNFOLDING PRACTICE
   --------------------------------------------------------------------------
   Four large editorial panels on the dark canvas. Treatment A (default):
   warm-ivory sheets. Treatment B (?services=tonal): dark tonal sheets with
   stronger type contrast. Symbols and copy are the homepage originals.

   Default layout (no JavaScript, reduced motion): panels simply sit in the
   page, one after another. html.svp-live (motion allowed) turns wide, tall
   enough screens into a sticky stack: each panel rises into place over the
   previous one, which recedes a little. scripts/services-panels.js drives
   the motion from scroll position (transform and opacity only).
   ========================================================================== */

.page-services main { background: var(--dark-bg); }
html:has(body.page-services) { background: var(--dark-bg); }
.svp-classic { display: none; }
html[data-services="classic"] .svp { display: none; }
html[data-services="classic"] .svp-classic { display: block; }

.svp {
  --svp-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --svp-radius: clamp(14px, 0.55rem + 0.55vw, 22px);
  /* A · warm ivory sheets */
  --svp-sheet: #F5EBDF;
  --svp-ink:   #17151B;     /* 15.4:1 on the sheet */
  --svp-soft:  #4D4440;     /* 8:1 */
  --svp-faint: #6B605A;     /* 5.2:1, labels */
  --svp-rule:  rgb(23 21 27 / 0.14);
  --svp-edge:  transparent;
  background: var(--dark-bg);
  color: var(--dark-text);
  padding-bottom: clamp(5rem, 3rem + 8vh, 10rem);
}
/* B · tonal sheets: darker surfaces, the type carries the contrast */
html[data-services="tonal"] .svp {
  --svp-sheet: #1C181F;
  --svp-ink:   #FBF1E4;     /* 15.7:1 */
  --svp-soft:  #CDBFB2;     /* 9.7:1 */
  --svp-faint: #A2958A;     /* 6:1 */
  --svp-rule:  rgb(244 233 221 / 0.12);
  --svp-edge:  rgb(244 233 221 / 0.09);
}
.svp :focus-visible { outline: 2px solid var(--dark-focus); outline-offset: 4px; border-radius: 3px; }

/* ---------- Intro ------------------------------------------------------------ */
.svp-intro {
  width: min(100% - 2 * var(--gutter), 90rem);
  margin: 0 auto;
  padding-block: clamp(4.5rem, 2rem + 10vh, 9.5rem) clamp(3.5rem, 2rem + 6vh, 6.5rem);
}
.svp-intro__eyebrow {
  margin: 0;
  font-size: var(--fs-eyebrow); font-weight: 500; letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
  color: var(--dark-text-faint);
}
.svp-intro__title {
  margin: 1.1rem 0 0;
  max-width: 13ch;
  font-family: var(--font-display);
  font-weight: 340;
  font-size: clamp(3rem, 1.5rem + 5vw, 7rem);
  line-height: 0.96;
  letter-spacing: -0.028em;
  color: var(--dark-text);
  text-wrap: balance;
}
.svp-intro__lede {
  margin: clamp(1.5rem, 1rem + 1.5vw, 2.5rem) 0 0;
  max-width: 40ch;
  font-size: clamp(1.0625rem, 0.95rem + 0.45vw, 1.375rem);
  line-height: 1.55;
  color: var(--dark-text-soft);
  text-wrap: pretty;
}
.svp-index { margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem); }
.svp-index ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem clamp(1.25rem, 0.5rem + 2vw, 2.75rem); }
.svp-index a {
  display: inline-flex; align-items: center; gap: 0.6em;
  min-height: 2.75rem;
  font-size: 0.9375rem; letter-spacing: 0.01em;
  color: var(--dark-text-soft); text-decoration: none;
  transition: color 300ms var(--svp-ease);
}
.svp-index a:hover, .svp-index a:focus-visible { color: var(--dark-text); }
.svp-index .svp-sym--mini { width: 1.5rem; height: 1.5rem; margin: 0; color: var(--dark-text); stroke-width: 1.25px; }

/* ---------- Panels ------------------------------------------------------------- */
.svp-stack { width: min(100% - 2 * var(--gutter), 90rem); margin: 0 auto; }
.svp-panel { scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.svp-panel:focus { outline: none; }   /* focused only so keyboard and reader continue from here */
.svp-panel + .svp-panel { margin-top: clamp(1.5rem, 1rem + 2vw, 3rem); }
.svp-panel__sheet {
  position: relative;
  overflow: hidden;
  background: var(--svp-sheet);
  color: var(--svp-ink);
  border-radius: var(--svp-radius);
  box-shadow: inset 0 0 0 1px var(--svp-edge);
  padding: clamp(1.75rem, 1rem + 4vw, 5.5rem);
  transform-origin: 50% 0%;
}
.svp-panel__shade { position: absolute; inset: 0; background: var(--dark-bg); opacity: 0; pointer-events: none; }

.svp-panel__lead { display: flex; flex-direction: column; }
.svp-sym {
  grid-area: auto;
  align-self: auto;
  display: block;
  width: clamp(6rem, 1rem + 13vw, 15rem);
  height: auto; aspect-ratio: 1;
  margin: 0;
  color: var(--svp-ink);
  stroke-width: 1.6px;
}
.svp-sym circle { vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; }
.svp-panel__title {
  margin: clamp(2rem, 1rem + 4vh, 4rem) 0 0;
  font-family: var(--font-display);
  font-weight: 340;
  font-size: clamp(3.25rem, 1.2rem + 6vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: -0.032em;
  color: var(--svp-ink);
}
.svp-panel__body { display: flex; flex-direction: column; }
.svp-panel__who {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.375rem, 1.05rem + 1vw, 2.125rem);
  line-height: 1.2;
  color: var(--svp-ink);
}
.svp-panel__what {
  margin: clamp(1rem, 0.8rem + 0.8vw, 1.6rem) 0 0;
  max-width: 30ch;
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.4375rem);
  line-height: 1.5;
  color: var(--svp-soft);
  text-wrap: pretty;
}
.svp-panel__offers { margin-top: clamp(1.75rem, 1rem + 2vw, 3rem); padding-top: 1rem; border-top: 1px solid var(--svp-rule); max-width: 30rem; }
.svp-panel__offers-label {
  margin: 0 0 0.55rem;
  font-size: 0.875rem; letter-spacing: 0.01em;
  color: var(--svp-faint);
}
.svp-panel__offers-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.svp-panel__offers-list li { font-size: 1rem; line-height: 1.45; color: var(--svp-soft); }

/* wide: two columns, symbol and name on one side; alternate panels mirror */
@media (min-width: 900px) {
  .svp-panel__sheet {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    column-gap: clamp(2.5rem, 1rem + 5vw, 7rem);
    min-height: min(calc(100svh - var(--header-h) - 8rem), 42rem);
  }
  .svp-panel__lead { justify-content: space-between; }
  .svp-panel__body { justify-content: flex-end; padding-bottom: 0.5rem; }
  .svp-panel:nth-child(even) .svp-panel__lead { order: 2; align-items: flex-end; text-align: right; }
  .svp-panel:nth-child(even) .svp-panel__body { order: 1; }
}

/* ---------- Live: the sticky stack (wide and tall enough screens) ----------------
   The script adds .svp-flat when a panel would not fit below its resting line,
   and .svp-measure for the instant it reads natural positions. */
@media (min-width: 900px) and (min-height: 640px) {
  html.svp-live .svp-panel { top: calc(var(--header-h) + 1.25rem + var(--svp-i, 0) * 0.85rem); }
  html.svp-live:not(.svp-flat) .svp-panel { position: sticky; }
  html.svp-live:not(.svp-flat) .svp-panel + .svp-panel { margin-top: 14vh; }
  html.svp-live.svp-measure .svp-panel { position: static; }
  .svp-panel:nth-child(2) { --svp-i: 1; }
  .svp-panel:nth-child(3) { --svp-i: 2; }
  .svp-panel:nth-child(4) { --svp-i: 3; }
}
html.svp-live [data-svp-sheet] { will-change: transform; }
/* until the script has placed everything, keep the inner parts out of sight (3 s failsafe in the head) */
html.svp-live:not(.svp-ready) [data-svp-part] { opacity: 0; }

/* ---------- Symbols: a small reaction to the hand ---------------------------------- */
@media (prefers-reduced-motion: no-preference) and (hover: hover), (prefers-reduced-motion: no-preference) and (min-width: 900px) {
  .svp-sym circle { transition: transform 700ms var(--svp-ease); }
  /* Coaching: the two circles draw toward each other */
  :is(.svp-panel--coaching:hover, [data-svp-link="coaching"]:is(:hover, :focus-visible)) .svp-sym circle:first-child { transform: translateX(2.2px); }
  :is(.svp-panel--coaching:hover, [data-svp-link="coaching"]:is(:hover, :focus-visible)) .svp-sym .glyph__o { transform: translateX(-2.2px); }
  /* Consulting: the rings breathe out once and return */
  :is(.svp-panel--consulting:hover, [data-svp-link="consulting"]:is(:hover, :focus-visible)) .svp-sym circle:nth-child(1) { animation: svp-ring 1100ms var(--svp-ease); }
  :is(.svp-panel--consulting:hover, [data-svp-link="consulting"]:is(:hover, :focus-visible)) .svp-sym circle:nth-child(2) { animation: svp-ring2 1100ms var(--svp-ease) 90ms; }
  /* Facilitation: the ring of dots opens its spacing a little */
  :is(.svp-panel--facilitation:hover, [data-svp-link="facilitation"]:is(:hover, :focus-visible)) .svp-sym circle:nth-child(1) { transform: translate(0, -1.6px); }
  :is(.svp-panel--facilitation:hover, [data-svp-link="facilitation"]:is(:hover, :focus-visible)) .svp-sym circle:nth-child(2) { transform: translate(1.4px, -0.8px); }
  :is(.svp-panel--facilitation:hover, [data-svp-link="facilitation"]:is(:hover, :focus-visible)) .svp-sym circle:nth-child(3) { transform: translate(1.4px, 0.8px); }
  :is(.svp-panel--facilitation:hover, [data-svp-link="facilitation"]:is(:hover, :focus-visible)) .svp-sym circle:nth-child(4) { transform: translate(0, 1.6px); }
  :is(.svp-panel--facilitation:hover, [data-svp-link="facilitation"]:is(:hover, :focus-visible)) .svp-sym circle:nth-child(5) { transform: translate(-1.4px, 0.8px); }
  :is(.svp-panel--facilitation:hover, [data-svp-link="facilitation"]:is(:hover, :focus-visible)) .svp-sym circle:nth-child(6) { transform: translate(-1.4px, -0.8px); }
  /* Education: the row lifts one circle after another */
  :is(.svp-panel--education:hover, [data-svp-link="education"]:is(:hover, :focus-visible)) .svp-sym circle { animation: svp-lift 760ms var(--svp-ease) calc(var(--n, 0) * 95ms); }
  .svp-sym circle:nth-child(2) { --n: 1; } .svp-sym circle:nth-child(3) { --n: 2; } .svp-sym circle:nth-child(4) { --n: 3; }
}
@keyframes svp-ring  { 40% { transform: scale(1.075); } }
@keyframes svp-ring2 { 40% { transform: scale(1.06); } }
@keyframes svp-lift  { 35% { transform: translateY(-2.6px); } }

/* ---------- Narrow: one column, symbol and name first ------------------------------- */
@media (max-width: 899.98px) {
  .svp-panel__title { margin-top: 1.5rem; }
  .svp-panel__body { margin-top: 1.75rem; }
  .svp-sym { width: clamp(4.25rem, 2.5rem + 8vw, 6rem); }
}
