/* ======================================================
   SERVICES — EDITORIAL MANGA SHOWCASE
====================================================== */

.services-reveal-frame {
  --services-paper-cut: polygon(
    0 2.1%, 5% 0.9%, 11% 2.3%, 18% 0.7%, 26% 1.9%, 34% 0.6%,
    43% 2.2%, 52% 0.8%, 61% 1.8%, 70% 0.5%, 79% 2.1%, 88% 0.9%,
    95% 2%, 100% 1.1%, 100% 98.1%, 94% 99.2%, 87% 97.8%, 79% 99.4%,
    70% 98%, 62% 99.1%, 53% 97.7%, 44% 99.3%, 35% 98%, 26% 99.4%,
    18% 97.9%, 10% 99.2%, 4% 98.1%, 0 99%
  );
  position: relative;
  isolation: isolate;
}

.services-section {
  --services-ink: rgb(var(--theme-ink-rgb));
  --services-paper: rgb(var(--theme-paper-rgb));
  --services-purple: rgb(var(--theme-primary-rgb));
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  min-height: max(800px, 92svh);
  overflow: hidden;
  clip-path: var(--services-paper-cut);
  color: var(--services-ink);
  background-color: var(--services-paper);
  background-image:
    linear-gradient(120deg, rgb(var(--theme-text-rgb) / 0.74), rgb(var(--theme-paper-rgb) / 0.54)),
    url("../Assets/Services Section/Reference/paper-texture.webp");
  background-size: cover, 640px auto;
  background-repeat: no-repeat, repeat;
  font-family: var(--font-dm-sans);
}

.services-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    url("../Assets/Services Section/Reference/halftone.svg") 4% 34% / 220px auto no-repeat,
    radial-gradient(ellipse at 0 82%, rgb(var(--theme-primary-rgb) / 0.16) 0 1%, transparent 27%),
    radial-gradient(circle at 19% 49%, rgb(var(--theme-ink-rgb) / 0.03) 0 1px, transparent 1.5px),
    radial-gradient(circle at 23% 55%, rgb(var(--theme-primary-rgb) / 0.08) 0 1px, transparent 2px),
    linear-gradient(165deg, transparent 0 78%, rgb(var(--theme-ink-rgb) / 0.04) 78.2% 78.4%, transparent 78.6%);
  background-size: 220px auto, auto, 13px 13px, 17px 17px, auto;
  background-blend-mode: multiply, normal, normal, normal, normal;
  opacity: 0.13;
  pointer-events: none;
}

.services-section .services-ink-layer {
  position: absolute;
  left: -5%;
  bottom: -17%;
  z-index: 1;
  width: 52%;
  height: 82%;
  background: url("../Assets/Services Section/BG-behind-character.webp") left bottom / contain no-repeat;
  opacity: 0;
  translate: -28px 16px;
  pointer-events: none;
  will-change: opacity, translate;
}

.services-section .services-speed-lines {
  position: absolute;
  top: -2%;
  right: -1%;
  z-index: 1;
  width: min(31vw, 600px);
  height: min(24vh, 260px);
  background: repeating-linear-gradient(
    155deg,
    transparent 0 13px,
    rgb(var(--theme-ink-rgb) / 0.34) 13px 15px,
    transparent 15px 21px
  );
  clip-path: polygon(25% 0, 100% 0, 100% 100%, 78% 56%, 42% 28%);
  opacity: 0.42;
  pointer-events: none;
}

/* Title lockup */

.services-section .services-heading {
  position: absolute;
  top: clamp(54px, 6.2vh, 76px);
  left: clamp(50px, 4.8vw, 92px);
  z-index: 8;
  width: min(37vw, 680px);
  margin: 0;
  pointer-events: none;
}

.services-section .services-title {
  position: relative;
  width: max-content;
  margin: 0;
  padding: 0 0 clamp(44px, 4.5vw, 74px);
  white-space: nowrap;
}

.services-section .title-main {
  position: relative;
  z-index: 1;
  display: block;
  color: var(--services-ink);
  font-family: var(--font-bebas-neue);
  font-size: clamp(8rem, 10.8vw, 12.5rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 0.74;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 rgb(var(--theme-ink-rgb) / 0.12);
  transform: translateY(8px) rotate(-2deg) skewX(-4deg);
  transform-origin: left bottom;
}

.services-section .title-main::after {
  content: "";
  position: absolute;
  inset: 8% 0 2%;
  background:
    radial-gradient(circle, rgb(var(--theme-text-rgb) / 0.23) 0 1px, transparent 1.5px),
    linear-gradient(96deg, transparent 0 18%, rgb(var(--theme-text-rgb) / 0.14) 18% 19%, transparent 19% 64%, rgb(var(--theme-text-rgb) / 0.12) 64% 65%, transparent 65%);
  background-size: 7px 7px, auto;
  mix-blend-mode: screen;
  opacity: 0.52;
  pointer-events: none;
}

.services-section .title-script {
  position: absolute;
  right: 0.05em;
  bottom: 0.05em;
  z-index: 3;
  color: var(--services-purple);
  font-family: var(--font-caveat);
  font-size: clamp(3rem, 4vw, 5rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.86;
  text-transform: none;
  transform: rotate(-4deg);
}

.services-section .services-title::after {
  content: "";
  position: absolute;
  right: -0.02em;
  bottom: -6px;
  z-index: 2;
  width: 43%;
  height: clamp(6px, 0.6vw, 11px);
  background: var(--services-purple);
  clip-path: polygon(0 35%, 100% 0, 96% 70%, 4% 100%);
  transform: rotate(-4deg);
}

/* Character */

.services-section .character-wrap {
  position: absolute;
  left: clamp(-18px, 0.5vw, 12px);
  bottom: -1px;
  z-index: 5;
  display: grid;
  grid-template-areas: "character";
  align-items: end;
  height: min(78vh, 780px);
  aspect-ratio: 1700 / 2240;
  pointer-events: none;
}

.services-section .character {
  grid-area: character;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom left;
}

.services-section .character-blink {
  z-index: 2;
  opacity: 0;
  animation: services-blink 5.4s infinite;
}

@keyframes services-blink {
  0%, 94%, 100% { opacity: 0; }
  95%, 98% { opacity: 1; }
}

/* Manga service panels */

.services-section .cards {
  position: absolute;
  top: clamp(124px, 13.5vh, 154px);
  right: clamp(42px, 4vw, 78px);
  z-index: 9;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(12px, 1vw, 19px);
  width: min(61vw, 1180px);
  height: min(64vh, 650px);
}

.services-section .card-shell {
  --panel-rotate: 0deg;
  --panel-skew: 0deg;
  position: relative;
  min-width: 0;
  height: 100%;
  transform: rotate(var(--panel-rotate)) skewY(var(--panel-skew));
  transform-origin: center bottom;
}

.services-section .card-shell::before {
  content: "";
  position: absolute;
  inset: 7px -7px -6px 7px;
  z-index: 0;
  border: 1.5px solid rgb(var(--theme-ink-rgb) / 0.78);
  background: rgb(var(--theme-paper-rgb) / 0.62);
  clip-path: polygon(0 0, 83% 0, 100% 7%, 100% 91%, 91% 100%, 0 100%);
  pointer-events: none;
}

.services-section .card-shell::after {
  content: "";
  position: absolute;
  top: 9%;
  right: -10px;
  bottom: 10%;
  z-index: 0;
  width: 5px;
  background: repeating-linear-gradient(165deg, var(--services-ink) 0 2px, transparent 2px 6px);
  opacity: 0.62;
  pointer-events: none;
}

.services-section .card-shell0 {
  --panel-rotate: -0.75deg;
  --panel-skew: -0.16deg;
}

.services-section .card-shell1 {
  --panel-rotate: 0.48deg;
  --panel-skew: 0.12deg;
  margin-top: 4px;
}

.services-section .card-shell2 {
  --panel-rotate: -0.38deg;
  --panel-skew: -0.1deg;
  margin-top: 7px;
}

.services-section .card-shell3 {
  --panel-rotate: 0.52deg;
  --panel-skew: 0.14deg;
  margin-top: 2px;
}

.services-reveal-frame > .services-reveal-wipe {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background: rgb(var(--theme-bg-rgb));
  border: 0;
  outline: 0;
  box-shadow: -3px 0 0 rgb(var(--theme-bg-rgb));
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  will-change: transform;
}

.services-section .card-shell4 {
  --panel-rotate: -0.44deg;
  --panel-skew: -0.12deg;
  margin-top: 6px;
}

.services-section .card {
  --card-accent: var(--services-card-accent);
  --card-accent-rgb: var(--services-card-accent-rgb);
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: minmax(220px, 47%) minmax(0, 1fr) 58px;
  box-sizing: border-box;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  color: var(--services-ink);
  background-color: rgb(var(--theme-paper-rgb));
  background-image:
    linear-gradient(rgb(var(--theme-paper-rgb) / 0.88), rgb(var(--theme-paper-rgb) / 0.88)),
    url("../Assets/Services Section/Reference/paper-texture.webp");
  background-size: auto, 420px auto;
  border: 2px solid var(--services-ink);
  clip-path: polygon(0 0, 83% 0, 100% 7%, 100% 91%, 91% 100%, 0 100%);
  filter: drop-shadow(2px 3px 0 rgb(var(--theme-ink-rgb) / 0.18));
  text-decoration: none;
  cursor: pointer;
  transition: translate 260ms cubic-bezier(0.22, 1, 0.36, 1), filter 260ms ease;
}

.services-section .card::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 5;
  width: 44px;
  height: 44px;
  background:
    linear-gradient(135deg, transparent 0 45%, var(--services-ink) 46% 50%, transparent 51%),
    repeating-linear-gradient(135deg, var(--card-accent) 0 4px, var(--services-ink) 4px 6px, var(--card-accent) 6px 10px);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.services-section .card::after {
  content: "";
  position: absolute;
  right: 0;
  top: 15%;
  bottom: 11%;
  z-index: 5;
  width: 5px;
  background: repeating-linear-gradient(165deg, var(--services-ink) 0 2px, transparent 2px 6px);
  opacity: 0.7;
}

.services-section .card-media,
.services-section .card-copy,
.services-section .card-action,
.services-section .card-sfx {
  position: relative;
  z-index: 2;
}

.services-section .card-media {
  grid-row: 1;
  display: block;
  min-height: 0;
  overflow: hidden;
  background: rgb(var(--theme-paper-rgb));
}

.services-section .card-media::before {
  content: "";
  position: absolute;
  right: -2%;
  bottom: 0;
  left: -2%;
  z-index: 3;
  height: 28px;
  background-color: var(--card-accent);
  background-image: radial-gradient(circle, rgb(var(--theme-ink-rgb) / 0.78) 0 1.2px, transparent 1.5px);
  background-size: 5px 5px;
  clip-path: polygon(0 0, 100% 54%, 100% 100%, 0 46%);
  pointer-events: none;
}

.services-section .card-media::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  width: 38%;
  height: 48px;
  background-color: var(--card-accent);
  background-image: radial-gradient(circle, rgb(var(--theme-ink-rgb) / 0.34) 0 1px, transparent 1.3px);
  background-size: 5px 5px;
  clip-path: polygon(0 0, 100% 0, 58% 100%, 0 100%);
  pointer-events: none;
}

.services-section .card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(1) saturate(0) contrast(1.06) brightness(0.96);
  clip-path: polygon(0 0, 100% 0, 100% 92%, 0 82%);
  transform: scale(1.02);
  transition: filter 260ms ease, transform 340ms cubic-bezier(0.22, 1, 0.36, 1);
}

.services-section .card0 .card-media img,
.services-section .card1 .card-media img,
.services-section .card2 .card-media img,
.services-section .card3 .card-media img,
.services-section .card4 .card-media img {
  padding: 0;
  object-fit: cover;
  object-position: center;
  transform: scale(1.02);
  transform-origin: center;
}

.services-section .card1 .card-media img {
  object-position: center 30%;
}

.services-section .card2 .card-media img {
  object-position: center 38%;
}

.services-section .card-copy {
  grid-row: 2;
  align-self: stretch;
  display: grid;
  align-content: start;
  min-width: 0;
  padding: clamp(20px, 1.75vw, 31px) clamp(18px, 1.45vw, 27px) 12px;
}

.services-section .card-title {
  position: relative;
  display: block;
  min-height: 1.8em;
  color: var(--services-ink);
  font-family: var(--font-bangers);
  font-size: clamp(1.45rem, 1.65vw, 2.2rem);
  font-weight: 400;
  letter-spacing: 0.015em;
  line-height: 0.9;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  transition: color 220ms ease;
}

.services-section .card-title::after {
  content: "";
  display: block;
  width: 82%;
  height: 2px;
  margin-top: clamp(14px, 1.35vh, 20px);
  background: linear-gradient(90deg, transparent 0 18px, var(--card-accent) 18px, rgb(var(--card-accent-rgb) / 0.05) 100%);
}

.services-section .card-title::before {
  content: "";
  position: absolute;
  top: calc(1.8em + clamp(11px, 1.1vh, 17px));
  left: 3px;
  width: 7px;
  height: 7px;
  background: var(--card-accent);
  transform: rotate(45deg);
}

.services-section .card0 .card-title::before {
  top: calc(0.9em + clamp(11px, 1.1vh, 17px));
}

.services-section .card-text {
  display: block;
  max-width: 26ch;
  margin-top: clamp(14px, 1.6vh, 22px);
  color: rgb(var(--theme-ink-rgb) / 0.78);
  font-family: var(--font-dm-sans);
  font-size: clamp(0.72rem, 0.77vw, 0.9rem);
  font-weight: 500;
  line-height: 1.48;
}

.services-section .card-action {
  grid-row: 3;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 1.45vw, 27px);
  color: var(--card-accent);
  text-transform: uppercase;
}

.services-section .card-action span {
  font-family: var(--font-bangers);
  font-size: clamp(0.92rem, 0.95vw, 1.15rem);
  letter-spacing: 0.04em;
}

.services-section .card-action strong {
  display: block;
  font-family: var(--font-barlow-condensed);
  font-size: clamp(2rem, 2.25vw, 2.8rem);
  font-weight: 700;
  line-height: 0.8;
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.services-section .card-sfx {
  display: none;
}

/* The supplied panel artwork is the desktop card frame. */
@media (min-width: 769px) {
  .services-section .card-shell::before,
  .services-section .card-shell::after {
    display: none;
  }

  .services-section .card {
    overflow: visible;
    background: transparent;
    border: 0;
    clip-path: none;
    filter: drop-shadow(4px 7px 0 rgb(var(--theme-ink-rgb) / 0.13));
  }

  .services-section .card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    width: auto;
    height: auto;
    background: url("../Assets/Services Section/pannel.webp") center / 100% 100% no-repeat;
    clip-path: none;
    pointer-events: none;
  }

  .services-section .card::after,
  .services-section .card-media::before,
  .services-section .card-media::after {
    display: none;
  }

  .services-section .card-media {
    position: absolute;
    top: 4.1%;
    right: 5.3%;
    left: 3.8%;
    z-index: 1;
    height: 44.5%;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 87%);
  }

  .services-section .card-media img {
    clip-path: none;
  }

  .services-section .card-copy,
  .services-section .card-action {
    z-index: 4;
  }

  .services-section .card-action {
    top: -10px;
  }

  .services-section .card-action strong {
    position: relative;
    right: 14px;
  }
}

@media (hover: hover) {
  .services-section .card:hover {
    translate: 0 -8px;
    filter: drop-shadow(10px 14px 0 rgb(var(--theme-ink-rgb) / 0.14));
  }

  .services-section .card:hover .card-title {
    color: var(--card-accent);
  }

  .services-section .card:hover .card-media img {
    filter: grayscale(0) saturate(1.08) contrast(1.06) brightness(1);
    transform: scale(1.075);
  }

  .services-section .card:hover .card-action strong {
    transform: translateX(6px);
  }
}

.services-section .card:focus-visible {
  outline: 4px solid var(--card-accent);
  outline-offset: 5px;
  translate: 0 -7px;
}

.services-section .card:focus-visible .card-media img,
.services-section .card.is-tap-active .card-media img {
  filter: grayscale(0) saturate(1.08) contrast(1.06) brightness(1);
}

.services-section .card.is-tap-active .card-title {
  color: var(--card-accent);
}

.services-section .card.is-tap-active .card-action strong {
  transform: translateX(6px);
}

/* Expanded branding preview */

body.service-preview-open {
  overflow: hidden;
}

.service-preview[hidden] {
  display: none;
}

.service-preview {
  --services-ink: rgb(var(--theme-ink-rgb));
  --services-purple: rgb(var(--theme-primary-rgb));
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: clamp(18px, 3vw, 48px);
  color: var(--services-ink);
  font-family: var(--font-dm-sans);
}

.service-preview__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgb(var(--theme-bg-deep-rgb) / 0.8);
  -webkit-backdrop-filter: blur(4px) saturate(0.72);
  backdrop-filter: blur(4px) saturate(0.72);
  cursor: pointer;
  opacity: 0;
  transition: opacity 280ms ease;
}

.service-preview__panel {
  --preview-origin-x: 50%;
  --preview-origin-y: 50%;
  position: relative;
  z-index: 1;
  display: grid;
  box-sizing: border-box;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  width: min(1160px, calc(100vw - 48px));
  max-height: min(760px, calc(100dvh - 48px));
  overflow: auto;
  color: var(--services-ink);
  background-color: rgb(var(--theme-paper-rgb));
  background-image:
    linear-gradient(rgb(var(--theme-text-rgb) / 0.74), rgb(var(--theme-paper-rgb) / 0.68)),
    url("../Assets/Services Section/Reference/paper-texture.webp");
  background-size: cover, 560px auto;
  border: 3px solid var(--services-ink);
  clip-path: polygon(0 0, 96% 0, 100% 7%, 100% 100%, 3% 100%, 0 94%);
  filter: drop-shadow(18px 24px 0 rgb(var(--theme-shadow-rgb) / 0.32));
  opacity: 0;
  transform: scale(0.36) rotate(-1.5deg);
  transform-origin: var(--preview-origin-x) var(--preview-origin-y);
  transition:
    opacity 260ms ease,
    transform 440ms cubic-bezier(0.16, 1, 0.3, 1);
}

.service-preview.is-open .service-preview__backdrop {
  opacity: 1;
}

.service-preview.is-open .service-preview__panel {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.service-preview__panel::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 4;
  width: 160px;
  height: 13px;
  background: var(--services-purple);
  clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
  pointer-events: none;
}

.service-preview--poster .service-preview__panel::after {
  display: none;
}

.service-preview__close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 8;
  width: 48px;
  height: 48px;
  padding: 0;
  color: rgb(var(--theme-text-rgb));
  background: var(--services-ink);
  border: 2px solid var(--services-ink);
  cursor: pointer;
  transform: rotate(2deg);
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.service-preview__close span {
  position: absolute;
  top: 21px;
  left: 11px;
  width: 24px;
  height: 3px;
  background: currentColor;
}

.service-preview__close span:first-child { transform: rotate(45deg); }
.service-preview__close span:last-child { transform: rotate(-45deg); }

.service-preview__close:hover,
.service-preview__close:focus-visible {
  color: var(--services-ink);
  background: var(--services-purple);
  transform: rotate(-2deg);
}

.service-preview__close:focus-visible {
  outline: 3px solid rgb(var(--theme-text-rgb));
  outline-offset: 3px;
}

.service-preview--3d .service-preview__close {
  top: 24px;
  right: 32px;
  transform: none;
}

.service-preview--3d .service-preview__close span {
  top: 50%;
  left: 50%;
  width: 24px;
  transform-origin: center;
}

.service-preview--3d .service-preview__close span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.service-preview--3d .service-preview__close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.service-preview--3d .service-preview__close:hover,
.service-preview--3d .service-preview__close:focus-visible {
  transform: none;
}

.service-preview__hero {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 650px;
  margin: 0;
  padding: 42px 34px 26px;
  overflow: hidden;
  color: rgb(var(--theme-text-rgb));
  background:
    linear-gradient(135deg, transparent 0 48%, rgb(var(--theme-primary-rgb) / 0.2) 48% 50%, transparent 50%),
    radial-gradient(circle at 76% 20%, rgb(var(--theme-primary-rgb) / 0.38), transparent 27%),
    rgb(var(--theme-bg-deep-rgb));
}

.service-preview__hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgb(var(--theme-text-rgb) / 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--theme-text-rgb) / 0.055) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: linear-gradient(135deg, rgb(var(--theme-shadow-rgb)), transparent 78%);
  mask-image: linear-gradient(135deg, rgb(var(--theme-shadow-rgb)), transparent 78%);
  pointer-events: none;
}

.service-preview__hero-frame {
  position: relative;
  align-self: center;
  display: grid;
  place-items: center;
  min-height: 470px;
  border: 2px solid rgb(var(--theme-text-rgb) / 0.72);
  clip-path: polygon(0 7%, 8% 0, 100% 0, 100% 92%, 92% 100%, 0 100%);
  background:
    radial-gradient(circle, rgb(var(--theme-text-rgb) / 0.12) 0 1px, transparent 1.5px),
    rgb(var(--theme-text-rgb) / 0.03);
  background-size: 9px 9px, auto;
}

#branding-preview .service-preview__hero-frame {
  background: rgb(var(--theme-text-rgb));
  border-color: rgb(var(--theme-ink-rgb) / 0.28);
}

#branding-preview .service-preview__hero-logo {
  width: min(76%, 520px);
  max-height: 300px;
  object-fit: contain;
  filter: none;
}

#branding-preview .service-preview__hero-logo.is-monochrome {
  filter: brightness(0) contrast(1.15);
}

.service-preview__hero-frame::before,
.service-preview__hero-frame::after {
  content: "";
  position: absolute;
  width: 44%;
  height: 8px;
  background: var(--services-purple);
}

.service-preview__hero-frame::before { top: 0; right: 0; }
.service-preview__hero-frame::after { bottom: 0; left: 0; }

.service-preview__hero-frame img {
  display: block;
  width: min(92%, 560px);
  height: auto;
  filter: drop-shadow(0 22px 34px rgb(var(--theme-primary-rgb) / 0.22));
}

.service-preview__hero figcaption {
  position: relative;
  z-index: 2;
  margin-top: 18px;
  font-family: var(--font-rajdhani);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.service-preview__content {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-width: 0;
  padding: clamp(54px, 5vw, 82px) clamp(32px, 4vw, 62px) 42px;
}

.service-preview__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 15px;
  color: var(--services-purple);
  font-family: var(--font-rajdhani);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.service-preview__eyebrow::before {
  content: "";
  width: 28px;
  height: 5px;
  background: repeating-linear-gradient(110deg, var(--services-purple) 0 3px, transparent 3px 7px);
}

.service-preview--poster .service-preview__eyebrow::before {
  display: none;
}

.service-preview__content h2 {
  margin: 0;
  font-family: var(--font-bebas-neue);
  font-size: clamp(4.4rem, 6.4vw, 7.2rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 0.82;
  text-transform: uppercase;
}

.service-preview__description {
  max-width: 44ch;
  margin: 28px 0 0;
  color: rgb(var(--theme-ink-rgb) / 0.76);
  font-family: var(--font-dm-sans);
  font-size: clamp(0.86rem, 1vw, 1rem);
  font-weight: 500;
  line-height: 1.65;
}

.service-preview__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.service-preview__meta span {
  padding: 7px 11px 6px;
  color: rgb(var(--theme-text-rgb));
  background: var(--services-ink);
  font-family: var(--font-rajdhani);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: skewX(-4deg);
}

.service-preview__logos {
  margin-top: auto;
  padding-top: 34px;
}

.service-preview__logos-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--services-ink);
}

.service-preview__logos-heading h3 {
  margin: 0;
  font-family: var(--font-bangers);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.service-preview__logos-heading span {
  color: rgb(var(--theme-ink-rgb) / 0.52);
  font-family: var(--font-rajdhani);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.service-preview__logo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.service-preview__logo-grid figure,
.service-preview__logo-tab,
.service-preview__poster-tab,
.service-preview__render-tab {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  min-width: 0;
  height: 104px;
  margin: 0;
  padding: 20px;
  overflow: hidden;
  background: rgb(var(--theme-text-rgb) / 0.82);
  border: 1.5px solid rgb(var(--theme-ink-rgb) / 0.32);
  clip-path: polygon(0 0, 91% 0, 100% 16%, 100% 100%, 0 100%);
}

.service-preview__logo-grid figure:nth-child(2),
.service-preview__logo-grid figure:nth-child(3),
.service-preview__logo-tab:nth-child(2),
.service-preview__logo-tab:nth-child(3),
.service-preview__poster-tab:nth-child(2),
.service-preview__poster-tab:nth-child(3),
.service-preview__render-tab:nth-child(2),
.service-preview__render-tab:nth-child(3) {
  background: rgb(var(--theme-primary-rgb) / 0.08);
}

.service-preview__logo-tab,
.service-preview__poster-tab,
.service-preview__render-tab {
  width: 100%;
  font: inherit;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.service-preview__logo-tab:hover {
  border-color: var(--services-purple);
  background: rgb(var(--theme-primary-rgb) / 0.13);
}

.service-preview__logo-tab:focus-visible {
  outline: 3px solid var(--services-purple);
  outline-offset: 3px;
}

.service-preview__logo-tab[aria-selected="true"] {
  border-color: var(--services-purple);
  background: rgb(var(--theme-primary-rgb) / 0.16);
  box-shadow: inset 5px 0 0 var(--services-purple);
}

.service-preview__poster-tab:hover {
  border-color: var(--services-purple);
}

.service-preview__poster-tab:hover img {
  opacity: 0.86;
}

.service-preview__poster-tab:focus-visible {
  outline: 3px solid var(--services-purple);
  outline-offset: 3px;
}

.service-preview__poster-tab[aria-selected="true"] {
  border: 3px solid var(--services-purple);
}

.service-preview__render-tab:hover {
  border-color: var(--services-purple);
}

.service-preview__render-tab:hover img {
  opacity: 0.84;
}

.service-preview__render-tab:focus-visible {
  outline: 3px solid var(--services-purple);
  outline-offset: 3px;
}

.service-preview__logo-grid img {
  display: block;
  max-width: 100%;
  max-height: 58px;
  width: auto;
  height: auto;
  filter: brightness(0) contrast(1.15);
}

.service-preview__logo-grid--images figure,
.service-preview__logo-grid--images .service-preview__poster-tab,
.service-preview__logo-grid--images .service-preview__render-tab {
  height: 118px;
  padding: 0;
  background: rgb(var(--theme-surface-raised-rgb));
}

.service-preview__logo-grid--images figure:nth-child(2),
.service-preview__logo-grid--images figure:nth-child(3) {
  background: rgb(var(--theme-surface-raised-rgb));
}

.service-preview__logo-grid--images img {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  object-fit: cover;
  filter: none;
  transition: opacity 180ms ease;
}

.service-preview--poster .service-preview__hero-frame img,
.service-preview--ai .service-preview__hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-preview--poster .service-preview__hero-frame img {
  filter: none;
}

@media (min-width: 821px) {
  .service-preview--poster .service-preview__panel {
    width: min(1240px, calc(100vw - 64px));
    overflow: hidden;
  }

  .service-preview--poster .service-preview__close {
    right: 32px;
  }

  .service-preview--poster .service-preview__description,
  .service-preview--poster .service-preview__meta,
  .service-preview--poster .service-preview__logos {
    transform: translateY(-18px);
  }

  .service-preview--poster .service-preview__hero-frame {
    width: min(92%, 520px);
    min-height: 440px;
    justify-self: center;
    transform: translateY(-16px);
  }

  .service-preview--poster .service-preview__logo-grid--images {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    width: min(100%, 410px);
  }

  .service-preview--poster .service-preview__logo-grid--images figure,
  .service-preview--poster .service-preview__logo-grid--images .service-preview__poster-tab {
    height: 104px;
  }
}

.service-preview--3d .service-preview__content h2 span {
  display: block;
}

.service-preview--3d .service-preview__content h2 {
  font-size: clamp(3.75rem, 5vw, 5.6rem);
}

.service-preview--3d .service-preview__content h2 span:first-child {
  white-space: nowrap;
}

.service-preview--3d .service-preview__marmoset-frame {
  min-height: 470px;
  overflow: hidden;
  background: rgb(var(--theme-ink-rgb));
}

.service-preview--3d .service-preview__marmoset-frame iframe {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
}

.service-preview--3d .service-preview__hero figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 18px;
}

.service-preview__render-card {
  position: relative;
}

.service-preview__render-card.is-selected {
  border-color: var(--services-purple);
  box-shadow: inset 0 0 0 2px var(--services-purple);
}

.service-preview__render-card.is-selected::after {
  content: "SELECTED";
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 7px 3px;
  color: rgb(var(--theme-text-rgb));
  background: var(--services-purple);
  font-family: var(--font-rajdhani);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.service-preview__render-card.is-selected .service-preview__render-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 10px 8px;
  color: rgb(var(--theme-text-rgb));
  background: linear-gradient(transparent, rgb(var(--theme-bg-deep-rgb) / 0.92));
  font-family: var(--font-rajdhani);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.service-preview__render-card.is-selected .service-preview__render-caption span {
  color: rgb(var(--theme-primary-rgb));
}

.service-preview__render-tab:not(.is-selected) .service-preview__render-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 10px 8px;
  color: rgb(var(--theme-text-rgb));
  background: linear-gradient(transparent, rgb(var(--theme-bg-deep-rgb) / 0.92));
  font-family: var(--font-rajdhani);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.service-preview__render-tab:not(.is-selected) .service-preview__render-caption span {
  color: rgb(var(--theme-primary-rgb));
}

.service-preview__logo-grid--images .service-preview__render-card.is-empty,
.service-preview__logo-grid--images .service-preview__render-card.is-empty:nth-child(2),
.service-preview__logo-grid--images .service-preview__render-card.is-empty:nth-child(3) {
  grid-template-columns: auto 1fr;
  place-items: center start;
  gap: 12px;
  padding: 16px;
  color: rgb(var(--theme-ink-rgb) / 0.42);
  background:
    linear-gradient(135deg, transparent 0 48%, rgb(var(--theme-primary-rgb) / 0.09) 48% 50%, transparent 50%),
    rgb(var(--theme-primary-rgb) / 0.055);
  border-style: dashed;
}

.service-preview__render-card.is-empty .service-preview__render-number {
  font-family: var(--font-bebas-neue);
  font-size: 2rem;
  line-height: 1;
}

.service-preview__render-card.is-empty figcaption {
  font-family: var(--font-rajdhani);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

@media (min-width: 821px) {
  .service-preview--3d {
    padding: 20px;
  }

  .service-preview--3d .service-preview__panel {
    grid-template-columns: minmax(0, 1.12fr) minmax(430px, 0.88fr);
    width: min(1280px, calc(100vw - 40px));
    height: min(800px, calc(100dvh - 40px));
    max-height: none;
    overflow: hidden;
  }

  .service-preview--3d .service-preview__hero {
    box-sizing: border-box;
    min-height: 0;
    height: 100%;
    padding: clamp(28px, 3.8vh, 42px) clamp(26px, 2.5vw, 36px) clamp(20px, 2.8vh, 28px);
  }

  .service-preview--3d .service-preview__marmoset-frame {
    min-height: 0;
    height: 100%;
  }

  .service-preview--3d .service-preview__content {
    height: 100%;
    padding: clamp(34px, 5vh, 54px) clamp(34px, 3.5vw, 52px) clamp(24px, 3vh, 34px);
  }

  .service-preview--3d .service-preview__description {
    margin-top: clamp(17px, 2.4vh, 24px);
  }

  .service-preview--3d .service-preview__meta {
    margin-top: clamp(15px, 2.2vh, 21px);
  }

  .service-preview--3d .service-preview__logos {
    padding-top: clamp(17px, 2.6vh, 26px);
  }

  .service-preview--3d .service-preview__logo-grid--images figure,
  .service-preview--3d .service-preview__logo-grid--images .service-preview__render-tab {
    height: clamp(82px, 11.5vh, 106px);
  }
}

.service-preview--ai .service-preview__hero {
  grid-template-rows: minmax(0, 1fr);
}

.service-preview--ai .service-preview__hero-frame {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: rgb(var(--theme-paper-rgb));
}

.service-preview--ai .service-preview__hero-frame img {
  object-fit: contain;
  filter: none;
}

.service-preview--ai .service-preview__content {
  justify-content: center;
}

.service-preview--frontend .service-preview__hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 820px) {
  .service-preview {
    padding: 12px;
  }

  .service-preview__panel {
    display: block;
    width: calc(100vw - 24px);
    min-width: 0;
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
  }

  .service-preview__hero {
    min-height: 360px;
    padding: 30px 24px 20px;
  }

  .service-preview__hero-frame {
    min-height: 285px;
  }

  .service-preview__hero-frame img {
    width: min(82%, 430px);
  }

  .service-preview__content {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 42px 24px 34px;
  }

  .service-preview--3d .service-preview__content h2 {
    font-size: clamp(3.2rem, 16vw, 4.5rem);
  }

  .service-preview--3d .service-preview__marmoset-frame {
    min-height: 0;
    height: auto;
    aspect-ratio: 4 / 5;
  }

  .service-preview__description {
    width: 100%;
    overflow-wrap: anywhere;
  }

  .service-preview__logos {
    margin-top: 32px;
    padding-top: 0;
  }
}

@media (max-width: 430px) {
  .service-preview__hero {
    min-height: 300px;
  }

  .service-preview__hero-frame {
    min-height: 230px;
  }

  .service-preview__close {
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
  }

  .service-preview__close span {
    top: 19px;
    left: 9px;
  }

  .service-preview__content h2 {
    font-size: clamp(4rem, 23vw, 5.6rem);
  }

  .service-preview__logo-grid figure,
  .service-preview__logo-tab,
  .service-preview__poster-tab,
  .service-preview__render-tab {
    height: 90px;
    padding: 15px;
  }

  .service-preview__logo-grid--images figure,
  .service-preview__logo-grid--images .service-preview__poster-tab,
  .service-preview__logo-grid--images .service-preview__render-tab {
    height: 100px;
    padding: 0;
  }
}

/* Scroll reveal */

.services-section.is-reveal-pending .title,
.services-section.is-reveal-pending .character-wrap,
.services-section.is-reveal-pending .card {
  opacity: 0;
}

.services-section.is-reveal-pending .title {
  translate: -24px 0;
}

.services-section.is-reveal-pending .character-wrap {
  translate: -38px 0;
}

.services-section.is-reveal-pending .card {
  translate: 30px 0;
}

.services-section.is-revealed .title,
.services-section.is-revealed .character-wrap {
  animation: services-subject-in 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.services-reveal-frame.is-revealed > .services-reveal-wipe {
  animation: services-paper-reveal 680ms cubic-bezier(0.76, 0, 0.24, 1) both;
}

.services-section.is-revealed .services-ink-layer {
  animation: services-character-bg-in 440ms cubic-bezier(0.22, 1, 0.36, 1) 720ms both;
}

.services-section.is-revealed .title,
.services-section.is-revealed .character-wrap {
  animation-delay: 1200ms;
}

.services-section.is-revealed .card { animation: services-card-in 500ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.services-section.is-revealed .card0 { animation-delay: 1800ms; }
.services-section.is-revealed .card1 { animation-delay: 1880ms; }
.services-section.is-revealed .card2 { animation-delay: 1960ms; }
.services-section.is-revealed .card3 { animation-delay: 2040ms; }
.services-section.is-revealed .card4 { animation-delay: 2120ms; }

@keyframes services-paper-reveal {
  to {
    transform: translate3d(calc(100% + 4px), 0, 0);
  }
}

@keyframes services-character-bg-in {
  from {
    opacity: 0;
    translate: -28px 16px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes services-subject-in {
  to { opacity: 1; translate: 0 0; }
}

@keyframes services-card-in {
  from { opacity: 0; translate: 30px 0; }
  to { opacity: 1; translate: 0 0; }
}

/* Tablet */

@media (min-width: 769px) and (max-width: 1100px) {
  .services-section {
    min-height: 830px;
  }

  .services-section .services-heading {
    top: 58px;
    left: 4%;
    width: 43vw;
  }

  .services-section .title-main {
    font-size: clamp(7rem, 12.5vw, 8.6rem);
  }

  .services-section .title-script {
    font-size: clamp(3rem, 5.2vw, 4rem);
  }

  .services-section .character-wrap {
    left: -8%;
    height: min(70vh, 650px);
  }

  .services-section .cards {
    top: 170px;
    right: 2.8%;
    gap: 12px;
    width: 90vw;
    height: 550px;
  }

  .services-section .card {
    grid-template-rows: 220px minmax(0, 1fr) 50px;
  }

  .services-section .card-copy {
    padding: 18px 15px 10px;
  }

  .services-section .card-title {
    font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  }

  .services-section .card-text {
    font-size: 0.68rem;
  }

}

/* Mobile */

@media (max-width: 768px) {
  .services-section {
    display: grid;
    grid-template-areas:
      "heading"
      "character"
      "cards";
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    min-height: 0;
    padding: 56px 16px 0;
  }

  .services-section .services-ink-layer {
    grid-area: character;
    position: relative;
    left: auto;
    bottom: auto;
    z-index: 1;
    justify-self: center;
    width: min(98vw, 500px);
    height: auto;
    aspect-ratio: 1700 / 2240;
    margin: -40px auto 6px;
    background-position: center bottom;
  }

  .services-section .services-speed-lines {
    width: 58vw;
    height: 150px;
    opacity: 0.24;
  }

  .services-section .services-heading {
    grid-area: heading;
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
  }

  .services-section .services-title {
    padding-bottom: 40px;
  }

  .services-section .title-main {
    font-size: clamp(6rem, 25vw, 8.4rem);
  }

  .services-section .title-script {
    right: 0;
    font-size: clamp(3rem, 13vw, 4.4rem);
  }

  .services-section .cards {
    grid-area: cards;
    position: relative;
    top: auto;
    right: auto;
    grid-template-columns: 1fr;
    gap: 18px;
    box-sizing: border-box;
    width: 100%;
    padding-inline: 4px;
    height: auto;
    margin: -88px auto 72px;
  }

  .services-section .card-shell,
  .services-section .card-shell0,
  .services-section .card-shell1,
  .services-section .card-shell2,
  .services-section .card-shell3,
  .services-section .card-shell4 {
    width: calc(100% - 8px);
    height: auto;
    margin: 0 auto;
  }

  .services-section .card-shell0 { --panel-rotate: -0.6deg; }
  .services-section .card-shell1 { --panel-rotate: 0.55deg; }
  .services-section .card-shell2 { --panel-rotate: -0.4deg; }
  .services-section .card-shell3 { --panel-rotate: 0.45deg; }
  .services-section .card-shell4 { --panel-rotate: -0.5deg; }

  .services-section .card-shell::before {
    clip-path: polygon(0 0, 92% 0, 100% 12%, 100% 88%, 94% 100%, 0 100%);
  }

  .services-section .card {
    grid-template-columns: minmax(128px, 40%) minmax(0, 1fr);
    grid-template-rows: minmax(168px, 1fr) 50px;
    min-height: 214px;
    width: 100%;
    clip-path: polygon(0 0, 92% 0, 100% 12%, 100% 88%, 94% 100%, 0 100%);
  }

  .services-section .card-media {
    grid-row: 1 / 3;
    grid-column: 1;
    border-right: 5px solid var(--card-accent);
    clip-path: none;
  }

  .services-section .card-media::before {
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: 8px;
    height: auto;
    clip-path: none;
  }

  .services-section .card-media::after {
    width: 46%;
    height: 34px;
  }

  .services-section .card-media img {
    clip-path: none;
  }

  .services-section .card-copy {
    grid-row: 1;
    grid-column: 2;
    padding: 28px 16px 8px;
  }

  .services-section .card-title {
    min-height: 0;
    font-size: clamp(1.8rem, 8vw, 2.45rem);
  }

  .services-section .card-title::after {
    margin-top: 12px;
  }

  .services-section .card-title::before {
    top: calc(1.8em + 9px);
  }

  .services-section .card0 .card-title::before {
    top: calc(0.9em + 9px);
  }

  .services-section .card-text {
    margin-top: 12px;
    font-size: clamp(0.66rem, 2.75vw, 0.78rem);
    line-height: 1.35;
  }

  .services-section .card-action {
    grid-row: 2;
    grid-column: 2;
    padding: 0 16px;
  }

  .services-section .character-wrap {
    grid-area: character;
    position: relative;
    left: auto;
    bottom: auto;
    justify-self: center;
    width: min(98vw, 500px);
    height: auto;
    margin: -40px auto 6px;
  }

  .services-section .character {
    position: relative;
    z-index: 1;
  }

}

@media (max-width: 430px) {
  .services-section {
    padding-right: 12px;
    padding-left: 12px;
  }

  .services-section .title-main {
    font-size: clamp(5.3rem, 24vw, 6.5rem);
  }

  .services-section .title-script {
    font-size: clamp(2.7rem, 12.5vw, 3.5rem);
  }

  .services-section .cards {
    margin-bottom: 64px;
  }

  .services-section .card {
    grid-template-columns: 39% minmax(0, 1fr);
    min-height: 204px;
  }

  .services-section .card-copy {
    padding: 26px 13px 7px;
  }

  .services-section .card-action {
    padding: 0 13px;
  }

  .services-section .card-action span {
    font-size: 0.82rem;
  }

  .services-section .character-wrap {
    left: auto;
    width: min(100vw, 460px);
    height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .services-reveal-frame > .services-reveal-wipe {
    display: none;
  }

  .services-section .title,
  .services-section .services-ink-layer,
  .services-section .character-wrap,
  .services-section .card {
    animation: none !important;
    opacity: 1 !important;
    translate: 0 0 !important;
  }

  .services-section .character-blink {
    animation: none !important;
    opacity: 0 !important;
  }

  .services-section .card,
  .services-section .card-media img,
  .services-section .card-title,
  .services-section .card-action strong {
    transition: none !important;
  }

  .service-preview__backdrop,
  .service-preview__panel {
    transition: none !important;
  }
}
