.service-photo {
  --photo-paper: #c4eddd;
  --photo-rule: #276858;
  --photo-tint: #175244;
  min-width: 0;
  margin: 0;
}

.service-photo--desarrollo {
  --photo-paper: #173b40;
  --photo-rule: #80c5b0;
  --photo-tint: #234d4b;
}

.service-photo--automatizacion { --photo-paper: #afd8c7; }

.service-photo--nube {
  --photo-paper: #c4dce0;
  --photo-rule: #325e69;
  --photo-tint: #184f62;
}

.service-photo-frame {
  --photo-inset: 7px;
  --photo-rail: clamp(34px, 8%, 54px);
  --photo-grid: color-mix(in srgb, var(--photo-rule) 19%, transparent);
  position: relative;
  isolation: isolate;
  padding: var(--photo-inset) var(--photo-rail) 15px var(--photo-inset);
  overflow: hidden;
  border-radius: 4px;
  background:
    repeating-linear-gradient(0deg, transparent 0 8px, var(--photo-grid) 8px 9px),
    repeating-linear-gradient(90deg, transparent 0 8px, var(--photo-grid) 8px 9px),
    var(--photo-paper);
}

.service-photo-frame::before,
.service-photo-frame::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.service-photo-frame::before {
  inset: var(--photo-inset) var(--photo-rail) 15px var(--photo-inset);
  z-index: 1;
  background: linear-gradient(145deg, var(--photo-tint), transparent 70%, var(--photo-tint));
  mix-blend-mode: multiply;
  opacity: .25;
}

.service-photo-frame::after {
  inset: 0;
  background:
    url("assets/brand/ecossoft-symbol.svg") right clamp(6px, 1vw, 12px) bottom 16px / clamp(21px, 3vw, 31px) auto no-repeat,
    linear-gradient(#a54829, #a54829) left 7px bottom 6px / 44px 2px no-repeat,
    linear-gradient(var(--photo-rule), var(--photo-rule)) left 55px bottom 6px / clamp(28px, 13%, 68px) 1px no-repeat;
}

.service-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--photo-paper);
  filter: saturate(.84) contrast(1.04);
}

.service-photo--automatizacion img { object-position: center 58%; }

.primary-service .chapter-copy {
  grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
  column-gap: clamp(24px, 5vw, 72px);
  align-items: start;
}

.primary-service .chapter-copy > :is(.service-name, h2, p, .service-actions) { grid-column: 1; }
.primary-service .chapter-copy > .service-photo {
  grid-column: 2;
  grid-row: 1 / 5;
  align-self: center;
}

.supporting-services .service-photo img { aspect-ratio: 2 / 1; }

.service-hero-media {
  display: grid;
  min-width: 0;
  gap: 16px;
}

.service-hero-media .service-photo img { aspect-ratio: 2 / 1; }
.service-photo figcaption {
  margin-top: 7px;
  color: #466070;
  font-size: 12px;
  line-height: 1.5;
}

.service-photo figcaption a {
  text-decoration: underline;
  text-underline-offset: .2em;
}

@media (max-width: 650px) {
  .primary-service .chapter-copy { grid-template-columns: minmax(0, 1fr); }
  .primary-service .chapter-copy > .service-photo {
    grid-column: 1;
    grid-row: auto;
    margin-top: 10px;
  }
}
