/* Services — mise en page Figma + empilement scroll inspiré de TRIONN. */

.services-page {
  background: #f7f7f7;
  color: #14141d;
}

.service-orbit-hero {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 320svh;
  min-height: 2304px;
  overflow: visible;
  background:
    radial-gradient(circle at 58% 42%, rgba(28, 55, 66, 0.52), transparent 36%),
    linear-gradient(135deg, var(--black) 0%, #071919 42%, #071b21 100%);
  isolation: isolate;
}

.service-hero-sticky {
  --service-intro-y: 0px;
  --service-final-y: 76svh;
  position: sticky;
  top: 0;
  width: 100%;
  height: 100svh;
  min-height: 720px;
  overflow: hidden;
  background:
    radial-gradient(circle at 58% 42%, rgba(28, 55, 66, 0.52), transparent 36%),
    linear-gradient(135deg, var(--black) 0%, #071919 42%, #071b21 100%);
  isolation: isolate;
}

.service-hero-stage {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.service-hero-shape {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--shape-width, 20vw);
  height: var(--shape-height, 20vw);
  transform: translate3d(var(--shape-x, 0px), var(--shape-y, 0px), 0);
  transform-origin: center;
  will-change: transform;
  pointer-events: none;
}

.service-hero-shape video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  background: transparent;
  transform: translateZ(0);
  user-select: none;
  -webkit-user-drag: none;
}

.service-hero-orbits {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: rgba(var(--ink-rgb), 0.30);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  transform: translate3d(var(--ellipse-parallax-x, 0px), var(--ellipse-parallax-y, 0px), 0);
  will-change: transform;
}

.service-hero-orbits ellipse {
  vector-effect: non-scaling-stroke;
}

.service-hero-copy {
  position: absolute;
  z-index: 7;
  left: 50%;
  top: 50%;
  width: min(90vw, 1420px);
  color: var(--ink);
  text-align: center;
  pointer-events: none;
}

.service-hero-copy--intro {
  transform: translate3d(-50%, calc(-50% + var(--service-intro-y)), 0);
  will-change: transform;
}

.service-hero-copy--final {
  top: calc(50% - 18px);
  width: min(45.8333vw, 880px);
  transform: translate3d(-50%, calc(-50% + var(--service-final-y)), 0);
  will-change: transform;
}

.service-hero-copy h1,
.service-hero-copy h2 {
  margin: 0;
  font-family: 'PP Eiko', Georgia, serif;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink);
  opacity: 1;
  filter: none;
  mix-blend-mode: normal;
  text-wrap: balance;
}

.service-hero-copy--intro h1 {
  font-size: clamp(64px, 5vw, 96px);
  line-height: 1.0208;
}

.service-hero-copy--final h2 {
  font-size: clamp(54px, 4.4792vw, 86px);
  line-height: 1.01163;
}

.service-hero-copy--final h2 span {
  display: block;
}

@media (min-width: 901px) {
  .service-hero-copy--final h2 span {
    white-space: nowrap;
  }
}

.service-hero-copy--intro p {
  margin: clamp(22px, 2.22svh, 26px) 0 0;
  color: rgba(var(--ink-rgb), 0.70);
  font-size: 16px;
  font-weight: 500;
  line-height: normal;
  letter-spacing: 0;
  text-transform: uppercase;
}

.service-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  width: max-content;
  max-width: 100%;
  margin-top: clamp(38px, 5svh, 60px);
  padding: 0 0 12px;
  color: var(--ink);
  font-size: clamp(13px, .83vw, 16px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
  transform: none;
  will-change: auto;
  pointer-events: auto;
}

.service-hero-cta:hover,
.service-hero-cta:focus-visible {
  color: var(--ink) !important;
  filter: none !important;
}

.service-hero-cta .button-arrow {
  transition: transform .32s var(--ease-out);
}

.service-hero-cta:hover .button-arrow,
.service-hero-cta:focus-visible .button-arrow {
  transform: translateX(6px);
}

/* Same compositing stack as the Home Hero: gradient overlay, then the exact
   grain asset with the exact Home opacity and plus-lighter blend mode. */
.service-hero-overlay {
  position: absolute;
  z-index: 5;
  inset: 0;
  background:
    radial-gradient(circle at 56% 38%, rgba(31, 63, 72, 0.34), transparent 38%),
    linear-gradient(180deg, rgba(var(--black-rgb), 0.56) 0%, rgba(6, 18, 20, 0.18) 46%, rgba(var(--black-rgb), 0.64) 100%);
  pointer-events: none;
}

.service-hero-grain {
  position: absolute;
  z-index: 6;
  inset: 0;
  opacity: 0.35;
  mix-blend-mode: plus-lighter;
  background-image: url('../images/home/hero-overlay.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}

.service-hero-wipe {
  --service-band-0: 0%;
  --service-band-1: 0%;
  --service-band-2: 0%;
  --service-band-3: 0%;
  --service-band-4: 0%;
  --service-band-5: 0%;
  position: absolute;
  z-index: 12;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image:
    linear-gradient(to top, #000 0, #000 var(--service-band-0), transparent calc(var(--service-band-0) + .01%)),
    linear-gradient(to top, #000 0, #000 var(--service-band-1), transparent calc(var(--service-band-1) + .01%)),
    linear-gradient(to top, #000 0, #000 var(--service-band-2), transparent calc(var(--service-band-2) + .01%)),
    linear-gradient(to top, #000 0, #000 var(--service-band-3), transparent calc(var(--service-band-3) + .01%)),
    linear-gradient(to top, #000 0, #000 var(--service-band-4), transparent calc(var(--service-band-4) + .01%)),
    linear-gradient(to top, #000 0, #000 var(--service-band-5), transparent calc(var(--service-band-5) + .01%));
  mask-image:
    linear-gradient(to top, #000 0, #000 var(--service-band-0), transparent calc(var(--service-band-0) + .01%)),
    linear-gradient(to top, #000 0, #000 var(--service-band-1), transparent calc(var(--service-band-1) + .01%)),
    linear-gradient(to top, #000 0, #000 var(--service-band-2), transparent calc(var(--service-band-2) + .01%)),
    linear-gradient(to top, #000 0, #000 var(--service-band-3), transparent calc(var(--service-band-3) + .01%)),
    linear-gradient(to top, #000 0, #000 var(--service-band-4), transparent calc(var(--service-band-4) + .01%)),
    linear-gradient(to top, #000 0, #000 var(--service-band-5), transparent calc(var(--service-band-5) + .01%));
  -webkit-mask-size: 100% calc(100% / 6 + 1px);
  mask-size: 100% calc(100% / 6 + 1px);
  -webkit-mask-position: 0 0%, 0 20%, 0 40%, 0 60%, 0 80%, 0 100%;
  mask-position: 0 0%, 0 20%, 0 40%, 0 60%, 0 80%, 0 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.service-hero-reveal-panel {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  z-index: 1 !important;
  pointer-events: none !important;
}

.service-orbit-hero.is-service-handoff-complete {
  z-index: 0;
}

.service-stack {
  position: relative;
  z-index: 1;
  isolation: isolate;
  width: 100%;
  background: #f7f7f7;
}

@media (prefers-reduced-motion: no-preference) {
  .service-stack {
    margin-top: -100svh;
  }
}

.service-panel {
  --panel-progress: 1;
  --copy-progress: 1;
  --media-progress: 1;
  --copy-blur: 0px;
  --copy-y: 0px;
  --media-blur: 0px;
  --media-y: 0px;
  --media-clip: 0%;
  --media-scale: 1;
  --image-parallax: 0%;
  position: sticky;
  top: 0;
  z-index: var(--service-index, 1);
  display: grid;
  grid-template-columns: 50.46875% 49.53125%;
  width: 100%;
  height: 100svh;
  min-height: 760px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 -1px 0 rgba(19, 18, 36, 0.16);
}

.service-panel-visual,
.service-panel-copy {
  position: relative;
  min-width: 0;
  height: 100%;
}

.service-panel-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(118px, 12.8svh, 150px) clamp(54px, 6.1458vw, 118px);
  overflow: hidden;
}

.service-panel--dark .service-panel-visual {
  background: #131224;
  color: #faf8f2;
}

.service-panel--light .service-panel-visual {
  background: #fff;
  color: #131224;
  border-right: 1px solid rgba(19, 18, 36, 0.3);
}

.service-visual-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(32px, 4.188svh, 49px);
  width: 100%;
  opacity: var(--media-progress);
  filter: blur(var(--media-blur));
  transform: translate3d(0, var(--media-y), 0);
  transition: opacity 120ms linear;
  will-change: opacity, filter, transform;
}

.service-manifesto {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.18;
  text-align: center;
  text-transform: uppercase;
}

.service-media {
  position: relative;
  width: 100%;
  aspect-ratio: 733 / 454;
  max-height: min(454px, 42svh);
  margin: 0;
  overflow: hidden;
  border-radius: 15px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.06), transparent 48%),
    #090911;
  clip-path: inset(var(--media-clip) 0 0 0 round 15px);
  transform: scale(var(--media-scale));
  transform-origin: 50% 100%;
  will-change: clip-path, transform;
}

.service-panel--light .service-media {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), transparent 48%),
    #131224;
}

.service-media-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 24px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(250, 248, 242, 0.44);
  text-align: center;
  text-transform: uppercase;
  transition: opacity 500ms ease;
}

.service-media::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border: 1px solid rgba(250, 248, 242, 0.1);
  border-radius: inherit;
}

.service-media-image {
  position: absolute;
  inset: -4%;
  z-index: 2;
  width: 108%;
  height: 108%;
  object-fit: cover;
  opacity: 0;
  transform: translate3d(0, var(--image-parallax), 0) scale(1.035);
  transition: opacity 500ms ease;
  will-change: transform;
}

.service-media.is-loaded .service-media-placeholder {
  opacity: 0;
}

.service-media.is-loaded .service-media-image {
  opacity: 1;
}

.service-panel-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(86px, 12svh, 140px) clamp(72px, 11.6667vw, 224px) clamp(72px, 10svh, 120px) clamp(72px, 10.9896vw, 211px);
  background: #fff;
  color: #14141d;
}

.service-copy-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(52px, 6.3248svh, 74px);
  width: min(100%, 516px);
  opacity: var(--copy-progress);
  filter: blur(var(--copy-blur));
  transform: translate3d(0, var(--copy-y), 0);
  will-change: opacity, filter, transform;
}

.service-copy-head {
  width: 100%;
}

.service-copy-head h1,
.service-copy-head h2 {
  margin: 0;
  font-family: 'PP Eiko', 'Satoshi', sans-serif;
  font-size: clamp(32px, 1.875vw, 36px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  color: #14141d;
}

.service-copy-head > p {
  margin: 18px 0 0;
  font-size: clamp(16px, 0.9375vw, 18px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.055em;
  color: rgba(20, 20, 29, 0.5);
}

.service-expertise {
  width: 100%;
}

.service-expertise-label {
  margin: 0 0 clamp(28px, 3.5897svh, 42px);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.375;
  color: rgba(20, 20, 29, 0.4);
  text-transform: uppercase;
}

.service-expertise ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-expertise li {
  --item-progress: 1;
  --item-blur: 0px;
  --item-y: 0px;
  position: relative;
  margin: 0;
  padding: 0 0 clamp(12px, 1.2821svh, 15px);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: #131224;
  opacity: var(--item-progress);
  filter: blur(var(--item-blur));
  transform: translate3d(0, var(--item-y), 0);
  will-change: opacity, filter, transform;
}

.service-expertise li + li {
  padding-top: clamp(10px, 1.2821svh, 15px);
}

.service-expertise li::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(19, 18, 36, 0.4);
  transform: scaleX(var(--item-progress));
  transform-origin: left center;
}

.site-header.service-logo-on-dark.is-on-light .brand-logo img,
.site-header.service-logo-on-dark .brand-logo img {
  filter: none !important;
}

@media (max-height: 820px) and (min-width: 901px) {
  .service-panel {
    min-height: 680px;
  }

  .service-panel-visual {
    padding-top: 94px;
    padding-bottom: 72px;
  }

  .service-visual-inner {
    gap: 26px;
  }

  .service-media {
    max-height: 350px;
  }

  .service-panel-copy {
    padding-top: 88px;
    padding-bottom: 62px;
  }

  .service-copy-inner {
    gap: 42px;
  }

  .service-copy-head > p {
    margin-top: 10px;
  }

  .service-expertise-label {
    margin-bottom: 22px;
  }

  .service-expertise li {
    padding-bottom: 7px;
    line-height: 1.25;
  }

  .service-expertise li + li {
    padding-top: 7px;
  }
}

@media (max-width: 1180px) and (min-width: 901px) {
  .service-panel-copy {
    padding-left: 64px;
    padding-right: 64px;
  }

  .service-copy-head h1,
  .service-copy-head h2 {
    font-size: 32px;
  }

  .service-expertise li {
    font-size: 20px;
  }
}

@media (max-width: 900px) {
  .service-orbit-hero {
    height: 280svh;
    min-height: 1736px;
  }

  .service-hero-sticky {
    min-height: 620px;
  }

  .service-hero-copy {
    width: calc(100% - 64px);
  }

  .service-hero-copy--intro h1 {
    font-size: clamp(52px, 9vw, 76px);
  }

  .service-hero-copy--final {
    top: 50%;
    width: calc(100% - 64px);
  }

  .service-hero-copy--final h2 {
    font-size: clamp(48px, 8vw, 70px);
  }

  .service-hero-copy--intro p {
    font-size: 14px;
  }

  .service-stack {
    overflow: visible;
  }

  .service-panel {
    position: relative;
    top: auto;
    display: grid;
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .service-panel-visual,
  .service-panel-copy {
    height: auto;
    min-height: 0;
  }

  .service-panel-visual {
    padding: 92px 32px 84px;
  }

  .service-panel--light .service-panel-visual {
    border-right: 0;
    border-bottom: 1px solid rgba(19, 18, 36, 0.3);
  }

  .service-visual-inner,
  .service-copy-inner {
    opacity: 1;
    filter: none;
    transform: none;
  }

  .service-media {
    max-height: none;
    clip-path: none;
    transform: none;
  }

  .service-media-image {
    transform: none;
  }

  .service-panel-copy {
    padding: 96px 32px 112px;
  }

  .service-copy-inner {
    gap: 66px;
    width: 100%;
  }

  .service-copy-head h1,
  .service-copy-head h2 {
    font-size: clamp(42px, 7vw, 62px);
  }

  .service-copy-head > p {
    max-width: 660px;
    margin-top: 22px;
    font-size: 18px;
    line-height: 1.35;
    letter-spacing: -0.035em;
  }

  .service-expertise li {
    --item-progress: 1 !important;
    font-size: 20px;
    filter: none;
    transform: none;
  }
}

@media (max-width: 640px) {
  .service-orbit-hero {
    height: 250svh;
    min-height: 1400px;
  }

  .service-hero-sticky {
    height: 100svh;
    min-height: 560px;
  }

  .service-hero-copy {
    width: calc(100% - 36px);
  }

  .service-hero-copy--intro h1 {
    font-size: clamp(40px, 12vw, 58px);
    line-height: 1.01;
    letter-spacing: -.015em;
  }

  .service-hero-copy--final {
    width: calc(100% - 36px);
  }

  .service-hero-copy--final h2 {
    font-size: clamp(40px, 10.5vw, 56px);
    line-height: 1.01;
    letter-spacing: -.015em;
  }

  .service-hero-copy--final h2 span {
    white-space: normal;
  }

  .service-hero-copy--intro p {
    width: min(100%, 320px);
    margin: 20px auto 0;
    font-size: 12px;
    line-height: 1.4;
  }

  .service-hero-cta {
    gap: 14px;
    margin-top: 34px;
    font-size: 12px;
  }

  .service-panel-visual {
    padding: 78px 22px 72px;
  }

  .service-manifesto {
    font-size: 14px;
  }

  .service-media {
    border-radius: 10px;
  }

  .service-panel-copy {
    padding: 82px 22px 96px;
  }

  .service-copy-inner {
    gap: 56px;
  }

  .service-copy-head h1,
  .service-copy-head h2 {
    font-size: clamp(36px, 11vw, 48px);
    line-height: 1.06;
  }

  .service-copy-head > p {
    font-size: 17px;
  }

  .service-expertise-label {
    margin-bottom: 24px;
  }

  .service-expertise li {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-orbit-hero {
    height: 100svh;
    min-height: 720px;
  }

  .service-hero-sticky {
    position: relative;
  }

  .service-hero-copy--intro {
    transform: translate3d(-50%, -50%, 0);
  }

  .service-hero-copy--final,
  .service-hero-wipe {
    display: none;
  }

  .service-hero-shape,
  .service-hero-orbits {
    will-change: auto;
  }

  .service-panel {
    position: relative;
    top: auto;
    height: auto;
    min-height: 0;
  }

  .service-visual-inner,
  .service-copy-inner,
  .service-expertise li {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }

  .service-media {
    clip-path: none !important;
    transform: none !important;
  }

  .service-expertise li {
    --item-progress: 1 !important;
  }
}

/* V8 — source cube verified clean; isolate the runtime compositor. */
.service-hero-shape--cube,
.service-hero-shape--cube video {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  contain: paint;
  transform-style: preserve-3d;
}

.service-hero-shape--cube video {
  will-change: transform, opacity;
}

.service-hero-copy--intro h1,
.service-hero-copy--final h2 {
  font-family: 'PP Eiko', 'Satoshi', sans-serif !important;
  font-size: var(--hero-title-size) !important;
  line-height: var(--hero-title-line-height) !important;
}

.service-hero-copy--final {
  width: min(86vw, 1180px) !important;
}

.service-hero-cta {
  font-family: 'Satoshi', sans-serif !important;
  font-size: 13px !important;
  text-transform: uppercase !important;
}

@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .service-orbit-hero {
    height: 380svh;
    min-height: 2736px;
  }
}
