/* Services: three quiet columns, each with one small CSS 3D object.
   The objects rest still; js/studio.js turns them toward a fine pointer
   through --tx and --ty. Reduced motion keeps the resting pose. */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 4rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.service-item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding-top: 28px;
  border-top: 1px solid var(--line-strong);
}
.service-title {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.service-text { max-width: 36ch; margin: 0; color: var(--text-mid); font-size: 16px; line-height: 1.55; }
.service-includes { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.service-includes li { color: var(--text-mid); font-size: 15px; line-height: 1.5; }
.service-includes li::before { content: "+"; margin-right: 10px; color: var(--studio-muted); }
.service-cta { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: auto; font-size: 15px; color: var(--text); }
.service-cta .icon-arrow { width: 14px; height: 14px; transition: transform 160ms cubic-bezier(.23, 1, .32, 1); }

/* The stage and the shared 3D transform. */
.service-object { display: grid; place-items: center; width: 100%; height: 190px; perspective: 700px; }
.shape {
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(calc(var(--bx) + var(--ty, 0deg))) rotateY(calc(var(--by) + var(--tx, 0deg))) rotateZ(var(--bz, 0deg));
  transition: transform 700ms cubic-bezier(.23, 1, .32, 1);
}
.shape i { position: absolute; inset: 0; display: block; border: 1px solid rgba(242, 242, 240, .5); background: #141414; backface-visibility: visible; }

/* Cube: a browser window turned into a block. */
[data-shape="cube"] .shape { --bx: -18deg; --by: 34deg; width: 96px; height: 96px; }
[data-shape="cube"] .shape i:nth-child(1) { transform: translateZ(48px); background: radial-gradient(circle at 14px 12px, #f2f2f0 2.5px, transparent 3px), radial-gradient(circle at 24px 12px, rgba(242, 242, 240, .55) 2.5px, transparent 3px), radial-gradient(circle at 34px 12px, rgba(242, 242, 240, .3) 2.5px, transparent 3px), linear-gradient(transparent 22px, rgba(242, 242, 240, .3) 22px, rgba(242, 242, 240, .3) 23px, transparent 23px), #141414; }
[data-shape="cube"] .shape i:nth-child(2) { transform: rotateY(180deg) translateZ(48px); }
[data-shape="cube"] .shape i:nth-child(3) { transform: rotateY(90deg) translateZ(48px); background: #1b1b1b; }
[data-shape="cube"] .shape i:nth-child(4) { transform: rotateY(-90deg) translateZ(48px); }
[data-shape="cube"] .shape i:nth-child(5) { transform: rotateX(90deg) translateZ(48px); background: #232323; }
[data-shape="cube"] .shape i:nth-child(6) { transform: rotateX(-90deg) translateZ(48px); }

/* Disc: a record seen at an angle, two faces for its thickness. */
[data-shape="disc"] .shape { --bx: 58deg; --by: 0deg; --bz: -24deg; width: 136px; height: 136px; }
[data-shape="disc"] .shape i { border-radius: 50%; }
[data-shape="disc"] .shape i:nth-child(1) { transform: translateZ(3px); background: radial-gradient(circle, #f2f2f0 0 5px, #141414 6px 20px, rgba(242, 242, 240, .7) 21px 22px, transparent 23px), repeating-radial-gradient(circle, #141414 0 3px, #1f1f1f 3px 4px); }
[data-shape="disc"] .shape i:nth-child(2) { transform: translateZ(-3px); }

/* Film: one frame with sprocket holes, two faces for its thickness. */
[data-shape="film"] .shape { --bx: 10deg; --by: -30deg; width: 140px; height: 92px; }
[data-shape="film"] .shape i { border-radius: 4px; }
[data-shape="film"] .shape i:nth-child(1) { transform: translateZ(4px); background: repeating-linear-gradient(90deg, transparent 0 7px, rgba(242, 242, 240, .65) 7px 13px) top 5px left 0 / 100% 6px no-repeat, repeating-linear-gradient(90deg, transparent 0 7px, rgba(242, 242, 240, .65) 7px 13px) bottom 5px left 0 / 100% 6px no-repeat, linear-gradient(#262626, #262626) center / calc(100% - 20px) 52px no-repeat, #141414; }
[data-shape="film"] .shape i:nth-child(2) { transform: translateZ(-4px); }

@media (hover: hover) and (pointer: fine) {
  .service-item:hover .shape { --ty: -6deg; --tx: 14deg; }
  .service-cta:hover .icon-arrow { transform: translate(2px, -2px); }
}
@media (max-width: 899px) {
  .service-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  /* Phones: each service centered under its object. */
  .service-item { align-items: center; gap: 10px; padding-block: 20px 32px; text-align: center; }
  .service-object { height: 130px; transform: scale(.8); }
  .service-title { margin: 0; }
  .service-text { margin-inline: auto; }
  .service-includes { justify-items: center; }
  .service-cta { margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .shape, .service-cta .icon-arrow { transition: none; }
  .service-item:hover .shape { --ty: 0deg; --tx: 0deg; }
}
