/* ===============================
   KOMATSU JYUNYA - Top Page
   Font: Neue Haas Grotesk Display Pro (Adobe Fonts)
   =============================== */

:root {
  --font-en: "neue-haas-grotesk-display", "Helvetica Neue", Arial, sans-serif;
  --white: #ffffff;
  --dark: #1a1a1a;
  --fade: 2.4s;
  /* スライドのフェード時間 */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-en);
  color: var(--white);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding: 45px;
}

body,
html {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ---------- 背景スライドショー ---------- */
.slideshow {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #fff;
  overflow: hidden;
  height: calc(100vh - 90px);
  width: calc(100vw - 90px);
  margin: 45px;
}

/* slick全体の高さを親要素に合わせる */
.slideshow .slick-list,
.slideshow .slick-track {
  height: 100%;
}

.slide {
  height: 100%;
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  /* 非表示になるときは、2.5秒かけてゆっくり等倍から拡大に戻る */
  transition: transform 2500ms ease-in-out;
}

/* 現在アクティブなスライドのズームアウト演出 */
.slideshow .slick-current .slide {
  transform: scale(1);
  /* 表示されるときは、8秒かけてじわじわとズームアウトさせる */
  transition: transform 8000ms ease-out;
}

/* テキスト可読性のためのスクリム（PCのみ） */
.scrim {
  height: calc(100vh - 90px);
  width: calc(100vw - 90px);
  margin: 45px;
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, .28), rgba(0, 0, 0, 0) 22%),
    linear-gradient(to top, rgba(0, 0, 0, .32), rgba(0, 0, 0, 0) 20%);
}

/* ---------- レイアウト ---------- */
.layout {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 90px);
  width: calc(100vw - 90px);
}

.hero {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
}

/* ---------- ヘッダー ---------- */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 20px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .55), 0 0 16px rgba(0, 0, 0, .4);
}

h1.logo {
  line-height: 1;
}

.logo-en {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: .18em;
  line-height: 1;
  white-space: nowrap;
}

.global-nav ul {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
}

.global-nav a {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .08em;
  opacity: .9;
  transition: opacity .3s ease;
}

.global-nav a:hover {
  opacity: .55;
}

.global-nav .is-current a {
  position: relative;
  opacity: 1;
}

.global-nav .is-current a::after {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(100% + 12px);
  width: 34px;
  height: 1px;
  background: currentColor;
}

/* ---------- コンタクト ---------- */
.contact-box {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 20px 20px;
}

.sns {
  display: flex;
  align-items: center;
  gap: 22px;
}

.mail {
  width: 1.5rem;
  height: auto;
  display: inline-flex;
  opacity: 1;
  transition: opacity .3s ease;
}

.mail:hover {
  opacity: .55;
}

.mail svg,
.sns-icon svg {
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .5));
  width: 100%;
  height: auto;
}

.sns a {
  width: 1.5rem;
  height: auto;
  display: inline-flex;
  align-items: center;
}

.sns-icon {
  display: inline-flex;
  opacity: 1;
  transition: opacity .3s ease;
}

.sns a:hover .sns-icon {
  opacity: .55;
}

.sns-label {
  display: none;
}



/* ---------- フッター ---------- */
.site-footer {
  position: absolute;
  bottom: 0;
  left: 50%;
  translate: -50% 100%;
  padding: 16px 20px;
  color: #333;
}

.copyright {
  text-align: center;
  font-size: 11px;
  letter-spacing: .14em;
  opacity: .7;
}

/* =========================================================
   スマートフォン（〜768px）
   PC:画像全面 → SP:白ヘッダー / 画像 / 白フッター
   ========================================================= */
@media (max-width:768px) {

  html {
    font-size: min(3.73vw, 16px);
  }

  body {
    padding: 0;
  }

  .slideshow {
    height: 100dvh;
    width: 100vw;
    margin: 0;
  }

  .scrim {
    display: none;
  }

  .site-header {
    position: relative;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    background: #fff;
    color: var(--dark);
    text-shadow: none;
  }

  .logo-en {
    font-size: 1rem;
    letter-spacing: .16em;
  }

  .global-nav ul {
    flex-direction: row;
    align-items: center;
    gap: 34px;
  }

  .global-nav a {
    font-size: 15px;
    opacity: .85;
  }

  /* SPでは「Top」を非表示、下線マーカーも消す */
  .nav-top {
    display: none;
  }

  .global-nav .is-current a::after {
    display: none;
  }

  .layout {
    height: 100dvh;
    width: 100vw;
  }

  .site-footer {
    background: #fff;
    color: var(--dark);
    padding: 26px 20px;
    min-height: 96px;
    text-shadow: none;
  }

  .contact-box {
    display: flex;
    background-color: #fff;
    padding: 0;
    flex-direction: row-reverse;
  }

  .mail {
    position: relative;
    top: auto;
    right: auto;
    translate: unset;
    height: 100%;
    width: auto;
    aspect-ratio: 1 / 1;
    padding: 1.25rem;

    background-color: #333;
  }

  .mail svg {
    filter: none;
    width: 1.25rem;
  }

  .sns {
    width: 100%;
    position: static;
    justify-content: center;
    gap: 0;
  }

  .sns a {
    display: block;
    width: auto;
  }


  .sns li {
    position: relative;
  }

  .sns li:not(:first-child)::before {
    content: "|";
    position: absolute;
    left: 0;
    color: rgba(0, 0, 0, .3);
  }

  .sns li:not(:first-child) {
    margin-left: 1.4rem;
    padding-left: 1.4rem;
  }

  .sns-icon {
    display: none;
  }

  .sns-label {
    display: inline;
    font-size: 1rem;
    letter-spacing: .04em;
    opacity: .9;
    color: #333;
  }

  .copyright {
    display: none;
  }
}

/* 極小画面の微調整 */
@media (max-width:360px) {
  .global-nav ul {
    gap: 20px;
  }

  .sns li+li {
    margin-left: 16px;
    padding-left: 16px;
  }

  .logo-en {
    font-size: 21px;
  }
}