/* ==========================================
   RayooTech 2026 - 共通外部スタイルシート
   ========================================== */

:root {
  scrollbar-gutter: stable;
  /* コーポレートブランドカラー */
  --color-brand-blue: #003399;
  --color-brand-red: #E60012;
  --color-brand-dark: #111827;
  --color-brand-light: #F8FAFC;
  --color-gray-800: #1f2937;
  --color-gray-600: #4b5563;
  --color-gray-500: #6b7280;

  /* アニメーション・トランジション */
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fade-up: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* スムーススクロール */
html {
  scroll-behavior: smooth;
}

/* ==========================================
   ナビゲーションリンク
   ========================================== */
.nav-link {
  position: relative;
  cursor: pointer;
  color: #374151; /* gray-700 */
  transition: color var(--transition-smooth);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-brand-red);
  transition: width var(--transition-smooth);
}

.nav-link:hover::after, 
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover, 
.nav-link.active {
  color: var(--color-brand-red);
  font-weight: 700;
}

/* ==========================================
   スクロール追従アニメーション
   ========================================== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-fade-up), transform var(--transition-fade-up);
  will-change: opacity, transform;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================
   グラデーション＆ヒーロー装飾
   ========================================== */
.hero-bg {
  background: radial-gradient(circle at top right, #f0f4f8 0%, #ffffff 50%, #fef2f2 100%);
  position: relative;
  overflow: hidden;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: -10%; left: -10%;
  width: 50%; height: 50%;
  background: radial-gradient(circle, rgba(0, 51, 153, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero-bg::after {
  content: '';
  position: absolute;
  bottom: -10%; right: -10%;
  width: 60%; height: 60%;
  background: radial-gradient(circle, rgba(230, 0, 18, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* 雲のように10秒周期でゆっくり動き、かつ呼吸するように明滅するアニメーション */
@keyframes cloud-pulse-slow {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.05;
  }
  50% {
    transform: translate(6%, 5%) scale(1.12);
    opacity: 0.14;
  }
}

@keyframes cloud-pulse-reverse {
  0%, 100% {
    transform: translate(0, 0) scale(1.12);
    opacity: 0.12;
  }
  50% {
    transform: translate(-6%, -5%) scale(1);
    opacity: 0.03;
  }
}

.animate-cloud-slow {
  animation: cloud-pulse-slow 10s ease-in-out infinite;
}

.animate-cloud-reverse {
  animation: cloud-pulse-reverse 10s ease-in-out infinite;
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-brand-blue) 0%, var(--color-brand-red) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================
   社長音声アバター（発声波形・波動アニメーション）
   ========================================== */

/* 話している時のアバター画像自体の微細な揺れと鼓動 */
@keyframes avatar-talk-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02) translateY(-2px); }
}

.is-talking#president-avatar {
  animation: avatar-talk-pulse 0.6s ease-in-out infinite;
}

/* Siri風・音声発話インジケーター（波動エフェクト） */
@keyframes voice-wave-ping {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

#president-avatar::before,
#president-avatar::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 4px solid var(--color-brand-red);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.is-talking#president-avatar::before {
  animation: voice-wave-ping 1.5s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.is-talking#president-avatar::after {
  animation: voice-wave-ping 1.5s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  animation-delay: 0.75s;
}

/* アバター内部の重なり制御 */
#president-avatar img {
  border-radius: 50%;
}

/* ==========================================
   案件（Cases）フィルター＆アコーディオン
   ========================================== */
.toggle-icon {
  transition: transform var(--transition-smooth);
}

.case-item {
  transition: all 0.5s ease;
}

.case-detail {
  transition: opacity 0.3s ease;
}

/* サービスバッジ定義 */
.badge-consulting { 
  background-color: var(--color-brand-blue); 
  color: white; 
}

.badge-si { 
  background-color: var(--color-brand-red); 
  color: white; 
}

.badge-bpo { 
  background-color: var(--color-brand-dark); 
  color: white; 
}

/* ==========================================
   汎用アニメーション
   ========================================== */
.animate-spin-slow {
  animation: spin 12s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
/* Navigation Link Active State Styles */
.nav-link {
    position: relative;
    cursor: pointer;
    color: #374151;
    transition: color 0.3s;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #E60012;
    transition: width 0.3s;
}
.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}
.nav-link:hover, .nav-link.active {
    color: #E60012;
    font-weight: 700;
}

/* ==========================================
   BLOCK 404: Sticky Architecture Diagram (WP & Local Robust Sticky)
   ========================================== */
@media (min-width: 1024px) {
  .lexi-sticky-diagram {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 100px !important;
    z-index: 20;
    align-self: flex-start !important;
  }
}

/* Ensure WordPress parent containers do not break sticky */
.entry-content, .wp-site-blocks, .site-content, main, #block-404-tech {
  overflow: visible !important;
}

/* ==========================================
   President Message: Sticky Portrait Column
   ========================================== */
@media (min-width: 1024px) {
  .president-sticky-portrait {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 110px !important;
    align-self: flex-start !important;
    z-index: 20;
  }
}

/* ==========================================
   パンくずリストの重複防止 (PHP側出力の非表示)
   ========================================== */
nav[aria-label="パンくずリスト"],
.site-main > nav[aria-label="パンくずリスト"] {
  display: none !important;
}
