/* ==========================================
   1. 基本設定（リセット）
   ※ :root の色・サイズ変数は各HTMLファイルで定義
========================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family:
    "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans",
    Meiryo, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #ffffff;
  padding-top: var(--header-height);
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
}

/* ==========================================
   2. 追従＆シュリンクするヘッダー
========================================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: height 0.3s ease;
}

.header-inner {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: auto;
  max-height: 44px;
  width: auto;
  max-width: 40vw;
}

/* ヘッダー用DLボタン（CTAへスクロール） */
.header-btn {
  background: var(--accent-color);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(255, 122, 0, 0.3);
  transition: all 0.3s ease;
}

.header-btn:hover {
  background: #e66e00;
  transform: scale(1.05);
}

header.shrink {
  height: var(--header-shrink-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
}

/* ==========================================
   3. アプリストアボタン共通スタイル
========================================== */
.store-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 25px;
}

.store-buttons a {
  display: flex;
  align-items: center;
  transition: opacity 0.3s ease;
}

.store-buttons a:hover {
  opacity: 0.8;
}

.store-buttons img {
  height: 3.5rem;
  width: auto;
}

/* ==========================================
   4. メインビジュアル（ファーストビュー）
========================================== */
.hero {
  background: var(--primary-color);
  color: #ffffff;
  padding: 0px 24px 48px;
  text-align: center;
}

.hero h1 {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 28px;
  line-height: 1.5;
}

.hero h1 .fade-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

.hero h1 .fade-word-1 {
  animation-delay: 0.2s;
}
.hero h1 .fade-word-2 {
  animation-delay: 0.4s;
}

.hero .fade-sub {
  font-size: 0.9375rem;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.6s;
}

.hero .fade-cta {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.8s;
}

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

/* スクロール連動フェードイン */
.scroll-fade {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.scroll-fade.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-fade-delay-1 {
  transition-delay: 0.1s;
}
.scroll-fade-delay-2 {
  transition-delay: 0.2s;
}
.scroll-fade-delay-3 {
  transition-delay: 0.3s;
}
.scroll-fade-delay-4 {
  transition-delay: 0.4s;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
}

.hero-image {
  width: 100%;
  line-height: 0;
  position: relative;
}

.hero-image::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(to bottom, transparent, var(--primary-color));
  pointer-events: none;
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

.free-badge {
  display: inline-block;
  background: #ffffff;
  color: var(--primary-color);
  padding: 5px 15px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* ==========================================
   5. 課題への共感（ユーザーの日常）
========================================== */
.pain-section {
  background: #ffffff;
  padding: 70px 0;
  text-align: center;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 40px;
  font-weight: bold;
  color: var(--text-color);
}

.section-title span {
  color: var(--primary-color);
}

.pain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.pain-card {
  background: var(--bg-light);
  padding: 30px 20px;
  border-radius: 12px;
  border-top: 4px solid #ddd;
}

.pain-card i {
  font-size: 2.5rem;
  color: #777;
  margin-bottom: 15px;
}

.pain-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.pain-card p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ==========================================
   6. ベネフィット（解決策）
========================================== */
.benefit-section {
  background: #ffffff;
  padding: 0;
}

.benefit-section > .section-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.benefit-card {
  text-align: center;
  padding: 60px 1.5rem 0;
}

.benefit-card h3 {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 16px;
}

.benefit-card p {
  font-size: 1rem;
  color: var(--text-color);
  line-height: 1.8;
  margin-bottom: 24px;
}

.benefit-card .benefit-screenshot {
  width: 100%;
  line-height: 0;
}

.benefit-card .benefit-screenshot img {
  width: 100%;
  height: auto;
  display: block;
}

.benefit-card .benefit-placeholder {
  background: var(--bg-light);
  border-radius: 16px;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-weight: bold;
  margin: 0 1rem;
}

/* ==========================================
   6.5. その他機能グリッド
========================================== */
.features-section {
  background: #ffffff;
  padding: 60px 1.5rem;
  text-align: center;
}

.features-section .section-title {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 24px;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.feature-card {
  background: var(--bg-light);
  border-radius: 12px;
  padding: 28px 16px 24px;
  text-align: center;
}

.feature-card .feature-icon {
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 12px;
}

.feature-card h3 {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 8px;
  line-height: 1.4;
}

h4 {
  color: var(--primary-color);
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--text-color);
  line-height: 1.6;
}

/* ==========================================
   7. 信頼の証（実績）＆ CTA
========================================== */
.cta-section {
  background: var(--bg-light);
  padding: 80px 0;
  text-align: center;
  border-top: 1px solid #eee;
}

.trust-badge {
  font-weight: bold;
  color: var(--text-light);
  margin-bottom: 20px;
}

.cta-section h2 {
  font-size: 2rem;
  margin-bottom: 15px;
}

.cta-section p {
  margin-bottom: 30px;
  color: var(--text-light);
}

footer {
  background: #f0f2f1;
  color: var(--text-light);
  text-align: center;
  padding: 30px 0;
  font-size: 0.85rem;
}

/* ==========================================
   10. スマホ対応
========================================== */
@media (max-width: 768px) {
  .hero-image img {
    width: 100%;
    height: auto;
  }

  .hero {
    padding: 0 0 24px;
  }

  .hero h1 {
    font-size: 1.7rem;
    margin-bottom: 10px;
  }

  .hero p {
    font-size: 0.9rem;
  }

  .benefit-item,
  .benefit-item:nth-child(even) {
    flex-direction: column;
    text-align: center;
  }

  .logo .logo-text {
    display: none;
  }

  /* アプリストアボタンをスマホでも横並びに */
  .store-buttons {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    margin-top: 16px;
  }

  .store-buttons img {
    height: 3rem;
    width: auto;
    max-width: 45vw;
  }

  .side-panel {
    display: none;
  }
}

/* ==========================================
   11. PC横固定レイアウト
========================================== */
@media (min-width: 769px) {
  body {
    background: var(--side-panel-color);
    background-attachment: fixed;
    padding-top: 0;
  }

  .page-frame {
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    background: #ffffff;
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.25);
    padding-top: var(--header-height);
  }

  .side-panel {
    position: fixed;
    top: 0;
    width: calc((100% - 480px) / 2);
    height: 100%;
    background: var(--side-panel-color);
    overflow: hidden;
  }

  /* background-image は各HTMLファイルで指定 */
  .side-panel.left {
    left: 0;
    background-size: 100% auto;
    background-position: bottom;
    background-repeat: no-repeat;
  }

  .side-panel.right {
    right: 0;
    background-size: 100% auto;
    background-position: bottom;
    background-repeat: no-repeat;
  }

  /* 左パネル内ナビゲーション */
  .navigation {
    height: 100%;
    width: 100%;
    padding: 0 15% 0 15%;
    display: flex;
    flex-flow: column;
    justify-content: center;
  }

  .navi-catchcopy {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    margin-top: 1rem;
    text-align: left;
  }

  .navi-logo {
    display: block;
    max-width: 320px;
    cursor: pointer;
    transform-origin: left;
    transition: transform 0.25s ease;
  }

  .navi-logo:hover {
    transform: scale(1.05);
  }

  .navi-logo img {
    width: 100%;
    height: auto;
  }

  .menu-list {
    list-style: none;
    margin: 2rem 0;
    font-size: 1.1rem;
  }

  .menu-list li {
    margin: 1.5rem 0;
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
    position: relative;
    transform-origin: left;
    transition:
      transform 0.25s ease,
      color 0.5s ease;
  }

  .menu-list li:hover {
    color: var(--primary-color);
    transform: scale(1.1);
  }

  .menu-list li.active {
    color: var(--primary-color);
    transform: scale(1.1);
  }

  .menu-list li::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    opacity: 0;
    transition:
      width 0.5s ease,
      opacity 0.5s ease;
  }

  .menu-list li:hover::after,
  .menu-list li.active::after {
    opacity: 1;
    width: 100%;
  }

  header {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%);
  }

  .logo img {
    max-width: 180px;
  }

  .container {
    width: 100%;
    padding: 0 1.5rem;
  }

  /* 右パネル DLエリア */
  .dl-area-right {
    width: 100%;
    height: 100%;
    padding: 0 15%;
    display: flex;
    flex-flow: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .dl-text-right {
    position: relative;
    max-width: 240px;
    font-weight: bold;
    word-break: auto-phrase;
    font-size: 1.1rem;
    line-height: 1.4;
    color: var(--primary-color);
    background: #ffffff;
    border-radius: 12px;
    padding: 12px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5rem;
  }

  .dl-text-right::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #ffffff;
  }

  .qr-code {
    margin: 0.5rem 0 2rem;
    max-width: 180px;
    width: 100%;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
  }

  .flex-store {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    width: 100%;
  }

  .flex-store img {
    max-height: 48px;
    height: auto;
    cursor: pointer;
  }

  .flex-store img:hover {
    opacity: 0.8;
  }
}

/* 極小画面対応 */
@media (max-width: 340px) {
  .header-btn {
    white-space: normal;
    text-align: center;
    max-width: 120px;
    padding: 8px 14px;
    font-size: 0.8rem;
    line-height: 1.3;
  }
}

/* ==========================================
   9. 接近情報対応バス会社
========================================== */
.additional-data {
  padding: 2rem 1.5rem;
}

.additional-data h2 {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  scroll-margin-top: var(--header-height);
  text-align: center;
}

.line-type {
  background: var(--bg-light);
  padding: 0.375rem 0.5rem;
  font-size: 0.875rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.area {
  margin-bottom: 1rem;
}

.area-name {
  cursor: pointer;
  position: relative;
  margin-left: 1rem;
  font-size: 1rem;
  font-weight: bold;
  padding: 0.25rem 0;
}

.area-name::before {
  content: "";
  position: absolute;
  left: -1rem;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-left: 8px solid #000;
  border-bottom: 5px solid transparent;
  transition: transform 0.3s ease;
  top: 50%;
  transform: translateY(-50%);
}

.area-name.open::before {
  transform: translateY(-50%) rotate(90deg);
}

.company-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.company-list.open {
  max-height: none;
}

.company-list .company {
  font-size: 0.75rem;
  display: inline;
}

.company:not(:last-child)::after {
  content: "、";
}

.close-btn {
  display: none;
  cursor: pointer;
  position: relative;
  padding: 0.75rem;
  background: none;
  color: #828282;
  font-weight: 400;
  margin-left: 1rem;
  font-size: 0.875rem;
  border: none;
}

.close-btn::before {
  content: "";
  position: absolute;
  left: -0.75rem;
  top: 1rem;
  transform: rotate(-45deg);
  width: 10px;
  height: 10px;
  border-top: solid 2px #828282;
  border-right: solid 2px #828282;
}

.company-list.open + .close-btn {
  display: block;
}
