/* ==========================================================================
   3. Components (Buttons, Menus, Cards, etc.)
   ========================================================================== */  
 
   /* --- Logo --- */
.logo img {
  height: 50px;
  display: block;
}

/* --- Buttons --- */
.cta-button {
  display: inline-block;
  padding: 12px 28px;
  background-color: var(--color-primary);
  color: white;
  text-decoration: none;
  font-weight: bold;
  border-radius: 5px;
  transition: background-color 0.3s, transform 0.3s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border: none;
  cursor: url('../images/pointer.png'), pointer;
}

.cta-button:hover {
  background-color: #555bf2; /* 少し明るい色に */
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}


/* ==================================================
   ▼▼▼ Dropdown Menu (Final Corrected Version) ▼▼▼
   ================================================== */

.main-nav a {
  font-family: 'Yu Gothic', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
  font-weight: bold;
  font-size: 1rem;
  font-weight: bold;
  color: var(--color-text);
  text-decoration: none;
  padding: 10px 20px;
}


/* プルダウンを持つ親 li (About, Serviceなど) */
.main-nav .has-child {
    position: relative;
}

/* プルダウンメニュー本体 (ul) の共通スタイル */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 220px;
    list-style: none;
    padding: 10px 0;
    margin: 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    z-index: 9999;
    border: 1px solid #eee;

    /* アニメーションのための初期設定（普段は隠す） */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

/* 親 li にホバーしたら、すぐ下の子メニューを表示 */
.main-nav .has-child:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 2階層目以降のメニュー本体 (ul) の位置調整 */
.sub-menu .sub-menu {
    top: -11px; /* 親のpadding分、少し上に調整 */
    left: 100%;
}

/* プルダウンメニュー内のリンクの共通スタイル */
.sub-menu a {
    display: block;
    padding: 12px 25px;
    font-family: var(--font-base), sans-serif;
    font-weight: bold;
    color: var(--color-primary);
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.sub-menu a:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* リンクの前のアイコンのスタイル */
.sub-menu a::before {
    content: '✦';
    margin-right: 10px;
    font-size: 0.9rem;
    color: var(--color-primary);
    transition: color 0.2s ease;
}

/* リンクにホバーした際に、アイコンの色も白に変える */
.sub-menu a:hover::before {
    color: var(--color-white);
}

/* --- Hamburger Menu Button --- */
.hamburger {
  position: absolute;
  top:15px;
  right:20px;
  width: 30px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: url('../images/pointer.png'), pointer;
  z-index: 9999; /* 最前面に */
  display: flex; /* spanをFlexアイテムとして扱う */
  flex-direction: column; /* 縦に並べる */
  justify-content: space-between; /* 垂直方向に均等に配置 */
  align-items: center;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--color-primary);
  border-radius: 2px;
  transition: all 0.4s ease;
}




/* ハンバーガーがアクティブ（クリック後）のスタイル */
.hamburger.is-active span:nth-child(1) {
  top: auto;
  transform: translateY(8px) rotate(45deg);
}
.hamburger.is-active span:nth-child(2) {
  opacity: 0;
}
.hamburger.is-active span:nth-child(3) {
  bottom: 50%;
  transform: translateY(8px) rotate(-45deg);
}


/* --- Loading Screen --- */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}
/* アイコンを上から表示させるための「マスク」となる要素 */
.loading-icon-wrapper {
  width: 80px;  /* アイコンの幅 */
  height: 80px; /* アイコンの高さ */
  overflow: hidden; /* ★この要素からはみ出た部分を隠す */
  
  /* アニメーションで高さを変えるため、初期値は0に */
  height: 0;
}

/* アイコン画像自体 */
.loading-icon {
  width: 100%;
}

/* パーセンテージテキスト */
.loading-percentage {
  font-size: 1.2rem;
  font-weight: bold;
  color: #555;
  font-family: 'Montserrat', sans-serif;
}

/* --- Hero Section Title --- */
.handwriting-svg {
  width: 100%;
  max-width: 800px;
  display: block;
  margin: 0 auto;
}
.handwriting-text {
  /* ★★★ font-familyの指定を修正 ★★★ */
  font-family: 'Special Gothic Expanded One', sans-serif;
  font-size: 72px;
  font-weight: 400; /* このフォントはウェイト400のみなので修正 */
  stroke: var(--color-primary);
  stroke-width: 1;
  fill: transparent;
  stroke-dasharray: 1500;
  stroke-dashoffset: 1500;
  animation: 
    draw-line 1.2s ease-out forwards,
    fill-in 0.5s ease-out 1.5s forwards;
}



.hero-subtitle {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  color: var(--color-text);
  margin-top: 1rem;
  opacity: 0;
  animation: fade-in-up 1s ease 2s forwards;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* components.css の一番下などに追加 */

/* is-loadedクラスが付いたら、ローディング画面を透明にする */
#loading-screen.is-loaded {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}



/* ここから */

.book-animation-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#book-frame {
  width: auto;
  height: 80vh;
  object-fit: contain;
}
.book-animation-wrapper img {
  max-width: 100%;
  height: auto;
}


/*　ここまで */