/* ========================================
   アニメーション & モダンエフェクト
   ======================================== */

/* スクロールアニメーション */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* 遅延アニメーション */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ========================================
   動画ヒーローセクション
   ======================================== */
.hero-video {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0a0a0a;
}

.hero-video__background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-video__background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 動画がない場合のアニメーション背景 */
.hero-video__background::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at 20% 80%, rgba(0, 102, 255, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(102, 126, 234, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(118, 75, 162, 0.2) 0%, transparent 60%),
    linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%);
  z-index: 0;
  animation: gradientShift 15s ease infinite;
}

.hero-video__background::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.15), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.1), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.15), transparent),
    radial-gradient(2px 2px at 130px 80px, rgba(255,255,255,0.1), transparent),
    radial-gradient(1px 1px at 160px 120px, rgba(255,255,255,0.12), transparent);
  background-size: 200px 200px;
  animation: particleFloat 20s linear infinite;
  z-index: 1;
}

@keyframes gradientShift {
  0%, 100% {
    background: 
      radial-gradient(ellipse at 20% 80%, rgba(0, 102, 255, 0.3) 0%, transparent 50%),
      radial-gradient(ellipse at 80% 20%, rgba(102, 126, 234, 0.3) 0%, transparent 50%),
      radial-gradient(ellipse at 50% 50%, rgba(118, 75, 162, 0.2) 0%, transparent 60%),
      linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%);
  }
  33% {
    background: 
      radial-gradient(ellipse at 80% 80%, rgba(0, 102, 255, 0.35) 0%, transparent 50%),
      radial-gradient(ellipse at 20% 20%, rgba(102, 126, 234, 0.35) 0%, transparent 50%),
      radial-gradient(ellipse at 60% 40%, rgba(118, 75, 162, 0.25) 0%, transparent 60%),
      linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%);
  }
  66% {
    background: 
      radial-gradient(ellipse at 50% 20%, rgba(0, 102, 255, 0.3) 0%, transparent 50%),
      radial-gradient(ellipse at 30% 70%, rgba(102, 126, 234, 0.3) 0%, transparent 50%),
      radial-gradient(ellipse at 70% 60%, rgba(118, 75, 162, 0.2) 0%, transparent 60%),
      linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%);
  }
}

@keyframes particleFloat {
  0% { transform: translateY(0) translateX(0); }
  100% { transform: translateY(-200px) translateX(50px); }
}

/* 動画表示時は疑似要素を非表示 */
.hero-video__background:has(video[src]:not([src=""])) video + *,
.hero-video--has-video .hero-video__background::before,
.hero-video--has-video .hero-video__background::after {
  opacity: 0;
}

/* 浮遊するオーブ */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  animation: orbFloat 8s ease-in-out infinite;
  z-index: 1;
}

.hero-orb--1 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.4), rgba(102, 126, 234, 0.2));
  top: 10%;
  left: -10%;
  animation-delay: 0s;
}

.hero-orb--2 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, rgba(118, 75, 162, 0.4), rgba(0, 102, 255, 0.2));
  bottom: 10%;
  right: -5%;
  animation-delay: -3s;
}

.hero-orb--3 {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.2));
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -5s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(20px, 10px) scale(1.02); }
}

.hero-video__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 20, 50, 0.6) 50%,
    rgba(0, 102, 255, 0.3) 100%
  );
  z-index: 2;
}

.hero-video__content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: #ffffff;
  max-width: 900px;
  padding: 0 24px;
}

.hero-video__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 24px;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-video__title {
  font-size: clamp(36px, 7vw, 72px);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 24px;
  letter-spacing: -0.03em;
  color: #ffffff;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.hero-video__title span {
  display: block;
  color: #ffffff;
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 70%, #c7d2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.3));
}

.hero-video__description {
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.7;
  color: #ffffff;
  margin: 0 0 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-video__cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-video__cta .btn {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: 100px;
}

.hero-video__cta .btn.primary {
  background: #ffffff;
  color: #0a0a0a;
  border-color: #ffffff;
}

.hero-video__cta .btn.primary:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-3px);
  box-shadow: 0 10px 40px rgba(255, 255, 255, 0.3);
}

.hero-video__cta .btn:not(.primary) {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
}

.hero-video__cta .btn:not(.primary):hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
}

.hero-video__scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  letter-spacing: 0.1em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: bounce 2s infinite;
}

.hero-video__scroll::after {
  content: '';
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.7), transparent);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

/* ========================================
   Feature セクション（モダン）
   ======================================== */
.feature-section {
  padding: 120px 0;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.feature-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 80px;
  background: var(--gradient-brand);
}

.feature-section::after {
  content: '';
  position: absolute;
  top: 20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139,92,246,0.05) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 60px;
}

.feature-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 48px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s ease;
}

.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,102,255,0.02) 0%, rgba(139,92,246,0.02) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 102, 255, 0.15);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover::after {
  opacity: 1;
}

.feature-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
  border-radius: var(--radius-lg);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
  background: var(--gradient-brand);
  box-shadow: var(--shadow-brand);
}

.feature-card:hover .feature-icon svg {
  color: #ffffff;
}

.feature-icon svg {
  width: 40px;
  height: 40px;
  color: var(--brand);
  transition: color 0.4s ease;
}

.feature-card h3 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text);
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

.feature-card p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0;
  position: relative;
  z-index: 1;
}

/* ========================================
   数字カウンター
   ======================================== */
.stats-section {
  padding: 100px 0;
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 50%, #252550 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,102,255,0.15) 0%, transparent 60%);
  border-radius: 50%;
}

.stats-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(139,92,246,0.15) 0%, transparent 60%);
  border-radius: 50%;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
}

.stat-item {
  position: relative;
}

.stat-number {
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 60%, #c7d2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 12px;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
}

.stat-label {
  font-size: 16px;
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.stat-item::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.2), transparent);
}

.stat-item:last-child::after {
  display: none;
}

/* ========================================
   レスポンシブ
   ======================================== */
@media (max-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
  
  .stat-item:nth-child(2)::after {
    display: none;
  }
}

@media (max-width: 768px) {
  .hero-video {
    min-height: 100svh;
  }
  
  .hero-video__title {
    font-size: 36px;
  }
  
  .hero-video__cta {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-video__cta .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .feature-section {
    padding: 80px 0;
  }
  
  .feature-section::before {
    height: 60px;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 40px;
  }
  
  .feature-card {
    padding: 36px 28px;
  }
  
  .feature-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 20px;
  }
  
  .feature-icon svg {
    width: 32px;
    height: 32px;
  }
  
  .stats-section {
    padding: 60px 0;
  }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  
  .stat-number {
    font-size: 40px;
  }
  
  .stat-item::after {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-video__kicker {
    font-size: 12px;
    padding: 6px 14px;
  }
  
  .hero-video__title {
    font-size: 28px;
  }
  
  .hero-video__description {
    font-size: 15px;
  }
  
  .hero-video__description br {
    display: none;
  }
  
  .stat-number {
    font-size: 36px;
  }
  
  .stat-label {
    font-size: 13px;
  }
}