@import url('assets/tokens.css');

/*
 * LPスコープ化:
 * - 基底（.lp-root）はspecificity 010 で SWELL body を確実に上書き
 * - 要素セレクタは :where() で specificity 0 を維持し、元の CSS カスケード（.btn等が上書きできる）を保つ
 */
:where(.lp-root) *, :where(.lp-root) *::before, :where(.lp-root) *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

.lp-root {
  font-family: var(--font-jp);
  color: var(--text-primary);
  background: var(--base-white);
  line-height: 1.85;
  font-size: 17px;
}

:where(.lp-root) img { max-width: 100%; display: block; }

:where(.lp-root) a { color: inherit; text-decoration: none; }

:where(.lp-root) button { font-family: inherit; cursor: pointer; border: 0; background: none; }

/* ------------- Shared primitives ------------- */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 120px 0;
  position: relative;
}

/* 既存テーマ style.css:91 の `section + section { margin-top: 170px }` を LP 内で無効化 */
.lp-root section + section { margin-top: 0; }
.section--tinted { background: var(--surface-teal-pale); }
.section--teal { background: var(--brand-primary-dark); color: #fff; }
.section--dark { background: #0A2525; color: #fff; }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 64px;
  max-width: 880px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; align-items: center; }

.en-label {
  font-family: var(--font-en);
  font-weight: 900;
  color: var(--brand-primary);
  font-size: 14px;
  letter-spacing: 0.12em;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.en-label::before {
  content: '';
  width: 32px;
  height: 2px;
  background: var(--brand-primary);
}
.section--teal .en-label,
.section--dark .en-label { color: var(--brand-primary-light); }
.section--teal .en-label::before,
.section--dark .en-label::before { background: var(--brand-primary-light); }

.section-title {
  font-family: var(--font-jp);
  font-weight: 900;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: var(--text-deep);
  text-wrap: balance;
}
.section--teal .section-title,
.section--dark .section-title { color: #fff; }

.section-lead {
  font-size: 19px;
  line-height: 1.95;
  color: var(--text-primary);
  max-width: 760px;
}
.section--teal .section-lead,
.section--dark .section-lead { color: rgba(255,255,255,0.85); }

.num-badge {
  font-family: var(--font-en);
  font-weight: 900;
  color: var(--brand-primary);
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line-soft);
  background: #fff;
  font-size: 12px;
  color: var(--text-primary);
  border-radius: 999px;
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  font-weight: 700;
  font-size: 15px;
  transition: opacity 150ms ease, transform 150ms ease;
  white-space: nowrap;
}
.btn:hover { opacity: 0.85; }
.btn--primary {
  background: var(--brand-primary);
  color: #fff;
}
.btn--ghost {
  background: transparent;
  color: var(--brand-primary);
  border: 1.5px solid var(--brand-primary);
}
.btn--white {
  background: #fff;
  color: var(--brand-primary-dark);
}
.btn--lg { padding: 20px 36px; font-size: 16px; }

.btn .arrow {
  display: inline-block;
  transition: transform 200ms ease;
}
.btn:hover .arrow { transform: translateX(4px); }

/* Scroll-reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ------------- Header ------------- */

.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
  z-index: 100;
  height: 88px;
  display: flex;
  align-items: center;
  transition: height .2s ease, background .2s ease;
}
.header.is-scrolled { height: 72px; }
/* WordPress管理バー(プレビュー/ログイン時のみ)の高さ分、固定ヘッダーを下げる */
body.admin-bar .lp-root .header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .lp-root .header { top: 46px; }
}
.header__inner {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text-deep);
}
.header__brand-icon { width: 28px; height: 28px; display: block; }
.header__brand-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  line-height: 1;
}
.header__brand-logo {
  height: 43px;
  width: auto;
  display: block;
  color: var(--teal, #03A8A8);
  transition: height .2s ease;
}
/* SWELL/wp-imagery系のCSSで svg/img の高さが auto 強制されるケースに備え、specificityと!importantで固定 */
.lp-root .header__brand-logo {
  height: 43px !important;
  width: 258px !important;       /* 43 * (660/110) = 258 */
  max-width: 100% !important;
  aspect-ratio: 660 / 110;
  display: block;
}
.header.is-scrolled .header__brand-logo { height: 34px; }
.lp-root .header.is-scrolled .header__brand-logo {
  height: 34px !important;
  width: 204px !important;       /* 34 * (660/110) = 204 */
}
.header__brand-by {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted, #6b7d7d);
}
.header__nav {
  display: flex;
  gap: 28px;
  font-size: 13px;
}
.header__nav a {
  color: var(--text-primary);
  transition: color 150ms ease;
}
.header__nav a:hover { color: var(--brand-primary); }
.header__cta {
  background: var(--brand-primary);
  color: #fff;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .header__nav { display: none; }
}

/* SWELLハンバーガーメニュー(#menubar_hdr)をLPで非表示
   LPは独自ヘッダーで完結し、対となる#menubar(header.php由来)も生成されないため
   トリガーだけ残ると無料相談CTAと重なるだけで機能しない */
body.page-lp #menubar_hdr { display: none !important; }

/* SP対応: 関連サービスCTAの長いボタンテキスト（デジタルマーケティングコンサルティング…）が
   .btn { white-space: nowrap } により折返し不可で、SP viewport を突き抜けるのを防ぐ */
@media (max-width: 760px) {
  .lp-root .related-primary { padding: 24px 20px; }
  .lp-root .related-primary__cta .btn {
    white-space: normal;
    text-align: center;
    line-height: 1.5;
    padding: 14px 16px;
  }
}

/* SP対応: 比較表 (.vs-table) の列ズレ修正
   既存のSP用 2-col + LABEL span が grid auto-placement で MINE/THEM 列を反転させていた。
   1列縦積みに切替え、:nth-child + order で各3つ組を LABEL → MINE → THEM の論理順で表示する。
   HTMLソース順は (MINE, LABEL, THEM) のまま、ビジュアルだけ並び替え */
@media (max-width: 640px) {
  .lp-root .vs-table {
    grid-template-columns: 1fr;
    border: 0;
    background: transparent;
    overflow: visible;
  }

  /* 上部のヘッダ3セル(マーケティングAIX/空/他社)はSPでは非表示 — ◎/△アイコンで識別可能 */
  .lp-root .vs-table > .vs-table__head { display: none; }

  /* 各3つ組(MINE, LABEL, THEM)の表示順を LABEL → MINE → THEM に reorder
     データ行は nth-child 4-18 (5行 × 3セル) */
  .lp-root .vs-table > div:nth-child(4)  { order: 2; }
  .lp-root .vs-table > div:nth-child(5)  { order: 1; }
  .lp-root .vs-table > div:nth-child(6)  { order: 3; }
  .lp-root .vs-table > div:nth-child(7)  { order: 5; }
  .lp-root .vs-table > div:nth-child(8)  { order: 4; }
  .lp-root .vs-table > div:nth-child(9)  { order: 6; }
  .lp-root .vs-table > div:nth-child(10) { order: 8; }
  .lp-root .vs-table > div:nth-child(11) { order: 7; }
  .lp-root .vs-table > div:nth-child(12) { order: 9; }
  .lp-root .vs-table > div:nth-child(13) { order: 11; }
  .lp-root .vs-table > div:nth-child(14) { order: 10; }
  .lp-root .vs-table > div:nth-child(15) { order: 12; }
  .lp-root .vs-table > div:nth-child(16) { order: 14; }
  .lp-root .vs-table > div:nth-child(17) { order: 13; }
  .lp-root .vs-table > div:nth-child(18) { order: 15; }

  .lp-root .vs-table > div {
    padding: 14px 16px;
    font-size: 15px;
    border: 1px solid var(--line-soft);
    border-bottom: 0;
  }
  /* 各グループの最後(THEM)に下ボーダー */
  .lp-root .vs-table__them { border-bottom: 1px solid var(--line-soft); }

  /* ラベル(体制/支援範囲...)を見出しバー化 */
  .lp-root .vs-table__row-label {
    grid-column: auto;
    background: var(--brand-primary);
    color: #fff;
    font-weight: 800;
    text-align: center;
    font-size: 13px;
    letter-spacing: 0.05em;
    padding: 10px 16px;
    border: 0 !important;
    margin-top: 18px;
    justify-content: center;
  }
  /* 先頭ラベル(LABEL-1, nth-child 5)は上余白なし */
  .lp-root .vs-table > div:nth-child(5) { margin-top: 0; }

  .lp-root .vs-table__mine {
    background: rgba(3,168,168,0.04);
    font-weight: 700;
  }
}

/* SP対応: mid-cta (ページ間CTAブロック) の文言とボタン間の謎空白
   .mid-cta__copy { flex: 1 1 420px } が column-direction flex で main axis (縦) の
   flex-basis として解釈され、コンテンツ実寸より大きな ~420px の高さを確保していた。
   SP では auto に戻して中身に沿わせる */
@media (max-width: 720px) {
  .lp-root .mid-cta__copy { flex: 0 0 auto; }
}

/* ------------- Hero (FV) ------------- */

.hero {
  padding: 160px 0 100px;
  background:
    radial-gradient(circle at 85% 20%, rgba(0, 199, 176, 0.12), transparent 50%),
    radial-gradient(circle at 10% 80%, rgba(3, 168, 168, 0.08), transparent 50%),
    #fff;
  overflow: hidden;
  position: relative;
}
.hero::before {
  /* Subtle grid overlay */
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(3,168,168,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(3,168,168,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  mask-image: radial-gradient(circle at 50% 30%, #000 20%, transparent 80%);
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero h1.seo-h1 {
  position: absolute;
  width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0);
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: #fff;
  border: 1px solid var(--brand-primary-light);
  color: var(--brand-primary-dark);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  border-radius: 999px;
  margin-bottom: 24px;
}
.hero__eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-red);
  box-shadow: 0 0 0 4px rgba(255,74,51,0.15);
}
.hero__title {
  font-size: clamp(26px, 3.4vw, 44px);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--text-deep);
  margin-bottom: 24px;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .hero__title { white-space: normal; font-size: clamp(22px, 5.5vw, 32px); line-height: 1.4; }
  .hero__title br { display: none; }
}
.hero__title .hl {
  color: var(--brand-primary);
  position: relative;
  display: inline-block;
}
.hero__title .hl::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 6px;
  height: 10px;
  background: rgba(0,199,176,0.18);
  z-index: -1;
}
.hero__title .num {
  font-family: var(--font-en);
  font-weight: 900;
  color: var(--accent-red);
  font-size: 1.2em;
  letter-spacing: -0.04em;
}
.hero__sub {
  font-size: 18px;
  line-height: 1.95;
  color: var(--text-primary);
  margin-bottom: 32px;
  max-width: 520px;
}
.hero__brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--surface-teal-pale);
  color: var(--brand-primary-dark);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 32px;
}
.hero__brand-chip::before {
  content: '';
  width: 6px; height: 6px; background: var(--brand-primary);
  display: inline-block;
}
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.hero__scroll {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-en);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  z-index: 2;
}
.hero__scroll-line {
  width: 1px; height: 36px;
  background: linear-gradient(to bottom, transparent, var(--brand-primary));
  animation: scroll-pulse 1.8s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.8); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

/* ------------- Agent Mock (hero right) ------------- */

.agent-mock {
  background: #fff;
  border: 1px solid var(--line-soft);
  box-shadow: 0 20px 60px rgba(3,168,168,0.12), 0 4px 12px rgba(27,27,43,0.06);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.agent-mock__chrome {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  gap: 8px;
  background: #FAFDFD;
}
.agent-mock__dots { display: flex; gap: 6px; }
.agent-mock__dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--line-medium);
}
.agent-mock__dots span:first-child { background: #FF6B5E; }
.agent-mock__dots span:nth-child(2) { background: #FFB21E; }
.agent-mock__dots span:nth-child(3) { background: var(--brand-primary-light); }
.agent-mock__url {
  margin-left: 16px;
  font-family: var(--font-en);
  font-size: 11px;
  color: var(--text-muted);
  background: #fff;
  border: 1px solid var(--line-soft);
  padding: 4px 12px;
  border-radius: 4px;
  flex: 1;
}
.agent-mock__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 700;
  color: var(--brand-primary);
  letter-spacing: 0.1em;
}
.agent-mock__status .ping {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-primary);
  box-shadow: 0 0 0 0 rgba(3,168,168,0.6);
  animation: ping 1.4s ease-out infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(3,168,168,0.5); }
  100% { box-shadow: 0 0 0 10px rgba(3,168,168,0); }
}

.agent-mock__body {
  padding: 20px;
  display: grid;
  gap: 12px;
  min-height: 380px;
  background:
    linear-gradient(180deg, #fff 0%, #FAFDFD 100%);
}

.mock-task {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  background: #fff;
  border-radius: 6px;
  opacity: 0;
  animation: task-in 0.5s ease forwards;
}
.mock-task:nth-child(1) { animation-delay: 0.2s; }
.mock-task:nth-child(2) { animation-delay: 0.5s; }
.mock-task:nth-child(3) { animation-delay: 0.9s; }
.mock-task:nth-child(4) { animation-delay: 1.3s; }
.mock-task:nth-child(5) { animation-delay: 1.7s; }

@keyframes task-in {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: none; }
}

.mock-task__icon {
  width: 24px; height: 24px;
  border-radius: 4px;
  background: var(--surface-teal-pale);
  color: var(--brand-primary);
  display: grid;
  place-items: center;
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 900;
}
.mock-task__label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-deep);
}
.mock-task__label small {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}
.mock-task__status {
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}
.mock-task__status--done {
  background: var(--surface-teal-pale);
  color: var(--brand-primary);
}
.mock-task__status--run {
  background: #FFF3D9;
  color: #B47F0B;
  display: inline-flex; align-items: center; gap: 5px;
}
.mock-task__status--run::before {
  content: '';
  width: 5px; height: 5px; border-radius: 50%;
  background: #B47F0B;
  animation: ping-soft 1s ease-in-out infinite;
}
@keyframes ping-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.mock-task__status--queue {
  background: #F2F2F2;
  color: var(--text-muted);
}

.agent-mock__footer {
  border-top: 1px solid var(--line-soft);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  background: #fff;
}
.agent-mock__footer strong {
  color: var(--brand-primary);
  font-family: var(--font-en);
  font-weight: 900;
  font-size: 13px;
}

.mock-badge {
  position: absolute;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-deep);
  box-shadow: 0 8px 24px rgba(3,168,168,0.12);
  display: flex;
  gap: 8px;
  align-items: center;
}
.mock-badge--tl {
  top: -18px; left: -24px;
}
.mock-badge--br {
  bottom: 40px; right: -28px;
}
.mock-badge .num {
  font-family: var(--font-en);
  color: var(--accent-red);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.mock-badge small { font-weight: 500; color: var(--text-muted); font-size: 10px; display: block; }

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .mock-badge--tl, .mock-badge--br { display: none; }
}
