.expertise-scene {
  padding: clamp(60px, 9vw, 150px) var(--gutter);
  background: radial-gradient(ellipse at 52% 100%, color-mix(in srgb, var(--lime) 13%, transparent), transparent 65%), #10110f;
  color: #f6f6f2;
}
.expertise-scene h2 {
  margin: 0 auto clamp(30px, 5vw, 70px);
  font-size: clamp(36px, 6vw, 88px);
  letter-spacing: -.035em;
  text-align: center;
}
.expertise-list {
  list-style: none;
  max-width: 1200px;
  margin: auto;
  padding: 0;
}
.expertise-list li { border-block-start: 1px solid #ffffff25; }
.expertise-list li:last-child { border-block-end: 1px solid #ffffff25; }
.expertise-list a {
  display: grid;
  grid-template-columns: minmax(0,1.65fr) minmax(0,1fr) auto;
  align-items: center;
  gap: clamp(12px,3vw,48px);
  min-height: 80px;
  padding: 16px 8px;
  text-decoration: none;
  color: inherit;
}
.expertise-list strong {
  font-size: clamp(30px,5.65vw,90px);
  font-weight: 560;
  line-height: 1.04;
  letter-spacing: -.045em;
  transform-origin: left center;
  transition: transform .75s cubic-bezier(.2,.75,.2,1), color .45s ease;
}
.expertise-list span { color: #d5d7d0; line-height: 1.5; }
.expertise-list i { color: var(--lime); font-style: normal; }
.expertise-list a:is(:hover,:focus-visible) strong, .expertise-list [data-current] strong { color: var(--lime); }
.expertise-list a:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
.expertise-list[data-scene-live] li:not([data-current]) a:not(:hover,:focus-visible) strong {
  transform: perspective(550px) rotateX(var(--row-angle,0deg)) scale(var(--row-scale,1));
  color: #b6bbb3;
}
html.pixel-purple .expertise-scene { background-color: #15111a; }
@media (max-width:650px) {
  .expertise-list a { grid-template-columns: minmax(0,1fr) auto; gap: 6px 12px; min-height: 76px; }
  .expertise-list strong { font-size: clamp(28px,8vw,42px); }
  .expertise-list span { grid-row: 2; font-size: 14px; }
  .expertise-list i { grid-area: 1 / 2 / 3 / 3; }
}
@media (prefers-reduced-motion:no-preference) {
  html:not(.reduce-motion):not(:has(.pixel-chat-body-page)) { scroll-behavior: smooth; }
}
.reduce-motion .expertise-list strong { transform: none !important; transition: none; }
@media (prefers-reduced-motion:reduce) {
  .expertise-list strong { transform: none !important; transition: none; }
}

/* The active label sits on the front plane; adjacent titles curve away. */
@media (prefers-reduced-motion:no-preference) {
  .expertise-scene:has(.expertise-list[data-wheel]) {
    min-height: calc(85svh + 520px);
  }
  .expertise-list[data-wheel] {
    position: sticky;
    top: clamp(64px, 16svh, 160px);
    height: min(64svh, 550px);
    perspective: 850px;
    perspective-origin: center 40%;
  }
  .expertise-list[data-wheel] li {
    position: absolute;
    inset: 34% 0 auto;
    transform: translateY(calc(var(--wheel-offset, 0) * clamp(66px, 10svh, 105px)))
      rotateX(calc(var(--wheel-offset, 0) * -16deg))
      scale(var(--wheel-scale, 1));
    opacity: var(--wheel-opacity, 1);
    transition: opacity .55s ease, transform .8s cubic-bezier(.18,.8,.22,1);
  }
  .expertise-list[data-wheel] strong { transform: none !important; }
  .expertise-list[data-wheel] li:not([data-current]) span { visibility: hidden; }
  .expertise-list[data-wheel] [data-current] { z-index: 1; }
}
.motion-highlight { position: relative; isolation: isolate; }
.motion-highlight::before {
  content: "";
  pointer-events: none;
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(ellipse at 50% 100%,color-mix(in srgb,var(--lime) 18%,transparent),transparent 72%);
  opacity: 0;
  transition: opacity 950ms ease;
}
.motion-highlight[data-lit]::before { opacity: 1; }
@media (prefers-reduced-motion:reduce) {
 .motion-highlight::before { transition: none; }
}
.reduce-motion .motion-highlight::before { transition: none; }

/* Scroll changes the animation position directly, including reverse scrolling. */

@keyframes section-signal { from { translate: 0 12px; opacity: .6; } }
@keyframes section-ledger { from { clip-path: inset(0 0 30% 0); opacity: .65; } }
@keyframes section-seal { from { scale: .94; opacity: .65; } }
@keyframes section-line { from { clip-path: inset(0 24% 0 0); opacity: .65; } }
@keyframes section-focus { from { filter: blur(3px); opacity: .7; } }
@keyframes section-bar { from { scale: .1 1; } }

@media (prefers-reduced-motion:no-preference) {
  .expertise-scene:has(.expertise-list[data-wheel]) {
    min-height: 0;
    padding-bottom: clamp(60px, 9vw, 150px);
  }
  .expertise-scene:has(.expertise-list[data-wheel])::after {
    content: "";
    display: block;
    height: clamp(220px, 38svh, 380px);
  }
  .expertise-list[data-wheel] {
    height: clamp(300px, 55svh, 490px);
    overflow: clip;
    top: clamp(72px, 14svh, 130px);
  }
  .expertise-list[data-wheel] li {
    inset-block-start: 37%;
    transition: none;
  }
}

/* Keep navigation and hover feedback without a second heading movement. */
html:not(.reduce-motion) main .soft-heading:is(:hover,.soft-focus) .heading-word {
  transform: none;
}

/* The viewport belongs to the expertise sequence until its final row settles. */
@media (prefers-reduced-motion:no-preference) {
  .expertise-list[data-wheel] {
    top: 0;
    height: 100svh;
    perspective-origin: center center;
  }
  .expertise-list[data-wheel] li {
    inset: 50% 0 auto;
    border: 0;
    transform: translateY(calc(-50% + var(--wheel-offset, 0) * clamp(92px, 13svh, 145px)))
      rotateX(calc(var(--wheel-offset, 0) * -16deg))
      scale(var(--wheel-scale, 1));
  }
  .expertise-list[data-wheel] a {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
    gap: 8px;
    padding: 8px 12px;
  }
  .expertise-list[data-wheel] span { grid-row: 2; max-width: 45ch; }
  .expertise-list[data-wheel] i { grid-area: 3 / 1; }
  .expertise-list[data-wheel] li:not([data-current]) i { visibility: hidden; }
}

@supports(animation-timeline:view()) {
 @media(prefers-reduced-motion:no-preference) {
  @keyframes section-signal { from {translate:0 16px;opacity:0} to {translate:0 0;opacity:1} }
  @keyframes section-focus { from {filter:blur(4px);opacity:0} to {filter:blur(0);opacity:1} }
  html:not(.reduce-motion) .role {
    animation: section-signal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 55%;
  }
 }
}
.role { scroll-margin-top: 100px; }
.expertise-list[data-wheel] a { max-width:100%; margin-inline:auto; }
@media(max-width:650px) {
 .expertise-list[data-wheel] strong { font-size:clamp(28px,8vw,42px); }
 .expertise-list[data-wheel] span { max-width:29ch; font-size:14px; }
}

/* Initial headings are readable before the visitor makes the first scroll. */
main > :is(.page-heading,.case-heading,.contact-heading) h1,
.hero h1, .pixel-chat-body-page main h1 {
  animation: none !important;
  opacity: 1;
  filter: none;
}
/* Page-specific structure animates inside the shared two-heading vocabulary. */
@supports(animation-timeline:view()) {
 @media(prefers-reduced-motion:no-preference) {
  html:not(.reduce-motion) .studio-results .metric-lines {animation: section-bar linear both;animation-timeline:view();animation-range:entry 0% entry 90%}
  html:not(.reduce-motion) .about-steps li {animation: section-signal linear both;animation-timeline:view();animation-range:entry 0% entry 70%}
  html:not(.reduce-motion) .qualification {animation: section-seal linear both;animation-timeline:view();animation-range:entry 0% entry 65%}
  html:not(.reduce-motion) .studio-answer {animation: section-focus linear both;animation-timeline:view();animation-range:entry 0% entry 65%}
 }
}

@media(prefers-reduced-motion:no-preference) {
 .expertise-list[data-wheel]::before {
   content:"";
   position:absolute;
   top:50%;
   left:0;
   right:0;
   height:clamp(92px,13svh,145px);
   transform:translateY(-50%);
   border-block:1px solid color-mix(in srgb,var(--lime) 25%,transparent);
   background:radial-gradient(ellipse at center,color-mix(in srgb,var(--lime) 7%,transparent),transparent 75%);
   pointer-events:none;
 }
 .expertise-list[data-wheel] strong {
   font-size:clamp(30px,6.2vw,100px);
   line-height:1.04;
 }
 .expertise-list[data-wheel] li:not([data-current]) strong { color:#a9aca5; }
}
@media(max-width:650px) {
 .expertise-list[data-wheel] strong {font-size:clamp(26px,7.8vw,40px)}
}

/* Editorial index: titles carry the scene without explanatory subcopy. */
.expertise-list a { grid-template-columns:minmax(0,1fr) auto; }
.expertise-list[data-wheel] a { display:block; position:relative; }
.expertise-list[data-wheel] i { position:absolute; right:2%; top:50%; transform:translateY(-50%); }
.expertise-list[data-wheel] li::before { content:attr(data-position); position:absolute; left:2%; top:50%; transform:translateY(-50%); font-size:14px; color:var(--lime); opacity:0; }
.expertise-list[data-wheel] li[data-current]::before { opacity:1; }
@media(min-width:1000px) { .expertise-list[data-wheel] strong { font-size:clamp(30px,5.6vw,100px); } }
@media(max-width:999px) { .expertise-list[data-wheel] li::before { top:calc(100% + 12px); left:50%; transform:translateX(-50%); font-size:12px; } .expertise-list[data-wheel] i { display:none; } }
