/* ============================================================
   CS実践トレーニングLP スタイル
   - モバイルファースト(375px基準)→ 768px以上でPC拡張(§9)
   - ブランドトーン: magicsuccess.tech踏襲
     (ダーク #131421 / パープル #7733FF / ラベンダー #F7F5FF)
   - 日本語Webフォント禁止。システムフォントスタックのみ(§9)
   ============================================================ */

:root {
  --ink: #131421;
  --ink-soft: #4b4d5e;
  --purple: #7733ff;
  --purple-dark: #5c1fd6;
  --purple-soft: #7456f9;
  --lavender: #f7f5ff;
  --line: #dbe0ec;
  --accent-warm: #ffd43b; /* 締切強調(ダーク背景上) */
  --white: #ffffff;
  --radius: 14px;
  --content-width: 680px;
}

* {
  box-sizing: border-box;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.7;
  font-size: 15px;
}

h1, h2, h3, p, ul, ol, dl {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

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

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

/* ---- ボタン ---- */
.btn {
  display: block;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
}

.btn-primary {
  background: var(--purple);
  color: var(--white);
  font-size: 17px;
  padding: 16px 24px;
  box-shadow: 0 6px 18px rgba(119, 51, 255, 0.35);
  transition: background-color 0.2s, transform 0.2s;
}

.btn-primary:hover {
  background: var(--purple-dark);
  transform: translateY(-1px);
}

.btn-small {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  color: var(--purple);
  border: 1.5px solid var(--purple);
  border-radius: 999px;
  padding: 8px 18px;
  transition: background-color 0.2s, color 0.2s;
}

.btn-small:hover {
  background: var(--purple);
  color: var(--white);
}

/* ============================================================
   §4-2 ファーストビュー(375×667の1画面に収める)
   - 100vhは使わない(IGアプリ内ブラウザでFV下端が見切れるため100svh)
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 120% 60% at 85% -10%, rgba(119, 51, 255, 0.45), transparent 60%),
    radial-gradient(ellipse 90% 50% at 0% 110%, rgba(116, 86, 249, 0.3), transparent 60%),
    var(--ink);
  color: var(--white);
}

/* §4-1 ヘッダー: ロゴのみ・ナビなし */
.site-header {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 16px;
  flex-shrink: 0;
}

.site-logo {
  height: 26px;
  width: auto;
  /* ダーク背景上で黒いワードマークを白に反転 */
  filter: brightness(0) invert(1);
}

.fv {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 8px 16px 28px;
  max-width: var(--content-width);
  margin: 0 auto;
  width: 100%;
}

.fv-badge {
  display: inline-block;
  background: var(--accent-warm);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  padding: 8px 14px;
  border-radius: 999px;
}

.fv-badge strong {
  font-size: 16px;
}

.fv-title {
  font-size: clamp(25px, 7vw, 34px);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.fv-title span {
  display: block;
}

.fv-chips {
  display: flex;
  gap: 8px;
}

.fv-chips li {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 14px;
  line-height: 1.4;
}

.fv-dates {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  max-width: 320px;
}

.fv-start {
  font-size: 15px;
}

.fv-cohort {
  display: inline-block;
  background: var(--white);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 8px;
  margin-right: 6px;
  vertical-align: 1px;
}

.fv-deadline {
  font-size: 14px;
}

.fv-deadline strong {
  color: var(--accent-warm);
  font-size: 17px;
}

.fv-cta {
  width: 100%;
  max-width: 320px;
}

/* ============================================================
   §4-3 追従CTA(画面下固定。表示制御はmain.js)
   ============================================================ */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  transform: translateY(0);
  transition: transform 0.25s ease, visibility 0.25s;
  visibility: visible;
}

.sticky-cta .btn {
  max-width: 480px;
  margin: 0 auto;
}

.sticky-cta.is-hidden {
  transform: translateY(110%);
  visibility: hidden;
  pointer-events: none;
}

/* ============================================================
   共通セクション
   ============================================================ */
.section {
  padding: 56px 20px;
  max-width: var(--content-width);
  margin: 0 auto;
}

.eyebrow {
  color: var(--purple);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  margin-bottom: 6px;
}

.section h2 {
  font-size: 23px;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 24px;
  text-wrap: balance; /* 対応ブラウザのみ。「を。」等の孤立改行を緩和 */
}

/* 背景色付きセクションは全幅にし、内側で幅を絞る */
.section-alt,
.section-dark,
.section-apply {
  max-width: none;
}

.section-alt > *,
.section-dark > *,
.section-apply > * {
  max-width: calc(var(--content-width) - 40px);
  margin-left: auto;
  margin-right: auto;
}

.section-alt {
  background: var(--lavender);
}

.section-dark {
  background: var(--ink);
  color: var(--white);
}

.section-apply {
  background: var(--lavender);
}

/* ---- §4-4 こんな方におすすめ ---- */
.check-list li {
  position: relative;
  padding: 10px 0 10px 36px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--purple);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lead-box {
  margin-top: 28px;
  background: var(--lavender);
  border-radius: var(--radius);
  padding: 20px;
}

.lead-box h3 {
  font-size: 16px;
  color: var(--purple-dark);
  margin-bottom: 8px;
  line-height: 1.5;
}

.lead-box p {
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---- §4-5 プログラム ---- */
.program-list {
  display: grid;
  gap: 16px;
}

.program-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 2px 10px rgba(19, 20, 33, 0.05);
}

.program-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.program-no {
  background: var(--ink);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
  padding: 2px 10px;
}

.program-tag {
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 10px;
}

.tag-online {
  background: rgba(119, 51, 255, 0.12);
  color: var(--purple-dark);
}

.tag-real {
  background: rgba(255, 146, 43, 0.16);
  color: #c2570a;
}

.program-date {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.program-theme {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.5;
  margin-bottom: 6px;
}

.program-desc {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

/* ---- §4-6 講師紹介 ---- */
.lecturer-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.lecturer-photo {
  width: 200px;
  height: auto;
  border-radius: var(--radius);
}

.lecturer-name {
  font-size: 20px;
  font-weight: 800;
  text-align: center;
}

.lecturer-title {
  font-size: 13px;
  color: var(--purple-dark);
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}

.lecturer-profile li {
  position: relative;
  font-size: 13px;
  color: var(--ink-soft);
  padding: 4px 0 4px 16px;
}

.lecturer-profile li::before {
  content: "・";
  position: absolute;
  left: 0;
  color: var(--purple);
  font-weight: 700;
}

/* ---- §4-7 実績 ---- */
.section-dark .eyebrow {
  color: var(--accent-warm);
}

.results-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  padding: 20px 12px;
  text-align: center;
}

.stat-number {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--accent-warm);
}

.stat-unit {
  font-size: 15px;
  margin-left: 2px;
}

.stat-label {
  font-size: 12px;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.85);
}

/* ---- §4-8 開催詳細 ---- */
.details-table {
  border-top: 1px solid var(--line);
}

.details-row {
  display: flex;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  gap: 12px;
}

.details-row dt {
  flex: 0 0 84px;
  font-weight: 700;
  color: var(--purple-dark);
  font-size: 14px;
}

.details-row dd {
  margin: 0;
  font-size: 14px;
}

.details-note {
  margin-top: 20px;
  font-size: 12px;
  color: var(--ink-soft);
  background: var(--lavender);
  border-radius: var(--radius);
  padding: 16px;
}

/* ---- §4-9 申込セクション ---- */
.section-apply h2 {
  text-align: center;
}

.apply-lead {
  text-align: center;
  font-size: 15px;
  margin-bottom: 24px;
}

.apply-lead strong {
  white-space: nowrap; /* 日付の語中改行(「7/月7日」)を防ぐ */
}

.apply-deadline {
  color: #c92a2a;
  font-size: 17px;
  margin-left: 2px;
}

.form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 16px;
  box-shadow: 0 4px 16px rgba(19, 20, 33, 0.08);
}

/* フォーム実高(2026-06実測: 375px幅=3147px / PC幅=2743px)に近い高さを
   事前確保してCLSを防止(§8)。フォーム項目変更時は再計測して更新する。
   実測よりわずかに小さくしておく(過剰確保でフォーム下に空白を作らないため) */
#hubspot-form {
  min-height: 3100px;
}

.form-fallback {
  font-size: 14px;
  color: var(--ink-soft);
  padding: 24px 8px;
  text-align: center;
}

/* ---- §4-10 補足資料リンク(控えめに) ---- */
.more-info {
  padding-top: 0;
  padding-bottom: 40px;
}

.more-info p {
  font-size: 12px;
  color: var(--ink-soft);
  text-align: center;
}

/* ---- §4-11 フッター ---- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  padding: 40px 20px calc(88px + env(safe-area-inset-bottom)); /* 追従CTAに隠れないよう下余白を確保 */
}

.footer-logo {
  height: 22px;
  width: auto;
  margin: 0 auto 16px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

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

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
}

.footer-copy {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================================
   PC(§9: 375px基準からの拡張)
   ============================================================ */
@media (min-width: 768px) {
  body {
    font-size: 16px;
  }

  .site-header {
    height: 64px;
    padding: 0 32px;
  }

  .site-logo {
    height: 30px;
  }

  .hero {
    min-height: auto;
  }

  .fv {
    padding: 72px 24px 88px;
    gap: 18px;
  }

  .fv-title {
    font-size: 40px;
    line-height: 1.35;
  }

  .section {
    padding: 80px 24px;
  }

  .section h2 {
    font-size: 28px;
  }

  .program-list {
    grid-template-columns: 1fr 1fr;
  }

  .lecturer-card {
    flex-direction: row;
    align-items: flex-start;
  }

  .lecturer-name,
  .lecturer-title {
    text-align: left;
  }

  .results-stats {
    max-width: 560px;
  }

  #hubspot-form {
    min-height: 2700px;
  }
}
