/* ================================
   Stellar AIz 共通スタイルシート
   Tailwind CSS併用版
   ================================ */

/* Tailwind CSSのベーススタイルを補完
   ================================ */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* CSS変数定義（Tailwind設定と連携）
   ================================ */
:root {
  /* ヘッダー高さ（Tailwindでは定義できない） */
  --header-height: 80px;
  --header-height-mobile: 60px;
  
  /* アニメーション */
  --transition-base: all 0.3s ease;
}

/* Tailwind補完用のカスタムコンポーネント
   ================================ */
   
/* 共通ボタンスタイル（Tailwindクラスと併用） */
.btn-primary-stellar {
  @apply inline-block px-6 py-3 bg-blue-600 text-white font-medium rounded-md 
         hover:bg-blue-700 transition-all duration-300 cursor-pointer;
}

.btn-secondary-stellar {
  @apply inline-block px-6 py-3 bg-transparent text-blue-600 font-medium 
         rounded-md border-2 border-blue-600 hover:bg-blue-600 hover:text-white 
         transition-all duration-300 cursor-pointer;
}

.btn-accent-stellar {
  @apply inline-block px-6 py-3 bg-cyan-500 text-white font-medium rounded-md 
         hover:bg-cyan-600 transition-all duration-300 cursor-pointer;
}

/* セクションタイトル（統一感のため） */
.section-title-stellar {
  @apply text-4xl md:text-5xl font-bold text-gray-900 mb-6;
}

.section-subtitle-stellar {
  @apply text-lg md:text-xl text-gray-600 mb-8 leading-relaxed;
}

/* カード共通スタイル */
.card-stellar {
  @apply bg-white rounded-lg shadow-md hover:shadow-lg transition-shadow duration-300 p-6;
}

/* グラデーション背景 */
.gradient-stellar-primary {
  background: linear-gradient(135deg, #1a202c 0%, #2d3748 50%, #1a202c 100%);
}

.gradient-stellar-mesh {
  background: 
    radial-gradient(at 20% 80%, rgba(59, 130, 246, 0.1) 0, transparent 50%),
    radial-gradient(at 80% 20%, rgba(124, 58, 237, 0.1) 0, transparent 50%),
    radial-gradient(at 40% 40%, rgba(6, 182, 212, 0.1) 0, transparent 50%),
    #1a202c;
}

/* ヘッダー固定の高さ設定（Tailwindでは設定できない） */
.site-header {
  height: var(--header-height);
}

@media (max-width: 768px) {
  .site-header {
    height: var(--header-height-mobile);
  }
}

/* メインコンテンツのオフセット */
main {
  margin-top: var(--header-height);
}

@media (max-width: 768px) {
  main {
    margin-top: var(--header-height-mobile);
  }
}

/* カスタムアニメーション
   ================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-fadein {
  animation: fadeIn 0.6s ease-out;
}

.animate-slidein {
  animation: slideInRight 0.6s ease-out;
}

/* スクロールアニメーション
   ================================ */
.scroll-fade-in,
.scroll-fade-up,
.scroll-fade-left,
.scroll-fade-right,
.scroll-scale-in {
  opacity: 0;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-fade-in {
  transform: translateY(30px);
}

.scroll-fade-up {
  transform: translateY(30px);
}

.scroll-fade-left {
  transform: translateX(-30px);
}

.scroll-fade-right {
  transform: translateX(30px);
}

.scroll-scale-in {
  transform: scale(0.95);
}

.scroll-fade-in.is-visible,
.scroll-fade-up.is-visible,
.scroll-fade-left.is-visible,
.scroll-fade-right.is-visible,
.scroll-scale-in.is-visible {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* スタガーアニメーション用 */
.scroll-stagger-item {
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* アクセシビリティ
   ================================ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* カスタムスクロールバー（Webkit系ブラウザ）
   ================================ */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 5px;
}

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

/* ================================
   斜めマーキーアニメーション（ヒーロー用）
   ================================ */

/* マーキーコンテナ */
.hero-marquee-container {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 400px;
  overflow: hidden;
  background: transparent;
}

/* 斜め配置のラッパー */
.hero-marquee-wrapper {
  position: absolute;
  inset: -50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  transform: rotate(-12deg);
}

/* 各マーキー列 */
.hero-marquee-row {
  display: flex;
  gap: 1rem;
  width: max-content;
}

/* 左に流れる（デフォルト） */
.hero-marquee-row.scroll-left {
  animation: marqueeLeft 30s linear infinite;
}

/* 右に流れる */
.hero-marquee-row.scroll-right {
  animation: marqueeRight 30s linear infinite;
}

/* 速度バリエーション */
.hero-marquee-row.speed-slow {
  animation-duration: 40s;
}

.hero-marquee-row.speed-fast {
  animation-duration: 20s;
}

/* マーキーアイテム */
.hero-marquee-item {
  flex-shrink: 0;
  width: 280px;
  height: 180px;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-marquee-item:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.hero-marquee-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* プレースホルダー用スタイル */
.hero-marquee-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 1.25rem;
}

.hero-marquee-placeholder.gradient-1 {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
}

.hero-marquee-placeholder.gradient-2 {
  background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
}

.hero-marquee-placeholder.gradient-3 {
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
}

.hero-marquee-placeholder.gradient-4 {
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
}

.hero-marquee-placeholder.gradient-5 {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

.hero-marquee-placeholder.gradient-6 {
  background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
}


/* キーフレーム */
@keyframes marqueeLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes marqueeRight {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0);
  }
}

/* prefers-reduced-motion対応 */
@media (prefers-reduced-motion: reduce) {
  .hero-marquee-row,
  .hero-marquee-mobile-row,
  .testimonial-marquee-row {
    animation: none !important;
  }
}

/* ================================
   モバイル用ヒーローマーキー
   ================================ */

.hero-marquee-mobile {
  width: 100%;
  overflow: hidden;
  padding: 1.5rem 0;
}

.hero-marquee-mobile-row {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: marqueeLeft 25s linear infinite;
}

.hero-marquee-mobile-item {
  flex-shrink: 0;
  width: 200px;
  height: 130px;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.hero-marquee-mobile-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ================================
   実績カードマーキーアニメーション
   ================================ */

.testimonial-marquee-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 1rem 0;
}

.testimonial-marquee-row {
  display: flex;
  gap: 2rem;
  width: max-content;
  animation: testimonialMarquee 40s linear infinite;
}

.testimonial-marquee-row:hover {
  animation-play-state: paused;
}

.testimonial-marquee-item {
  flex-shrink: 0;
  width: 380px;
}

@keyframes testimonialMarquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ================================
   メンバーマーキーアニメーション
   ================================ */

.member-marquee-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 1rem 0;
}

.member-marquee-row {
  display: flex;
  gap: 2rem;
  width: max-content;
  animation: memberMarquee 60s linear infinite;
}

.member-marquee-row:hover {
  animation-play-state: paused;
}

.member-marquee-item {
  flex-shrink: 0;
  width: 280px;
}

.member-marquee-card {
  background: #f9fafb;
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  height: 100%;
}

.member-marquee-avatar {
  width: 8rem;
  height: 8rem;
  margin: 0 auto 1rem;
  border-radius: 9999px;
  object-fit: cover;
}

.member-marquee-avatar-placeholder {
  width: 8rem;
  height: 8rem;
  margin: 0 auto 1rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes memberMarquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}