@font-face {
  font-family: "Services Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/netbuur/fonts/services-poppins-600.woff2") format("woff2");
}

@font-face {
  font-family: "Services Playfair";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/netbuur/fonts/services-playfair-400.ttf") format("truetype");
}

.reference-services {
  position: relative;
  overflow-x: clip;
  padding-inline: var(--padding-x, 20px);
  background: var(--fps-paper);
  color: var(--fps-ink);
}

.rs-stage {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: min(760px, 100svh);
  width: 100%;
  margin-inline: auto;
  padding: clamp(40px, 5vw, 80px) 0;
}

.reference-services[data-pinned] {
  min-height: 395svh;
}

.reference-services[data-pinned] .rs-stage {
  position: sticky;
  top: 80px;
  height: calc(100svh - 80px);
  min-height: 0;
  padding-block: 24px 32px;
}

@media (min-width: 768px) {
  .reference-services[data-pinned] .rs-service-link {
    font-size: clamp(28px, min(5.65vw, calc((100svh - 220px) / 8.54)), 124px);
  }
}

.rs-kicker {
  display: flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  margin: 0;
  color: var(--fps-ink);
  font-family: "Bebas Neue", "Arial Narrow", sans-serif;
  font-size: clamp(30px, 2.5vw, 42px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.rs-flower {
  flex: none;
  width: 1em;
  height: 1em;
}

/* minmax(0, 1fr) — not the implicit `auto` track: WebKit (iOS Safari) sized
   that track to the list's intrinsic width (~2× a phone screen), so every row
   was centred far off to the right. The track must never exceed the stage. */
.rs-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  flex: 1;
  gap: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rs-list > li {
  position: relative;
  min-width: 0;
  margin: 0;
}

.rs-service-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.18em;
  min-height: 1.22em;
  color: var(--fps-ink);
  font-size: clamp(32px, min(5.65vw, 11.3svh), 124px);
  line-height: 1.22;
  letter-spacing: -0.045em;
  text-align: center;
  text-wrap: balance;
  text-decoration: none;
  transition: color 220ms ease;
}

.rs-label {
  display: grid;
  min-width: 0;
}

.rs-list > li:not([data-active="true"]) .rs-illustration {
  display: none;
}

.rs-illustration {
  --rs-sticker: #e8dab1;
  flex: none;
  width: 0.95em;
  height: 0.95em;
  transform: rotate(-9deg);
  transition: transform 220ms ease;
}

.rs-list > li:nth-child(even) .rs-illustration {
  transform: rotate(9deg);
}

.rs-list > li[data-active="true"] .rs-illustration {
  transform: rotate(0deg) scale(1.06);
}

.rs-sans,
.rs-serif {
  grid-area: 1 / 1;
  display: block;
  max-width: 100%;
  transition: opacity 220ms ease;
}

.rs-sans {
  font-family: "Services Poppins", "Mulish", Arial, sans-serif;
  font-weight: 600;
  opacity: 1;
}

.rs-serif {
  font-family: "Services Playfair", Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.045em;
  opacity: 0;
}

.rs-list > li[data-active="true"] .rs-service-link {
  color: var(--fps-ink);
}

.rs-list > li[data-active="true"] .rs-sans {
  opacity: 0;
}

.rs-list > li[data-active="true"] .rs-serif {
  opacity: 1;
}

.rs-service-link:focus-visible {
  outline: 2px solid var(--fps-accent);
  outline-offset: 8px;
  border-radius: 8px;
}

.rs-description {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 767px) {
  .rs-stage {
    min-height: 75svh;
    padding: 70px 0;
  }

  .rs-list {
    gap: 8px;
  }

  .rs-service-link {
    font-size: clamp(32px, 9vw, 54px);
    line-height: 1.22;
    letter-spacing: -0.055em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rs-illustration {
    transform: none !important;
  }

  .rs-illustration,
  .rs-service-link,
  .rs-sans,
  .rs-serif {
    transition: none;
  }
}

/* Remove the captured contact capsule directly after the Services section. */
.reference-services + section:has(> .bg-netbuur-orange) {
  display: none;
}

/* Branding becomes a custom wordmark instead of a separate illustration. */
.rs-brand-wordmark {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: center;
  line-height: 1.22;
  letter-spacing: -0.075em;
  white-space: nowrap;
}

.rs-brand-base {
  position: relative;
  font-family: "Services Poppins", Arial, sans-serif;
  font-weight: 600;
}

.rs-brand-initial {
  color: var(--fps-accent);
}

.rs-brand-base::after {
  position: absolute;
  right: 0.02em;
  bottom: 0.06em;
  left: 0.05em;
  height: 0.045em;
  border-radius: 100% 15% 85% 20%;
  background: var(--fps-accent);
  content: "";
  transform: rotate(-3deg) scaleX(0);
  transform-origin: left center;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.rs-brand-ending {
  margin-left: -0.025em;
  padding-right: 0.09em;
  font-family: "Services Playfair", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.065em;
}

.rs-list > li[data-active="true"] .rs-brand-base::after {
  transform: rotate(-3deg) scaleX(1);
}

.rs-web-label .rs-sans,
.rs-web-label .rs-serif {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.12em;
  white-space: nowrap;
}

.rs-web-label .rs-web-browser {
  width: 1.5em;
  height: 1.1em;
  transform: none;
  overflow: visible;
}

.rs-web-browser > svg {
  display: block;
  width: 100%;
  height: 100%;
}

.rs-figma-label {
  position: relative;
  isolation: isolate;
}

.rs-figma-label .rs-serif {
  line-height: 1.08;
}

/* Frame the active serif word, without reserving the wider hidden sans word. */
.rs-list > li[data-active="true"] .rs-figma-label .rs-sans {
  position: absolute;
  inset: 0;
}

.rs-selection {
  position: absolute;
  inset: 0.04em -0.04em;
  border: 1.5px solid #159fea;
  color: #0788cf;
  pointer-events: none;
}

.rs-selection > i {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 1.5px solid #159fea;
  border-radius: 1px;
  background: var(--fps-paper);
}

.rs-selection > i:nth-child(1) {
  top: -5px;
  left: -5px;
}
.rs-selection > i:nth-child(2) {
  top: -5px;
  right: -5px;
}
.rs-selection > i:nth-child(3) {
  bottom: -5px;
  right: -5px;
}
.rs-selection > i:nth-child(4) {
  bottom: -5px;
  left: -5px;
}

.rs-selection-size {
  position: absolute;
  bottom: calc(100% + 6px);
  left: -1.5px;
  font:
    600 clamp(11px, 0.12em, 15px) / 1.3 "Services Poppins",
    Arial,
    sans-serif;
  letter-spacing: 0;
  white-space: nowrap;
}

.rs-selection-dims {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  translate: -50% 0;
  padding: 0.2em 0.55em;
  border-radius: 4px;
  background: #159fea;
  color: white;
  font:
    600 clamp(10px, 0.105em, 14px) / 1.3 "Services Poppins",
    Arial,
    sans-serif;
  letter-spacing: 0;
  white-space: nowrap;
}

.rs-collaborator {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  --collaborator-color: #159fea;
  color: var(--collaborator-color);
  pointer-events: none;
  filter: drop-shadow(0 3px 6px rgb(0 0 0 / 0.18));
}

.rs-collaborator > svg {
  flex: none;
  width: clamp(20px, 0.24em, 30px);
  height: auto;
  aspect-ratio: 22 / 26;
}

.rs-collaborator > span {
  margin: 0.95em 0 0 -0.35em;
  padding: 0.3em 0.7em;
  border-radius: 999px 999px 999px 4px;
  background: var(--collaborator-color);
  color: white;
  font:
    600 clamp(12px, 0.135em, 17px) / 1.25 "Services Poppins",
    Arial,
    sans-serif;
  letter-spacing: 0;
  white-space: nowrap;
}

.rs-collaborator--you > span {
  color: #1c1405;
}

.rs-collaborator--designer {
  top: 16%;
  right: -0.28em;
}

.rs-collaborator--you {
  bottom: 2%;
  left: 14%;
  --collaborator-color: #e5a700;
}

.rs-selection,
.rs-collaborator {
  opacity: 0;
  transition: opacity 200ms ease;
}

.rs-list > li[data-active="true"] .rs-selection,
.rs-list > li[data-active="true"] .rs-collaborator {
  opacity: 1;
}

.rs-list > li[data-active="true"] .rs-collaborator--designer {
  animation: rs-designer-cursor 5.6s ease-in-out infinite;
}

.rs-list > li[data-active="true"] .rs-collaborator--you {
  animation: rs-you-cursor 5.6s ease-in-out infinite;
}

@keyframes rs-designer-cursor {
  0%,
  100% {
    transform: translate(0, 0);
  }
  38% {
    transform: translate(-0.5em, 0.12em);
  }
  72% {
    transform: translate(-0.15em, 0.35em);
  }
}

@keyframes rs-you-cursor {
  0%,
  100% {
    transform: translate(0, 0);
  }
  42% {
    transform: translate(0.35em, -0.25em);
  }
  76% {
    transform: translate(0.7em, -0.1em);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rs-list > li[data-active="true"] .rs-collaborator {
    animation: none;
  }

  .rs-selection,
  .rs-collaborator {
    transition: none;
  }
}

@media (max-width: 767px) {
  .rs-collaborator > svg {
    width: 16px;
  }

  .rs-collaborator > span {
    margin: 10px 0 0 -4px;
    padding: 2px 6px;
    font-size: 10px;
  }

  .rs-selection-size {
    font-size: 9px;
  }

  .rs-selection-dims {
    font-size: 9px;
  }

  .rs-collaborator--designer {
    top: -0.12em;
    right: -0.45em;
  }

  .rs-collaborator--you {
    bottom: -0.06em;
    left: -0.4em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rs-brand-base::after {
    transition: none;
  }
}

/* Layered stickers with motion inside the drawing, tied to scroll selection. */
.rs-ai-artwork,
.rs-audit-artwork {
  width: 1.35em;
  height: 1.15em;
  overflow: visible;
}

.rs-ai-flow {
  stroke-dasharray: 5 24;
}

.rs-ai-core {
  transform-box: fill-box;
  transform-origin: center;
}

.rs-list > li[data-active="true"] .rs-ai-flow {
  animation: rs-ai-signal 2.8s linear infinite;
}

.rs-list > li[data-active="true"] .rs-ai-core {
  animation: rs-ai-breathe 2.8s ease-in-out infinite;
}

.rs-list > li[data-active="true"] .rs-audit-scan {
  animation: rs-audit-scan 3.2s ease-in-out infinite;
}

.rs-list > li[data-active="true"] .rs-audit-check {
  stroke-dasharray: 38;
  animation: rs-audit-check 3.2s ease-in-out infinite;
}

@keyframes rs-ai-signal {
  to {
    stroke-dashoffset: -58;
  }
}

@keyframes rs-ai-breathe {
  0%,
  100% {
    transform: scale(0.92);
  }
  50% {
    transform: scale(1.06);
  }
}

@keyframes rs-audit-scan {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0;
  }
  15%,
  75% {
    opacity: 0.5;
  }
  85% {
    transform: translateY(46px);
    opacity: 0;
  }
}

@keyframes rs-audit-check {
  0%,
  12% {
    stroke-dashoffset: 38;
  }
  36%,
  88% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: 38;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rs-list
    > li[data-active="true"]
    :is(.rs-ai-flow, .rs-ai-core, .rs-audit-scan, .rs-audit-check) {
    animation: none;
  }

  .rs-audit-scan {
    opacity: 0;
  }
}

/* "3D" written in 3D: stacked copies pushed back along Z form a real
   extrusion, so the depth stays correct while the word turns. When the row
   becomes active the word flies in from the back, lands, then keeps swaying. */
.rs-3d-scene {
  position: relative;
  display: inline-block;
  perspective: 4.5em;
}

/* Soft contact shadow, breathing with the word's height. */
.rs-3d-scene::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -0.02em;
  height: 0.14em;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    color-mix(in srgb, var(--fps-ink) 32%, transparent),
    transparent
  );
  transform: translateZ(-1em);
  z-index: -1;
  opacity: 0;
}

.rs-3d-word {
  display: inline-grid;
  transform: rotateX(12deg) rotateY(-30deg);
  transform-style: preserve-3d;
  font-family: "Services Poppins", "Mulish", Arial, sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Side walls: dark gold near the face, fading into ink at the back. */
.rs-3d-word > span {
  grid-area: 1 / 1;
  color: color-mix(
    in srgb,
    var(--fps-accent) calc(62% - var(--i) * 2.6%),
    var(--fps-ink)
  );
  transform: translateZ(calc(var(--i) * -0.017em));
}

.rs-3d-word > span:last-child {
  -webkit-text-stroke: 0.022em var(--fps-ink);
}

/* Front face: lit gold with an ink outline. */
.rs-3d-word > span:first-child {
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--fps-accent) 55%, #fff) 0%,
    var(--fps-accent) 48%,
    color-mix(in srgb, var(--fps-accent) 82%, var(--fps-ink)) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 0.022em var(--fps-ink);
  paint-order: stroke fill;
}

.rs-list > li[data-active="true"] .rs-3d-word {
  animation:
    rs-3d-enter 1.1s cubic-bezier(0.16, 1, 0.3, 1) both,
    rs-3d-turn 5s ease-in-out 1.1s infinite;
}

.rs-list > li[data-active="true"] .rs-3d-scene::after {
  animation:
    rs-3d-shadow-in 1.1s cubic-bezier(0.16, 1, 0.3, 1) both,
    rs-3d-shadow 5s ease-in-out 1.1s infinite;
}

@keyframes rs-3d-enter {
  0% {
    transform: translate3d(0, -0.35em, -3.5em) rotateX(55deg) rotateY(-200deg)
      scale(0.6);
  }
  70% {
    transform: translate3d(0, 0.04em, 0) rotateX(8deg) rotateY(-22deg)
      scale(1.04);
  }
  100% {
    transform: rotateX(12deg) rotateY(-30deg);
  }
}

@keyframes rs-3d-turn {
  0%,
  100% {
    transform: rotateX(12deg) rotateY(-30deg);
  }
  50% {
    transform: translate3d(0, -0.05em, 0) rotateX(-6deg) rotateY(30deg);
  }
}

@keyframes rs-3d-shadow-in {
  from {
    opacity: 0;
    transform: translateZ(-1em) scaleX(0.3);
  }
  to {
    opacity: 1;
    transform: translateZ(-1em);
  }
}

@keyframes rs-3d-shadow {
  0%,
  100% {
    opacity: 1;
    transform: translateZ(-1em);
  }
  50% {
    opacity: 0.6;
    transform: translateZ(-1em) scaleX(0.85);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rs-list > li[data-active="true"] .rs-3d-word,
  .rs-list > li[data-active="true"] .rs-3d-scene::after {
    animation: none;
  }

  .rs-list > li[data-active="true"] .rs-3d-scene::after {
    opacity: 1;
  }
}
