/* ==========================================================================
   Filma LP 共通スタイル
   3つのLP (developers / elearning / ip) で共有するデザイントークンと
   セクションコンポーネント。詳細は lp/DESIGN.md を参照。
   ========================================================================== */

:root {
  /* カラートークン */
  --color-bg: #0b1220;
  --color-bg-raised: #131d33;
  --color-bg-card: #18233c;
  --color-border: #2a3752;
  --color-text: #e6ebf4;
  --color-text-muted: #9aa7bf;
  --color-accent: #38bdf8;
  --color-accent-strong: #0ea5e9;
  --color-accent-contrast: #06222f;
  --color-light-section: #f5f7fb;
  --color-light-text: #1c2434;
  --color-light-muted: #5b6b80;
  /* タイポグラフィ */
  --font-body: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* レイアウト */
  --content-width: 1080px;
  --section-pad: 72px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

section[id] { scroll-margin-top: 84px; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.8;
}

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

a { color: var(--color-accent); }

.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- ヘッダー ----------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 18, 32, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.brand {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.brand span { color: var(--color-accent); }

.global-nav {
  display: flex;
  gap: 20px;
  margin-left: auto;
  align-items: center;
}

.global-nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 14px;
}

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

/* ナビ内に置いたボタンは .global-nav a の文字色より優先させる */
.global-nav a.btn-primary,
.global-nav a.btn-primary:hover {
  color: var(--color-accent-contrast);
}

/* --- ボタン ------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.btn:hover { opacity: 0.85; }

.btn-primary {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
}

.btn-ghost {
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn-small { padding: 8px 18px; font-size: 13px; }

/* --- Hero --------------------------------------------------------------- */

.hero {
  padding: 96px 0 72px;
  background:
    radial-gradient(ellipse 60% 50% at 70% 0%, rgba(56, 189, 248, 0.16), transparent),
    var(--color-bg);
  text-align: center;
}

.hero h1 {
  font-size: 42px;
  line-height: 1.4;
  margin: 0 0 16px;
  letter-spacing: 0.02em;
}

.hero .lead {
  font-size: 17px;
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto 32px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--color-text-muted);
}

/* --- セクション共通 ------------------------------------------------------ */

.section { padding: var(--section-pad) 0; }

.section-title {
  text-align: center;
  font-size: 30px;
  margin: 0 0 12px;
}

.section-lead {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-alt { background: var(--color-bg-raised); }

/* --- カードグリッド ------------------------------------------------------ */

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

.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 28px 24px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.card p {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-muted);
}

.card .card-icon {
  font-size: 26px;
  margin-bottom: 12px;
  display: block;
}

a.card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}

a.card:hover { border-color: var(--color-accent); }

/* --- コードブロック ------------------------------------------------------ */

.code-panel {
  background: #0a0f1c;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}

.code-panel-title {
  padding: 10px 16px;
  font-size: 12px;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}

.code-panel pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: #c9d6ea;
}

.code-panel .tag { color: #7dd3fc; }
.code-panel .attr { color: #a5b4fc; }
.code-panel .str { color: #86efac; }
.code-panel .comment { color: #64748b; }

/* --- ステップ ------------------------------------------------------------ */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 28px 24px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  font-weight: 700;
  margin-bottom: 14px;
}

.step h3 { margin: 0 0 8px; font-size: 16px; }
.step p { margin: 0; font-size: 14px; color: var(--color-text-muted); }

/* --- バッジ列 ------------------------------------------------------------ */

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.badge {
  padding: 6px 16px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

/* --- 実績 ---------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: center;
}

.stat .stat-value {
  font-size: 38px;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1.2;
}

.stat .stat-label {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-top: 6px;
}

/* --- 料金テーブル --------------------------------------------------------- */

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  font-size: 14px;
}

.pricing-table th,
.pricing-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

.pricing-table thead th {
  background: var(--color-bg-raised);
  color: var(--color-text-muted);
  font-size: 13px;
}

.pricing-table .price {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-accent);
}

.pricing-table .pricing-featured td {
  background: rgba(56, 189, 248, 0.07);
}

.pricing-table .pricing-featured td:first-child {
  box-shadow: inset 3px 0 0 var(--color-accent);
}

.pricing-badge {
  display: inline-block;
  margin: 6px 0 0;
  padding: 2px 7px;
  border: 1px solid var(--color-accent);
  border-radius: 4px;
  color: var(--color-accent);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}

.pricing-subtitle {
  margin: 32px 0 12px;
  font-size: 18px;
}

.pricing-options {
  max-width: 720px;
}

.pricing-options th:not(:first-child),
.pricing-options td:not(:first-child) {
  text-align: right;
}

.pricing-notes {
  margin-top: 20px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.pricing-notes li { margin-bottom: 4px; }

/* --- FAQ ------------------------------------------------------------------ */

.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-list details {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  margin-bottom: 12px;
  padding: 0 20px;
}

.faq-list summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 700;
  font-size: 15px;
  list-style: none;
  position: relative;
  padding-right: 28px;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-accent);
  font-size: 20px;
}

.faq-list details[open] summary::after { content: "−"; }

.faq-list details p {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--color-text-muted);
}

/* --- CTAバンド ------------------------------------------------------------ */

.cta-band {
  text-align: center;
  padding: 72px 0;
  background:
    radial-gradient(ellipse 50% 80% at 50% 100%, rgba(56, 189, 248, 0.14), transparent),
    var(--color-bg-raised);
}

.cta-band h2 { font-size: 28px; margin: 0 0 12px; }

.cta-band p {
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto 28px;
}

/* --- フッター -------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 48px 0 32px;
  font-size: 13px;
  color: var(--color-text-muted);
}

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

.footer-columns h3 {
  font-size: 13px;
  color: var(--color-text);
  margin: 0 0 10px;
}

.footer-columns ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-columns li { margin-bottom: 6px; }

.footer-columns a {
  color: var(--color-text-muted);
  text-decoration: none;
}

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

.footer-copy {
  text-align: center;
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
}

/* --- 比較テーブル(eラーニングLP用) ---------------------------------------- */

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
}

.compare-table th,
.compare-table td {
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  text-align: center;
}

.compare-table td:first-child,
.compare-table th:first-child { text-align: left; }

.compare-table .good { color: #4ade80; font-weight: 700; }
.compare-table .bad { color: #f87171; }

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

@media (max-width: 768px) {
  :root { --section-pad: 48px; }

  .hero { padding: 64px 0 48px; }
  .hero h1 { font-size: 28px; }
  .section-title { font-size: 24px; }

  .card-grid,
  .steps,
  .stats,
  .footer-columns {
    grid-template-columns: 1fr;
  }

  .global-nav a:not(.btn) { display: none; }

  .pricing-scroll { overflow-x: auto; }
  .pricing-table { min-width: 560px; }
}
