/* ナビゲーション
 * NOTE: バー本体 (nav / nav.scrolled の背景・blur・影・border) は
 * src/styles/critical.css が唯一の source of truth (ATF / inline)。
 * ここで再定義すると値が二重管理になり競合するため定義しない。 */

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-size: 1.375rem;
  font-weight: 700;
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0;
}

.logo-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  margin-top: 2px;
}

.logo:hover .logo-icon {
  transform: scale(1.05) rotate(-3deg);
}

.logo:hover {
  transform: translateY(-1px);
}

.logo::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #1e3a8a, #1d4ed8);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo:hover::after {
  width: 100%;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a:not(.nav-cta) {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.2s;
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a:not(.nav-cta):after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
}

.nav-links a:not(.nav-cta):hover,
.nav-links a:not(.nav-cta).active {
  color: var(--primary);
}

.nav-links a:not(.nav-cta):hover:after,
.nav-links a:not(.nav-cta).active:after {
  width: 100%;
}

.nav-cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white !important;
  padding: 0.625rem 1.75rem;
  min-height: 44px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
  display: inline-block;
  white-space: nowrap;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(30, 58, 138, 0.4);
}

/* ハンバーガーメニューボタン（デフォルトは非表示） */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* モバイルメニューが開いている時 */
.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(10.5px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-10.5px) rotate(-45deg);
}

/* モバイル対応 */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 80px;
    right: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    /* v4: solid 背景 (critical.css と同値)。透け防止のため backdrop-filter は使わない。 */
    background: #ffffff;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    gap: 1.75rem;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a:not(.nav-cta) {
    font-size: 1.25rem;
    padding: 1rem 0;
    width: 100%;
    text-align: center;
  }

  .nav-cta {
    width: 100%;
    max-width: 300px;
    text-align: center;
    padding: 1rem 2rem;
    margin-top: 1rem;
  }
}
/* ヒーローセクション
 *
 * Phase 4b 完了: hero のコア構造・タイポ・proof-card・hero-video は
 * `src/styles/critical.css` が唯一の source of truth。
 * このファイルは critical.css に含めない補助スタイルのみを保持する:
 *   - hero CTA の微調整 (.hero-cta / .hero-cta-secondary)
 *   - 装飾アニメーション (mac/phone float, video play ring)
 *   - インタラクション (hover transform)
 *   - レガシー .recording-indicator / .waveform (旧 hero 内ウィジェット)
 */

/* hero-content 内ビジュアル枠 */
.visual-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* hero CTA の微調整 (critical.css の .btn-primary を継承した上で padding/font-size を上書き) */
.hero-cta {
  padding: 1.125rem 2.75rem;
  font-size: 1.0625rem;
}

.hero-cta-secondary {
  padding: 0.875rem 2rem;
  font-size: 0.9375rem;
}

/* デバイスの浮遊アニメーション */
.mac-wrapper {
  animation: floatMac 4s ease-in-out infinite;
}

.iphone-wrapper {
  animation: floatPhone 4s ease-in-out infinite;
  animation-delay: -2s;
}

.device-image {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.hero-visual:hover .mac-wrapper {
  transform: translateY(-50%) translateX(-10px) scale(1.02);
}

.hero-visual:hover .iphone-wrapper {
  transform: translateX(10px) scale(1.02);
}

@keyframes floatMac {
  0%, 100% { transform: translateY(-50%); }
  50% { transform: translateY(calc(-50% - 15px)); }
}

@keyframes floatPhone {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* --- レガシー hero 内ウィジェット (recording / waveform) ---
 * 現行 LP では VoiceToChart セクションが等価機能を提供するため
 * markup 上では使用されていないが、CSS 互換のため残置。 */
.recording-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: white;
  padding: 0.75rem 1.5rem;
  border-radius: 100px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
}

.recording-indicator span {
  font-weight: 500;
  color: var(--text);
  font-size: 0.875rem;
}

.rec-dot {
  width: 8px;
  height: 8px;
  background: #ff4444;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.waveform {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 60px;
  margin: 2rem 0;
  padding: 1rem;
  background: white;
  border-radius: 15px;
  box-shadow: var(--shadow-sm);
}

.wave-bar {
  flex: 1;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 3px;
  animation: wave 1.5s ease-in-out infinite;
  opacity: 0.8;
}

.wave-bar:nth-child(odd) { animation-delay: 0.1s; }
.wave-bar:nth-child(even) { animation-delay: 0.3s; }
/* ヒーローセクション レスポンシブ
 *
 * Phase 4b 完了: hero のレスポンシブ基本ルールは critical.css に集約済み。
 * このファイルは critical.css の 768/480/375px ブレイクポイント外でのみ
 * 必要な調整 (ラージデスクトップ・1024 タブレット横・landscape 等) と
 * critical.css でカバーしていないアニメーション/装飾を担当する。
 */

/* ラージデスクトップ (1440px 以上) ── critical の clamp 上限 4.25rem で
 * 十分大きいが、デバイスステージの最大サイズと padding は強化する */
@media (min-width: 1440px) {
  .hero {
    padding: 12rem 4rem 8rem;
  }

  .devices-stage {
    max-width: 750px;
  }

  .mac-image {
    width: 480px;
    height: auto;
  }

  .iphone-image {
    width: 120px;
    height: auto;
  }
}

/* デスクトップ (1024-1439px) */
@media (max-width: 1439px) and (min-width: 1024px) {
  .mac-image {
    width: 420px;
    height: auto;
  }

  .iphone-image {
    width: 105px;
    height: auto;
  }
}

/* タブレット横向き (1024px 以下、768px は critical.css 担当) */
@media (max-width: 1024px) and (min-width: 769px) {
  .hero {
    padding: 9rem 2.5rem 5rem;
  }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-content {
    max-width: 680px;
    margin: 0 auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    height: 450px;
    margin-top: 2rem;
  }

  .hero-proof-card {
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
  }

  .devices-stage {
    max-width: 600px;
  }

  .iphone-wrapper {
    right: 10%;
    bottom: 20%;
  }

  .mac-image {
    width: min(68vw, 360px) !important;
    height: auto;
  }

  .iphone-image {
    width: min(17vw, 90px) !important;
    height: auto;
  }

  .hero-video {
    padding: 2.75rem 2.5rem 3.5rem;
  }

  .hero-video__inner {
    padding: 0 1.5rem;
  }

  .hero-video__preview {
    padding: 1.5rem;
  }

  /* タブレットではアニメーション控えめ */
  @keyframes floatMac {
    0%, 100% { transform: translateY(-50%); }
    50% { transform: translateY(calc(-50% - 10px)); }
  }

  @keyframes floatPhone {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
  }
}

/* モバイル (768px 以下) ── critical.css で基本 layout は対応済み。
 * ここでは独自アニメーション再定義のみ。 */
@media (max-width: 768px) {
  .mac-wrapper {
    animation: floatMacMobile 5s ease-in-out infinite;
  }

  .iphone-wrapper {
    animation: floatPhoneMobile 5s ease-in-out infinite;
    animation-delay: -2.5s;
  }

  @keyframes floatMacMobile {
    0%, 100% { transform: translate(-50%, -50%); }
    50% { transform: translate(-50%, calc(-50% - 8px)); }
  }

  @keyframes floatPhoneMobile {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
  }

  /* ホバーエフェクト無効化 (タッチデバイス) */
  .hero-visual:hover .mac-wrapper {
    transform: translate(-50%, -50%);
  }

  .hero-visual:hover .iphone-wrapper {
    transform: none;
  }
}

/* スマートフォン (480px 以下) ── critical.css で基本 layout は対応済み */
@media (max-width: 480px) {
  .mac-wrapper {
    animation: none !important;
  }

  .iphone-wrapper {
    animation: none !important;
  }

  .device-image {
    filter: drop-shadow(0 10px 20px rgba(30, 58, 138, 0.15));
  }
}

/* 横向きモード対応 */
@media (max-height: 600px) and (orientation: landscape) {
  .hero {
    padding: 5rem 2rem 3rem;
    min-height: auto;
  }

  .hero-visual {
    height: 280px;
  }

  .devices-stage {
    max-width: 450px;
  }

  .iphone-wrapper {
    right: 15%;
    bottom: 20%;
  }
}

/* アクセシビリティ */
@media (prefers-reduced-motion: reduce) {
  .mac-wrapper,
  .iphone-wrapper {
    animation: none !important;
  }

  .device-image {
    transition: none;
  }
}

/* 高解像度ディスプレイ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .device-image {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}
/* 社会的証明バー - ヒーロー直下
 * v2: 薄水色グラデから neutral オフホワイトに変更。
 * Hero 下の sub-nav 帯として情報点が前に出るデザインへ。 */
.trust-bar {
  padding: 2.5rem 3rem;
  background: #fafbfc;
  border-top: 1px solid rgba(30, 58, 138, 0.08);
  border-bottom: 1px solid rgba(30, 58, 138, 0.08);
}

.trust-bar-inner {
  max-width: var(--max-width-content, 1100px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
}

.trust-number {
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary, #1e3a8a) 0%, var(--accent, #2563eb) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.trust-unit {
  font-size: 1.25rem;
  font-weight: 600;
}

.trust-label {
  font-size: 0.8125rem;
  color: var(--text-light, #64748b);
  font-weight: 500;
  white-space: nowrap;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary, #1e3a8a) 0%, var(--accent, #2563eb) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.trust-badge svg {
  color: var(--primary, #1e3a8a);
  flex-shrink: 0;
}

/* trust-badge--metric / trust-metric-num/unit は導入実績バッジ撤去に伴い未使用 */

.trust-divider {
  width: 1px;
  height: 2.5rem;
  background: rgba(165, 180, 252, 0.5);
  flex-shrink: 0;
}

/* 監修医バリアント: 顔写真 + 名前を横並びで表示 */
.trust-item--supervisor {
  flex-direction: row;
  gap: 0;
}

.trust-supervisor-link {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: inherit;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.trust-supervisor-link:hover,
.trust-supervisor-link:focus-visible {
  background-color: rgba(255, 255, 255, 0.6);
  outline: none;
}

.trust-supervisor-link:focus-visible {
  box-shadow: 0 0 0 2px var(--primary, #1e3a8a);
}

.trust-supervisor-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 35%;
  flex-shrink: 0;
  /* gold accent ring を subtle に復活させ、Hero「2時間」と並ぶ "gold の点" に */
  box-shadow: 0 2px 6px rgba(30, 58, 138, 0.18), 0 0 0 2px rgba(212, 169, 96, 0.45);
}

.trust-supervisor-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.25;
}

.trust-supervisor-eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-light, #64748b);
  letter-spacing: 0.06em;
}

.trust-supervisor-name {
  font-size: 0.9375rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary, #1e3a8a) 0%, var(--accent, #2563eb) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.trust-note {
  margin: 1.25rem auto 0;
  max-width: var(--max-width-content, 1100px);
  color: var(--text-lighter, #94a3b8);
  font-size: 0.75rem;
  line-height: 1.6;
  text-align: center;
}

/* レスポンシブ: タブレット */
@media (max-width: 768px) {
  .trust-bar {
    padding: 2rem 1.5rem;
  }

  .trust-bar-inner {
    flex-wrap: wrap;
    gap: 1.5rem 2rem;
  }

  .trust-divider {
    display: none;
  }

  .trust-item {
    flex: 0 0 calc(50% - 1rem);
  }

  /* 監修医はモバイルで最上段に単独配置 (信頼信号として最優先) */
  .trust-item--supervisor {
    flex: 0 0 100%;
    justify-content: center;
  }

  .trust-number {
    font-size: 1.5rem;
  }

  .trust-note {
    margin-top: 1rem;
    padding: 0 0.5rem;
  }

}

/* レスポンシブ: スマートフォン */
@media (max-width: 480px) {
  .trust-bar {
    padding: 1.5rem 1rem;
  }

  .trust-bar-inner {
    gap: 1.25rem 1rem;
  }

  .trust-number {
    font-size: 1.25rem;
  }

  .trust-label {
    font-size: 0.75rem;
  }

  .trust-badge {
    font-size: 0.875rem;
  }

}
