@charset "UTF-8";

/* TOP ページ（依頼書 第2部 第6項 A〜C・第11項 TOP／第3部 第3項） */

/* ===== ① ヒーロー（修正1：お客様指定の参考サイトのFVの構成）
   白い角丸のカードの左に見出し・説明・ボタン、右半分に縦長の写真が縦に流れ続ける。
   後ろの黄色いリボンは前のまま。 ===== */
.top-hero {
  --hero-ribbon: #ffe601;
  --hero-text: #8a6d00;
  --intro-duration: 2600ms;
  position: relative;
  padding: 8px;
  background: var(--color-panel);
  isolation: isolate;
}

.top-hero__card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - 16px);
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  container-type: inline-size;
}

/* リボン（写真と文字の後ろを横切る太い線） */
.top-hero__ribbon {
  position: absolute;
  z-index: 0;
  color: var(--hero-ribbon);
  pointer-events: none;
}

.top-hero__ribbon svg {
  display: block;
  width: 100%;
  overflow: visible;
}

.top-hero__ribbon-path {
  stroke-dasharray: 1 1;
  stroke-dashoffset: 0;
}

.top-hero__ribbon--narrow {
  top: 15.7%;
  left: -14.6%;
  width: 158.5%;
}

.top-hero__ribbon--narrow svg {
  height: auto;
  aspect-ratio: 618 / 633.5;
}

.top-hero__ribbon--wide {
  display: none;
}

/* 左：英字サブ・見出し（修正3で説明文・ボタン・Scroll を削除） */
.top-hero__body {
  position: relative;
  z-index: 2;
  padding: 104px 24px 40px;
}

.top-hero__eyebrow {
  color: var(--hero-text);
  font-family: var(--font-en);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.5;
  white-space: nowrap;
}

.top-hero__eyebrow span {
  display: block;
}

.top-hero__headline {
  margin-top: 20px;
  font-size: 9.6cqw;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

/* 右：縦に流れる写真（2列。左の列は上へ、右の列は下へ） */
.top-hero__visual {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 12px;
  height: 380px;
  padding: 0 16px;
  overflow: hidden;
}

.top-hero__col {
  flex: 1;
  min-width: 0;
}

.top-hero__track {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 12px;
}

.top-hero__col--02 .top-hero__track {
  margin-top: -64px;
}

.top-hero__photo {
  overflow: hidden;
  border-radius: 14px;
  background: var(--color-panel);
}

.top-hero__photo picture {
  width: 100%;
  height: 100%;
}

.top-hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 写真は大・中・小の3種類。列ごとに順番を変え、左右の寄せも互い違いにする（修正2） */
.top-hero__col--01 {
  flex: 1.12;
}

.top-hero__col--02 {
  flex: 0.88;
}

.top-hero__photo--l {
  width: 100%;
  aspect-ratio: 4 / 5;
}

.top-hero__photo--m {
  width: 86%;
  aspect-ratio: 3 / 4;
}

.top-hero__photo--s {
  width: 68%;
  aspect-ratio: 1 / 1;
}

.top-hero__col--01 .top-hero__photo--s,
.top-hero__col--02 .top-hero__photo--m {
  margin-left: auto;
}

.top-hero__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-main);
}

.top-hero__badge img {
  width: 70%;
  height: auto;
}

@media screen and (min-width: 768px) and (max-width: 1023px) and (orientation: portrait),
  screen and (min-width: 1024px) and (orientation: portrait) and (hover: none) {
  .top-hero__body {
    padding: 128px 44px 48px;
  }

  .top-hero__headline {
    font-size: 7cqw;
  }

  .top-hero__visual {
    gap: 20px;
    height: 520px;
    padding: 0 44px;
  }

  .top-hero__track {
    gap: 20px;
    padding-bottom: 20px;
  }
}

@media screen and (min-width: 1024px) and (hover: hover),
  screen and (min-width: 768px) and (orientation: landscape) {
  .top-hero__card {
    flex-direction: row;
    align-items: center;
    height: calc(100svh - 16px);
    min-height: 600px;
  }

  .top-hero__ribbon--narrow {
    display: none;
  }

  .top-hero__ribbon--wide {
    top: 29.6%;
    left: 50%;
    display: block;
    width: max(101.1%, 100vw + 80px);
    height: 74.2%;
    transform: translateX(-50%);
  }

  .top-hero__ribbon--wide svg {
    height: 100%;
  }

  .top-hero__body {
    width: 47.6%;
    padding: 0 calc(var(--px) * 40) 0 calc(var(--px) * 140);
  }

  .top-hero__eyebrow {
    font-size: 1.5rem;
    line-height: 1.6;
  }

  .top-hero__headline {
    margin-top: calc(var(--px) * 28);
    font-size: calc(var(--px) * 58);
  }

  .top-hero__visual {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    gap: calc(var(--px) * 24);
    width: 52.4%;
    height: auto;
    padding: 0 calc(var(--px) * 40) 0 0;
  }

  .top-hero__track {
    gap: calc(var(--px) * 24);
    padding-bottom: calc(var(--px) * 24);
  }

  .top-hero__col--02 .top-hero__track {
    margin-top: calc(var(--px) * -96);
  }

  .top-hero__photo {
    border-radius: 22px;
  }

  .top-hero__badge {
    width: calc(var(--px) * 69);
    height: calc(var(--px) * 69);
  }
}

/* ===== 写真の列が流れ続ける ===== */
@keyframes hero-col-up {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(0, -50%, 0);
  }
}

.top-hero__track {
  animation: hero-col-up 70s linear infinite;
}

.top-hero__col--02 .top-hero__track {
  animation-duration: 80s;
  animation-direction: reverse;
}

.top-hero.is-offscreen .top-hero__track {
  animation-play-state: paused;
}

/* ===== 読み込み時の入り（修正1。2600ms の中で順に出る） ===== */
.is-js .top-hero.is-intro-wait .top-hero__ribbon-path,
.top-hero.is-intro .top-hero__ribbon-path {
  animation: intro-ribbon var(--intro-duration) linear both;
}

.is-js .top-hero.is-intro-wait .top-hero__visual,
.top-hero.is-intro .top-hero__visual {
  animation: hero-visual-in 1200ms var(--ease-out) 200ms both;
}

.is-js .top-hero.is-intro-wait .top-hero__headline,
.top-hero.is-intro .top-hero__headline {
  animation: intro-headline var(--intro-duration) linear both;
}

.is-js .top-hero.is-intro-wait .top-hero__eyebrow,
.top-hero.is-intro .top-hero__eyebrow {
  animation: hero-fade-up 900ms var(--ease-out) 700ms both;
}

.is-js .top-hero.is-intro-wait .top-hero__ribbon-path,
.is-js .top-hero.is-intro-wait .top-hero__visual,
.is-js .top-hero.is-intro-wait .top-hero__headline,
.is-js .top-hero.is-intro-wait .top-hero__eyebrow {
  animation-play-state: paused;
}

@media screen and (min-width: 1024px) and (hover: hover),
  screen and (min-width: 768px) and (orientation: landscape) {
  .is-js .top-hero.is-intro-wait .top-hero__headline,
  .top-hero.is-intro .top-hero__headline {
    animation-name: intro-headline-wide;
  }
}

@keyframes hero-fade-up {
  from {
    opacity: 0;
    transform: translate3d(0, 16px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes hero-visual-in {
  from {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes intro-ribbon {
  0% {
    stroke-dasharray: 0 1;
    visibility: hidden;
    animation-timing-function: var(--ease-out);
  }

  25%,
  100% {
    stroke-dasharray: 1 1;
    visibility: visible;
  }
}

@keyframes intro-headline {
  0%,
  35% {
    clip-path: inset(0 100% 0 0);
    opacity: 0;
    transform: translateX(-12px);
    animation-timing-function: var(--ease-out);
  }

  40% {
    opacity: 1;
  }

  55% {
    clip-path: inset(0 0 0 0);
    animation-timing-function: var(--ease-out);
  }

  57.5%,
  100% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes intro-headline-wide {
  0%,
  35% {
    clip-path: inset(0 100% 0 0);
    opacity: 0;
    transform: translateX(-20px);
    animation-timing-function: var(--ease-out);
  }

  40% {
    opacity: 1;
  }

  55% {
    clip-path: inset(0 0 0 0);
    animation-timing-function: var(--ease-out);
  }

  57.5%,
  100% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .top-hero__track,
  .top-hero__ribbon-path,
  .top-hero__visual,
  .top-hero__headline,
  .top-hero__eyebrow {
    animation: none !important;
  }
}

/* ===== ② コンセプト ===== */
.top-concept {
  position: relative;
  margin-top: 24vh;
  margin-top: 24svh;
  padding: 56px 24px 40px;
  isolation: isolate;
}

.top-concept__inner {
  max-width: 520px;
  margin: 0 auto;
}

.top-concept__copy {
  display: flex;
  flex-direction: column;
  gap: 48px;
  font-size: 1.4rem;
  letter-spacing: 0;
  line-height: 1.8;
}

.top-concept__copy p {
  font-weight: 500;
  text-box: trim-both cap alphabetic;
}

@supports not (text-box: trim-both) {
  .top-concept__copy {
    gap: 33.08px;
  }
}

.top-concept__photos {
  position: relative;
  margin-top: 7.2rem;
  aspect-ratio: 342 / 308.33;
}

.top-concept__photo {
  position: absolute;
  overflow: hidden;
  border-radius: 12px;
  background: var(--color-panel);
}

.top-concept__photo picture {
  width: 100%;
  height: 100%;
}

.top-concept__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-concept__photo--01 {
  top: 0;
  left: 0;
  z-index: 2;
  width: 68%;
  aspect-ratio: 3 / 2;
}

.top-concept__photo--02 {
  top: 30%;
  left: 62%;
  z-index: 3;
  width: 38%;
  aspect-ratio: 1 / 1;
}

.top-concept__photo--03 {
  top: 66%;
  left: 14%;
  z-index: 2;
  width: 44%;
  aspect-ratio: 16 / 10;
}

@media screen and (min-width: 768px) and (max-width: 1023px) and (orientation: portrait),
  screen and (min-width: 1024px) and (orientation: portrait) and (hover: none) {
  .top-concept {
    margin-top: 32vh;
    margin-top: 32svh;
    padding: 80px 44px 56px;
  }

  .top-concept__inner {
    max-width: 680px;
  }

  .top-concept__copy {
    gap: 52px;
    font-size: 1.6rem;
    line-height: 1.9;
  }

  .top-concept__photos {
    margin-top: 10rem;
  }
}

@supports not (text-box: trim-both) {
  @media screen and (min-width: 768px) and (max-width: 1023px) and (orientation: portrait),
    screen and (min-width: 1024px) and (orientation: portrait) and (hover: none) {
    .top-concept__copy {
      gap: 33.34px;
    }
  }
}

@media screen and (min-width: 1024px) and (hover: hover),
  screen and (min-width: 768px) and (orientation: landscape) {
  .top-concept {
    margin-top: 35vh;
    margin-top: 35svh;
    padding: min(7.6923077vw, 138px) 0;
  }

  .top-concept__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 1800px;
    min-height: min(53.8461538vw, 969.23px);
    padding: 0 min(1.5384615vw, 27.7px);
  }

  .top-concept__copy {
    gap: clamp(3.78rem, -0.0072rem + 3.6985vw, 6.65rem);
    padding-left: 7.69%;
    font-size: clamp(1.3rem, -0.1515rem + 1.4175vw, 2.4rem);
    line-height: 2.1;
    white-space: nowrap;
  }

  .top-concept__photos {
    position: absolute;
    inset: 0;
    margin-top: 0;
    aspect-ratio: auto;
    pointer-events: none;
  }

  .top-concept__photo--01 {
    top: 6%;
    left: 55%;
    width: 28%;
    aspect-ratio: 4 / 3;
  }

  .top-concept__photo--02 {
    top: 26%;
    left: 80%;
    width: 16%;
    aspect-ratio: 1 / 1;
  }

  .top-concept__photo--03 {
    top: 60%;
    left: 63%;
    width: 25%;
    aspect-ratio: 3 / 2;
  }
}

@supports not (text-box: trim-both) {
  @media screen and (min-width: 1024px) and (hover: hover),
    screen and (min-width: 768px) and (orientation: landscape) {
    .top-concept__copy {
      gap: clamp(2.004rem, 0.2014rem + 1.7603vw, 3.37rem);
    }
  }
}

/* ===== ③ 私たちについて（代表メッセージのカード） ===== */
.top-about {
  padding-top: 80px;
}

.top-about__card {
  display: flex;
  flex-direction: column;
  gap: 36px;
  margin-top: 40px;
}

.top-about__photo {
  overflow: hidden;
  aspect-ratio: 342 / 224.286;
  border-radius: 12px;
  background: var(--color-panel);
}

.top-about__photo picture {
  width: 100%;
  height: 100%;
}

.top-about__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-about__content {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.top-about__content .btn-view {
  align-self: flex-start;
  margin-top: -4px;
}

.top-about__label {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.top-about__label-en {
  font-family: var(--font-en);
  font-size: clamp(3.2rem, 2.7914rem + 1.0476vw, 4.3rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-box: trim-both cap alphabetic;
}

.top-about__label-ja {
  color: var(--color-accent-text);
  font-size: clamp(1.3rem, 1.2257rem + 0.1905vw, 1.5rem);
  font-weight: 600;
  line-height: 1.5;
  text-box: trim-both cap alphabetic;
}

.top-about__text {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.top-about__heading {
  font-size: clamp(1.7rem, 1.5143rem + 0.4762vw, 2.2rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.7;
  text-box: trim-both cap alphabetic;
}

.top-about__body {
  font-size: var(--fs-body);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.8;
  text-box: trim-both cap alphabetic;
}

.top-about__caption {
  display: flex;
  flex-flow: row wrap;
  align-items: baseline;
  font-feature-settings: "palt";
  letter-spacing: 0.046em;
}

.top-about__role {
  color: var(--color-sub);
  font-size: clamp(1.1rem, 1.0629rem + 0.0952vw, 1.2rem);
  font-weight: 500;
  line-height: 1.56;
}

.top-about__role::after {
  content: "　";
}

.top-about__name {
  font-size: clamp(1.2rem, 1.1257rem + 0.1905vw, 1.4rem);
  font-weight: 500;
  line-height: 1.56;
}

@media screen and (min-width: 768px) and (max-width: 1023px) and (orientation: portrait),
  screen and (min-width: 1024px) and (orientation: portrait) and (hover: none) {
  .top-about {
    padding-top: 120px;
  }

  .top-about__card {
    gap: 48px;
    margin-top: 48px;
  }

  .top-about__content {
    gap: 40px;
  }

  .top-about__content .btn-view {
    margin-top: -8px;
  }
}

@media screen and (min-width: 1024px) and (hover: hover),
  screen and (min-width: 768px) and (orientation: landscape) {
  .top-about {
    padding-top: calc(var(--px) * 240);
  }

  .top-about__card {
    flex-direction: row;
    align-items: flex-start;
    gap: calc(var(--px) * 64);
    margin-top: calc(var(--px) * 64);
    padding: calc(var(--px) * 48);
    overflow: hidden;
    border: 1px solid var(--color-line);
    border-radius: 20px;
    background: #fff;
  }

  .top-about__photo {
    flex: none;
    width: calc(var(--px) * 490);
    aspect-ratio: 490 / 350;
    border-radius: 16px;
  }

  .top-about__content {
    flex: 1 1 0;
    gap: calc(var(--px) * 48);
    min-width: 0;
  }

  .top-about__content .btn-view {
    margin-top: calc(var(--px) * 32 - var(--px) * 48);
  }

  .top-about__label {
    gap: calc(var(--px) * 24);
  }

  .top-about__label-en {
    font-size: clamp(3.272rem, 0.0007rem + 3.1946vw, 5.751rem);
  }

  .top-about__label-ja {
    font-size: clamp(1.161rem, 0.0011rem + 1.1327vw, 2.04rem);
  }

  .top-about__text {
    gap: calc(var(--px) * 32);
  }

  .top-about__heading {
    font-size: clamp(1.68rem, -0.0012rem + 1.6418vw, 2.954rem);
  }

  .top-about__body {
    letter-spacing: 0;
    line-height: 2;
  }

  /* 1文目「1998年の設立以来、〜続けてきました。」は1行に収める（修正3） */
  .top-about__line {
    white-space: nowrap;
  }

  .top-about__role {
    font-size: clamp(0.935rem, 0.0007rem + 0.9124vw, 1.643rem);
  }

  .top-about__name {
    font-size: clamp(1.082rem, -0.0001rem + 1.0567vw, 1.902rem);
  }
}

/* ===== ④ 事業内容（修正2：1行に1事業、縦に4行。スクロールで次の行が重なってくる） ===== */
.top-service {
  padding-top: 88px;
}

/* 見出し「Service 事業内容」は、4行が重なり終わるまで画面の上に残す（修正3）
   --service-head-top は JS がヘッダーの高さから決める */
.top-service .sec-head {
  position: sticky;
  top: var(--service-head-top, 76px);
  z-index: 1;
}

.top-service__list {
  --stack-step: 12px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 40px;
}

/* 各行は画面の上に貼り付き、次の行が下から重なる。貼り付く位置は1行ごとに少し下げ、前の行の上端をのぞかせる
   --stack-top は JS がヘッダーの高さと行の高さから決める */
.top-service__item {
  position: sticky;
  top: calc(var(--stack-top, 76px) + var(--stack-index, 0) * var(--stack-step));
}

.top-service__item:nth-child(2) {
  --stack-index: 1;
}

.top-service__item:nth-child(3) {
  --stack-index: 2;
}

.top-service__item:nth-child(4) {
  --stack-index: 3;
}

/* 重なるにつれて、下になった行は少し小さく・暗くなる（--stack-p は JS が 0〜1 で渡す） */
.top-service__panel {
  --stack-p: 0;
  position: relative;
  display: flex;
  flex-direction: column-reverse;
  gap: 20px;
  padding: 12px 12px 24px;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 -12px 32px -16px rgba(35, 24, 21, 0.22);
  transform: scale(calc(1 - var(--stack-p) * 0.06));
  transform-origin: center top;
}

.top-service__panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--color-dark);
  opacity: calc(var(--stack-p) * 0.28);
  pointer-events: none;
}

.top-service__content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 8px;
}

.top-service__num {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-en);
  font-size: 3.6rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
}

.top-service__num-label {
  color: var(--color-accent-text);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.top-service__title {
  font-size: clamp(1.6rem, 1.4514rem + 0.381vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.top-service__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
}

.top-service__link:focus-visible {
  outline: none;
}

.top-service__link:focus-visible::after {
  outline: 2px solid var(--color-dark);
  outline-offset: -4px;
}

.top-service__body {
  font-size: clamp(1.3rem, 1.2257rem + 0.1905vw, 1.5rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.7;
}

.top-service__more {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  font-family: var(--font-en);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.top-service__more .btn-arrow {
  --size: 22px;
  --glyph-w: 9.67px;
  --glyph-h: 9.33px;
}

.top-service__photo {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: var(--color-panel);
}

.top-service__photo picture {
  width: 100%;
  height: 100%;
}

.top-service__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media screen and (min-width: 768px) and (max-width: 1023px) and (orientation: portrait),
  screen and (min-width: 1024px) and (orientation: portrait) and (hover: none) {
  .top-service__list {
    --stack-step: 14px;
    gap: 32px;
    margin-top: 48px;
  }

  .top-service__item {
    top: calc(var(--stack-top, 92px) + var(--stack-index, 0) * var(--stack-step));
  }

  .top-service__panel {
    flex-direction: row;
    align-items: center;
    gap: 28px;
    padding: 16px 16px 16px 36px;
    border-radius: 20px;
  }

  .top-service__content {
    flex: 1 1 0;
    min-width: 0;
    padding: 0;
  }

  .top-service__photo {
    flex: 0 0 44%;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
  }
}

@media screen and (min-width: 1024px) and (hover: hover),
  screen and (min-width: 768px) and (orientation: landscape) {
  .top-service {
    padding-top: calc(var(--px) * 144);
  }

  .top-service__list {
    --stack-step: calc(var(--px) * 18);
    gap: calc(var(--px) * 48);
    margin-top: calc(var(--px) * 64);
  }

  .top-service__item {
    top: calc(var(--stack-top, 86px) + var(--stack-index, 0) * var(--stack-step));
  }

  .top-service__panel {
    flex-direction: row;
    align-items: stretch;
    gap: calc(var(--px) * 64);
    min-height: calc(var(--px) * 400);
    padding: calc(var(--px) * 20) calc(var(--px) * 20) calc(var(--px) * 20) calc(var(--px) * 64);
    border-radius: 28px;
  }

  .top-service__content {
    flex: 1 1 0;
    justify-content: center;
    gap: calc(var(--px) * 20);
    min-width: 0;
    padding: 0;
  }

  .top-service__num {
    gap: calc(var(--px) * 14);
    font-size: calc(var(--px) * 64);
  }

  .top-service__num-label {
    font-size: max(12px, calc(var(--px) * 14));
  }

  .top-service__title {
    font-size: clamp(1.6rem, 0.0008rem + 1.5vw, 2.6rem);
  }

  .top-service__body {
    font-size: var(--fs-body);
  }

  .top-service__more {
    gap: calc(var(--px) * 14);
    margin-top: calc(var(--px) * 12);
    font-size: max(12px, calc(var(--px) * 14));
  }

  .top-service__more .btn-arrow {
    --size: calc(var(--px) * 30);
    --glyph-w: calc(var(--px) * 12.6);
    --glyph-h: calc(var(--px) * 12.2);
  }

  .top-service__photo {
    flex: 0 0 44%;
    aspect-ratio: auto;
    border-radius: 18px;
  }
}

/* ===== ⑤ 写真の帯 ===== */
.top-gallery {
  --set-w: calc(100vw * 1010 / 390);
  margin-top: 88px;
}

.top-gallery .marquee__track {
  width: calc(var(--set-w) * 3);
}

.top-gallery .marquee__item {
  flex: 0 0 calc(var(--set-w) / 4);
  height: 43.0769231vw;
}

@media screen and (min-width: 768px) and (max-width: 1023px) and (orientation: portrait),
  screen and (min-width: 1024px) and (orientation: portrait) and (hover: none) {
  .top-gallery {
    --set-w: calc(100vw * 1800 / 1300);
    margin-top: 104px;
  }

  .top-gallery .marquee__item {
    height: 23.0769231vw;
  }
}

@media screen and (min-width: 1024px) and (hover: hover),
  screen and (min-width: 768px) and (orientation: landscape) {
  .top-gallery {
    --set-w: min(100vw * 1800 / 1300, 2492.31px);
    margin-top: calc(var(--px) * 144);
  }

  .top-gallery .marquee__item {
    height: calc(var(--px) * 300);
  }
}

/* ===== ⑥⑦ 見出し左＋右の列 ===== */
.top-split {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

@media screen and (min-width: 1024px) and (hover: hover),
  screen and (min-width: 768px) and (orientation: landscape) {
  .top-split {
    flex-direction: row;
    align-items: flex-start;
    gap: calc(var(--px) * 92);
  }

  .top-split__head {
    flex: 0 0 calc(var(--px) * 296);
    min-width: 0;
  }
}

/* 見出しの英字は折り返さない（修正1：「Company」の y が2行目に落ちていた） */
.top-split .sec-head__en {
  white-space: nowrap;
}

/* ===== ⑥ 会社概要（修正2：会社情報・アクセス・沿革を横3列） ===== */
.top-company {
  padding-top: 71px;
}

.top-company__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 32px;
}

.top-company__item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.top-company__photo {
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background: var(--color-panel);
}

.top-company__photo picture {
  width: 100%;
  height: 100%;
}

.top-company__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-company__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
}

.top-company__label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.top-company__en {
  color: var(--color-accent-text);
  font-family: var(--font-en);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}

.top-company__title {
  font-size: clamp(1.3rem, 1.1514rem + 0.381vw, 1.7rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.top-company__link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.top-company__link:focus-visible {
  outline: none;
}

.top-company__link:focus-visible::after {
  outline: 2px solid var(--color-dark);
  outline-offset: 4px;
}

.top-company__foot .btn-arrow {
  --size: 18px;
  --glyph-w: 8.24px;
  --glyph-h: 8.02px;
  flex: none;
}

@media screen and (min-width: 768px) and (max-width: 1023px) and (orientation: portrait),
  screen and (min-width: 1024px) and (orientation: portrait) and (hover: none) {
  .top-company {
    padding-top: 104px;
  }

  .top-company__list {
    gap: 20px;
    margin-top: 48px;
  }

  .top-company__photo {
    aspect-ratio: 4 / 3;
    border-radius: 12px;
  }

  .top-company__en {
    font-size: 1.2rem;
  }

  .top-company__foot .btn-arrow {
    --size: 24px;
    --glyph-w: 10.5px;
    --glyph-h: 10.2px;
  }
}

@media screen and (min-width: 1024px) and (hover: hover),
  screen and (min-width: 768px) and (orientation: landscape) {
  .top-company {
    padding-top: calc(var(--px) * 144);
  }

  .top-company__list {
    gap: calc(var(--px) * 32);
    margin-top: calc(var(--px) * 64);
  }

  .top-company__item {
    gap: calc(var(--px) * 24);
  }

  .top-company__photo {
    aspect-ratio: 4 / 3;
    border-radius: 20px;
  }

  .top-company__label {
    gap: calc(var(--px) * 10);
  }

  .top-company__en {
    font-size: max(11px, calc(var(--px) * 14));
  }

  .top-company__title {
    font-size: clamp(1.455rem, 0.0008rem + 1.4201vw, 2.557rem);
  }

  .top-company__foot .btn-arrow {
    --size: calc(var(--px) * 34);
    --glyph-w: calc(var(--px) * 14.2);
    --glyph-h: calc(var(--px) * 13.8);
  }
}

/* ===== ⑦ 採用情報（修正1：握手の写真をセクションの背景に） ===== */
.top-recruit {
  padding: 88px 0 96px;
}

.top-recruit__box {
  position: relative;
  max-width: 1800px;
  margin: 0 auto;
  padding: 64px 0;
  overflow: hidden;
  border-radius: 24px;
  color: #fff;
  isolation: isolate;
}

.top-recruit__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--color-dark);
}

.top-recruit__bg picture {
  position: absolute;
  inset: 0;
}

.top-recruit__bg img {
  position: absolute;
  top: -10%;
  left: 0;
  width: 100%;
  height: 120%;
  object-fit: cover;
  object-position: 50% 51%;
  transform: translate3d(0, var(--parallax-y, 0px), 0);
}

/* 文字が読めるよう、左側を暗くする */
.top-recruit__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(35, 24, 21, 0.78) 0%,
    rgba(35, 24, 21, 0.6) 55%,
    rgba(35, 24, 21, 0.35) 100%
  );
}

.top-recruit .sec-head__en,
.top-recruit .sec-head__lead {
  color: #fff;
}

.top-recruit .sec-head__ja {
  color: var(--color-main);
}

.top-recruit__lead {
  font-size: clamp(1.1rem, 1.0257rem + 0.1905vw, 1.3rem);
  white-space: nowrap;
}

.top-recruit__panel {
  display: flex;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-text);
}

@media screen and (min-width: 768px) and (max-width: 1023px) and (orientation: portrait),
  screen and (min-width: 1024px) and (orientation: portrait) and (hover: none) {
  .top-recruit {
    padding: 104px 0 120px;
  }

  .top-recruit__box {
    padding: 88px 0;
  }
}

@media screen and (min-width: 1024px) and (hover: hover),
  screen and (min-width: 768px) and (orientation: landscape) {
  .top-recruit {
    padding: calc(var(--px) * 144) 0 calc(var(--px) * 184);
  }

  .top-recruit__box {
    padding: calc(var(--px) * 160) 0;
    border-radius: 32px;
  }

  .top-recruit__lead {
    font-size: clamp(1.161rem, 0.0011rem + 1.1327vw, 2.04rem);
    white-space: normal;
  }

  .top-recruit__side {
    flex: 1 1 auto;
    align-self: center;
    min-width: 0;
  }
}

/* =====================================================================
   フェーズ2：コンセプトの写真の入り（依頼書 第2部 第6項 F）
   ===================================================================== */
@property --enter-y {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

@property --enter-scale {
  syntax: "<number>";
  inherits: false;
  initial-value: 1;
}

.top-concept__photo {
  --parallax-y: 0px;
  transform: translate3d(0, calc(var(--parallax-y) + var(--enter-y, 0px)), 0) scale(var(--enter-scale, 1));
}

.is-js .top-concept__photo[data-reveal] {
  transition-property: opacity, --enter-y, --enter-scale;
  transition-duration: 800ms, 1.1s, 1.1s;
  transition-timing-function:
    cubic-bezier(0.4, 0, 0.2, 1),
    var(--ease-out),
    var(--ease-out);
}

.is-js .top-concept__photo--01[data-reveal] {
  --enter-y: 24px;
  --enter-scale: 1.05;
}

.is-js .top-concept__photo--02[data-reveal] {
  --enter-y: -22px;
  --enter-scale: 1.02;
}

.is-js .top-concept__photo--03[data-reveal] {
  --enter-y: 64px;
  --enter-scale: 1.1;
}

.is-js .top-concept__photo[data-reveal].is-shown {
  --enter-y: 0px;
  --enter-scale: 1;
  transform: translate3d(0, calc(var(--parallax-y) + var(--enter-y, 0px)), 0) scale(var(--enter-scale, 1));
}

/* =====================================================================
   フェーズ3：背景のリボン線（依頼書 第2部 第6項 D。修正1で線の形を本件オリジナルに）
   ===================================================================== */

/* ===== D 背景のリボン線（画面に固定・スクロールで描く） ===== */
.motion-lines {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: var(--lines-exit-opacity, 1);
  pointer-events: none;
}

.motion-lines__svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.motion-lines__svg--wide {
  display: none;
}

.motion-lines__path {
  opacity: var(--line-opacity, 0);
  stroke-dasharray: var(--line-draw, 0) 1;
  stroke-dashoffset: 0;
}

@media screen and (min-width: 1024px) and (hover: hover),
  screen and (min-width: 768px) and (orientation: landscape) {
  .motion-lines__svg--wide {
    display: block;
  }

  .motion-lines__svg--narrow {
    display: none;
  }
}

/* JSが無いときは描き終わりの薄い状態 */
html:not(.is-js) .motion-lines__path {
  opacity: 0.1;
  stroke-dasharray: 1 1;
}

.page-top .site-footer {
  z-index: 1;
}

/* ===== J コンセプトの写真のパララックス ===== */
.top-concept.is-parallax-active .top-concept__photo {
  will-change: transform;
}

/* ===== 動きを減らす設定のとき ===== */
@media (prefers-reduced-motion: reduce) {
  .motion-lines__path {
    opacity: var(--line-opacity, 0.1);
    stroke-dasharray: 1 1;
  }
}
