/* ============================================================
   Lethonaut — Landing Page (LP) 専用スタイル
   base.html を継承しない独立 layout(card/profile.html と同思想)。
   theme.css の :root / [data-theme="light"] の色変数を流用。
   ============================================================ */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-base);
  color: var(--fg-base);
  font-family: var(--font-sans);
  line-height: var(--leading-relaxed);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== 固定ヘッダー ===== */
.lp-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: color-mix(in srgb, var(--bg-base) 92%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.lp-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-base);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-tight);
  text-decoration: none;
}
.lp-brand:hover { color: var(--fg-base); text-decoration: none; }
.lp-brand-mark { display: block; }
.lp-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.lp-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg-base);
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.15s, border-color 0.15s;
}
.lp-theme-toggle:hover {
  background: var(--hover-overlay);
  border-color: var(--border-strong);
}
.lp-login-link {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg-base);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}
.lp-login-link:hover {
  background: var(--hover-overlay);
  border-color: var(--border-strong);
  color: var(--fg-base);
  text-decoration: none;
}

/* ===== セクション共通 ===== */
main { display: block; }
.lp-section {
  max-width: 880px;
  margin: 0 auto;
  padding: 56px 24px;
}
.lp-section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  margin: 0 0 28px;
  color: var(--fg-base);
  text-align: center;
}

/* ===== 1. ヒーロー ===== */
.lp-hero {
  max-width: 880px;
  margin: 0 auto;
  padding: 80px 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.lp-hero-symbol { margin-bottom: 20px; }
.lp-hero-wordmark {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  margin: 0 0 24px;
  color: var(--fg-base);
  line-height: 1.05;
}
.lp-hero-ruby {
  display: block;
  margin-top: 10px;
  font-family: var(--font-sans);
  font-size: var(--text-md);
  font-weight: 400;
  color: var(--fg-muted);
  letter-spacing: 0.6em;
  /* 字間広めの末尾の余白を相殺 */
  padding-left: 0.6em;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.lp-hero-tagline {
  margin: 0 0 32px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lp-hero-line {
  display: block;
  font-family: var(--font-display);
}
.lp-hero-line--lead {
  font-size: var(--text-2xl);
  font-weight: 500;
  color: var(--fg-base);
  letter-spacing: var(--tracking-tight);
}
.lp-hero-line:not(.lp-hero-line--lead):not(.lp-hero-line--sub) {
  font-size: var(--text-lg);
  color: var(--fg-base);
  font-weight: 400;
}
.lp-hero-line--sub {
  font-size: var(--text-md);
  color: var(--fg-muted);
  font-weight: 400;
  margin-top: 8px;
}
.lp-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 16px;
}
.lp-hero-note {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--fg-subtle);
}

/* ===== ボタン ===== */
.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: var(--text-base);
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  cursor: pointer;
}
.lp-btn:hover { text-decoration: none; }
.lp-btn--primary {
  background: var(--accent);
  color: var(--accent-fg);
}
.lp-btn--primary:hover {
  background: var(--accent-hover);
  color: var(--accent-fg);
}
.lp-btn--primary:active { background: var(--accent-active); }
.lp-btn--ghost {
  background: transparent;
  color: var(--fg-base);
  border-color: var(--border);
}
.lp-btn--ghost:hover {
  background: var(--hover-overlay);
  border-color: var(--border-strong);
  color: var(--fg-base);
}

/* ===== 2. 主要機能 ===== */
.lp-feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 720px) {
  .lp-feature-grid { grid-template-columns: 1fr 1fr; }
}
.lp-feature {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}
.lp-feature-icon {
  font-size: 28px;
  color: var(--accent);
  margin-bottom: 12px;
}
.lp-feature-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--fg-base);
}
.lp-feature-body {
  margin: 0;
  font-size: var(--text-base);
  color: var(--fg-muted);
  line-height: var(--leading-normal);
}

/* ===== 3. スクリーンショット(上 3 + 下 2 中央寄せ) ===== */
.lp-screens-row {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
.lp-screens-row + .lp-screens-row {
  margin-top: 16px;
}
@media (min-width: 720px) {
  .lp-screens-row--3 { grid-template-columns: repeat(3, 1fr); }
  .lp-screens-row--2 {
    grid-template-columns: repeat(2, 1fr);
    /* 3 列のうち 2 列分の幅(gap 16px を考慮) */
    max-width: calc((100% - 32px) * 2 / 3 + 16px);
    margin-left: auto;
    margin-right: auto;
  }
}
.lp-screen {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
}

/* ===== 3.5 ホーム画面に追加(PWA) ===== */
.lp-pwa-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
.lp-pwa-icon {
  font-size: 40px;
  color: var(--accent);
}
.lp-pwa-text {
  margin: 0;
  max-width: 480px;
  color: var(--fg-muted);
  line-height: var(--leading-relaxed);
}
.lp-pwa-howto {
  margin: 6px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--fg-subtle);
}
.lp-pwa-howto i {
  margin-right: 6px;
  color: var(--fg-muted);
}

/* ===== 4. 設計思想 ===== */
.lp-philosophy-block {
  margin-bottom: 28px;
}
.lp-philosophy-block:last-child { margin-bottom: 0; }
.lp-philosophy-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--fg-base);
}
.lp-philosophy-body {
  margin: 0;
  color: var(--fg-muted);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
}

/* ===== 5. 招待 ===== */
.lp-invite-body {
  margin: 0 0 20px;
  text-align: center;
  color: var(--fg-muted);
}
.lp-invite-cta {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.lp-invite-note {
  margin: 0;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--fg-subtle);
}

/* ===== 6. 料金 ===== */
.lp-pricing-body {
  margin: 0 0 14px;
  color: var(--fg-muted);
}
.lp-pricing-note {
  margin: 12px 0 0;
  font-size: var(--text-sm);
  color: var(--fg-subtle);
}

/* ===== 7. About ===== */
.lp-about-body {
  margin: 0 0 14px;
  color: var(--fg-muted);
}
.lp-about-body:last-child { margin-bottom: 0; }

/* ===== 8. フッター ===== */
.lp-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 32px 24px;
  margin-top: 40px;
}
.lp-footer-content {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
@media (min-width: 720px) {
  .lp-footer-content {
    flex-direction: row;
    justify-content: space-between;
  }
}
.lp-footer-brand {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--fg-subtle);
}
.lp-footer-links {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
}
.lp-footer-links a { color: var(--fg-muted); }
.lp-footer-links a:hover { color: var(--accent); }
.lp-footer-links span { color: var(--fg-subtle); }

/* ============================================================
   v3: 長文セクションは 60ch ラッパーで可読性を確保
   ・個別要素に max-width: 60ch を当てると ch 単位が font-size
     依存で揃わない(本文 text-base と note text-sm で 60ch の
     絶対幅が違い、auto 中央寄せで噛み合わないため左端ズレ)
   ・親ラッパーに 60ch を当て、内部は left-align で揃える
   ============================================================ */
.lp-section-content {
  max-width: 60ch;
  margin: 0 auto;
}

/* ============================================================
   v3: 「できること」を zigzag 4 ブロック + チーム全幅 に再構築
   ============================================================ */
.lp-features-v3 {
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.lp-feature-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: center;
}
@media (min-width: 720px) {
  .lp-feature-block {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  /* reverse: PC 時のみ SS を左に・テキストを右に */
  .lp-feature-block--reverse .lp-feature-block-text { order: 2; }
  .lp-feature-block--reverse .lp-feature-block-screens { order: 1; }
}
.lp-feature-block--full {
  grid-template-columns: 1fr;
  text-align: center;
  padding: 32px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
@media (min-width: 720px) {
  .lp-feature-block--full {
    grid-template-columns: 1fr;
  }
}
.lp-feature-block-text .lp-feature-icon {
  font-size: 32px;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
}
.lp-feature-block-text .lp-feature-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--fg-base);
}
.lp-feature-block-text .lp-feature-body {
  margin: 0;
  font-size: var(--text-base);
  color: var(--fg-muted);
  line-height: var(--leading-relaxed);
}
.lp-feature-block-screens {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* 直接子の .lp-screen のみ対象(slideshow 内の slide は .lp-slideshow が
   aspect-ratio を持つので二重指定を避けて子セレクタ `>` に絞る) */
.lp-feature-block-screens > .lp-screen {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  cursor: zoom-in;
}
/* slideshow 内の slide は親 .lp-slideshow に aspect-ratio が
   かかるので、見た目は直接子と同じ装飾だけ与える */
.lp-slideshow .lp-slideshow-slide {
  object-fit: cover;
  object-position: top center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  cursor: zoom-in;
}

/* ============================================================
   v3: 「使う画面と、見せる画面」(home + share、各ブロックに軽め説明)
   ============================================================ */
.lp-showcase {
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.lp-showcase-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: center;
}
@media (min-width: 720px) {
  .lp-showcase-block {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  .lp-showcase-block--reverse .lp-showcase-screen { order: 2; }
  .lp-showcase-block--reverse .lp-showcase-text { order: 1; }
}
.lp-showcase-screen {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  cursor: zoom-in;
}
.lp-showcase-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 6px;
  letter-spacing: var(--tracking-tight);
}
.lp-showcase-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--fg-base);
}
.lp-showcase-body {
  margin: 0;
  font-size: var(--text-base);
  color: var(--fg-muted);
  line-height: var(--leading-relaxed);
}

/* ============================================================
   v3: lightbox(SS 拡大表示モーダル、a11y 対応)
   ============================================================ */
.lp-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
}
.lp-lightbox-overlay[hidden] { display: none; }
.lp-lightbox-image {
  max-width: 100%;
  max-height: calc(100vh - 96px);
  display: block;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}
.lp-lightbox-caption {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 16px;
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--text-sm);
  text-align: center;
  pointer-events: none;
}
.lp-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.lp-lightbox-close:hover { background: rgba(255, 255, 255, 0.28); }
.lp-lightbox-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* ============================================================
   v3: スライドショー(楽曲の SS 2 枚をクロスフェードで切替)
   ・3.5 秒間隔 / 600ms フェード / ホバー停止 / インジケータ点
   ・prefers-reduced-motion で自動切替停止
   ・各 slide は .lp-screen を兼ねるので既存 lightbox が機能
   ============================================================ */
.lp-slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
}
.lp-slideshow-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 600ms ease;
  pointer-events: none;
}
.lp-slideshow-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}
.lp-slideshow-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}
.lp-slideshow-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  /* 白フチ付き黒丸 + 影 = どんな背景色でも視認可 */
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  background: rgba(0, 0, 0, 0.55);
  padding: 0;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, border-color 0.15s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.lp-slideshow-dot:hover {
  background: rgba(0, 0, 0, 0.75);
}
.lp-slideshow-dot.is-active {
  /* アクティブ = フチ反転(白塗り + 黒フチ)で識別を明確に */
  background: rgba(255, 255, 255, 1);
  border-color: rgba(0, 0, 0, 0.7);
  transform: scale(1.25);
}
.lp-slideshow-dot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .lp-slideshow-slide { transition: none; }
}
