/* ===================================
   LesserGameStudio - メインスタイル
   任天堂公式風デザイン（白背景・青ベース）
   =================================== */

/* --- リセット・基本設定 --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #ffffff;
  --color-bg-light: #f5f7fa;
  --color-bg-card: #ffffff;
  --color-primary: #0068b7;
  --color-primary-light: #1a8adb;
  --color-primary-dark: #004e8c;
  --color-accent: #e60012;
  --color-text: #2d2d2d;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-heading: #1a1a1a;
  --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Arial, sans-serif;
  --max-width: 1100px;
  --header-height: 64px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.8;
  overflow-x: hidden;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-primary-light);
  text-decoration: underline;
}

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

/* --- ヘッダー --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: #ffffff;
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-inner {
  width: 100%;
  max-width: var(--max-width);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo:hover {
  text-decoration: none;
}

.site-logo .logo-img {
  height: 36px;
  width: auto;
}

/* --- ナビゲーション --- */
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.main-nav a {
  color: var(--color-text);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: 0.5rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.main-nav a:hover {
  background: var(--color-bg-light);
  color: var(--color-primary);
  text-decoration: none;
}

/* ハンバーガーメニュー */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: all 0.3s ease;
  border-radius: 1px;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- ヒーローセクション --- */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--header-height) + 3rem) 2rem 4rem;
  background: linear-gradient(180deg, #eaf2fb 0%, #ffffff 100%);
}

.hero-content {
  max-width: 750px;
}

.hero-logo {
  max-width: 320px;
  margin: 0 auto 2rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--color-heading);
  line-height: 1.3;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--color-text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.9;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: var(--color-primary);
  border: none;
  border-radius: 2rem;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
}

/* --- カルーセル --- */
.hero-carousel {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: 0 auto 2rem;
  overflow: hidden;
  border-radius: 1rem;
}

.carousel-track {
  display: flex;
  transition: transform 0.6s ease;
}

.carousel-slide {
  min-width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 1rem;
  padding: 2rem;
}

/* 各スライドの背景色 */
.slide-featured { background: linear-gradient(135deg, #eaf2fb, #d4e4f7); border: 2px solid var(--color-primary); }
.slide-game1    { background: linear-gradient(135deg, #f0f4f8, #e2e8f0); border: 1px solid var(--color-border); }
.slide-game2    { background: linear-gradient(135deg, #f5f0fa, #e8dff5); border: 1px solid var(--color-border); }
.slide-game3    { background: linear-gradient(135deg, #edf7ed, #d4eed4); border: 1px solid var(--color-border); }

.slide-badge {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: 2rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--color-bg-light);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.slide-badge--dev {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.slide-icon {
  font-size: 3rem;
}

.slide-title {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 700;
  color: var(--color-heading);
}

.slide-desc {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  max-width: 420px;
  text-align: center;
}

/* カルーセルコントロール */
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 2rem;
}

.carousel-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.carousel-dots {
  display: flex;
  gap: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  border: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.carousel-dot.active {
  background: var(--color-primary);
  transform: scale(1.4);
}

/* --- ボタン --- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 2rem;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 104, 183, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-1px);
}

.btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- セクション共通 --- */
.section {
  padding: 4.5rem 2rem;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 0.75rem;
}

.section-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--color-primary);
  margin-top: 0.6rem;
  border-radius: 2px;
}

/* 中央揃えセクション内のタイトル下線も中央に */
[style*="text-align: center"] .section-title::after {
  margin-left: auto;
  margin-right: auto;
}

.section-desc {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
  max-width: 600px;
}

/* 交互背景 */
.section-alt {
  background: var(--color-bg-light);
}

/* --- カード --- */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.2s ease;
}

.card:hover {
  border-color: #ccd6e0;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* --- ゲーム紹介セクション --- */
.game-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.feature-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: 0.4rem;
}

.feature-text {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* --- ゲームロゴ画像 --- */
.game-logo {
  max-width: 400px;
  margin-bottom: 1.5rem;
  border-radius: 0.5rem;
}

/* --- ニュースセクション --- */
.news-list {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.news-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.25rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  transition: border-color 0.2s ease;
}

.news-item:hover {
  border-color: #b8c9d9;
}

.news-date {
  flex-shrink: 0;
  text-align: center;
  padding: 0.5rem 0.75rem;
  background: #eaf2fb;
  border-radius: 0.5rem;
  min-width: 64px;
}

.news-date .month {
  display: block;
  font-size: 0.7rem;
  color: var(--color-primary);
  text-transform: uppercase;
  font-weight: 700;
}

.news-date .day {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-heading);
}

.news-content h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--color-heading);
}

.news-content p {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.news-tag {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.news-tag.dev {
  background: #eaf2fb;
  color: var(--color-primary);
}

.news-tag.announce {
  background: #fef3cd;
  color: #856404;
}

/* --- SNSセクション --- */
.sns-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2rem;
}

.sns-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.25rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 2rem;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.sns-link:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  text-decoration: none;
}

.sns-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* --- フッター --- */
.site-footer {
  padding: 2.5rem 2rem;
  background: #1a1a1a;
  color: #a0a0a0;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-logo {
  height: 28px;
  margin-bottom: 1.25rem;
  /* 黒ロゴなのでフッターでは白反転 */
  filter: brightness(0) invert(1);
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.footer-nav a {
  color: #a0a0a0;
  font-size: 0.8rem;
}

.footer-nav a:hover {
  color: #ffffff;
  text-decoration: none;
}

.footer-copy {
  color: #6b6b6b;
  font-size: 0.75rem;
}

/* --- ページヘッダー（下層ページ用） --- */
.page-header {
  padding: calc(var(--header-height) + 2.5rem) 2rem 2.5rem;
  text-align: center;
  background: linear-gradient(180deg, #eaf2fb 0%, #f5f7fa 100%);
  border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--color-heading);
  margin-bottom: 0.4rem;
}

.page-header p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* --- コンテンツ（下層ページ用） --- */
.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.page-content h2 {
  font-size: 1.35rem;
  color: var(--color-heading);
  margin: 2.5rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-primary);
}

.page-content h3 {
  font-size: 1.1rem;
  color: var(--color-primary-dark);
  margin: 1.5rem 0 0.5rem;
}

.page-content p {
  margin-bottom: 1rem;
  color: var(--color-text);
  line-height: 1.9;
}

.page-content ul,
.page-content ol {
  margin: 0.5rem 0 1.5rem 1.5rem;
  color: var(--color-text);
}

.page-content li {
  margin-bottom: 0.4rem;
  line-height: 1.8;
}

/* --- FAQ --- */
.faq-list {
  margin-top: 1.5rem;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1rem 1.25rem;
  background: #ffffff;
  border: none;
  color: var(--color-heading);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s ease;
}

.faq-question:hover {
  background: var(--color-bg-light);
}

.faq-question::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--color-primary);
  font-weight: 400;
  transition: transform 0.2s ease;
}

.faq-item.active .faq-question::after {
  content: "\2212";
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer-inner {
  padding: 0.75rem 1.25rem 1.25rem;
  color: var(--color-text-muted);
  line-height: 1.9;
  border-top: 1px solid var(--color-border);
}

/* --- プレスキット --- */
.presskit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.presskit-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.presskit-card h3 {
  color: var(--color-heading);
  font-size: 1.05rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-primary);
}

.presskit-card p,
.presskit-card li {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table th,
.info-table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.info-table th {
  color: var(--color-text-muted);
  font-weight: 600;
  width: 35%;
  font-size: 0.85rem;
}

.info-table td {
  color: var(--color-text);
  font-size: 0.9rem;
}

/* --- ガイドラインハイライト --- */
.guideline-box {
  padding: 1.5rem;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
}

.guideline-box.allowed {
  background: #f0faf4;
  border: 1px solid #b7e4c7;
}

.guideline-box.prohibited {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.guideline-box h3 {
  margin-bottom: 0.75rem;
}

.guideline-box.allowed h3 {
  color: #16a34a;
}

.guideline-box.prohibited h3 {
  color: #dc2626;
}

.guideline-box ul {
  margin-left: 1.25rem;
}

.guideline-box li {
  margin-bottom: 0.3rem;
  line-height: 1.7;
  color: var(--color-text);
}

/* --- レスポンシブ --- */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }

  .main-nav.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav ul {
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0.25rem;
  }

  .main-nav a {
    display: block;
    padding: 0.75rem 1rem;
  }

  /* ヒーロー */
  .hero {
    min-height: auto;
    padding: calc(var(--header-height) + 1.5rem) 1rem 2.5rem;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  .hero-logo {
    max-width: 220px;
  }

  /* カルーセル（スマホ） */
  .hero-carousel {
    max-width: 100%;
    margin: 0 auto 1.5rem;
    border-radius: 0.75rem;
  }

  .carousel-slide {
    aspect-ratio: 4 / 3;
    padding: 1.25rem 1rem;
    gap: 8px;
  }

  .slide-icon {
    font-size: 2rem;
  }

  .slide-title {
    font-size: 1.1rem;
  }

  .slide-desc {
    font-size: 0.78rem;
    max-width: 90%;
  }

  .slide-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.7rem;
  }

  .carousel-controls {
    margin-bottom: 1.5rem;
    gap: 10px;
  }

  .carousel-btn {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }

  /* セクション */
  .section {
    padding: 3rem 1rem;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .section-desc {
    font-size: 0.88rem;
  }

  /* カード */
  .card {
    padding: 1.25rem;
  }

  /* ゲーム紹介カード内のgrid */
  .game-features[style*="grid-template-columns: 1fr 1fr"],
  .game-features {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  .game-logo {
    max-width: 280px;
  }

  /* ニュース */
  .news-item {
    flex-direction: column;
  }

  .news-content h3 {
    font-size: 0.92rem;
  }

  .news-content p {
    font-size: 0.82rem;
  }

  /* SNS */
  .sns-links {
    flex-direction: column;
    align-items: center;
  }

  .sns-link {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  /* フッター */
  .footer-nav {
    flex-direction: column;
    gap: 0.5rem;
  }

  /* プレスキット */
  .presskit-grid {
    grid-template-columns: 1fr;
  }

  /* 情報テーブル */
  .info-table th,
  .info-table td {
    font-size: 0.82rem;
    padding: 0.5rem 0.4rem;
  }

  .info-table th {
    width: 40%;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: calc(var(--header-height) + 1rem) 0.75rem 2rem;
  }

  .carousel-slide {
    aspect-ratio: 3 / 2;
    padding: 1rem 0.75rem;
    gap: 6px;
  }

  .slide-icon {
    font-size: 1.6rem;
  }

  .slide-title {
    font-size: 1rem;
  }

  .slide-desc {
    font-size: 0.72rem;
  }

  .btn-group {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .btn-group .btn {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }

  .game-features {
    grid-template-columns: 1fr !important;
  }

  .feature-icon {
    font-size: 1.5rem;
  }

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

  .section {
    padding: 2.5rem 0.75rem;
  }

  .section-title {
    font-size: 1.25rem;
  }
}
