.service-story {
  --story-ink: #1b231b;
  --story-line: #c5ca9452;
  color: var(--white);
  padding-block: clamp(60px, 8vw, 124px);
}

.service-story-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
  column-gap: clamp(12px, 1.5vw, 24px);
  isolation: isolate;
}

.service-story-line {
  position: absolute;
  z-index: -1;
  inset: -20% -18% auto;
  height: 86%;
  border: 1px solid #c5ca9426;
  border-bottom-color: transparent;
  border-radius: 50%;
  rotate: -12deg;
  pointer-events: none;
}

.service-story-heading { display: contents; }

.service-story h2 {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: clamp(58px, 7.7vw, 118px);
  line-height: .99;
  letter-spacing: -.062em;
}

.service-story-photo { z-index: 0; }

.service-story-mask {
  position: relative;
  overflow: clip;
  border-radius: inherit;
}

.service-story-mask img {
  display: block;
  width: 100%;
  height: auto;
}

.service-story-object {
  position: relative;
  z-index: 3;
  width: clamp(108px, 17vw, 246px);
  pointer-events: none;
}

.service-story .service-story-sculpture { width: 100%; height: auto; animation: none; }

.service-story-copy {
  position: relative;
  z-index: 1;
  max-inline-size: 65ch;
  padding-inline-start: clamp(18px, 2vw, 32px);
  border-inline-start: 1px solid var(--story-line);
}

.service-story-copy p { color: #d1d7ca; font-size: clamp(16px, 1.22vw, 18px); }

/* Editorial: a headline across the left edge of a wide, off-centre photograph. */
.service-story--editorial .service-story-photo {
  grid-area: 1 / 4 / 2 / -1;
  border-radius: 20px clamp(70px, 13vw, 185px) 20px 20px;
}

.service-story--editorial h2 {
  grid-area: 1 / 1 / 2 / 8;
  align-self: center;
  max-inline-size: 8ch;
}

.service-story--editorial .service-story-mask::after,
.service-story--pinned .service-story-mask::after,
.service-story--cinematic .service-story-mask::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.service-story--editorial .service-story-mask::after {
  background: linear-gradient(90deg, #151d15d9, transparent 50%);
}

.service-story--editorial .service-story-object {
  grid-area: 1 / 1 / 2 / 4;
  align-self: end;
  justify-self: center;
  width: clamp(96px, 11vw, 150px);
  margin-block-end: -36px;
}

.service-story--editorial .service-story-copy { grid-area: 2 / 4 / 3 / 10; margin-top: 40px; }

/* Storytelling: a photograph on the left and a sticky title on the right. */
.service-story--pinned .service-story-photo {
  grid-area: 1 / 1 / 2 / 9;
  border-radius: clamp(68px, 10vw, 156px) 20px 20px;
}

.service-story--pinned .service-story-mask::after {
  background: linear-gradient(270deg, #141d1466, transparent 31%);
}

.service-story--pinned .service-story-heading {
  display: block;
  grid-area: 1 / 9 / 3 / -1;
  position: relative;
  z-index: 2;
  margin-top: clamp(35px, 6vw, 94px);
}

.service-story--pinned h2 { font-size: clamp(44px, 4.95vw, 74px); }

.service-story--pinned .service-story-copy {
  grid-area: 2 / 2 / 3 / 8;
  margin-top: -24px;
  padding: clamp(22px, 3vw, 44px);
  background: var(--story-ink);
  border-radius: 0 14px 14px 0;
}

@media (min-width: 1000px) and (min-height: 700px) and (prefers-reduced-motion: no-preference) {
  .cinematic-motion .service-story--pinned .service-story-heading {
    position: sticky;
    top: max(110px, 17svh);
  }
}

/* Cinematic: the photograph becomes the canvas for the overlaid title. */
.service-story--cinematic .service-story-photo {
  grid-area: 1 / 1 / 2 / -1;
  margin-inline: clamp(-24px, -1.7vw, -12px);
  border-radius: 24px 24px clamp(74px, 13vw, 190px) 24px;
}

.service-story--cinematic .service-story-mask::after {
  background: linear-gradient(0deg, #121a12ed, transparent 71%);
}

.service-story--cinematic h2 {
  grid-area: 1 / 2 / 2 / 12;
  align-self: end;
  max-inline-size: 12ch;
  margin-bottom: clamp(25px, 4.5vw, 70px);
  font-size: clamp(56px, 7.4vw, 112px);
}

.service-story--cinematic .service-story-copy { grid-area: 2 / 6 / 3 / 12; margin-top: 40px; }

/* Offset: a full-width title above the photograph and a description at the lower edge. */
.service-story--offset .service-story-photo {
  grid-area: 2 / 1 / 3 / 10;
  margin-top: clamp(16px, 2vw, 28px);
  border-radius: 24px clamp(68px, 9vw, 128px) 24px 24px;
}

.service-story--offset h2 {
  grid-area: 1 / 2 / 2 / -1;
  text-align: end;
  font-size: clamp(68px, 9.2vw, 136px);
  text-shadow: 0 8px 28px #1218126b;
}

.service-story--offset .service-story-copy {
  grid-area: 2 / 8 / 3 / -1;
  align-self: end;
  margin: 48px 0 -28px;
  padding: clamp(22px, 2.8vw, 42px);
  background: var(--story-ink);
  border-radius: 0 14px 14px 0;
}

@media (max-width: 999px) {
  .service-story-grid { row-gap: 22px; }
  .service-story-line { inset-block-start: -8%; height: 72%; }
  .service-story--pinned .service-story-heading { display: contents; }

  .service-story h2 {
    grid-area: 1 / 1 / 2 / -1;
    margin: 0;
    max-inline-size: 16ch;
    font-size: clamp(29px, 7.65vw, 72px);
    text-align: start;
  }

  .service-story .service-story-photo {
    grid-area: 2 / 1 / 3 / -1;
    margin: 0;
    border-start-end-radius: clamp(42px, 10vw, 98px);
  }

  .service-story .service-story-object {
    grid-area: 2 / 9 / 3 / -1;
    align-self: end;
    justify-self: end;
    width: clamp(70px, 20vw, 160px);
    margin: 0 4% -12px 0;
  }

  .service-story .service-story-copy {
    grid-area: 3 / 1 / 4 / -1;
    margin: 4px 0 0;
    padding: 0 0 0 18px;
    background: none;
  }

  .service-story .service-story-mask::after { background: none; }

  .service-story--editorial .service-story-object {
    grid-column: 1 / 5;
    justify-self: start;
    margin-inline-start: 7%;
  }

  .service-story--editorial .service-story-object { width: clamp(68px, 14vw, 112px); }
}

@media (max-width: 650px) {
  .service-story-grid { column-gap: 0; row-gap: 20px; }
  .service-story-copy p { line-height: 1.7; }
}

@media (prefers-reduced-motion: no-preference) {
  .cinematic-motion .service-story.is-in-view .service-story-sculpture {
    animation: service-story-float 9s ease-in-out infinite;
  }
}

@keyframes service-story-float {
  50% { transform: translateY(-9px) rotate(3deg); }
}
