/* 写真は最初の描画から待機。読み込み後に表示を消して始め直さない。 */
html:is([data-photo-motion="pending"], [data-photo-motion="ready"]) main :is(.service-photo, .company-image, .work-image, .work-article-photo) > img:is(:not([data-scroll-motion-state]), [data-scroll-motion-state="waiting"]) {
  opacity: 0;
}
.work-image > .scroll-photo-frame { width: 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) {
  html:is([data-photo-motion="pending"], [data-photo-motion="ready"]) main :is(.service-photo, .company-image, .work-image, .work-article-photo) > img { opacity: 1; }
}
@media print {
  html:is([data-photo-motion="pending"], [data-photo-motion="ready"]) main :is(.service-photo, .company-image, .work-image, .work-article-photo) > img { opacity: 1; }
}
/* 先頭のタイトルだけ、描画前の準備から演出へ引き継ぐ。レイアウトは動かさない。 */
.page-title-pending .page-heading :is(.eyebrow, h1, .page-intro, .page-number) {
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .page-title-pending .page-heading :is(.eyebrow, h1, .page-intro, .page-number) {
    opacity: 1;
  }
}
/* スクロールの演出を使わない要素は通常表示のまま。 */
.js .reveal,
.js .reveal.visible {
  opacity: 1;
  transform: none;
  transition: none;
}
:is(
  .button,
  .text-link,
  .hero-cta,
  .menu-toggle,
  .motion-button,
  .modal-close,
  .site-nav a,
  .footer-links a,
  .overview-grid > a,
  .mobile-contact a,
  .privacy-link,
  .scroll-hint,
  .brand,
  .footer-brand,
  summary
) {
  transition:
    background-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease,
    translate 0.1s ease;
}
:is(.text-link, .hero-cta, .privacy-link, .scroll-hint) {
  display: inline-flex;
}
@media (hover: hover) {
  :is(
      .button,
      .text-link,
      .hero-cta,
      .menu-toggle,
      .motion-button,
      .modal-close,
      .site-nav a,
      .footer-links a,
      .overview-grid > a,
      .mobile-contact a,
      .privacy-link,
      .scroll-hint,
      summary
    ):not(:disabled):hover {
    box-shadow: inset 0 -2px 0 currentColor;
  }
  :is(.menu-toggle, .modal-close):not(:disabled):hover {
    background-color: var(--ho-color-9bad9826,#9bad9826);
  }
}
:is(
    .button,
    .text-link,
    .hero-cta,
    .menu-toggle,
    .motion-button,
    .modal-close,
    .site-nav a,
    .footer-links a,
    .overview-grid > a,
    .mobile-contact a,
    .privacy-link,
    .scroll-hint,
    .brand,
    .footer-brand,
    summary
  ):not(:disabled):is(:active, .is-pressed) {
  translate: 0 2px;
  box-shadow: inset 0 0 0 2px currentColor;
}
:is(button, a, summary):focus-visible {
  outline: 3px solid #e8a539;
  outline-offset: 5px;
}
button:disabled,
button:disabled:hover,
button:disabled:active {
  translate: none;
  box-shadow: none;
  opacity: 0.55;
  cursor: not-allowed;
}
.button:disabled,
.button:disabled:hover {
  background: var(--teal);
  color: #fff;
}
@media (prefers-reduced-motion: reduce) {
  :is(
    .button,
    .text-link,
    .hero-cta,
    .menu-toggle,
    .motion-button,
    .modal-close,
    .site-nav a,
    .footer-links a,
    .overview-grid > a,
    .mobile-contact a,
    .privacy-link,
    .scroll-hint,
    .brand,
    .footer-brand,
    summary
  ) {
    transition: none;
  }
  :is(
      .button,
      .text-link,
      .hero-cta,
      .menu-toggle,
      .motion-button,
      .modal-close,
      .site-nav a,
      .footer-links a,
      .overview-grid > a,
      .mobile-contact a,
      .privacy-link,
      .scroll-hint,
      .brand,
      .footer-brand,
      summary
    ):not(:disabled):is(:active, .is-pressed) {
    translate: none;
  }
}

/* 写真の比率と文章の配置は元のまま。演出用の重ね合わせは操作を受け取らない。 */
.scroll-photo-frame { position: relative; overflow: hidden; isolation: isolate; line-height: 0; background: var(--ho-color-e7ece5,#e7ece5); }
.scroll-photo-frame > img { display: block; }
.scroll-photo-split,.scroll-photo-half,.scroll-photo-diagonal,.scroll-photo-outline { position: absolute; inset: 0; pointer-events: none; }
.scroll-photo-split { background: var(--ho-color-e7ece5,#e7ece5); overflow: hidden; }
.scroll-photo-half { overflow: hidden; }
.scroll-photo-half.top { clip-path: inset(0 0 50% 0); }
.scroll-photo-half.bottom { clip-path: inset(50% 0 0 0); }
.scroll-photo-half img { display: block; width: 100%; height: 100%; object-fit: cover; }
.scroll-photo-diagonal { background: var(--ho-color-b9cbb8,#b9cbb8); opacity: .7; z-index: -1; }
.scroll-photo-outline { border: 1px solid #fff; inset: 8%; }
@media (prefers-reduced-motion: reduce) {
  .scroll-photo-split,.scroll-photo-diagonal,.scroll-photo-outline { display: none; }
}

/* The title cue remains a simple decoration when motion is disabled. */
.page-heading .page-title-cue {
  display: block;
  width: 88px;
  height: 1px;
  margin: 4px 0 9px;
  background: var(--teal, var(--ho-color-26756c,#26756c));
  transform-origin: left center;
  pointer-events: none;
}

/* A pale green panel reveals behind the page title without moving its layout. */
.page-heading {
  position: relative;
  isolation: isolate;
}
.page-heading .page-title-backdrop {
  position: absolute;
  inset: 12px -18px;
  z-index: -1;
  border-radius: 2px;
  background: linear-gradient(110deg, var(--ho-color-e1ebe4,#e1ebe4) 0%, var(--ho-color-eaf0e7,#eaf0e7) 72%, var(--ho-color-eff3eb,#eff3eb) 100%);
  pointer-events: none;
}

/* 下層ページは見出しと写真のまとまりを一度だけ表示する。事業写真は既存の写真演出を使う。 */
html[data-subpage-motion="balanced"] .angle-subpage main :is(.company-image, .work-image, .work-article-photo) > img {
  opacity: 1 !important;
}
html[data-subpage-motion="balanced"] .angle-subpage main .work-card {
  transition-property: background-color, color, box-shadow;
  transition-duration: 0.18s;
}
html[data-subpage-motion="balanced"] .angle-subpage main .work-image img {
  transition: transform 0.35s;
}
@media screen and (prefers-reduced-motion: no-preference) {
  html[data-subpage-motion="balanced"][data-balanced-body="pending"] .angle-subpage main
    :is(.section-heading, .about-title, .company-block-heading, .company-journal-link, .contact-heading,
        .service-card > .angle-service-copy, .company-image, .work-article-photo, .company-statement,
        .company-greeting-panel, #recruit-lead, .contact-aside, .audience-grid, .recruit-page-links) {
    opacity: 0;
  }
}
