/* =====================================================
   キーボード音符 — style.css
   ===================================================== */

/* ── リセット & ベース ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', 'Noto Sans JP', sans-serif;
  background: #000000;
  color: #f0e8d4;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── ヒーローラッパー（キャンバスコンテナ） ── */
.hero-wrapper {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 480px;
  overflow: hidden;
  cursor: pointer;
}

#main-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ── 音声・エフェクトON/OFFボタン ── */
.mute-btn {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 20;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255, 220, 140, 0.75);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.mute-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 220, 140, 1);
  transform: scale(1.1);
}
.mute-btn:active {
  transform: scale(0.95);
}
.mute-btn svg {
  width: 22px;
  height: 22px;
  display: block;
}
.mute-btn.is-muted {
  color: rgba(255, 255, 255, 0.30);
}
.particle-btn {
  right: 74px; /* mute-btn(22) + mute-btn幅(44) + gap(8) */
}
.particle-btn.is-off {
  color: rgba(255, 255, 255, 0.30);
}

/* ── ヒントオーバーレイ ── */
.hint-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  z-index: 10;
  transition: opacity 1.2s ease;
  user-select: none;
}

/* 音符グリッド透かし — canvas に一元化したため不使用 */

.hint-notes {
  display: none; /* 透かし音符に役割を移譲 */
}

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

.hint-main {
  font-size: clamp(1rem, 3vw, 1.5rem);
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.1em;
  text-shadow: 0 0 15px rgba(210, 160, 40, 0.9);
  margin-bottom: 6px;
}

.hint-sub {
  font-size: clamp(0.7rem, 2vw, 0.9rem);
  font-weight: 300;
  color: rgba(240, 220, 170, 0.75);
  letter-spacing: 0.12em;
}

.hint-tap {
  margin-top: 10px;
  font-size: clamp(0.65rem, 1.8vw, 0.82rem);
  color: rgba(230, 200, 130, 0.65);
  letter-spacing: 0.08em;
  display: none; /* JSで表示切り替え */
}

/* ── モバイル用隠し入力 ── */
.mobile-input {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  border: none;
  outline: none;
  background: transparent;
  color: transparent;
  font-size: 16px; /* iOS zoom 防止 */
}

/* ── フッター（palette-explorer スタイル） ── */
.footer {
  background: #0c0a06;
  border-top: 1px solid rgba(180, 140, 60, 0.25);
  width: 100%;
  color: #ccc;
}

.footer-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.footer-logo {
  width: 32px;
  height: 32px;
  background: rgba(180, 140, 40, 0.2);
  border: 1px solid rgba(200, 160, 50, 0.45);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #d4a830;
}

.footer-brand-name {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.footer-description {
  font-size: 0.85rem;
  line-height: 1.7;
  color: rgba(220, 200, 155, 0.75);
  margin-bottom: 16px;
}

.social-links {
  display: flex;
  gap: 10px;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.25s ease;
}

.social-link:hover {
  background: rgba(190, 145, 40, 0.3);
  border-color: rgba(210, 165, 50, 0.6);
  color: #fff;
  transform: translateY(-2px);
}

.footer-heading {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links li {
  font-size: 0.85rem;
  color: rgba(220, 200, 155, 0.7);
}

.footer-links a {
  color: rgba(220, 200, 155, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 16px 0 20px;
  font-size: 0.82rem;
  color: rgba(220, 200, 150, 0.55);
  display: flex;
  justify-content: center;
}

.footer-bottom a {
  color: rgba(220, 200, 150, 0.75);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: #fff;
}

/* ── レスポンシブ ── */
@media (max-width: 600px) {
  .hero-wrapper {
    height: 100svh; /* セーフエリア考慮 */
  }

  .hint-tap {
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hint-notes,
  .feature {
    animation: none;
    transition: none;
  }
}
