/* ============================================
   ポートフォリオサイト カスタムCSS
   Tailwind CDNと併用するカスタムスタイル
   ============================================ */

/* --- Google Fonts読み込み --- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Noto+Sans+JP:wght@300;400;500;600;700&display=swap');

/* --- ベーススタイル --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', 'Noto Sans JP', sans-serif;
}

body {
  background-color: #020617; /* slate-950 */
  color: #e2e8f0; /* slate-200 */
  overflow-x: hidden;
  line-height: 1.8;
}

/* --- グラスモーフィズム カード --- */
.glass-card {
  background: rgba(30, 41, 59, 0.5); /* slate-800 半透明 */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(99, 102, 241, 0.1); /* indigo微光ボーダー */
  border-radius: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15), 0 0 60px rgba(16, 185, 129, 0.05);
  border-color: rgba(99, 102, 241, 0.3);
}

/* --- Hero背景アニメーション --- */
.hero-bg {
  position: relative;
  overflow: hidden;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 50%, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
  animation: heroFloat 15s ease-in-out infinite;
  z-index: 0;
}

@keyframes heroFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -20px) rotate(1deg); }
  66% { transform: translate(-20px, 15px) rotate(-1deg); }
}

/* --- グリッドドットパターン背景 --- */
.dot-pattern {
  background-image: radial-gradient(rgba(99, 102, 241, 0.15) 1px, transparent 1px);
  background-size: 30px 30px;
}

/* --- アクセントグラデーション テキスト --- */
.gradient-text {
  background: linear-gradient(135deg, #818cf8, #6366f1, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- アクセントグラデーション ライン --- */
.gradient-line {
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #10b981);
  border: none;
  border-radius: 2px;
}

/* --- セクション共通余白 --- */
.section-padding {
  padding: 5rem 1.5rem;
}

@media (min-width: 768px) {
  .section-padding {
    padding: 7rem 2rem;
  }
}

/* --- ナビゲーション --- */
.nav-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
  transition: background 0.3s ease;
}

.nav-link {
  position: relative;
  color: #94a3b8; /* slate-400 */
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #e2e8f0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #6366f1, #10b981);
  transition: width 0.3s ease;
}

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

/* --- モバイルメニュー --- */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(2, 6, 23, 0.97);
  backdrop-filter: blur(20px);
  z-index: 100;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 600;
}

/* --- ボタンスタイル --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  border: none;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #818cf8, #6366f1);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  background: transparent;
  color: #e2e8f0;
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.7);
  transform: translateY(-2px);
}

/* --- ステップUI（データフローアニメーション） --- */
.step-connector {
  position: absolute;
  top: 2rem;
  left: calc(50% + 1.5rem);
  width: calc(100% - 3rem);
  height: 2px;
  background: rgba(99, 102, 241, 0.15);
  overflow: hidden;
}

/* ベースのグラデーションライン */
.step-connector::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #6366f1, #10b981);
  opacity: 0.3;
}

/* 光の粒が流れるアニメーション */
.step-connector::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -40%;
  width: 40%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, #818cf8, #34d399, transparent);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.6), 0 0 24px rgba(16, 185, 129, 0.3);
  animation: dataFlow 2.5s ease-in-out infinite;
}

@keyframes dataFlow {
  0% {
    left: -40%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

/* 各コネクターのアニメーション遅延でリレー効果 */
.step-connector.delay-1::after { animation-delay: 0s; }
.step-connector.delay-2::after { animation-delay: 0.8s; }
.step-connector.delay-3::after { animation-delay: 1.6s; }

/* --- 料金カード --- */
.pricing-card {
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.pricing-card.featured {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.1);
}

.pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
}

/* --- フォーム入力 --- */
.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 0.75rem;
  color: #e2e8f0;
  font-family: 'Plus Jakarta Sans', 'Noto Sans JP', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
}

.form-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-input::placeholder {
  color: #475569;
}

/* --- フッター --- */
footer {
  border-top: 1px solid rgba(99, 102, 241, 0.1);
}

/* --- Fade-inアニメーション（Stagger対応） --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Stagger遅延：JSから --stagger-delay を注入 */
.fade-in[style*="--stagger-delay"] {
  transition-delay: var(--stagger-delay);
}

/* --- ポートフォリオギャラリー --- */
.portfolio-item {
  overflow: hidden;
  border-radius: 1rem;
  position: relative;
}

/* glass-card のホバー浮き上がりを portfolio-item では無効化 */
.portfolio-item.glass-card {
  transition: none;
}

.portfolio-item.glass-card:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(99, 102, 241, 0.1);
}

/* 画像リンクをブロック要素にして隙間をなくし、カーソルを pointer に固定 */
.portfolio-item > a {
  display: block;
  line-height: 0;
  cursor: pointer;
}

/* --- パルスアニメーション（デコ用） --- */
@keyframes pulse-slow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

.pulse-slow {
  animation: pulse-slow 4s ease-in-out infinite;
}

/* --- スクロールバー --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0f172a;
}

::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* --- 送信ボタン ローディングスピナー --- */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-loading svg.spin {
  animation: spin 1s linear infinite;
}

/* --- 見積もりシミュレーター誘導 CTA ボタン --- */
.btn-estimate {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, #10b981, #6366f1);
  color: #fff;
  border: none;
  border-radius: 0.875rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: 0 4px 24px rgba(16, 185, 129, 0.2);
}

.btn-estimate:hover {
  background: linear-gradient(135deg, #34d399, #818cf8);
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.35), 0 0 0 1px rgba(16, 185, 129, 0.15);
  transform: translateY(-3px);
}

.btn-estimate:active {
  transform: translateY(-1px);
}

/* --- 見積もりシミュレーター誘導カード（エメラルドアクセント） --- */
.simulator-cta-card {
  border-color: rgba(16, 185, 129, 0.2);
}

.simulator-cta-card:hover {
  border-color: rgba(16, 185, 129, 0.4);
}

/* simulator-cta-card は glass-card と同じ要素に付く複合セレクタで上書き */
.simulator-cta-card.glass-card {
  position: relative; /* stretched-link の基準点 */
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.simulator-cta-card.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -10px rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
}
