/* ===========================================================
   CRJ WEB — pricing.css
   料金ページ専用: プラン3カラム / オプション表 / 月額保守 / FAQ
   =========================================================== */

/* ===========================================================
   共通: セクション余白
   =========================================================== */
.pricing-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 100px 40px;
  border-top: 1px solid var(--line);
}

/* 最初のセクション (page-hero の直下) は border-top 不要 */
.pricing-section.first {
  border-top: none;
  padding-top: 80px;
}

/* ===========================================================
   Plans Grid (3カラム比較)
   =========================================================== */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.plan-card {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 40px 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.plan-card:hover {
  border-color: var(--fg);
  transform: translateY(-4px);
}

/* おすすめ (Standard) */
.plan-card.is-featured {
  border: 1px solid var(--fg);
  background: #fff;
  box-shadow: 0 20px 48px -24px rgba(17, 17, 17, 0.12);
}

.plan-card.is-featured::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 3px;
  background: var(--accent);
  border-radius: 10px 10px 0 0;
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 32px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.22em;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 2px;
}

/* プラン名 */
.plan-name {
  font-size: 11px;
  letter-spacing: 0.22em;
  font-weight: 600;
  color: var(--fg-muted);
}

.plan-tagline {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin-top: -20px;
}

/* 料金 */
.plan-price {
  font-size: 44px;
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--fg);
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px;
}

.plan-price .pre {
  font-size: 20px;
  color: var(--fg-muted);
}

.plan-price .unit {
  font-size: 18px;
  color: var(--fg-muted);
  margin-left: 2px;
}

.plan-tax {
  font-size: 11px;
  color: var(--fg-subtle);
  letter-spacing: 0.1em;
  margin-top: -20px;
}

/* スペックライン (納期 / ページ数 / 修正) */
.plan-specs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.plan-specs li {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.plan-specs .label {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--fg-subtle);
  font-weight: 600;
}

.plan-specs .value {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.01em;
}

/* 含まれるもの (チェックリスト) */
.plan-feat {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.6;
}

.plan-feat li {
  position: relative;
  padding-left: 22px;
}

.plan-feat li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 10px;
  height: 6px;
  border-left: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(-45deg);
}

/* CTA */
.plan-cta {
  margin-top: auto;
  width: 100%;
  justify-content: center;
  padding: 14px 24px;
  font-size: 14px;
}

/* Standard の CTA は primary / その他は secondary (index.css 側の btn-* を使用) */

/* ===========================================================
   Plan Card — 創業記念価格 (Premium)
   =========================================================== */
.plan-founding-offer {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  background: var(--accent-soft);
  border-radius: 4px;
  margin-top: -12px;
  font-size: 13px;
  line-height: 1.4;
}

.plan-founding-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--accent);
  text-transform: uppercase;
}

.plan-founding-strike {
  text-decoration: line-through;
  color: var(--fg-subtle);
  font-size: 12px;
}

.plan-founding-arrow {
  color: var(--accent);
  font-weight: 600;
}

.plan-founding-new {
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
}

/* ===========================================================
   キャンペーンバナー (plans-grid 下)
   =========================================================== */
.campaigns-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 32px;
  margin-top: 40px;
  background: #fff;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--fg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  /* はみ出し防止 */
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.campaigns-banner-text strong,
.campaigns-banner-text span {
  max-width: 100%;
  word-break: keep-all;
  overflow-wrap: break-word;
  white-space: normal;
}

.campaigns-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -12px rgba(224, 74, 48, 0.3);
}

.campaigns-banner-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.campaigns-banner-text strong {
  font-size: 17px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -0.005em;
}

.campaigns-banner-text span {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.6;
}

.campaigns-banner-arrow {
  font-size: 20px;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.campaigns-banner:hover .campaigns-banner-arrow {
  transform: translateX(4px);
}

/* ===========================================================
   Use Cases (Lightプラン訴求)
   =========================================================== */
.usecases-intro {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.85;
  max-width: 640px;
  margin-top: -40px;
  margin-bottom: 48px;
}

.usecases-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.usecase-card {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.usecase-card:hover {
  border-color: var(--fg);
  transform: translateY(-3px);
}

.usecase-icon {
  width: 32px;
  height: 32px;
  color: var(--accent);
  margin-bottom: 4px;
}

.usecase-icon svg {
  width: 100%;
  height: 100%;
}

.usecase-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.005em;
  line-height: 1.4;
}

.usecase-desc {
  font-size: 12.5px;
  color: var(--fg-muted);
  line-height: 1.8;
  flex: 1;
}

.usecase-price {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ===========================================================
   Feature Comparison Table (SaaS スタイル)
   =========================================================== */
.compare-intro {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.85;
  max-width: 640px;
  margin-top: -40px;
  margin-bottom: 40px;
}

.feat-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.feat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 820px;
}

.feat-table thead th {
  text-align: center;
  padding: 22px 16px 18px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--fg-subtle);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  background: rgba(242, 239, 232, 0.5);
  vertical-align: middle;
  width: 22%;
}

.feat-table thead th:first-child {
  text-align: left;
  background: transparent;
  width: 34%;
  padding-left: 24px;
}

.feat-table thead th.is-featured {
  color: var(--accent);
  background: var(--accent-soft);
  position: relative;
}

.feat-table thead th.is-featured::after {
  content: "RECOMMENDED";
  display: block;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-top: 4px;
  font-weight: 600;
  opacity: 0.85;
}

.feat-table .feat-group-head th {
  padding: 26px 20px 10px;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--fg);
  font-weight: 600;
  background: var(--bg);
  text-align: left;
  border-top: 1.5px solid var(--fg);
  border-bottom: 1px solid var(--line);
}

.feat-table .feat-group-head th:first-child {
  padding-left: 24px;
}

.feat-table tbody th.feat-name {
  text-align: left;
  padding: 18px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  border-bottom: 1px solid var(--line);
  letter-spacing: -0.005em;
  vertical-align: top;
  background: transparent;
}

.feat-name-desc {
  display: block;
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
  margin-top: 4px;
  font-weight: 400;
  line-height: 1.55;
}

.feat-table tbody td {
  text-align: center;
  padding: 18px 16px;
  font-size: 13px;
  color: var(--fg);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  letter-spacing: -0.005em;
}

.feat-table tbody td.is-featured {
  background: var(--accent-soft);
}

/* 「含む」セル */
.feat-value-include {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--fg);
  font-weight: 500;
  white-space: nowrap;
}

.feat-value-include::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--accent);
  flex-shrink: 0;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath d='M4.5 9.25l3 3 6-6.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 100% 100%;
}

.feat-value-include.text-only::before {
  display: none;
}

/* 「別料金」セル */
.feat-value-option {
  color: var(--fg-muted);
  font-size: 12px;
  font-weight: 500;
}

.feat-value-option small {
  display: block;
  font-size: 10px;
  color: var(--fg-subtle);
  letter-spacing: 0.05em;
  margin-top: 2px;
  font-weight: 400;
}

/* 「対応外」セル */
.feat-value-none {
  color: var(--fg-subtle);
  font-size: 20px;
  line-height: 1;
  font-weight: 300;
}

.feat-foot-note {
  margin-top: 20px;
  font-size: 12px;
  color: var(--fg-subtle);
  line-height: 1.75;
}

@media (max-width: 900px) {
  .feat-table thead th,
  .feat-table tbody th.feat-name,
  .feat-table tbody td {
    padding: 14px 12px;
    font-size: 12px;
  }
  .compare-intro {
    margin-top: -24px;
    margin-bottom: 28px;
  }

  /* モバイル時:表が画面幅を超えることを明示(横スクロール誘導) */
  .feat-table-wrap::before {
    content: "← 左右にスワイプできます →";
    display: block;
    text-align: center;
    font-size: 11px;
    color: var(--accent-deep, #a03a24);
    padding: 10px 12px;
    background: var(--accent-soft);
    border-bottom: 1px solid var(--line);
    letter-spacing: 0.08em;
    font-weight: 500;
    position: sticky;
    left: 0;
  }
}

/* ===========================================================
   Options Table
   =========================================================== */
.options-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.options-table th,
.options-table td {
  text-align: left;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.options-table th {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--fg-subtle);
  font-weight: 600;
  padding-bottom: 14px;
  padding-top: 0;
}

.options-table tbody tr {
  transition: background 0.2s ease;
}

.options-table tbody tr:hover {
  background: var(--accent-soft);
}

.options-table .opt-name {
  font-weight: 500;
  color: var(--fg);
  font-size: 15px;
  letter-spacing: -0.005em;
}

.options-table .opt-price {
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.options-table .opt-note {
  color: var(--fg-muted);
  font-size: 13px;
  line-height: 1.7;
}

.options-note {
  margin-top: 28px;
  font-size: 12px;
  color: var(--fg-subtle);
  line-height: 1.7;
}

/* ===========================================================
   Maintenance Grid
   =========================================================== */
.maintenance-intro {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.8;
  max-width: 560px;
  margin-top: -40px;
  margin-bottom: 48px;
}

.maintenance-intro strong {
  color: var(--fg);
  font-weight: 500;
}

.maintenance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.maint-card {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.maint-card:hover {
  border-color: var(--fg);
  transform: translateY(-3px);
}

.maint-name {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--fg-muted);
  font-weight: 600;
}

.maint-price {
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}

.maint-price .pre {
  font-size: 16px;
  color: var(--fg-muted);
}

.maint-price .unit {
  font-size: 13px;
  color: var(--fg-muted);
  margin-left: 4px;
}

.maint-feat {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.65;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.maint-feat li {
  position: relative;
  padding-left: 16px;
}

.maint-feat li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 1px;
  background: var(--fg-subtle);
}

/* ===========================================================
   Pricing FAQ (抜粋)
   =========================================================== */
.faq-list {
  list-style: none;
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 28px 8px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 20px;
  transition: background 0.2s ease;
}

.faq-item:hover {
  background: var(--accent-soft);
}

.faq-mark {
  font-size: 12px;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--accent);
  padding-top: 2px;
}

.faq-q {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--fg);
  margin-bottom: 12px;
  line-height: 1.5;
}

.faq-a {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.8;
}

.faq-foot {
  margin-top: 40px;
  text-align: right;
}

/* ===========================================================
   Responsive
   =========================================================== */
@media (max-width: 900px) {
  .pricing-section {
    padding: 60px 24px;
  }

  .plans-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .plan-card.is-featured {
    /* SP では横並びが崩れるので強調を控えめに */
    transform: none;
  }

  .usecases-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .usecases-intro {
    margin-top: -24px;
    margin-bottom: 32px;
  }

  .campaigns-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 16px;
  }

  .campaigns-banner-text strong {
    font-size: clamp(1rem, 4.5vw, 17px);
    line-height: 1.5;
  }

  .campaigns-banner-text span {
    font-size: clamp(0.8125rem, 3.5vw, 13px);
    line-height: 1.7;
  }

  .campaigns-banner-arrow {
    align-self: flex-end;
  }

  .options-table th,
  .options-table td {
    padding: 16px 12px;
    font-size: 13px;
  }

  .options-table .opt-name {
    font-size: 14px;
  }

  .options-table .opt-price {
    font-size: 14px;
  }

  .maintenance-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .maintenance-intro {
    margin-top: -24px;
    margin-bottom: 32px;
  }

  .faq-item {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 14px;
    padding: 20px 4px;
  }

  .faq-q {
    font-size: 15px;
  }
}

/* ===========================================================
   モバイル専用: オプション表を縦積みカードに変換
   =========================================================== */
@media (max-width: 768px) {
  .options-table,
  .options-table thead,
  .options-table tbody,
  .options-table tr,
  .options-table th,
  .options-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  /* ヘッダー行は非表示(モバイルカードでは不要) */
  .options-table thead {
    display: none;
  }

  /* 各行 tr をカードとして表示 */
  .options-table tbody tr {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px 20px 22px;
    margin-bottom: 12px;
  }

  .options-table tbody tr:last-child {
    margin-bottom: 0;
  }

  /* tr:hover の accent 背景はモバイル時に不要 */
  .options-table tbody tr:hover {
    background: #fff;
  }

  /* セル個別調整 */
  .options-table td {
    border: 0;
    padding: 0;
  }

  .options-table .opt-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 6px;
  }

  .options-table .opt-price {
    font-size: 15px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 10px;
  }

  .options-table .opt-note {
    font-size: 13px;
    color: var(--fg-muted);
    line-height: 1.75;
    margin-bottom: 0;
  }
}

@media (max-width: 500px) {
  .usecases-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
