/* ==========================================================================
   SkyPets — Services page
   Editorial service overview and relocation process.
   ========================================================================== */

.services-page {
  overflow-x: clip;
}

.services-section {
  padding: 64px 0;
}

.services-container {
  width: min(1080px, calc(100% - 44px));
  margin: 0 auto;
}

.services-hero {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.services-intro {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 56px;
}

.services-hero-media,
.services-hero-copy {
  min-width: 0;
}

.services-hero-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 14px 32px rgba(15, 46, 32, 0.1);
}

.services-intro h1 {
  margin: 0 0 26px;
  color: var(--green-dark);
  font-size: clamp(30px, 3.2vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
  text-align: center;
  text-transform: none;
  white-space: nowrap;
}

.services-lead {
  color: var(--text);
  font-size: 18px;
  line-height: 1.75;
}

.services-lead p {
  margin: 0 0 18px;
}

.services-lead p:last-child {
  margin-bottom: 0;
}

.services-offerings {
  background: var(--cream);
}

.service-block {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  gap: 64px;
  padding: 42px 0;
  border-top: 1px solid var(--line);
}

.service-block:last-of-type {
  border-bottom: 1px solid var(--line);
}

.service-heading {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.service-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--green-deep);
  font-size: 14px;
  font-weight: 900;
}

.service-block h2 {
  margin: 4px 0 0;
  color: var(--green-dark);
  font-size: clamp(25px, 2.8vw, 34px);
  line-height: 1.15;
  letter-spacing: 0;
}

.service-block > p {
  max-width: 620px;
  margin: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.75;
}

.services-gallery {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 42px;
}

.services-gallery figure {
  position: relative;
  z-index: 0;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: 0 10px 24px rgba(15, 46, 32, 0.16);
  transition:
    transform var(--hover-duration) var(--hover-ease),
    box-shadow var(--hover-duration) var(--hover-ease);
}

.services-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.services-gallery figure:first-child {
  transform-origin: left center;
}

.services-gallery figure:last-child {
  transform-origin: right center;
}

.services-gallery figure.is-expanded {
  z-index: 5;
  transform: scale(1.5);
  box-shadow: 0 24px 48px rgba(15, 46, 32, 0.26);
}

.services-gallery figure:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

@media (min-width: 621px) and (hover: hover) and (pointer: fine) {
  .services-gallery figure {
    cursor: zoom-in;
    box-shadow:
      0 6px 14px rgba(15, 46, 32, 0.12),
      0 20px 44px rgba(15, 46, 32, 0.2);
  }

  .services-gallery figure:hover:not(.is-expanded) {
    z-index: 10;
    transform: scale(1.15);
    box-shadow:
      0 10px 20px rgba(15, 46, 32, 0.14),
      0 26px 54px rgba(15, 46, 32, 0.24);
  }

  .services-gallery figure.is-expanded {
    z-index: 10;
    cursor: zoom-out;
    transform: scale(3);
    box-shadow:
      0 14px 28px rgba(15, 46, 32, 0.16),
      0 42px 90px rgba(15, 46, 32, 0.32);
  }
}

@media (hover: none), (pointer: coarse) {
  .services-gallery figure[role="button"] {
    cursor: zoom-in;
    touch-action: manipulation;
  }

  .services-gallery figure[role="button"].is-expanded {
    cursor: zoom-out;
  }
}

.services-process {
  background: var(--paper);
}

.services-process h2 {
  margin: 0 0 42px;
  color: var(--green-dark);
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1.08;
  letter-spacing: 0;
}

.process-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 38px 42px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.process-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.process-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.process-step h3 {
  margin: 2px 0 9px;
  color: var(--green-dark);
  font-size: 19px;
  line-height: 1.25;
}

.process-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .services-section {
    padding: 48px 0;
  }

  .services-container {
    width: min(100% - 28px, 720px);
  }

  .services-intro {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .services-intro h1 {
    margin-bottom: 22px;
    font-size: 36px;
  }

  .service-block {
    grid-template-columns: minmax(240px, 0.88fr) minmax(0, 1.12fr);
    gap: 34px;
    padding: 36px 0;
  }

  .services-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .services-gallery figure {
    transform-origin: center;
  }

  .services-gallery figure:nth-child(3n + 1) {
    transform-origin: left center;
  }

  .services-gallery figure:nth-child(3n) {
    transform-origin: right center;
  }

  .process-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }
}

@media (max-width: 620px) {
  .services-section {
    padding: 38px 0;
  }

  .services-intro h1 {
    margin-bottom: 18px;
    font-size: 32px;
  }

  .services-lead {
    font-size: 16px;
    line-height: 1.68;
  }

  .service-block {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 32px 0;
  }

  .service-heading {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
  }

  .service-number {
    width: 38px;
    height: 38px;
    font-size: 13px;
  }

  .service-block h2 {
    margin-top: 2px;
    font-size: 26px;
  }

  .service-block > p {
    font-size: 16px;
    line-height: 1.68;
  }

  .services-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 32px;
  }

  .services-gallery figure {
    transform-origin: center;
  }

  .services-gallery figure:nth-child(odd) {
    transform-origin: left center;
  }

  .services-gallery figure:nth-child(even) {
    transform-origin: right center;
  }

  .services-process h2 {
    margin-bottom: 30px;
    font-size: 32px;
  }

  .process-list {
    position: relative;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .process-list::before {
    content: "";
    position: absolute;
    top: 18px;
    bottom: 18px;
    left: 17px;
    width: 1px;
    background: var(--line);
  }

  .process-step {
    position: relative;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 14px;
    padding: 0 0 30px;
    border-top: 0;
  }

  .process-step:last-child {
    padding-bottom: 0;
  }

  .process-number {
    position: relative;
    z-index: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .services-gallery figure {
    transition: none;
  }
}
