/* Inner pages only. Initial HTML, consultation content and CTAs stay visible. */
.page:not(#page-home) {
  --inner-motion-ease: cubic-bezier(.22, .8, .28, 1);
}

/* Small, static editorial accents; never animate a section-sized surface. */
.page:not(#page-home) .page-hero .wrap {
  position: relative;
}

.page:not(#page-home) .page-hero .wrap::after {
  content: "";
  display: block;
  width: 58px;
  height: 3px;
  margin-top: 21px;
  background: linear-gradient(90deg, #0b5aa6 0 72%, #ed620d 72%);
  pointer-events: none;
}

.page:not(#page-home) .page-hero .en {
  font-family: "Noto Sans JP", "Hiragino Sans", sans-serif;
  letter-spacing: .13em;
}

.page:not(#page-home) :is(
  .service-consultation,
  .article-related,
  .work-context
) {
  position: relative;
}

.page:not(#page-home) :is(
  .service-consultation,
  .article-related,
  .work-context
)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 3px;
  background: linear-gradient(90deg, #0b5aa6 0 70%, #ed620d 70%);
  pointer-events: none;
}

/* Conversion geometry belongs to conversion.css. These are paint-only accents. */
.page:not(#page-home) .conversion-section {
  background-image: linear-gradient(135deg, rgba(11, 90, 166, .045), transparent 72%);
}

.page:not(#page-home) :is(.conversion-concern, .conversion-step) {
  border-color: #c5d9ec;
}

.page:not(#page-home) :is(.conversion-concern, .conversion-step):focus-within {
  border-color: #0b5aa6;
}

.page:not(#page-home) .conversion-proof-card {
  border-color: #c5d9ec;
}

.page:not(#page-home) .conversion-mail {
  box-shadow: 0 5px 14px rgba(232, 89, 12, .16);
}

.page:not(#page-home) .conversion-phone {
  border-color: #0b5aa6;
}

/* A clear, immediate keyboard signal, independent of JavaScript and motion. */
.page:not(#page-home) :is(a, button, input, textarea, select):focus-visible {
  outline: 3px solid #0b5aa6;
  outline-offset: 4px;
  box-shadow: 0 0 0 2px #fff;
}

.page:not(#page-home) :is(.conversion-actions, .work-contact) a:focus-visible {
  outline-color: #073f75;
}

/* Hover color changes remain available even when motion is reduced. */
.page:not(#page-home) :is(
  .works-record-card,
  .conversion-proof-card
):is(:hover, :focus-within) {
  border-color: #0b5aa6;
}

.page:not(#page-home) :is(
  .service-consultation-link,
  .work-contact-mail,
  .work-contact-phone,
  .early-phone,
  .conversion-mail,
  .conversion-phone
):is(:hover, :focus-visible) {
  text-decoration: underline;
  text-underline-offset: .22em;
}

@media (prefers-reduced-motion: no-preference) {
  /* No pending opacity/transform: a failed or absent observer cannot hide content. */
  .page:not(#page-home) .inner-motion-pending.is-inview {
    animation: inner-editorial-enter 440ms var(--inner-motion-ease);
  }

  .page:not(#page-home) .page-hero h1.inner-motion-pending.is-inview {
    animation-duration: 520ms;
  }

  .page:not(#page-home) .work-photo.inner-motion-pending.is-inview {
    animation-duration: 460ms;
  }

  .page:not(#page-home) :is(
    .btn-gold,
    .btn-outline,
    .btn-dark-outline,
    .service-consultation-link,
    .work-contact-mail,
    .work-contact-phone,
    .early-phone,
    .conversion-mail,
    .conversion-phone,
    .works-record-card,
    .conversion-proof-card,
    .work-photo
  ) {
    transition: transform 180ms var(--inner-motion-ease), opacity 180ms ease;
    transition-delay: 0s;
  }

  .page:not(#page-home) :is(
    .service-consultation-link,
    .work-contact-mail,
    .conversion-mail,
    .btn-gold,
    .btn-outline,
    .btn-dark-outline
  ) :is(.ic, [aria-hidden="true"]) {
    transition: transform 180ms var(--inner-motion-ease);
  }

  .page:not(#page-home) :is(
    .btn-gold,
    .btn-outline,
    .btn-dark-outline,
    .service-consultation-link,
    .work-contact-mail,
    .work-contact-phone,
    .early-phone,
    .conversion-mail,
    .conversion-phone
  ):focus-visible {
    transform: translateY(-2px);
  }

  .page:not(#page-home) :is(
    .service-consultation-link,
    .work-contact-mail,
    .conversion-mail,
    .btn-gold,
    .btn-outline,
    .btn-dark-outline
  ):focus-visible :is(.ic, [aria-hidden="true"]) {
    transform: translateX(3px);
  }

  .page:not(#page-home) :is(
    .works-record-card,
    .conversion-proof-card
  ):focus-within {
    transform: translateY(-3px);
  }

  @media (hover: hover) and (pointer: fine) {
    .page:not(#page-home) :is(
      .btn-gold,
      .btn-outline,
      .btn-dark-outline,
      .service-consultation-link,
      .work-contact-mail,
      .work-contact-phone,
      .early-phone,
      .conversion-mail,
      .conversion-phone
    ):hover {
      transform: translateY(-2px);
    }

    .page:not(#page-home) :is(
      .works-record-card,
      .conversion-proof-card,
      .work-photo
    ):hover {
      transform: translateY(-3px);
    }

    .page:not(#page-home) :is(
      .service-consultation-link,
      .work-contact-mail,
      .conversion-mail,
      .btn-gold,
      .btn-outline,
      .btn-dark-outline
    ):hover :is(.ic, [aria-hidden="true"]) {
      transform: translateX(3px);
    }
  }

  .page:not(#page-home) :is(
    .btn-gold,
    .btn-outline,
    .btn-dark-outline,
    .service-consultation-link,
    .work-contact-mail,
    .work-contact-phone,
    .early-phone,
    .conversion-mail,
    .conversion-phone,
    .works-record-card,
    .conversion-proof-card
  ):active {
    transform: translateY(0);
    opacity: .92;
    transition-duration: 80ms;
  }
}

@keyframes inner-editorial-enter {
  from {
    opacity: .65;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page:not(#page-home) .inner-motion-pending {
    animation: none !important;
    opacity: 1;
    transform: none;
  }

  .page:not(#page-home) :is(
    .faq-item,
    .btn-gold,
    .btn-outline,
    .btn-dark-outline,
    .service-consultation-link,
    .work-contact-mail,
    .work-contact-phone,
    .early-phone,
    .conversion-mail,
    .conversion-phone,
    .works-record-card,
    .conversion-proof-card,
    .work-photo
  ),
  .page:not(#page-home) :is(
    .service-consultation-link,
    .work-contact-mail,
    .conversion-mail,
    .btn-gold,
    .btn-outline,
    .btn-dark-outline
  ) :is(.ic, [aria-hidden="true"]) {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}
