/* Scoped to the homepage; reduced motion keeps a natural document flow. */
#service.service-showcase {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  max-width: 1200px;
  width: calc(100% - 96px);
  margin-inline: auto;
  padding: 0;
  background: transparent;
  color: var(--text);
}
#service > .section-title { position: sticky; top: 120px; }
#service .section-title__en, #service .section-title__ja { color: var(--text); }
#service .service-showcase__content { min-width: 0; }
#service .service-showcase__stage { position: relative; }
#service .service-showcase__nav, #service .service-showcase__status { display: none; }
#service .service-showcase__panel { display: grid; position: relative; isolation: isolate; overflow: hidden; background: #fbf6fa; border-radius: 20px; margin-bottom: 32px; }
#service .service-showcase__image { grid-area: 1 / 1; position: relative; z-index: 0; display: block; width: 100%; height: auto; aspect-ratio: 2400 / 1363; object-fit: contain; }
#service .service-showcase__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.20) 0%, rgba(0,0,0,.09) 38%, rgba(0,0,0,0) 72%);
}
#service .service-showcase__name { color: inherit; text-decoration: none; }
#service .service-showcase__eyebrow { font-family: var(--font-display); font-size: 24px; font-weight: 400; line-height: 1.25; letter-spacing: .01em; color: #fff; }
#service .service-showcase__category { margin-top: 7px; font-size: 13px; color: #fff; }
#service .service-showcase__footer { padding-block: 40px var(--space-8); }
#service .service-showcase__footer .section-cta { margin-top: 0; }
/* Desktop: bounded image stage and a scroll distance for five services. */
#service.is-enhanced .service-showcase__track { height: calc(var(--showcase-height) + var(--showcase-travel)); }
#service.is-enhanced .service-showcase__stage { position: sticky; top: var(--showcase-top); height: var(--showcase-height); overflow: hidden; isolation: isolate; border-radius: 24px; background: #d8bdcc; }
#service.is-enhanced .service-showcase__panel { position: absolute; inset: 0; margin: 0; border-radius: 0; background: transparent; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s; }
#service.is-enhanced .service-showcase__panel.is-active { opacity: 1; visibility: visible; }
#service.is-enhanced .service-showcase__image { position: absolute; inset: 0; height: 100%; object-fit: contain; z-index: -2; }
#service.is-enhanced .service-showcase__nav { display: flex; position: absolute; z-index: 3; left: 5%; bottom: 14%; width: 44%; flex-direction: column; align-items: flex-start; gap: clamp(8px, 1.5vh, 16px); }
#service .service-showcase__link { display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 12px; color: rgba(255,255,255,.58); text-decoration: none; transition: color .4s, transform .4s; }
#service .service-showcase__link-number { font-family: var(--font-display); font-size: 11px; padding-top: 8px; }
#service .service-showcase__link-en { grid-column: 2; font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 32px); line-height: 1.15; letter-spacing: -.015em; }
#service .service-showcase__link-ja { grid-column: 2; font-size: 12px; line-height: 1.6; margin-top: 5px; letter-spacing: .02em; }
#service .service-showcase__link.is-active, #service .service-showcase__link:hover, #service .service-showcase__link:focus-visible { color: #fff; }
#service .service-showcase__link.is-active { transform: translateX(6px); }
#service a:focus-visible { outline: 2px solid currentColor; outline-offset: 6px; }
#service.is-enhanced .service-showcase__status { display: flex; position: absolute; z-index: 3; left: 5%; right: 5%; bottom: 30px; align-items: center; justify-content: space-between; font-family: var(--font-display); font-size: 11px; letter-spacing: .12em; color: #fff; }
#service .service-showcase__progress { display: flex; gap: 7px; }
#service .service-showcase__progress i { width: 24px; height: 2px; background: rgba(255,255,255,.35); }
#service .service-showcase__progress i.is-active { background: #fff; }
@media (max-width: 960px) {
  #service.service-showcase { display: block; width: calc(100% - 32px); max-width: none; }
  #service > .section-title { position: static; margin-bottom: 24px; }
  #service .service-showcase__panel { border-radius: 14px; margin-bottom: 16px; }
  #service .service-showcase__eyebrow { color: #fff; font-size: clamp(23px, 5vw, 32px); }
  #service .service-showcase__category { color: #fff; }
  #service .service-showcase__name { display: block; color: #fff; text-decoration: none; }
  }
@media (max-width: 380px) {
  #service.service-showcase { width: calc(100% - 32px); }
  #service .service-showcase__eyebrow { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  #service .service-showcase__panel, #service .service-showcase__link { transition: none; }
}

/* Mobile cards accumulate at the top while the next service scrolls over them. */
@media (max-width: 960px) {
  #service.is-stacked .service-showcase__stage { display: flow-root; isolation: isolate; }
  #service.is-stacked .service-showcase__panel {
    position: sticky;
    top: calc(var(--stack-top) + var(--stack-index) * 8px);
    z-index: calc(var(--stack-index) + 1);
    margin-bottom: 16px;
  }
  #service.is-stacked .service-showcase__panel:last-of-type { margin-bottom: 0; }
}

/* The caption belongs to each image, independent of the desktop stage copy. */
#service .service-showcase__caption {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 4;
  display: block;
  color: #fff;
  text-align: left;
}
#service .service-showcase__caption .service-showcase__name { display: block; }
#service .service-showcase__caption .service-showcase__eyebrow,
#service .service-showcase__caption .service-showcase__category {
  display: block;
  color: #fff;
  opacity: 1;
  visibility: visible;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .25);
}
@media (min-width: 961px) {
  #service.is-enhanced .service-showcase__caption { display: none; }
}

#service .service-showcase__image-link { position: absolute; inset: 0; z-index: 3; border-radius: inherit; }
#service .service-showcase__image-link:focus-visible { outline: 2px solid #fff; outline-offset: -6px; }
#service .service-showcase__image { transition: transform .45s ease; }
#service .service-showcase__status { pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  #service .service-showcase__panel:hover .service-showcase__image { transform: scale(1.025); }
}
@media (prefers-reduced-motion: reduce) {
  #service .service-showcase__image { transition: none; }
  #service .service-showcase__panel:hover .service-showcase__image { transform: none; }
}

@media (max-width: 960px) {
  #service .service-showcase__panel > picture { display: contents; }
  #service .service-showcase__image { aspect-ratio: auto; }
  #service .service-showcase__copy--sp, #service .service-showcase__heading--sp { display: none; }
}

/* Mobile: show only the service belonging to each image. */
@media (max-width: 960px) {
  #service .service-showcase__nav { display: none; }
  #service .service-showcase__caption { display: block; bottom: 12%; }
  #service .service-showcase__caption .service-showcase__eyebrow { font-size: clamp(26px, 6.8vw, 36px); }
  #service .service-showcase__caption .service-showcase__category { font-size: 15px; }
}
