/* ======================================================
   SubsTracker ランディングページ専用CSS
   カラーテーマ: アプリアイコンの青・ピンク・ガラス効果を反映
   ====================================================== */

/* --- CSS変数 --- */
:root {
  --st-blue: #007AFF;
  --st-purple: #5856D6;
  --st-pink: #FF2D78;
  --st-cyan: #00D4FF;
  --st-bg-deep: #06060f;
  --st-bg-dark: #0a0a1a;
  --st-bg-mid: #12102a;
  --st-glass-bg: rgba(255, 255, 255, 0.06);
  --st-glass-bg-hover: rgba(255, 255, 255, 0.10);
  --st-glass-border: rgba(255, 255, 255, 0.12);
  --st-glass-border-hover: rgba(255, 255, 255, 0.20);
  --st-text: #FFFFFF;
  --st-text-secondary: rgba(255, 255, 255, 0.65);
  --st-radius: 24px;
  --st-radius-sm: 16px;
  --st-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
  color: var(--st-text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;

  /* メッシュグラデーション背景 */
  background: var(--st-bg-deep);
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(88, 86, 214, 0.25) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 80% 20%, rgba(0, 122, 255, 0.20) 0%, transparent 70%),
    radial-gradient(ellipse 70% 50% at 60% 85%, rgba(255, 45, 120, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 35% 15%, rgba(0, 212, 255, 0.10) 0%, transparent 60%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- パーティクルコンテナ（common.js用） --- */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  bottom: -10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  animation: particleRise 15s linear infinite;
}

@keyframes particleRise {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-100vh) rotate(720deg);
    opacity: 0;
  }
}

/* --- ヘッダー --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(6, 6, 15, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  animation: slideDown 0.6s ease-out;
}

header nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--st-text-secondary);
  transition: color var(--st-transition);
}

.nav-links a:hover {
  color: var(--st-text);
}

/* --- ヒーローセクション --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  z-index: 1;
  overflow: hidden;
}

/* 背景グロー効果 */
.hero::before {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 122, 255, 0.15) 0%, rgba(255, 45, 120, 0.08) 50%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  animation: glowPulse 6s ease-in-out infinite alternate;
}

.hero .app-icon {
  position: relative;
  z-index: 2;
  margin-bottom: 32px;
}

.hero .app-icon img {
  width: 160px;
  height: 160px;
  border-radius: 32px;
  animation: float 4s ease-in-out infinite;
  filter: drop-shadow(0 20px 40px rgba(0, 122, 255, 0.3)) drop-shadow(0 8px 16px rgba(255, 45, 120, 0.2));
}

.hero h1 {
  position: relative;
  z-index: 2;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #FFFFFF 0%, #007AFF 50%, #FF2D78 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 8s ease-in-out infinite;
}

.hero .subtitle {
  position: relative;
  z-index: 2;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--st-text-secondary);
  max-width: 480px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero .app-store-badge {
  position: relative;
  z-index: 2;
  transition: transform var(--st-transition), filter var(--st-transition);
}

.hero .app-store-badge:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.hero .app-store-badge img {
  height: 54px;
  width: auto;
}

/* --- スクリーンショットセクション --- */
.screenshots {
  position: relative;
  z-index: 1;
  padding: 40px 0 80px;
}

.screenshots h2 {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 48px;
  letter-spacing: -0.02em;
}

.screenshot-track {
  display: flex;
  gap: 24px;
  padding: 0 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.screenshot-track::-webkit-scrollbar {
  display: none;
}

.screenshot-item {
  flex: 0 0 auto;
  scroll-snap-align: center;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: transform var(--st-transition);
}

.screenshot-item:hover {
  transform: translateY(-8px);
}

.screenshot-item img {
  height: 520px;
  width: auto;
  display: block;
}

/* --- フィーチャーセクション --- */
.features {
  position: relative;
  z-index: 1;
  padding: 80px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.features h2 {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.features .section-subtitle {
  text-align: center;
  color: var(--st-text-secondary);
  font-size: 1.05rem;
  margin-bottom: 56px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--st-glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--st-glass-border);
  border-radius: var(--st-radius);
  padding: 36px 28px;
  transition: all var(--st-transition);
  opacity: 0;
}

.feature-card:hover {
  background: var(--st-glass-bg-hover);
  border-color: var(--st-glass-border-hover);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 60px rgba(0, 122, 255, 0.08);
}

.feature-icon {
  font-size: 2.4rem;
  margin-bottom: 20px;
  display: inline-block;
}

.feature-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-description {
  font-size: 0.92rem;
  color: var(--st-text-secondary);
  line-height: 1.7;
}

/* --- CTAセクション --- */
.cta {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 100px 24px;
  margin: 40px 24px;
  border-radius: var(--st-radius);
  background: var(--st-glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--st-glass-border);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}

/* CTAのグロー装飾 */
.cta::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(0, 122, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.cta::after {
  content: '';
  position: absolute;
  bottom: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(255, 45, 120, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.cta h2 {
  position: relative;
  z-index: 1;
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.cta .cta-description {
  position: relative;
  z-index: 1;
  color: var(--st-text-secondary);
  font-size: 1.05rem;
  margin-bottom: 36px;
}

.cta .app-store-badge {
  position: relative;
  z-index: 1;
  display: inline-block;
  transition: transform var(--st-transition), filter var(--st-transition);
}

.cta .app-store-badge:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.cta .app-store-badge img {
  height: 54px;
  width: auto;
}

/* --- フッター --- */
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 48px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 40px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--st-text-secondary);
  transition: color var(--st-transition);
}

.footer-links a:hover {
  color: var(--st-text);
}

footer p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

/* --- アニメーション --- */
@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

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

@keyframes glowPulse {
  0% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  100% { opacity: 1; transform: translateX(-50%) scale(1.15); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

/* --- レスポンシブ --- */

/* タブレット */
@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* モバイル */
@media (max-width: 640px) {
  header nav {
    padding: 12px 16px;
  }

  .logo {
    font-size: 1rem;
  }

  .logo img {
    width: 28px;
    height: 28px;
  }

  .nav-links {
    gap: 20px;
  }

  .nav-links a {
    font-size: 0.8rem;
  }

  .hero {
    padding: 100px 20px 60px;
    min-height: auto;
  }

  .hero .app-icon img {
    width: 120px;
    height: 120px;
    border-radius: 28px;
  }

  .hero .subtitle {
    font-size: 0.95rem;
  }

  .hero .app-store-badge img {
    height: 44px;
  }

  .screenshot-item img {
    height: 400px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-card {
    padding: 28px 24px;
  }

  .cta {
    padding: 60px 20px;
    margin: 40px 16px;
  }

  .cta .app-store-badge img {
    height: 44px;
  }

  .footer-links {
    gap: 20px;
  }
}
