/* ============================================================
   Nakashi Lab - カスタムスタイル
   Tailwind CSS CDN と組み合わせて使用
   ============================================================ */

/* フォント読み込み最適化 */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* ============================================================
   スクロールマージン (固定ヘッダー対応)
   ============================================================ */
[id] {
  scroll-margin-top: 80px;
}

/* ============================================================
   Tailwind の line-clamp を補完
   ============================================================ */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   ツールカード ホバー効果
   ============================================================ */
.tool-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
  transform: translateY(-2px);
}

/* ============================================================
   フォームの focus スタイル補完
   ============================================================ */
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid #0284c7;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================================
   プリント対応
   ============================================================ */
@media print {
  header,
  footer,
  nav,
  #mobile-menu {
    display: none !important;
  }

  main {
    padding: 0 !important;
    margin: 0 !important;
  }
}

/* ============================================================
   アニメーション (過度なアニメーション回避)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   prose スタイル補完
   ============================================================ */
.prose p {
  color: #4b5563;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.prose a {
  color: #0284c7;
  text-decoration: underline;
}

.prose strong {
  color: #1f2937;
  font-weight: 600;
}

/* ============================================================
   スキップリンク (アクセシビリティ)
   ============================================================ */
.skip-link {
  position: absolute;
  top: -9999px;
  left: 0;
  background: #0284c7;
  color: white;
  padding: 0.5rem 1rem;
  z-index: 9999;
  font-size: 0.875rem;
}

.skip-link:focus {
  top: 0;
}
