/* ===================================================
   Front Page Template — アトリエJ.
   =================================================== */

/* ----- Cocoon レイアウトオーバーライド ----- */
body.page-template-page-front #content,
body.page-template-page-front #content-in {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.page-template-page-front #main {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
  background: transparent !important;
}

body.page-template-page-front #sidebar {
  display: none !important;
}

/* ----- ヘッダーエリア非表示（ロゴ・タグライン） ----- */
body.page-template-page-front #header {
  display: none !important;
}

/* ----- 透明ナビ（ヒーローに重ねる） ----- */
body.page-template-page-front .navi,
body.page-template-page-front .navi.fixed {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: transparent !important;
  box-shadow: none !important;
  transition: background 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

/* 下スクロール: ナビを上に隠す */
body.page-template-page-front .navi.fp-nav-hidden {
  transform: translateY(-100%);
}

/* 上スクロール後: 白背景 */
body.page-template-page-front .navi.fp-nav-solid {
  background: rgba(255, 255, 255, 0.97) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1) !important;
}

/* ナビリンク: 常に濃紺（透明・白背景どちらにも対応） */
body.page-template-page-front .navi .navi-in .menu-header .menu-item > a {
  color: #002d5e !important;
}

/* サブメニュー: 白背景・濃紺テキスト */
body.page-template-page-front .navi .navi-in .sub-menu {
  background: #fff !important;
  border: 1px solid rgba(0, 85, 143, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

body.page-template-page-front .navi .navi-in .sub-menu a {
  color: #002d5e !important;
}

body.page-template-page-front .navi .navi-in .sub-menu a:hover {
  background: #e4f4fc !important;
  color: #00558F !important;
}

/* ----- ナビ: ロゴ左・メニュー右レイアウト ----- */
@media (min-width: 1024px) {
  body.page-template-page-front .navi .navi-in {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 24px !important;
    box-sizing: border-box;
  }
}

/* ----- ロゴ（ナビ内に統合） ----- */
.fp-nav-logo {
  display: none; /* JS で navi-in に移動後に表示 */
}

.fp-nav-logo.is-in-nav {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.fp-nav-logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.fp-nav-logo img {
  height: 36px;
  width: auto;
}

/* ロゴ: モバイルでは非表示（Cocoon のモバイルヘッダーに任せる） */
@media (max-width: 1023px) {
  .fp-nav-logo,
  .fp-nav-logo.is-in-nav {
    display: none !important;
  }
}

/* ----- ヒーロー: ナビ高さ分のパディングを追加 ----- */
body.page-template-page-front .fp-hero {
  min-height: 100vh;
  padding-top: 80px;
}

/* ----- Hero ----- */
.fp-hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 80px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.fp-hero__inner {
  max-width: 800px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.fp-hero__label {
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  color: #00558F;
  text-transform: uppercase;
  margin-bottom: 20px;
  font-family: Arial, sans-serif;
}

.fp-hero__tagline {
  font-size: clamp(1.8rem, 5vw, 3.6rem);
  font-weight: 900;
  color: #002d5e;
  line-height: 1.4;
  letter-spacing: 0.06em;
  margin: 0 0 64px;
}

/* スクロールインジケーター */
.fp-hero__scroll {
  display: inline-block;
  width: 36px;
  height: 56px;
  border: 2px solid #00558F;
  border-radius: 18px;
  position: relative;
  text-decoration: none;
}

.fp-hero__scroll span {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: #00558F;
  border-radius: 50%;
  animation: fp-scroll-dot 1.8s ease-in-out infinite;
}

@keyframes fp-scroll-dot {
  0%   { top: 8px;  opacity: 1; }
  100% { top: 34px; opacity: 0; }
}

/* ----- Hero 背景: Canvas アニメーション ----- */
#hero-canvas {
  display: block !important; /* style.css の canvas { display:none } を上書き */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ----- 共通セクション ----- */
.fp-section-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 80px 40px;
}

.fp-section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: #002d5e;
  font-weight: 700;
  text-align: center;
  margin: 0 0 56px;
  position: relative;
}

.fp-section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  background: #ECE038;
  margin: 14px auto 0;
  border-radius: 2px;
}

/* ----- Services ----- */
.fp-services {
  background: #e4f4fc;
}

.fp-services__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.fp-services__item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  background: #fff;
  border-radius: 12px;
  padding: 40px 16px 28px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-top: 4px solid #00558F;
  height: 100%;
  box-sizing: border-box;
}

.fp-services__item a:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(0, 85, 143, 0.15);
}

.fp-services__item img {
  width: 72px;
  height: auto;
  margin-bottom: 20px;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.fp-services__item a:hover img {
  opacity: 1;
}

.fp-services__title {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #00558F;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  font-family: Arial, sans-serif;
}

.fp-services__desc {
  display: block;
  font-size: 0.82rem;
  color: #555;
  text-align: center;
  line-height: 1.6;
}

/* ----- About ----- */
.fp-about {
  background: #fff;
}

.fp-about__text {
  font-size: 1rem;
  color: #333;
  line-height: 1.95;
  max-width: 740px;
  margin: 0 auto 36px;
}

.fp-about__text p {
  margin-bottom: 1.2em;
}

.fp-about__more a {
  display: block;
  text-align: center;
  color: #00558F;
  font-size: 0.95rem;
  text-decoration: none;
  letter-spacing: 0.06em;
}

.fp-about__more a:hover {
  text-decoration: underline;
}

/* ----- CTA ----- */
.fp-cta {
  background: #00558F;
  text-align: center;
}

.fp-cta__lead {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  margin-bottom: 32px;
}

.fp-cta__btn {
  display: inline-block;
  background: #ECE038;
  color: #002d5e;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 18px 56px;
  border-radius: 4px;
  text-decoration: none;
  letter-spacing: 0.12em;
  transition: background 0.25s ease, transform 0.2s ease;
}

.fp-cta__btn:hover {
  background: #f5ec4a;
  transform: translateY(-3px);
  color: #002d5e;
}

/* ----- スクロールアニメーション ----- */
.fp-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fp-services__item.fp-reveal:nth-child(2) { transition-delay: 0.1s; }
.fp-services__item.fp-reveal:nth-child(3) { transition-delay: 0.2s; }
.fp-services__item.fp-reveal:nth-child(4) { transition-delay: 0.3s; }

.fp-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ----- レスポンシブ ----- */
@media (max-width: 640px) {
  .fp-section-inner {
    padding: 56px 20px;
  }

  .fp-services__grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
  }

  .fp-services__item a {
    padding: 28px 12px 20px;
  }

  .fp-services__item img {
    width: 56px;
  }

  .fp-cta__btn {
    padding: 16px 40px;
  }
}
