/* =========================================================
   index.css（TOPページ専用）
   Figma: top_SP 177:70 / 177:242、top_PC 177:463 / 177:638
   動き：デザイナー指示 animation.html（ロード演出・背景の黒⇄白反転・英文の行塗り）
   SP基準（390）→ 768px〜 でPC（1440）の値に切り替え。
========================================================= */

/* ---------------------------------------------------------
   背景の黒⇄白反転（js/top.js が body.has-dark-header を付け外し）
   各ブロックは背景透明＋文字色は継承。body の色が1.2秒かけて切り替わると全体が追従する。
   フッターは common.css で常に黒。
--------------------------------------------------------- */
body.home {
  --top-sub: rgba(17, 17, 17, 0.15);   /* 英文の塗る前の色 */
  --top-line: rgba(0, 0, 0, 0.24);     /* NEWSの区切り線 */
  background-color: var(--color-white);
  color: var(--color-gray-100);
  transition: background-color 1.2s cubic-bezier(.4, 0, .2, 1), color 1.2s cubic-bezier(.4, 0, .2, 1);
}
body.home.has-dark-header {
  --top-sub: rgba(255, 255, 255, 0.2);
  --top-line: rgba(255, 255, 255, 0.2);
  background-color: var(--color-black);
  color: var(--color-white);
}

.top { display: block; color: inherit; }
.top *, .top *::before, .top *::after { box-sizing: border-box; }

/* 表示切替ユーティリティ：SPだけ改行など */
.u-sp { display: inline; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* TOPの下線ボタンは背景に合わせて文字・線とも現在の文字色。.c-btn は common.css */
.top .c-btn { color: inherit; } /* 下線は ::after（currentColor）なので文字色に追従 */

/* ---------------------------------------------------------
   KV（KVありパターンのみ）
--------------------------------------------------------- */
.top-kv { padding: 120px var(--padding-20); }
.top-kv__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-24);
  max-width: 640px;
  margin: 0 auto;
}
.top-kv__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 640 / 544;
  object-fit: cover;
}
.top-kv__caption {
  font-family: var(--font-futura-pt);
  font-size: var(--fs-8);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
}

/* ---------------------------------------------------------
   THE SPECIAL ONE（画面の高さの約9割・中身は中央）
--------------------------------------------------------- */
.top-intro {
  display: flex;
  flex-direction: column;
  min-height: max(450px, calc(90svh - 72px));
  padding: var(--padding-8) var(--padding-20) 0;
  font-family: var(--font-futura-pt);
}
.top-intro__inner { flex: 1 0 auto; display: flex; flex-direction: column; }
.top-intro__sttl {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 21px;
  font-size: var(--fs-12);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.top-intro__est { font-size: var(--fs-10); }
.top-intro__body {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--gap-40);
  padding: 40px 0;
}
.top-intro__group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 1.14px + 3.81vw, 56px); /* ONE と英文の間：SP 16 → PC 56 */
}
.top-intro__title {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center; /* THE を SPECIAL の上下中央に（2026-10 要望） */
  /* THE SPECIAL ONE は画面幅390〜1440pxで比例して可変（SP値→PC値）。範囲外は上下限で止まる */
  column-gap: clamp(8px, 5.03px + 0.76vw, 16px);
  row-gap: clamp(16px, 11.54px + 1.14vw, 28px);
  margin: 0;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}
.top-intro__the {
  font-family: var(--font-didot);
  font-size: clamp(24px, 10.63px + 3.43vw, 60px);
}
.top-intro__special {
  font-family: var(--font-optima-nova-lt-pro);
  font-size: clamp(40px, 18.46px + 5.52vw, 98px);
  font-style: italic;
  font-weight: 300;
}
.top-intro__one {
  flex: 0 0 100%;
  display: flex;
  justify-content: center;
}
.top-intro__one svg { display: block; width: clamp(220px, 93.71px + 32.38vw, 560px); height: auto; overflow: visible; }
/* THE SPECIAL ONE 下の英文：見出しと同じく画面幅390〜1440pxで比例（SP 7px/行間12 → PC 12px/行間16）
   改行位置は Figma どおり <br> で固定（SP 3行／PC 2行）。自動で折り返さない */
.top-intro__copy {
  white-space: nowrap;
  margin: 0;
  font-size: clamp(7px, 5.14px + 0.48vw, 12px);
  line-height: clamp(12px, 10.51px + 0.38vw, 16px);
  letter-spacing: 0.02em;
  text-align: center;
}

/* ---------------------------------------------------------
   WHAT'S NEW（特集スライダー）
--------------------------------------------------------- */
.top-new {
  display: flex;
  flex-direction: column;
  gap: var(--gap-20);
  padding: 0 var(--padding-20) 64px;
  font-family: var(--font-futura-pt);
}
.top-new__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.top-new__title {
  margin: 0;
  font-size: var(--fs-24);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.top-new__pager { display: flex; gap: var(--gap-16); }
.top-new__dot {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--font-futura-pt);
  font-size: var(--fs-12);
  font-weight: 500;
  letter-spacing: 0.05em;
  color: inherit;
  opacity: 0.5;
  transition: opacity 0.3s;
}
.top-new__dot.is-active,
.top-new__dot:hover { opacity: 1; }

/* スライドは重ねてフェード切替（高さは1枚目で確保） */
.top-new__track { display: grid; }
.top-new__slide {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: var(--gap-20);
  color: inherit;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}
.top-new__slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s ease;
}
.top-new__media {
  width: 100%;
  aspect-ratio: 350 / 560;
  overflow: hidden;
  background-color: var(--color-gray-100);
}
.top-new__media picture { display: block; width: 100%; height: 100%; }
.top-new__media img,
.top-new__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.top-new__meta { display: flex; flex-direction: column; }
.top-new__name {
  margin: 0;
  padding: var(--padding-8) 0;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.01em;
}

/* 日付 — カテゴリ（WHAT'S NEW / NEWS 共通） */
.c-news-meta {
  display: flex;
  align-items: center;
  white-space: nowrap; /* 各ラベルの中では折り返さない */
  flex-wrap: wrap;     /* カテゴリが2つで幅が足りないときはラベル単位で折り返す */
  gap: 4px var(--gap-8);
  font-family: var(--font-futura-pt);
  font-size: var(--fs-12);
  letter-spacing: 0.05em;
  line-height: 15px;
}
.c-news-meta__date { font-weight: 300; text-transform: uppercase; }
.c-news-meta__cat {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-8);
  font-weight: 500;
}
/* 2つ目以降は線の代わりに薄いスラッシュ（「— BRAND / CORPORATE」・80%・左右6px） */
.c-news-meta__cat + .c-news-meta__cat { margin-left: -2px; gap: 6px; } /* 左：親の間隔 8px − 2px ＝ 6px／右：6px */
.c-news-meta__cat + .c-news-meta__cat::before {
  content: '/';
  width: auto;
  height: auto;
  background: none;
  font-size: 80%;
  opacity: 0.5;
}
.c-news-meta__cat::before {
  content: '';
  width: 14px;
  height: 1px;
  background-color: currentColor;
}

/* ---------------------------------------------------------
   ブロック共通（Our Brands / NEWS / get in touch / RECRUIT）
--------------------------------------------------------- */
.top-block {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 64px var(--padding-20);
}
.top-heading {
  margin: 0;
  font-family: var(--font-futura-pt);
  font-size: var(--fs-48);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.top-text {
  margin: 0;
  font-family: var(--font-noto-sans-jp);
  font-size: 11px;
  font-weight: 500;
  line-height: var(--lh-24);
  letter-spacing: 0.12em;
}
.top-block__btn { align-self: flex-end; margin-top: 8px; } /* 32 + 8 = Figma 40 */

/* Our Brands */
.top-brands__heading { line-height: 44px; letter-spacing: -0.05em; }
.top-brands__body {
  display: flex;
  flex-direction: column;
  gap: var(--gap-24);
}
/* 英文の行塗り（js/top.js）：下にグレーの文、上に同じ行を重ねて mask の幅で左→右に塗る。戻すと塗りも戻る */
.top-fill {
  position: relative;
  margin: 0;
  font-family: var(--font-futura-pt);
  font-size: var(--fs-24);
  font-weight: 500; /* Futura PT Medium（Demi 600 だと太く見えるため） */
  line-height: 1.1;
  letter-spacing: 0.02em;
}
.top-fill__base { margin: 0; }
.top-fill.is-ready .top-fill__base {
  color: var(--top-sub);
  transition: color 1.2s cubic-bezier(.4, 0, .2, 1);
}
.top-fill__lines { position: absolute; inset: 0; pointer-events: none; }
.top-fill__line {
  display: block;
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(#000, #000);
          mask-image: linear-gradient(#000, #000);
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-size: 0% 100%;
          mask-size: 0% 100%;
}
.top-brands__body .top-block__btn { margin-top: var(--gap-16); } /* 24 + 16 = 40 */

/* NEWS */
.top-news { gap: 32px; }
.top-news .top-heading { letter-spacing: -0.03em; }
.top-news__body {
  display: flex;
  flex-direction: column;
  gap: var(--gap-40);
}
.top-news__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.top-news__list li {
  border-top: 1px solid var(--top-line);
  transition: border-color 1.2s cubic-bezier(.4, 0, .2, 1);
}
.top-news__list li:last-child { border-bottom: 1px solid var(--top-line); }
.top-news__item {
  display: flex;
  flex-direction: column;
  padding: var(--padding-28) 0;
  color: inherit;
}
.top-news__title {
  padding: var(--padding-8) 0;
  font-family: var(--font-noto-sans-jp);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: 0.12em;
}
/* ホバー：右ズレは無し。ふわっと薄くする（2026-10 クライアント要望） */
.top-news__item { transition: opacity 0.4s ease; }
.top-news__item:hover { opacity: 0.6; }
.top-news__empty { margin: 0; padding: 40px 0; text-align: center; }
.top-news .top-block__btn { margin-top: 0; }

/* RECRUIT */
.top-recruit__ttl { display: flex; flex-direction: column; gap: 4px; }
.top-recruit__sub {
  margin: 0;
  font-family: var(--font-futura-pt);
  font-size: var(--fs-20);
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------
   ロード演出（html.motion のときだけ。js/top.js が .is-play を付ける）
   THE/SPECIAL：1文字ずつせり上がる → ONE：O→N→E の順に浮かぶ → 英文 → ボタン
   → WHAT'S NEW（見出し→番号→画像→タイトル）。KVありはKVを先にフェードイン。
--------------------------------------------------------- */
.top-intro__the .mask,
.top-intro__special .mask {
  display: inline-block;
  /* 下だけで隠す（左右・上は切らない）。overflow:hidden だとイタリックのはみ出しが欠けるため */
  clip-path: inset(-0.5em -0.5em 0 -0.5em);
  vertical-align: bottom;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.top-intro__the .ch,
.top-intro__special .ch { display: inline-block; }
html.motion .top-intro__title:not(.is-split) { visibility: hidden; }
html.motion .top-intro__the .ch,
html.motion .top-intro__special .ch {
  transform: translateY(110%);
  transition: transform 0.8s cubic-bezier(.16, 1, .3, 1) var(--d, 0ms);
}
html.motion .top-intro.is-play .ch { transform: none; }

html.motion .top-intro__one svg path {
  transform-box: fill-box;
  transform: translateY(18%);
  opacity: 0;
  transition: transform 1.1s cubic-bezier(.16, 1, .3, 1), opacity 0.9s ease;
}
html.motion .top-intro__one svg path:nth-child(3) { transition-delay: 0.4s; }  /* O */
html.motion .top-intro__one svg path:nth-child(2) { transition-delay: 0.55s; } /* N */
html.motion .top-intro__one svg path:nth-child(1) { transition-delay: 0.7s; }  /* E */
html.motion .top-intro.is-play .top-intro__one svg path { transform: none; opacity: 1; }

html.motion .top-intro__copy,
html.motion .top-intro__body > .c-btn,
html.motion .top-new__title,
html.motion .top-new__pager,
html.motion .top-new__media,
html.motion .top-new__meta {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1s ease, transform 1s cubic-bezier(.16, 1, .3, 1);
}
html.motion .top-intro__copy { transition-delay: 0.7s; }
html.motion .top-intro__body > .c-btn { transition-delay: 1s; }
html.motion .top-new__title { transition-duration: .6s; transition-delay: 1.6s; }
html.motion .top-new__pager { transition-duration: .6s; transition-delay: 1.7s; }
html.motion .top-new__media { transition-duration: .6s; transition-delay: 1.8s; }
html.motion .top-new__meta  { transition-duration: .6s; transition-delay: 1.95s; }
html.motion .top-intro.is-play .top-intro__copy,
html.motion .top-intro.is-play .top-intro__body > .c-btn,
html.motion .top-new.is-play .top-new__title,
html.motion .top-new.is-play .top-new__pager,
html.motion .top-new.is-play .top-new__media,
html.motion .top-new.is-play .top-new__meta { opacity: 1; transform: none; }
/* スライド切替後（2枚目以降）は待たずに表示 */
html.motion .top-new.is-played .top-new__media,
html.motion .top-new.is-played .top-new__meta { transition-delay: 0s; }

html.motion .top-kv { opacity: 0; transition: opacity 0.9s ease; }
html.motion .top-kv.is-play { opacity: 1; }

/* Our Brands の日本語とボタン：英文を塗り終えたら出る（戻すと隠れる） */
html.motion .top-brands .top-text,
html.motion .top-brands .top-block__btn {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.85s cubic-bezier(.16, 1, .3, 1), transform 0.85s cubic-bezier(.16, 1, .3, 1);
}
html.motion .top-brands .top-text { transition-delay: 0.12s; }
html.motion .top-brands .top-block__btn { transition-delay: 0.24s; }
html.motion .top-brands.is-filled .top-text,
html.motion .top-brands.is-filled .top-block__btn { opacity: 1; transform: none; }

/* =========================================================
   PC（768px〜）
========================================================= */
@media (min-width: 768px) {
  .u-sp { display: none; }

  .top-kv { padding: 120px; }

  .top-intro { min-height: max(600px, calc(90svh - 72px)); padding: var(--padding-40) 50px 0; }
  .top-intro__body { gap: 30px; }

  .top-new { padding: 0 var(--padding-40) 80px; }
  .top-new__title { font-size: 40px; }
  .top-new__media { aspect-ratio: 1360 / 680; }
  .top-new__meta {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }
  .top-new__name { padding: 0; }

  .top-block { padding: 80px var(--padding-40); }
  .top-heading { font-size: var(--fs-64); }
  .top-text { font-size: 15px; line-height: 2; }

  .top-brands {
    flex-direction: row;
    gap: var(--gap-16);
  }
  .top-brands__heading {
    flex: 0 0 37.7%; /* Figma 513 / 1360 */
    line-height: 1;
  }
  .top-brands__body { flex: 1 1 auto; min-width: 0; }
  .top-fill { font-size: 44px; }
  .top-brands__body .top-block__btn { margin-top: var(--gap-8); } /* 24 + 8 = Figma 32 */

  .top-news .top-heading { letter-spacing: -0.01em; }
  .top-news__item {
    flex-direction: row;
    align-items: center;
    gap: 48px;
  }
  .top-news__item .c-news-meta { flex: 0 0 240px; } /* Figma 175px → カテゴリ2つが1行に入るよう 240px（NEWS一覧と同じ） */
  .top-news__title { padding: 0; font-size: 15px; }

  .top-contact { gap: 30px; }
  .top-contact .top-heading,
  .top-recruit .top-heading { line-height: 53px; }
  .top-contact .top-block__btn { margin-top: -20px; } /* Figma：本文と10px間隔 */

  .top-recruit { gap: 30px; }
  .top-recruit__ttl { gap: var(--gap-20); }
  .top-recruit__sub { font-size: 22px; }
  .top-recruit .top-block__btn { margin-top: var(--gap-10); } /* 30 + 10 = 40 */
}
