.main-visual {
  position: relative;
  width: 100%;
  height: calc(100vh - 100px);
  overflow: hidden;
}

.main-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1;
  pointer-events: none;
}

.main-visual-slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.slider-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slider-item.active {
  opacity: 1;
}

.main-visual-picture,
.main-visual-picture img {
  display: block;
  width: 100%;
  height: 100%;
}

.main-visual-picture img {
  object-fit: cover;
}

.main-visual-caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  z-index: 2;
}

.main-visual .caption-inner {
  max-width: 1290px;
  width: 100%;
  margin: 0 auto;
  padding: 0 36px;
  color: #f3eded;
}

h1 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--color-white);
  z-index: 10;
  font-weight: 400;
  width: 60%;
  padding: 0px 16px;
  font-size: clamp(24px, 3.5vw, 26px);
  line-height: var(--line-height-normal);
}

.mv-title h1.main-text {
  position: static;
  top: auto;
  left: auto;
  transform: none;
  width: auto;
  padding: 0;
  font-family: var(--font-family-gantari);
  font-size: var(--font-size-fixed-2xl);
  font-weight: var(--font-weight-regular);
  color: var(--color-white);
  display: inline-block;
  margin: 0 0 20px 0;
}

.mv-title .main-text-line {
  display: inline-block;
  opacity: 0;
  transition: opacity 1.2s ease, transform 1.2s ease;
}

/* 1段落目（data-delay="0"）: 左から右に */
.mv-title .main-text-line[data-delay="0"] {
  transform: translateX(-100px);
}

/* 2段落目（data-delay="1"）: 右から左に */
.mv-title .main-text-line[data-delay="1"] {
  transform: translateX(100px);
}

/* 3段落目（data-delay="2"）: 左から右に */
.mv-title .main-text-line[data-delay="2"] {
  transform: translateX(-100px);
}

.mv-title .main-text-line.visible {
  opacity: 1;
  transform: translateX(0);
}

.mv-title span.sub-text {
  display: block;
  line-height: var(--line-height-relaxed);
  font-size: var(--font-size-fixed-md);
  margin-bottom: 20px;
}

  .mv-title span.sub-text-2 {
    display: block;
    margin-bottom: 20px;
    font-size: var(--font-size-fixed-md);
    line-height: var(--line-height-relaxed);
  }

@media (max-width: 1024px) {
  h1 {
    width: 80%;
  }
}

@media (max-width: 767px) {
  h1 {
    width: 100%;
  }

  .mv-title h1.main-text {
    font-size: 20px;
font-weight: 600;
    line-height: var(--line-height-relaxed);
  }

  .main-visual {
    /* 固定ヘッダー(約70px)の分を引いて、画面ちょうどに収める */
    height: calc(100svh - 70px);
  }

  .mv-title {
    position: relative;
  }

  .mv-title .sub-text-wrapper {
    max-height: 200px;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
  }

  .mv-title {
    position: relative;
  }

  .mv-title .sub-text-scroll-indicator {
    position: absolute;
    right: -40px;
    pointer-events: none;
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row;
    gap: 10px;
  }

  .mv-title .sub-text-scroll-indicator .scroll-arrow {
    width: 32px;
    height: 32px;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    animation: arrow-float 2s ease-in-out infinite;
  }

  @keyframes arrow-float {
    0%, 100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-8px);
    }
  }

  .mv-title .sub-text-scroll-indicator .scroll-arrow::before {
    content: "";
    position: absolute;
    width: 2px;
    height: 24px;
    background: #ffffff;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
  }

  .mv-title .sub-text-scroll-indicator .scroll-arrow::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    left: 50%;
    top: 12px;
    transform: translateX(-50%) rotate(45deg);
  }

  .mv-title .sub-text-scroll-up .scroll-arrow::before {
    top: 12px;
    height: 20px;
  }

  .mv-title .sub-text-scroll-up .scroll-arrow::after {
    top: 12px;
    transform: translateX(-50%) rotate(-135deg);
  }

  .mv-title .sub-text-scroll-indicator .scroll-indicator-line {
    width: 1px;
    height: 200px;
    background: #ffffff;
    opacity: 0.3;
    animation: scroll-line-pulse 2s ease-in-out infinite;
    flex-shrink: 0;
    display: block;
    margin-left: 12px;
    position: relative;
  }

  .mv-title .sub-text-scroll-indicator .scroll-indicator-line::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: repeating-linear-gradient(
      to bottom,
      transparent 0px,
      transparent 4px,
      #ffffff 4px,
      #ffffff 8px
    );
    opacity: 0.6;
  }

  @keyframes scroll-line-pulse {
    0%, 100% {
      opacity: 0.3;
    }
    50% {
      opacity: 0.8;
    }
  }

  .mv-title .sub-text-scroll-up,
  .mv-title .sub-text-scroll-down {
    top: 0;
  }

  /* SPの時はJavaScriptで表示されるので、!importantを付けてPCのスタイルを上書き */
  .mv-title .sub-text-scroll-indicator[style*="display: flex"] {
    display: flex !important;
  }

  .mv-title .mv-scroll-indicator {
    position: absolute;
    right: 63px;
    bottom: -50px;
    font-size: 42px;
    color: #ffffff;
    opacity: 0.8;
    pointer-events: none;
    animation: mv-scroll-bounce 1.8s ease-in-out infinite;
  }
}

/* PCの時は矢印とドット線を完全に非表示 */
@media (min-width: 768px) {
  .mv-title .sub-text-scroll-indicator {
    display: none !important;
  }
}

@keyframes mv-scroll-bounce {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
  100% {
    transform: translateY(0);
  }
}

@media (max-width: 400px) {
  h1 {
    width: 100%;
  }

  .main-visual {
    height: calc(100svh - 70px);
  }

  .mv-title h1.main-text {
    font-size: 20px;
  }

  .mv-title span.sub-text {
    font-size: 12px;
  }

  .mv-title span.sub-text-2 {
    font-size: 12px;
  }
}

/* 

Why Soft Skills?

*/

#why-soft-skills {
  padding: var(--space-xxl) 16px;
}

#why-soft-skills h2 {
  text-align: center;
}

#why-soft-skills .container .wrapper .item p {
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-l);
}

#why-soft-skills .container .wrapper .item p.jp {
  font-family: var(--font-family-noto-serif-jp);
}

#why-soft-skills .container .wrapper .item:nth-child(2) {
  padding-right: 60px;
}

#why-soft-skills .container .wrapper .item .why-soft-skills-bg img {
  max-width: 80%;
  height: 600px;
  object-fit: cover;
}

#why-soft-skills .container .wrapper .item .why-soft-skills-overlay {
  position: absolute;
  top: 0;
  right: 10%;
  bottom: auto;
}

#why-soft-skills .container .wrapper .item .why-soft-skills-overlay img {
  width: 100%;
}

#why-soft-skills .container .wrapper .item:nth-child(2) p span {
  display: block;
  margin-bottom: 40px;
  line-height: var(--line-height-relaxed);
}

#why-soft-skills .container .wrapper .item:nth-child(2) p span:last-child {
  margin-bottom: 40px;
}

/* 

Why Work with Me?

*/

@media (max-width: 1100px) {
}

@media (max-width: 767px) {
  #why-soft-skills {
    padding: var(--space-xxl) 32px;
  }

  #why-soft-skills .container {
    padding: 0px;
  }

  #why-soft-skills .container .wrapper {
    display: block;
  }

  /* 背景用の画像は非表示にして、オーバーレイ側の画像をそのまま表示 */
  #why-soft-skills .container .wrapper .item .why-soft-skills-bg {
    display: none;
  }

  #why-soft-skills .container .wrapper .item .why-soft-skills-overlay {
    position: static;
    display: block;
    margin: 0 auto;
    max-width: 100%;
  }

  #why-soft-skills .container .wrapper .item .why-soft-skills-overlay img {
    width: 100%;
    height: auto;
    display: block;
  }

  /* テキストブロック（下） */
  #why-soft-skills .container .wrapper .item:nth-child(2) {
    width: 100%;
    padding-right: 0;
  }

  #why-soft-skills h2 {
    margin-bottom: 50px;
  }

  #why-soft-skills .container .wrapper .item:nth-child(2) p span {
    display: block;
    line-height: 1.8;
    margin-bottom: 12px;
  }

  #why-soft-skills .container .wrapper .item:nth-child(2) p span:last-child {
    margin-bottom: 0;
  }

  #why-soft-skills .btn {
    margin-top: 24px;
  }
}

/* 

tag

*/

#tag {
  overflow: hidden;
  padding: 40px 0;
  margin-bottom: var(--space-xl);
}

.tag-wrapper {
  display: flex;
  gap: 40px;
  will-change: transform;
}

.tag-slide {
  display: flex;
  gap: 40px;
  flex-shrink: 0;
}

#tag .item {
  white-space: nowrap;
  font-size: var(--font-size-fixed-lg);
  color: var(--color-dark-brown);
  background-color: var(--color-white);
  border-radius: var(--border-radius-xl);
  padding: 10px 20px;
  flex-shrink: 0;
}

/* 

service

*/
#service {
  background-color: var(--color-dark-brown);
  padding: var(--space-xxl) 0;
}

#service .container .wrapper {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 80px;
}

#service .container .wrapper .box {
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

#service .container .wrapper .box:hover {
  transform: scale(0.98);
}

#service .container .wrapper .box .img-item {
  width: 100%;
  margin-bottom: 0;
}

#service .container .wrapper .box .img-item img {
  width: 100%;
  height: auto;
  display: block;
}

#service .container .wrapper .box .text-item {
  background-color: var(--color-white);
  padding: 40px;
  display: flex;
  flex-direction: column;
  text-align: center;
  gap: 10px;
  height: 380px;
}

#service .container .wrapper .box .text-item h3 {
  font-family: var(--font-family-montserrat);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-fixed-lg);
  color: var(--color-dark-brown);
  margin: 0;
}

/* 日本語ページのh3にNoto Serif JPフォントを適用 */
body.jp-page #service .container .wrapper .box .text-item h3,
body.page-template-page-jp-php #service .container .wrapper .box .text-item h3 {
  font-family: var(--font-family-noto-serif-jp);
}

#service .container .wrapper .box .text-item p {
  color: var(--color-dark-brown);
  text-align: left;
  line-height: var(--line-height-default);
  margin: 0;
}

#service .container .wrapper .box .text-item p.jp {
  text-align: left;
  font-family: var(--font-family-noto-serif-jp);
}

#service .container .wrapper .box .text-item p span {
  font-weight: var(--font-weight-bold);
  display: inline-block;
  margin-bottom: 20px;
}

#service .container .wrapper .box .text-item span.note-text {
  font-weight: normal;
  color: var(--color-dark-brown);
  text-align: left;
  font-family: var(--font-family-noto-serif-jp);
  font-size: var(--font-size-fixed-sm);
  margin-bottom: 0;
  display: block;
}

/* フロントページのnote-textにMontserratフォントを適用 */
body:not(.jp-page) #service .container .wrapper .box .text-item span.note-text {
  font-family: var(--font-family-montserrat);
}

#service .container .wrapper .box .text-item p.jp span {
  font-family: var(--font-family-noto-serif-jp);
}

#service .container .wrapper .box .text-item .btn {
  margin-top: auto;
}

@media (max-width: 1080px) {
  #service .container .wrapper {
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 1024px) {
}

@media (max-width: 767px) {
  #service .container .wrapper {
    gap: 40px 160px;
  }

  #service .container .wrapper .box .text-item {
    flex: 1;
    padding: 40px 32px;
  }
}

/* 

Why Work  with Me ?

*/

#why-work-with-me {
  padding: var(--space-xxl) 16px var(--space-xxl) 16px;
}

#why-work-with-me h2 {
  text-align: center;
  font-family: var(--font-family-montserrat);
}

#why-work-with-me .container .wrapper .item:nth-child(1) p {
  display: block;
  margin-bottom: 20px;
  line-height: var(--line-height-relaxed);
}

#why-work-with-me .container .wrapper .item:nth-child(1) p.jp {
  font-family: var(--font-family-noto-serif-jp);
}

#why-work-with-me .container .wrapper .item:nth-child(1) p:last-child {
  margin-bottom: 0px ;
}

#why-work-with-me .container .wrapper .item .why-soft-skills-bg img {
  max-width: 80%;
  height: 600px;
  object-fit: cover;
  margin-left: auto;
}

#why-work-with-me .container .wrapper .item .why-soft-skills-overlay {
  position: absolute;
  top: 0;
  left: 10%;
  bottom: auto;
}

#why-work-with-me .container .wrapper .item .why-soft-skills-overlay img {
  width: 100%;
}

#why-work-with-me .container .wrapper .item p span.why-work-with-me-point {
  display: block;
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-m);
}

#why-work-with-me .container .wrapper .item p.why-work-with-me-point.text-indent {
  line-height: 1.5;
}

@media (max-width: 767px) {
  #why-work-with-me {
    padding: var(--space-xxl) 32px;
  }

  #why-work-with-me .container .wrapper {
    display: flex;
    flex-direction: column;
  }

  /* 画像ブロック（2番目のitem）を先に表示 */
  #why-work-with-me .container .wrapper .item:nth-child(2) {
    order: 1;
    width: 100%;
    margin-bottom: 24px;
  }

  #why-work-with-me .container .wrapper .item:nth-child(1) {
    order: 2;
    width: 100%;
    padding-left: 0;
  }

  /* 背景用の画像は非表示にして、オーバーレイ側の画像だけ表示 */
  #why-work-with-me .container .wrapper .item .why-soft-skills-bg {
    display: none;
  }

  #why-work-with-me .container .wrapper .item .why-soft-skills-overlay {
    position: static;
    display: block;
    margin: 0 auto;
    max-width: 100%;
  }

  #why-work-with-me .container .wrapper .item .why-soft-skills-overlay img {
    width: 100%;
    height: auto;
    display: block;
  }

  #why-work-with-me h2 {
    margin-bottom: 50px;
  }

  #why-work-with-me .container .wrapper .item:nth-child(1) p  {
    display: block;
    margin-bottom: 12px;
  }

  #why-work-with-me .container .wrapper .item:nth-child(1) p:last-child {
    margin-bottom: 0;
  }

  #why-work-with-me .btn {
    margin-top: 24px;
  }
}

/* 

profile

*/

#profile {
  background-color: var(--color-dark-brown);
  padding: var(--space-xxl) 0;
}

#profile h2 {
  text-align: center;
}

#profile .container .wrapper {
  display: flex;
  gap: 60px;
}

#profile .container .wrapper .img-item {
  width: 20%;
  flex-shrink: 0;
}

#profile .container .wrapper .img-item img {
  width: 100%;
  height: auto;
  display: block;
}

#profile .container .wrapper .text-item {
  width: 80%;
  background-color: var(--color-white);
  padding: 40px;
}

#profile .container .wrapper .text-item h3 {
  font-family: var(--font-family-montserrat);
  font-weight: var(--font-weight-light);
  color: var(--color-black);
  font-size: 24px;
  display: inline-block;
  border-bottom: 1px solid var(--color-dark-brown);
  padding-bottom: 10px;
  margin-bottom: 30px;
}

#profile .container .wrapper .text-item h3.jp {
  font-family: var(--font-family-noto-serif-jp);
}

#profile .container .wrapper .text-item p {
  line-height: var(--line-height-relaxed);
  margin-bottom: 20px;
}

#profile .container .wrapper .text-item p.jp {
  font-family: var(--font-family-noto-serif-jp);
}

#profile .container .wrapper .text-item p span {
  display: inline-block;
  margin-bottom: 5px;
}

#profile .container .wrapper .text-item p span.profile-detail-text {
  font-size: var(--font-size-fixed-sm);
  display: block;
}

#profile .container .wrapper .text-item p span.profile-detail-text {
  font-size: var(--font-size-fixed-sm);
  display: block;
}

@media (max-width: 1024px) {
  #profile .container .wrapper {
    flex-direction: column;
  }

  #profile .container .wrapper .img-item {
    width: 100%;
    width: 60%;
    margin: 0 auto;
  }

  #profile .container .wrapper .text-item {
    width: 100%;
    padding: 40px 32px;
  }
}

/* 

contact

*/
#contact {
  padding: var(--space-xxl) 0;
}

#contact .btn {
  background-color: var(--color-dark-gray);
  width: 200px;
  text-align: center;
  font-size: 24px;
}

/* 

詳細テキスト↓↓↓↓↓↓↓↓

*/

.company-details-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  /* ヘッダーなど他要素より必ず前面に出す */
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.company-details-overlay.active {
  opacity: 1;
  visibility: visible;
}

.company-details-content {
  position: relative;
  width: 80%;
  max-height: 90vh;
  background-color: var(--color-dark-brown);
  padding: 60px 40px 40px;
  transform: scale(0.8);
  transition: transform 0.3s ease-in-out;
  overflow-y: auto;
}

.company-details-overlay.active .company-details-content {
  transform: scale(1);
}

.company-details-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 32px;
  cursor: pointer;
  color: var(--color-white);
  background: transparent;
  border: none;
  z-index: 1000;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
}

.service-detail {
  display: none;
}

#company-details-overlay .company-details-inner h3 {
  font-family: var(--font-family-montserrat);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-fixed-lg);
  color: var(--color-white);
  margin-bottom: 20px;
  padding-bottom: 10px;
  display: inline-block;
}

#company-details-overlay .company-details-inner h3.jp {
  font-family: var(--font-family-noto-serif-jp);
}

#company-details-overlay .company-details-inner h3:first-of-type {
  border-bottom: 1px solid var(--color-white);
}

.company-details-inner h3:first-child {
  margin-top: 0;
}

.company-details-inner ul {
  list-style: none;
  padding: 0 0 0 30px;
  margin: 0 0 30px 0;
}

.company-details-inner ul li {
  padding: 10px 0;
  padding-left: 20px;
  position: relative;
  color: var(--color-white);
  font-family: var(--font-family-noto-serif-jp);
  line-height: var(--line-height-relaxed);
}

/* フロントページのcompany-details-inner ul liにMontserratフォントを適用 */
body:not(.jp-page) .company-details-inner ul li {
  font-family: var(--font-family-montserrat);
}

/* Service details (modal content blocks) */
#service-details-overlay .service-detail {
  display: none;
}

#service-details-overlay .service-detail h3 {
  font-family: var(--font-family-montserrat);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-fixed-lg);
  color: var(--color-white);
  margin-bottom: 20px;
  padding-bottom: 10px;
  display: inline-block;
}

#service-details-overlay .service-detail h3.jp {
  font-family: var(--font-family-noto-serif-jp);
}

#service-details-overlay .service-detail h3:first-of-type {
  border-bottom: 1px solid var(--color-white);
}

#service-details-overlay .service-detail h4 {
  font-family: var(--font-family-montserrat);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-fixed-lg);
  color: var(--color-white);
  margin-bottom: 20px;
}

#service-details-overlay .service-detail h4.jp {
  font-family: var(--font-family-noto-serif-jp);
}

#service-details-overlay .service-detail p {
  font-family: var(--font-family-montserrat);
  color: var(--color-white);
  margin-bottom: 20px;
  line-height: var(--line-height-relaxed);
}

#service-details-overlay .service-detail p.jp {
  font-family: var(--font-family-noto-serif-jp);
}

#service-details-overlay .service-detail p.service3 {
  color: var(--color-black);
  background-color: var(--color-white);
  padding: 20px 30px;
}

#service-details-overlay .service-detail p.service3 span {
  font-family: var(--font-family-noto-serif-jp);
}

#service-details-overlay .service-detail p.service4 {
  margin-bottom: 20px;
}

#service-details-overlay .service-detail.active {
  display: block;
}

@media (max-width: 767px) {
  .company-details-inner ul li {
    padding-left: 0px;
  }

  .company-details-inner ul {
    padding: 0 0 0 0px;
  }

  .company-details-content {
    padding: 60px 40px 40px;
    width: 90%;
  }

  #service-details-overlay .service-detail p.service3 {
    padding: 20px 16px;
  }
}
