/* ============ SERVICES — image mosaic ============
   The images carry the section; each tile shows only a number
   and the service name.
   ============================================================ */
.services {
  position: relative;
  background: var(--ink);
  color: var(--text-on-dark);
  background-image:
    repeating-linear-gradient(90deg,
      rgba(255, 255, 255, 0.022) 0 1px,
      transparent 1px 7px);
}
.services .section-title { color: #fff; }
.services .section-intro { color: var(--text-on-dark); }

/* ---- Mosaic ---- */
.svc {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(150px, 15.5vw, 215px);
  gap: clamp(10px, 1.1vw, 16px);
  margin-top: clamp(34px, 4.5vw, 54px);
}

.svc__tile--hero { grid-column: span 2; grid-row: span 2; }
.svc__tile--wide { grid-column: span 2; }

/* ---- Tile ---- */
.svc__tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink-2);
  isolation: isolate;
}
.svc__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease), filter 0.5s var(--ease);
}

/* legibility scrim — always on, deepens on hover */
.svc__tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(0, 0, 0, 0.94) 0%,
    rgba(0, 0, 0, 0.86) 24%,
    rgba(0, 0, 0, 0.6) 48%,
    rgba(0, 0, 0, 0.22) 72%,
    rgba(0, 0, 0, 0) 92%);
  transition: opacity 0.45s var(--ease);
}

/* ---- Caption ---- */
.svc__tag {
  position: absolute;
  z-index: 2;
  left: clamp(16px, 1.5vw, 24px);
  right: clamp(56px, 5vw, 72px);
  bottom: clamp(14px, 1.4vw, 20px);
  display: block;
  transition: transform 0.5s var(--ease);
}
.svc__i {
  font-size: var(--fs-tiny);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--red);
  font-variant-numeric: tabular-nums;
  display: block;
  margin-bottom: 5px;
}
.svc__t {
  display: block;
  font-size: clamp(1rem, 1.35vw, 1.22rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: #fff;
}
.svc__tile--hero .svc__t { font-size: clamp(1.4rem, 2.4vw, 2.1rem); }

/* ---- Arrow ---- */
.svc__arrow {
  position: absolute;
  z-index: 2;
  right: clamp(14px, 1.3vw, 20px);
  bottom: clamp(14px, 1.4vw, 20px);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 0.75rem;
  backdrop-filter: blur(3px);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease),
              transform 0.4s var(--ease);
}

/* ---- Play badge (video walkthrough) ---- */
.svc__play {
  position: absolute;
  z-index: 2;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(225, 29, 42, 0.92);
  color: #fff;
  font-size: 1rem;
  padding-left: 3px;
  transition: transform 0.45s var(--ease);
}
.svc__play::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}

/* ---- Accent tile (no photo available) ---- */
.svc__tile--accent {
  background: var(--red);
  background-image:
    repeating-linear-gradient(135deg,
      rgba(255, 255, 255, 0.07) 0 1px,
      transparent 1px 9px);
}
.svc__tile--accent::after { display: none; }
.svc__tile--accent .svc__i { color: rgba(255, 255, 255, 0.72); }
.svc__ico {
  position: absolute;
  top: clamp(16px, 1.5vw, 24px);
  left: clamp(16px, 1.5vw, 24px);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.05rem;
}
.svc__tile--accent .svc__arrow { border-color: rgba(255, 255, 255, 0.55); }

/* ---- Hover ---- */
@media (hover: hover) and (pointer: fine) {
  .svc__tile:hover img { transform: scale(1.07); }
  .svc__tile:hover::after { opacity: 0.88; }
  .svc__tile:hover .svc__tag { transform: translateY(-6px); }
  .svc__tile:hover .svc__arrow {
    background: var(--red);
    border-color: var(--red);
    transform: rotate(-45deg);
  }
  .svc__tile--accent:hover .svc__arrow { background: #fff; color: var(--red); border-color: #fff; }
  .svc__tile:hover .svc__play { transform: translate(-50%, -50%) scale(1.1); }
}
.svc__tile:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .svc { grid-template-columns: repeat(2, 1fr); grid-auto-rows: clamp(140px, 24vw, 190px); }
  .svc__tile--hero { grid-column: span 2; grid-row: span 1; }
  .svc__tile--wide { grid-column: span 2; }
}
@media (max-width: 560px) {
  .svc { grid-template-columns: 1fr; grid-auto-rows: 168px; }
  .svc__tile--hero, .svc__tile--wide { grid-column: span 1; }
  .svc__tag { right: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  .svc__tile img, .svc__tag, .svc__play { transition: none; }
}
