/* ============================================
   ヒーローセクション (F-002)
   株式会社PHOSS コーポレートサイト
   ============================================ */

/* ----------------------------------------
   ヒーローセクション: ベース
   ---------------------------------------- */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    var(--color-primary-900) 0%,
    var(--color-primary-800) 40%,
    var(--color-primary-700) 70%,
    #0d2a5e 100%
  );
}

/* ----------------------------------------
   背景: パーティクル層（CSS のみ）
   ---------------------------------------- */
.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

/* グラデーションオーバーレイ（奥行き演出） */
.hero__bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(0, 144, 232, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 20% 70%, rgba(41, 168, 245, 0.08) 0%, transparent 50%);
  z-index: 0;
}

/* ----------------------------------------
   浮遊する幾何学図形（パーティクル効果）
   ---------------------------------------- */

/* 共通: 図形基底スタイル */
.hero__particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat linear infinite;
}

/* 図形1: 大きな円（左上） */
.hero__particle--1 {
  width: 320px;
  height: 320px;
  top: -80px;
  left: -80px;
  border: 1px solid rgba(0, 144, 232, 0.18);
  background: radial-gradient(circle, rgba(0, 144, 232, 0.06) 0%, transparent 70%);
  animation-duration: 18s;
  animation-delay: 0s;
  animation-name: particleFloat1;
}

/* 図形2: 中円（右上） */
.hero__particle--2 {
  width: 180px;
  height: 180px;
  top: 10%;
  right: 8%;
  border: 1px solid rgba(41, 168, 245, 0.20);
  background: radial-gradient(circle, rgba(41, 168, 245, 0.08) 0%, transparent 70%);
  animation-duration: 14s;
  animation-delay: -4s;
  animation-name: particleFloat2;
}

/* 図形3: 小円（中央右） */
.hero__particle--3 {
  width: 100px;
  height: 100px;
  top: 45%;
  right: 18%;
  border: 1px solid rgba(93, 192, 248, 0.25);
  background: radial-gradient(circle, rgba(93, 192, 248, 0.10) 0%, transparent 70%);
  animation-duration: 10s;
  animation-delay: -2s;
  animation-name: particleFloat3;
}

/* 図形4: 光点（中央左） */
.hero__particle--4 {
  width: 6px;
  height: 6px;
  top: 30%;
  left: 15%;
  background: rgba(93, 192, 248, 0.7);
  box-shadow: 0 0 10px 4px rgba(93, 192, 248, 0.3);
  animation-duration: 8s;
  animation-delay: -1s;
  animation-name: particleFloat4;
}

/* 図形5: 光点（右下） */
.hero__particle--5 {
  width: 4px;
  height: 4px;
  bottom: 28%;
  right: 25%;
  background: rgba(0, 144, 232, 0.8);
  box-shadow: 0 0 8px 3px rgba(0, 144, 232, 0.3);
  animation-duration: 11s;
  animation-delay: -5s;
  animation-name: particleFloat5;
}

/* 図形6: 菱形（左中央） */
.hero__particle--6 {
  width: 60px;
  height: 60px;
  top: 55%;
  left: 8%;
  border-radius: 0;
  transform: rotate(45deg);
  border: 1px solid rgba(0, 144, 232, 0.20);
  animation-duration: 15s;
  animation-delay: -7s;
  animation-name: particleFloat6;
}

/* 図形7: 三角形気味の円（下部中央） */
.hero__particle--7 {
  width: 240px;
  height: 240px;
  bottom: -60px;
  right: -40px;
  border: 1px solid rgba(18, 39, 82, 0.4);
  background: radial-gradient(circle, rgba(18, 39, 82, 0.3) 0%, transparent 70%);
  animation-duration: 22s;
  animation-delay: -10s;
  animation-name: particleFloat7;
}

/* 図形8: 細い光線（上部） */
.hero__particle--8 {
  width: 2px;
  height: 80px;
  top: 5%;
  left: 38%;
  border-radius: var(--radius-full);
  background: linear-gradient(180deg, transparent, rgba(0, 144, 232, 0.4), transparent);
  animation-duration: 9s;
  animation-delay: -3s;
  animation-name: particleFloat8;
}

/* ----------------------------------------
   パーティクルアニメーション（各固有）
   ---------------------------------------- */

@keyframes particleFloat1 {
  0%   { opacity: 0;    transform: translate(0, 0) scale(1); }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { opacity: 0;    transform: translate(20px, 30px) scale(1.05); }
}

@keyframes particleFloat2 {
  0%   { opacity: 0;    transform: translate(0, 0) rotate(0deg); }
  20%  { opacity: 0.9; }
  50%  { transform: translate(-15px, 20px) rotate(10deg); }
  80%  { opacity: 0.9; }
  100% { opacity: 0;    transform: translate(0, 40px) rotate(0deg); }
}

@keyframes particleFloat3 {
  0%   { opacity: 0;    transform: translate(0, 0); }
  25%  { opacity: 1; }
  75%  { opacity: 1; }
  100% { opacity: 0;    transform: translate(10px, -20px); }
}

@keyframes particleFloat4 {
  0%   { opacity: 0;    transform: translate(0, 0) scale(1); }
  30%  { opacity: 1; }
  60%  { transform: translate(8px, -15px) scale(1.3); }
  80%  { opacity: 1; }
  100% { opacity: 0;    transform: translate(0, -30px) scale(0.8); }
}

@keyframes particleFloat5 {
  0%   { opacity: 0;    transform: translate(0, 0); }
  20%  { opacity: 0.9; }
  50%  { transform: translate(-12px, 10px); }
  80%  { opacity: 0.9; }
  100% { opacity: 0;    transform: translate(0, 20px); }
}

@keyframes particleFloat6 {
  0%   { opacity: 0;    transform: rotate(45deg) translate(0, 0); }
  30%  { opacity: 0.7; }
  70%  { opacity: 0.7; }
  100% { opacity: 0;    transform: rotate(90deg) translate(10px, 15px); }
}

@keyframes particleFloat7 {
  0%   { opacity: 0;    transform: translate(0, 0) scale(1); }
  15%  { opacity: 0.6; }
  85%  { opacity: 0.6; }
  100% { opacity: 0;    transform: translate(-15px, -10px) scale(1.03); }
}

@keyframes particleFloat8 {
  0%   { opacity: 0;    transform: translateY(0) scaleY(1); }
  25%  { opacity: 0.8; }
  75%  { opacity: 0.8; }
  100% { opacity: 0;    transform: translateY(-20px) scaleY(0.7); }
}

/* ----------------------------------------
   ヒーロー本文コンテンツ
   ---------------------------------------- */
.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--container-padding);
  padding-top: var(--header-height);
  text-align: center;
}

/* バッジ（上部ラベル） */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  background-color: rgba(0, 144, 232, 0.15);
  border: 1px solid rgba(0, 144, 232, 0.35);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-wider);
  color: var(--color-accent-300);
  margin-bottom: var(--space-8);
  opacity: 0;
  animation: heroFadeInDown 0.8s ease 0.2s forwards;
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-accent-400);
  box-shadow: 0 0 6px 2px rgba(41, 168, 245, 0.5);
  animation: badgeDotPulse 2s ease-in-out infinite;
}

@keyframes badgeDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.85); }
}

/* メインキャッチコピー */
.hero__title {
  font-size: clamp(var(--font-size-2xl), 5.5vw, var(--font-size-5xl));
  font-weight: var(--font-weight-black);
  line-height: var(--line-height-tight);
  color: var(--color-white);
  margin-bottom: var(--space-6);
  letter-spacing: var(--letter-spacing-tight);
  opacity: 0;
  animation: heroFadeInUp 0.9s ease 0.5s forwards;
}

.hero__title-accent {
  display: inline-block;
  background: -webkit-linear-gradient(
    135deg,
    var(--color-accent-300) 0%,
    var(--color-accent-400) 50%,
    var(--color-accent-500) 100%
  );
  background: linear-gradient(
    135deg,
    var(--color-accent-300) 0%,
    var(--color-accent-400) 50%,
    var(--color-accent-500) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* サブコピー */
.hero__subtitle {
  font-size: clamp(var(--font-size-base), 2vw, var(--font-size-md));
  color: rgba(255, 255, 255, 0.75);
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: var(--space-10);
  line-height: var(--line-height-relaxed);
  opacity: 0;
  animation: heroFadeInUp 0.9s ease 0.8s forwards;
}

/* CTAボタングループ */
.hero__actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-12);
  opacity: 0;
  animation: heroFadeInUp 0.9s ease 1.1s forwards;
}

/* ヒーロー専用ゴーストボタン（白枠） */
.hero__btn-ghost {
  background-color: transparent;
  border: 2px solid rgba(255, 255, 255, 0.45);
  color: var(--color-white);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 60px;
  padding: var(--space-5) var(--space-10);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: background-color var(--transition-base),
              border-color var(--transition-base),
              transform var(--transition-fast);
  white-space: nowrap;
  cursor: pointer;
}

.hero__btn-ghost:hover {
  background-color: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.75);
  transform: translateY(-1px);
}

/* 数値実績バー */
.hero__stats {
  display: flex;
  gap: var(--space-8);
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: heroFadeInUp 0.9s ease 1.4s forwards;
}

.hero__stat {
  text-align: center;
}

.hero__stat-number {
  display: block;
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-black);
  color: var(--color-white);
  line-height: 1;
  margin-bottom: var(--space-1);
}

.hero__stat-number span {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-accent-300);
}

.hero__stat-label {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: var(--letter-spacing-wider);
}

/* 数値区切り線 */
.hero__stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.15);
  align-self: center;
}

/* ----------------------------------------
   スクロールインジケーター
   ---------------------------------------- */
.hero__scroll-indicator {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  opacity: 0;
  animation: heroFadeIn 1s ease 2s forwards;
}

.hero__scroll-text {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: var(--letter-spacing-widest);
  text-transform: uppercase;
}

.hero__scroll-arrow {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: scrollBounce 1.8s ease-in-out infinite;
}

.hero__scroll-arrow svg {
  width: 20px;
  height: 20px;
  color: rgba(255, 255, 255, 0.4);
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

/* ----------------------------------------
   ヒーロー専用キーフレーム
   ---------------------------------------- */

@keyframes heroFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes heroFadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroFadeInDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* prefers-reduced-motion: アニメーション無効化 */
@media (prefers-reduced-motion: reduce) {
  .hero__badge,
  .hero__title,
  .hero__subtitle,
  .hero__actions,
  .hero__stats,
  .hero__scroll-indicator {
    opacity: 1;
    animation: none;
  }

  .hero__particle {
    opacity: 0 !important;
    animation: none;
  }

  .hero__scroll-arrow {
    animation: none;
  }

  .hero__badge-dot {
    animation: none;
  }
}

/* ----------------------------------------
   レスポンシブ: タブレット（768px〜1023px）
   ---------------------------------------- */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero__title {
    font-size: clamp(var(--font-size-xl), 4.5vw, var(--font-size-3xl));
  }

  .hero__particle--1 {
    width: 220px;
    height: 220px;
  }

  .hero__particle--7 {
    width: 160px;
    height: 160px;
  }

  .hero__stat-divider {
    display: none;
  }
}

/* ----------------------------------------
   レスポンシブ: スマートフォン（〜767px）
   ---------------------------------------- */
@media (max-width: 767px) {
  .hero__content {
    padding-top: var(--header-height-sp);
    padding-bottom: var(--space-24);
  }

  .hero__badge {
    font-size: var(--font-size-xs);
    padding: var(--space-2) var(--space-4);
    margin-bottom: var(--space-6);
  }

  .hero__title {
    font-size: clamp(var(--font-size-xl), 7vw, var(--font-size-2xl));
    margin-bottom: var(--space-4);
  }

  .hero__subtitle {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-8);
  }

  .hero__actions {
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-8);
  }

  .hero__actions .btn--xl,
  .hero__btn-ghost {
    min-height: 52px;
    padding: var(--space-4) var(--space-8);
    font-size: var(--font-size-base);
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  .hero__stats {
    gap: var(--space-6);
  }

  .hero__stat-divider {
    display: none;
  }

  .hero__stat-number {
    font-size: var(--font-size-xl);
  }

  /* SP: 図形を小さめ・一部非表示 */
  .hero__particle--1 {
    width: 180px;
    height: 180px;
  }

  .hero__particle--2 {
    width: 110px;
    height: 110px;
  }

  .hero__particle--6,
  .hero__particle--8 {
    display: none;
  }

  .hero__particle--7 {
    width: 140px;
    height: 140px;
  }
}
