/* ====================================
   BabylingualJapan 公式サイト カスタムスタイル
   Tailwind CSS (CDN) を補完するスタイル
   ==================================== */

/* --- ベース設定 --- */
html {
  scroll-behavior: smooth;
}

/* セクション間のスクロールオフセット（固定ナビ対策） */
section[id] {
  scroll-margin-top: 80px;
}

/* --- カスタムプロパティ --- */
:root {
  --color-primary: #1e293b;       /* ダークネイビー */
  --color-primary-light: #334155;
  --color-accent: #6366f1;        /* インディゴ */
  --color-accent-hover: #4f46e5;
  --color-surface: #f8fafc;
  --color-surface-alt: #f1f5f9;
  --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  --gradient-accent: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

/* --- ヒーローセクション --- */
.hero-gradient {
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.hero-gradient::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
  animation: hero-shimmer 15s ease-in-out infinite alternate;
}

@keyframes hero-shimmer {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-5%, 3%) rotate(2deg); }
}

/* --- ナビゲーション --- */
.nav-blur {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: 1px;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* --- プロダクトカード --- */
.product-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.product-card:hover::before {
  transform: scaleX(1);
}

/* --- アコーディオン --- */
.accordion-trigger {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

.accordion-trigger:hover {
  background-color: var(--color-surface-alt);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.accordion-content.open {
  max-height: 5000px;
}

.accordion-icon {
  transition: transform 0.3s ease;
}

.accordion-trigger[aria-expanded="true"] .accordion-icon {
  transform: rotate(180deg);
}

/* --- フェードインアニメーション --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- アイコンバッジ --- */
.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--gradient-accent);
  color: white;
  font-size: 24px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

/* --- メールリンク --- */
.email-link {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
  transition: all 0.3s ease;
}

.email-link:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

/* --- 法務セクションの区切り --- */
.legal-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #e2e8f0 30%, #e2e8f0 70%, transparent 100%);
  margin: 2rem 0;
}

/* --- レスポンシブ調整 --- */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .nav-desktop {
    display: none;
  }

  .icon-badge {
    width: 48px;
    height: 48px;
    font-size: 20px;
    border-radius: 12px;
  }
}

@media (min-width: 769px) {
  .nav-mobile-btn {
    display: none;
  }
}

/* --- モバイルメニュー --- */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-menu.open {
  max-height: 300px;
}

/* --- プリントスタイル --- */
@media print {
  .nav-blur,
  .hero-gradient::before {
    display: none;
  }

  .fade-in {
    opacity: 1 !important;
    transform: none !important;
  }
}
