/* ==========================================================================
   TOPページ固有
   ========================================================================== */

/* --------------------------------------------------------------------------
   ローディング：ロゴが中央でゆっくりズームアウト → 背景が上下に分かれ、上は左・下は右へ開く
   -------------------------------------------------------------------------- */
.yk-loader {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
}
.yk-loader.is-active { display: block; }
.yk-loader__half {
  position: absolute;
  left: 0;
  right: 0;
  height: 50.5%;
  background: #111111;
  transition: transform 1.1s cubic-bezier(.77, 0, .18, 1);
}
.yk-loader__half--top { top: 0; }
.yk-loader__half--bottom { bottom: 0; }
.yk-loader__logo {
  position: absolute;
  left: 50%;
  top: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.3);
  transition: opacity 1s ease, transform 2.6s cubic-bezier(.22, .61, .36, 1);
}
/* ロゴのマーク部分だけ画像で表示し、社名はキャッチと同じ明朝体の文字で表示 */
.yk-loader__logo { display: flex; align-items: center; gap: .45em; font-size: min(28px, 5.3vw); white-space: nowrap; }
.yk-loader__logo img {
  display: block;
  width: auto;
  height: min(51px, 9.7vw);
  max-width: none;
  aspect-ratio: 130 / 55;
  object-fit: cover;
  object-position: left center;
}
.yk-loader__name {
  font-family: "Shippori Mincho B1", serif;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .08em;
}
.yk-loader.is-logo-in .yk-loader__logo { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.yk-loader.is-logo-out .yk-loader__logo { opacity: 0; transition: opacity .4s ease; }
.yk-loader.is-open { pointer-events: none; }
.yk-loader.is-open .yk-loader__half--top { transform: translateX(-100%); }
.yk-loader.is-open .yk-loader__half--bottom { transform: translateX(100%); }

/* --------------------------------------------------------------------------
   メインビジュアル
   -------------------------------------------------------------------------- */
.yk-mv {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  max-height: 1000px;
  overflow: hidden;
  background: #111111;
}
#slideshow {
  position: absolute;
  inset: 0;
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  max-height: 1000px;
}
#slideshow .swiper-slide,
#slideshow .main_slider__inner { width: 100%; height: 100%; }
#slideshow img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
  transform: scale(1);
  transition: transform 7s linear;
}
.yk-mv.is-zoom #slideshow img { transform: scale(1.08); }
.yk-mv__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(0deg, rgba(17, 17, 17, .85) 0%, rgba(17, 17, 17, 0) 35%),
    linear-gradient(90deg, rgba(17, 17, 17, .72) 0%, rgba(17, 17, 17, .38) 50%, rgba(17, 17, 17, .08) 100%);
}
.yk-mv__content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: clamp(20px, 3vw, 32px);
  height: 100%;
  padding: 0 clamp(28px, 5vw, 48px) clamp(80px, 14vh, 140px);
}
.yk-mv__catch {
  margin: 0;
  font-family: "Shippori Mincho B1", serif;
  font-weight: 800;
  font-size: clamp(40px, 7.4vw, 100px);
  line-height: 1.28;
  letter-spacing: .08em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .5);
}
.yk-mv__catch .yk-gold-text {
  text-shadow: none;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, .5));
}
/* キャッチ左背景のミンサー柄（白の半透明。サイズ・位置はキャッチの文字サイズに連動） */
.yk-mv__catch { position: relative; }
.yk-mv__minsa {
  position: absolute;
  z-index: -1;
  display: block;
  height: auto;
  max-width: none;
  filter: brightness(0) invert(1);
  opacity: .2;
  pointer-events: none;
}
.yk-mv__minsa--01 { top: -.55em; left: -1.1em; width: 1.7em; }
.yk-mv__minsa--02 { bottom: -.35em; left: -1.2em; width: .9em; opacity: .12; }
@media (max-width: 639px) {
  .yk-mv__minsa--01 { left: -.6em; }
  .yk-mv__minsa--02 { left: -.7em; }
}
.yk-mv__lead {
  margin: 0;
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 2;
  letter-spacing: .08em;
}

/* --------------------------------------------------------------------------
   現場ブログ（カード）
   -------------------------------------------------------------------------- */
.yk-blog-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(24px, 3vw, 36px);
}
.yk-blog-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #F2EEE6;
  transition: color .3s ease;
}
.yk-blog-card:hover { color: #C7A24B; }
.yk-blog-card__img {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid rgba(199, 162, 75, .2);
}
.yk-blog-card__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.yk-blog-card__title {
  margin: 0;
  font-family: "Shippori Mincho B1", serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.7;
  letter-spacing: .04em;
}

/* --------------------------------------------------------------------------
   事業内容（写真＋白枠ボックスの重なり）
   -------------------------------------------------------------------------- */
.yk-top-service__stroke {
  left: -1vw;
  top: clamp(40px, 6vw, 80px);
  font-size: clamp(100px, 18vw, 260px);
}
.yk-overlap {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
}
.yk-overlap__img {
  position: relative;
  grid-column: 1 / 9;
  grid-row: 1;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.yk-overlap__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.yk-overlap__box {
  position: relative;
  z-index: 1;
  grid-column: 7 / 13;
  grid-row: 1;
  margin-top: 120px;
}
.yk-overlap--reverse .yk-overlap__img { grid-column: 5 / 13; }
.yk-overlap--reverse .yk-overlap__box { grid-column: 1 / 7; transform: translateY(-64px); }
.yk-frame-box {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(28px, 4vw, 52px);
  background: #111111;
}
.yk-frame-box__title {
  margin: 0;
  font-family: "Shippori Mincho B1", serif;
  font-weight: 800;
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: .08em;
  line-height: 1.5;
}
@media (max-width: 899px) {
  .yk-overlap { grid-template-columns: minmax(0, 1fr); }
  .yk-overlap__img,
  .yk-overlap--reverse .yk-overlap__img { grid-column: 1; grid-row: 1; aspect-ratio: 16 / 10; }
  .yk-overlap__box,
  .yk-overlap--reverse .yk-overlap__box { grid-column: 1; grid-row: 2; margin-top: -32px; transform: none; }
}

/* 対応エリア */
.yk-area {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
  padding-top: clamp(48px, 6vw, 72px);
  border-top: 1px solid rgba(199, 162, 75, .3);
}
.yk-area__text {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.yk-area__title {
  margin: 0;
  font-family: "Shippori Mincho B1", serif;
  font-weight: 800;
  font-size: clamp(24px, 2.8vw, 34px);
  letter-spacing: .08em;
  line-height: 1.5;
}
.yk-area__sub {
  margin: 0;
  font-family: "Shippori Mincho B1", serif;
  font-weight: 600;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.8;
  letter-spacing: .06em;
}
.yk-area__map {
  flex: 1 1 360px;
  min-width: 0;
  max-width: 460px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   選ばれる理由（上端を斜めカット＋白線で区切る）
   -------------------------------------------------------------------------- */
.yk-reason {
  margin-top: -140px;
  padding: 280px 0 140px;
  clip-path: polygon(0 140px, 100% 0, 100% 100%, 0 100%);
}
.yk-reason__line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  height: 140px;
  pointer-events: none;
  background: linear-gradient(to bottom right, transparent calc(50% - 4.5px), #FFFFFF calc(50% - 4.5px), #FFFFFF calc(50% + 4.5px), transparent calc(50% + 4.5px));
}
.yk-reason__bg { background-position: center 60%; }
.yk-reason__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 17, 17, .75) 0%, rgba(17, 17, 17, .5) 45%, rgba(17, 17, 17, .78) 100%);
}
.yk-reason .yk-stack-lg { gap: clamp(40px, 5vw, 64px); }
.yk-reason__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  border-top: 1px solid rgba(199, 162, 75, .4);
  border-left: 1px solid rgba(199, 162, 75, .4);
}
.yk-reason__item {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(32px, 4vw, 48px) clamp(24px, 3vw, 40px);
  background: rgba(17, 17, 17, .94);
  border-right: 1px solid rgba(199, 162, 75, .4);
  border-bottom: 1px solid rgba(199, 162, 75, .4);
}
.yk-reason__num { display: flex; align-items: baseline; gap: 12px; }
.yk-reason__num .yk-num { align-self: auto; }
.yk-reason__num-en { font-size: 14px; letter-spacing: .2em; }
.yk-reason__title {
  margin: 0;
  font-family: "Shippori Mincho B1", serif;
  font-weight: 800;
  font-size: clamp(22px, 2.2vw, 26px);
  letter-spacing: .08em;
  line-height: 1.5;
}
.yk-reason__title--long {
  font-size: clamp(18px, 1.8vw, 22px);
  letter-spacing: .04em;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   採用バナー（背景を明るいグレー／濃いグレーで斜めに切り替え）
   -------------------------------------------------------------------------- */
.yk-recruit-bnr {
  padding: clamp(80px, 10vw, 128px) clamp(20px, 4vw, 40px);
  background: #555555;
}
.yk-recruit-bnr::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #949494;
  clip-path: polygon(0 0, 16% 0, 22% 100%, 0 100%);
  pointer-events: none;
}
.yk-recruit-bnr__link {
  position: relative;
  display: block;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #C7A24B;
  color: #F2EEE6;
  transition: border-color .3s ease;
}
.yk-recruit-bnr__link:hover { border-color: #D9B865; color: #F2EEE6; }
.yk-recruit-bnr__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}
.yk-recruit-bnr__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 17, 17, .95) 0%, rgba(17, 17, 17, .8) 55%, rgba(17, 17, 17, .45) 100%);
}
.yk-recruit-bnr__stroke {
  right: -10px;
  bottom: -24px;
  font-size: clamp(80px, 13vw, 180px);
}
.yk-recruit-bnr__body {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(40px, 6vw, 80px) clamp(24px, 5vw, 72px);
}
.yk-recruit-bnr__text {
  flex: 1 1 420px;
  min-width: 0;
  gap: 18px;
}
.yk-recruit-bnr__text .yk-heading { gap: 18px; }
.yk-recruit-bnr__lead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 0;
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.9;
}

/* --------------------------------------------------------------------------
   CMS出力（span内のカード）をgridの子として並べる
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   タブレット・スマホ調整
   -------------------------------------------------------------------------- */
@media (min-width: 640px) and (max-width: 1023px) {
  .yk-blog-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .yk-blog-card__title { font-size: 16px; }
}
@media (max-width: 899px) {
  .yk-reason__grid { grid-template-columns: minmax(0, 1fr); }
  .yk-reason { margin-top: -80px; padding: 160px 0 80px; clip-path: polygon(0 80px, 100% 0, 100% 100%, 0 100%); }
  .yk-reason__line { height: 80px; }
  .yk-recruit-bnr { padding: 56px 20px; }
}
@media (max-width: 639px) {
  /* ブログ：サムネ左・テキスト右の横並び */
  .yk-blog-cards { gap: 0; border-top: 1px solid rgba(199, 162, 75, .25); }
  .yk-blog-card {
    display: grid;
    grid-template-columns: 113px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    gap: 6px 16px;
    padding: 18px 0;
    border-bottom: 1px solid rgba(199, 162, 75, .25);
  }
  .yk-blog-card__img { grid-row: 1 / 3; }
  .yk-blog-card .yk-meta { align-self: end; }
  .yk-blog-card__title { font-size: 15px; line-height: 1.6; }
  .yk-top-service__stroke { top: 24px; }
  .yk-reason { margin-top: -48px; padding: 112px 0 64px; clip-path: polygon(0 48px, 100% 0, 100% 100%, 0 100%); }
  .yk-reason__line { height: 48px; }
  .yk-reason__item { padding: 28px 22px; gap: 14px; }
  .yk-reason__num .yk-num--lg { font-size: 44px; }
  .yk-reason__title--long { white-space: normal; }
  .yk-recruit-bnr { padding: 40px 16px; }
  .yk-recruit-bnr .yk-heading--lg .heading__ja { font-size: 24px; }
  .yk-recruit-bnr__lead { font-size: 14px; gap: 10px; }
  .yk-recruit-bnr .yk-btn--xl { height: 54px; padding: 0 28px; font-size: 14px; }
}

/* CMSスライダー：外枠（#slideshow）の高さに追従させる */
#slideshow #main_slider.slider_wrapper { --swiper-wrapper-height: 100%; height: 100%; }
#cms-slider-1-1-area { height: 100%; }
/* CMSスライダーの z-index がキャッチコピーの上に来ないよう重なり順を固定 */
#slideshow { z-index: 0; }
.yk-mv__shade { z-index: 1; }
.yk-mv__content { z-index: 2; }

/* スマホ：メインビューの高さを画面の70% */
@media (max-width: 639px) {
  .yk-mv,
  #slideshow {
    height: 70vh;
    height: 70svh;
    min-height: 0;
  }
}

/* 選ばれる理由：斜めの白線を端まで同じ太さに（カット線に沿った帯で描画） */
.yk-reason { --cut: 140px; --line: 9px; }
.yk-reason__line {
  height: calc(var(--cut) + var(--line));
  background: #FFFFFF;
  clip-path: polygon(0 var(--cut), 100% 0, 100% var(--line), 0 calc(var(--cut) + var(--line)));
}
@media (max-width: 899px) {
  .yk-reason { --cut: 80px; }
  .yk-reason__line { height: calc(var(--cut) + var(--line)); }
}
@media (max-width: 639px) {
  .yk-reason { --cut: 48px; --line: 6px; }
  .yk-reason__line { height: calc(var(--cut) + var(--line)); }
}

/* スマホ：対応エリアの地図を80%で中央 */
@media (max-width: 639px) {
  .yk-area__map { flex: none; width: 80%; margin: 0 auto; }
}

/* タブレット：メインビューの高さを画面の60% */
@media (min-width: 640px) and (max-width: 1024px) {
  .yk-mv,
  #slideshow {
    height: 60vh;
    height: 60svh;
    min-height: 0;
  }
}

/* スマホ：採用バナーの「採用情報を見る」ボタンを中央に */
@media (max-width: 639px) {
  .yk-recruit-bnr .yk-btn--xl { margin: 0 auto; }
}

/* スマホ：ローディングのロゴを少し大きく */
@media (max-width: 639px) {
  .yk-loader__logo { font-size: 6vw; }
  .yk-loader__logo img { height: 11vw; }
}
