/* The script sets the columns from the number of services: data-mid for tablets, data-wide from a small laptop up. */
#services [data-services] {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 4rem) clamp(1rem, 2vw, 1.85rem);
}
#services [data-services][data-mid="1"] { grid-template-columns: minmax(0, 42rem); }
#services [data-services][data-mid="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* More than three services: compact cards keep the whole catalogue in view. */
#services [data-services][data-dense] { gap: clamp(1.6rem, 2.7vw, 2.7rem) clamp(.9rem, 1.6vw, 1.5rem); }
.v2-service {
  min-width: 0;
  margin: 0;
  border-bottom: 1px solid var(--line-dark);
}
.v2-service__surface {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  color: inherit;
  isolation: isolate;
  text-decoration: none;
}
.v2-service__surface:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}
.v2-service__photo {
  aspect-ratio: 3 / 2;
  position: relative;
  overflow: hidden;
  background: var(--night-3);
}
[data-dense] .v2-service__photo { aspect-ratio: 16 / 10; }
.v2-service__photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.015);
  transition: transform 600ms cubic-bezier(.22,.67,.26,1);
}
/* No photo yet: sound waves fading out in the studio colours. */
.v2-service__photo--empty {
  color: var(--accent);
  background:
    radial-gradient(85% 115% at 0% 100%, color-mix(in srgb, var(--accent) 30%, var(--night)) 0%, transparent 68%),
    linear-gradient(140deg, var(--night-3), var(--night-2));
}
.v2-service:nth-child(even) .v2-service__photo--empty { transform: scaleX(-1); }
.v2-service__photo--empty svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}
.v2-service__photo--empty circle { vector-effect: non-scaling-stroke; }
.v2-service__info {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.25rem 0 1rem;
  overflow-wrap: anywhere;
}
.v2-service__title {
  margin: 0;
  color: var(--on-dark);
  font-size: clamp(1.6rem, 2.55vw, 2.75rem);
  line-height: 1.02;
  letter-spacing: -.045em;
  font-weight: 640;
}
.v2-service__description {
  max-width: 39ch;
  margin: .75rem 0 0;
  color: var(--muted-on-dark);
  font-size: 1rem;
  line-height: 1.55;
}
.v2-service__action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: auto;
  padding: 1.1rem 0 .3rem;
  color: var(--on-dark);
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.3;
}
.v2-service__action::before {
  content: '';
  display: block;
  flex: none;
  width: 1rem;
  height: 2px;
  background: var(--accent);
  transition: width 220ms ease;
}
[data-dense] .v2-service__info { padding: 1rem 0 .85rem; }
[data-dense] .v2-service__title { font-size: clamp(1.3rem, 2vw, 2.05rem); line-height: 1.06; letter-spacing: -.04em; }
[data-dense] .v2-service__description { margin-top: .55rem; font-size: .95rem; line-height: 1.5; }
[data-dense] .v2-service__action { padding-top: .9rem; }
@media (min-width: 64rem) {
  #services [data-services][data-wide="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  [data-wide="4"] .v2-service__photo { aspect-ratio: 3 / 2; }
  [data-wide="4"] .v2-service__title { font-size: clamp(1.3rem, 1.72vw, 1.75rem); }
}
@media (hover: hover) {
  a.v2-service__surface:hover .v2-service__photo img { transform: scale(1.06); }
  a.v2-service__surface:hover .v2-service__action::before { width: 1.7rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .v2-service--arrived .v2-service__photo { animation: svc-unfold 650ms calc(var(--svc-beat, 0) * 45ms) cubic-bezier(.22,.8,.3,1) both; }
  @keyframes svc-unfold { from { clip-path: inset(0 0 12% 0); } to { clip-path: inset(0); } }
}
@media (max-width: 49rem) {
  #services [data-services],
  #services [data-services][data-mid] { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .v2-service__surface {
    display: grid;
    grid-template-columns: minmax(5.5rem, .85fr) minmax(0, 1.55fr);
    align-items: stretch;
    gap: clamp(.9rem, 3.8vw, 1.8rem);
    padding-bottom: 1.25rem;
  }
  .v2-service__photo { min-height: 9rem; aspect-ratio: auto; }
  .v2-service__info { padding: .05rem 0; }
  .v2-service__title { font-size: clamp(1.4rem, 4.8vw, 2rem); }
  .v2-service__description { margin-top: .5rem; line-height: 1.43; }
  .v2-service__action { padding-top: .8rem; }
  /* A long catalogue on a phone: a smaller photo, the whole row stays one large tap target. */
  #services [data-services][data-dense] { gap: 1rem; }
  [data-dense] .v2-service__surface { grid-template-columns: clamp(6.75rem, 22vw, 10.5rem) minmax(0, 1fr); gap: 1rem; padding-bottom: 1rem; }
  [data-dense] .v2-service__photo { min-height: 6.75rem; aspect-ratio: auto; }
  [data-dense] .v2-service__info { padding: .05rem 0; }
  [data-dense] .v2-service__title { font-size: clamp(1.2rem, 4.5vw, 1.55rem); }
  [data-dense] .v2-service__description { margin-top: .35rem; line-height: 1.42; }
  [data-dense] .v2-service__action { padding-top: .6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .v2-service__photo img, .v2-service__action::before { transition: none; }
  a.v2-service__surface:hover .v2-service__photo img { transform: none; }
}
