/* ============================================================
   pages.css — 下層ページ専用の追加スタイル

   assets/style.css は全ページ共通の正本です。
   このファイルは「下層ページ（can-do / openclaw / hermes / flow / price）に
   グラフィックを足したことで必要になった分」だけを持ちます。
   style.css のトークン（--line / --ease など）を前提にしているため、
   必ず style.css より後ろで読み込んでください。

   読み込み：_build/build.py の <head> に以下を追加すること。
     <link rel="stylesheet" href="assets/pages.css">

   images/cards/ の画像は2種類あります。
     cat_*.png  … 背景のない立体オブジェクト（受け皿になる面が要る）
     why_* / env_* / dept_*.png … 角丸タイル込みの完成アイコン（そのまま置ける）
   下のクラスもその2系統に分かれています。
============================================================ */


/* ------------------------------------------------------------
   1. できること一覧（can-do.html）
      13カテゴリの見出しに、番号バッジと並べてカテゴリの絵を置く。
      cat_*.png は背景が透明なので、小さな受け皿（面）を敷いています。
      面をなくすと、白地に絵が浮いて安っぽく見えます。
------------------------------------------------------------ */

/* 導入の流れ：OpenClaw／できることと同じ 1942:809 の全幅ヒーロー。
   文字は画像に焼き込まず、拡大時も読めるライブテキストで重ねる。 */
.fl-head--conversation{
  padding:0;
  background:#fff;
  border-bottom:0;
  overflow:hidden;
}
.fl-head--conversation::before,
.fl-head--conversation::after{display:none}
.fl-hero-stage{
  position:relative;
  width:100vw;
  max-width:none;
  aspect-ratio:1942 / 809;
  overflow:hidden;
}
.fl-hero-stage > img{
  position:absolute;
  inset:0;
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}
.fl-hero-copy{
  position:absolute;
  z-index:1;
  left:9.7%;
  top:16%;
  width:44%;
  color:var(--ink);
}
.fl-hero-copy .label{display:block}
.fl-head .fl-hero-copy h1{
  max-width:12em;
  margin-top:clamp(12px,1.2vw,20px);
  font-size:clamp(34px,3.45vw,67px);
  line-height:1.24;
  letter-spacing:-.045em;
  text-wrap:balance;
}
.fl-head .fl-hero-copy h1 em{
  position:relative;
  z-index:0;
  white-space:nowrap;
}
.fl-head .fl-hero-copy h1 em::after{
  content:'';
  position:absolute;
  z-index:-1;
  left:0;
  right:0;
  bottom:-.08em;
  height:.12em;
  border-radius:999px;
  background:#c9d4ff;
}
.fl-head .fl-hero-copy .lead{
  max-width:53ch;
  margin-top:clamp(16px,1.6vw,26px);
  font-size:clamp(13px,1.05vw,18px);
  line-height:1.9;
  color:#596579;
}
@media (max-width:900px){
  .fl-hero-stage{aspect-ratio:auto;min-height:620px}
  .fl-hero-stage > img{
    /* 画像右側に寄ったキャラクターだけを中央に大きく見せる。 */
    /* 元画像のキャラクター群は右側にあるため、表示基準を左へ寄せる。 */
    inset:auto auto -15px 10%;
    width:180vw;
    max-width:none;
    height:auto;
    object-fit:contain;
    object-position:center bottom;
    transform:translateX(-50%);
  }
  .fl-hero-copy{
    position:relative;
    left:auto;
    top:auto;
    width:100vw;
    max-width:100vw;
    min-width:0;
    box-sizing:border-box;
    padding:calc(var(--header-h) + 38px) var(--gutter) 220px;
  }
  .fl-head .fl-hero-copy h1{font-size:clamp(34px,8vw,52px)}
  .fl-head .fl-hero-copy .lead{max-width:calc(100vw - (var(--gutter) * 2));font-size:16px;overflow-wrap:anywhere}
}
@media (max-width:560px){
  .fl-hero-stage{min-height:600px}
  .fl-hero-copy{padding-bottom:190px}
  .fl-head .fl-hero-copy h1 em{white-space:normal}
}

/* ヒーロー：価値説明と相談導線を左、業務を象徴するビジュアルを右に配置 */
.cd-hero .wrap{
  /* OpenClaw と同じく、ヒーローの高さはコンテンツ量で決める */
  min-height:0;
  padding-right:clamp(320px,37vw,500px);
}
/* OpenClaw のヒーローと同じ密度にそろえ、CTAの下に余白を残しすぎない。 */
.cd-hero{padding-bottom:clamp(36px,3vw,48px)}
.cd-hero + .pg-panelwrap{padding-top:clamp(18px,2vw,28px)}
.cd-hero .lead{max-width:700px}
.cd-hero__actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:clamp(22px,2.4vw,32px)}
.cd-hero__actions .ibtn{min-width:210px}
.cd-hero__visual{
  position:absolute;z-index:0;right:clamp(0px,1vw,16px);top:34%;
  width:clamp(260px,29vw,420px);aspect-ratio:1;
  display:grid;place-items:center;pointer-events:none;
  transform:translateY(-46%);
}
.cd-hero__visual::before{
  content:'';position:absolute;inset:8%;border-radius:50%;
  background:radial-gradient(circle,#dbe8ff 0 36%,rgba(219,232,255,.28) 37% 61%,transparent 62%);
  box-shadow:0 14px 34px rgba(67,75,170,.1);
}
.cd-hero__visual img{
  position:relative;z-index:2;width:84%;height:auto;
  filter:drop-shadow(0 22px 26px rgba(45,63,145,.18));
  animation:cdHeroFloat 6s ease-in-out infinite;
}
.cd-hero__orb{position:absolute;border-radius:50%;z-index:1;box-shadow:0 10px 20px rgba(45,63,145,.12)}
.cd-hero__orb--a{width:clamp(26px,3vw,42px);height:clamp(26px,3vw,42px);right:2%;top:17%;background:#4e7cff}
.cd-hero__orb--b{width:clamp(16px,1.7vw,25px);height:clamp(16px,1.7vw,25px);left:12%;bottom:17%;background:#8b55ee}
.cd-hero__spark{position:absolute;z-index:1;width:18px;height:18px;background:#ffd34d;clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%)}
.cd-hero__spark--a{right:13%;bottom:12%;transform:scale(1.2)}
.cd-hero__spark--b{left:5%;top:27%;background:#ff8bc8;transform:scale(.72)}
@keyframes cdHeroFloat{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-10px) rotate(2deg)}}
@media (max-width:900px){
  .cd-hero .wrap{min-height:0;padding-right:var(--gutter)}
  .cd-hero__visual{position:relative;right:auto;top:auto;transform:none;margin:12px auto 0;width:min(300px,64vw)}
  .cd-hero__actions{justify-content:center}
  .cd-hero .lead{max-width:100%}
}
@media (prefers-reduced-motion:reduce){.cd-hero__visual img{animation:none}}

/* 指定イラストをそのまま使う、できることページのヒーロー */
.cd-hero--illustrated{
  padding:0;
  background:#fff;
  border-bottom:0;
}
.cd-hero--illustrated::before,
.cd-hero--illustrated::after{display:none}
.cd-hero-stage{
  position:relative;
  width:100%;
  /* OpenClaw と同じく、ヘッダー直下から通常のヒーローとして始める。 */
  height:auto;
  overflow:visible;
  background:#fff;
}
.cd-hero-stage > img{
  display:block;
  width:100%;
  height:auto;
  transform:none;
}
.cd-hero-image-actions{position:absolute;inset:0;z-index:1}
.cd-hero-image-actions a{
  position:absolute;
  top:77%;height:11%;
  display:block;border-radius:999px;
}
.cd-hero-image-actions a:first-child{left:11%;width:20%}
.cd-hero-image-actions a:last-child{left:32%;width:19%}

/* できること：OpenClaw と同じ、文字と図を分けた2カラムヒーロー */
.cap-v2-hero{position:relative;overflow:hidden;padding:calc(var(--header-h) + clamp(52px,5vw,84px)) 0 clamp(58px,5vw,88px);background:#fff}
.cap-v2-hero .wrap{max-width:1680px}
.cap-v2-hero__grid{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(320px,.92fr);align-items:center;gap:clamp(32px,5vw,88px)}
.cap-v2-hero__copy{position:relative;z-index:1;max-width:760px}
.cap-v2-hero .label{color:#149c19}
.cap-v2-hero h1{margin:14px 0 0;font-size:clamp(38px,4.25vw,68px);line-height:1.25;letter-spacing:-.045em;font-weight:800}
.cap-v2-hero h1 span{position:relative}
.cap-v2-hero h1 span::after{content:'';position:absolute;left:0;right:0;bottom:-.06em;height:.13em;border-radius:99px;background:#91d236;z-index:-1}
.cap-v2-hero__copy>p{max-width:680px;margin:22px 0 0;color:var(--sub);font-size:clamp(14px,1.15vw,16.5px);line-height:2;font-weight:500}
.cap-v2-hero__facts{display:flex;flex-wrap:wrap;gap:10px;margin:24px 0 0;padding:0;list-style:none}
.cap-v2-hero__facts li{display:inline-flex;align-items:center;gap:8px;padding:9px 17px;border-radius:999px;background:#fff;border:1px solid var(--line);box-shadow:var(--sh-rest);font-size:13px;font-weight:700}
.cap-v2-hero__facts li::before{content:'';width:8px;height:8px;border-radius:50%;background:#35b926;flex:none}
.cap-v2-hero__actions{margin-top:28px;justify-content:flex-start;gap:12px;flex-wrap:wrap}
.cap-v2-hero__actions .ibtn{min-width:210px}
.cap-v2-hero__actions .ibtn-primary{background:#202429;color:#fff;box-shadow:none}
.cap-v2-hero__actions .ibtn-primary:hover{background:#149c19}
.cap-v2-hero__actions .arw{margin-left:8px;color:#149c19}
.cap-v2-hero__art{justify-self:center;width:min(100%,500px)}
.cap-v2-hero__art img{display:block;width:100%;height:auto}
@media (max-width:900px){.cap-v2-hero{padding-top:calc(var(--header-h) + 44px)}.cap-v2-hero__grid{grid-template-columns:1fr}.cap-v2-hero__art{width:min(72vw,420px);order:-1}}

/* OpenClaw と同じ左右2カラムの密度で、指定イメージを右側の背景に固定する。 */
.cap-wide-hero{
  min-height:720px;
  /* 共通ヘッダーは負の下マージンで次の要素に重なるため、ヒーロー自体をその下へ送る。 */
  margin-top:var(--header-h);
  padding:48px 0 54px;
  background:#fffdfa url('../images/can_do_hero_wide_v3.png') right center/auto 100% no-repeat;
}
.cap-wide-hero .wrap{max-width:1680px}
.cap-wide-hero .cap-v2-hero__grid{grid-template-columns:minmax(0,1.04fr) minmax(320px,.96fr);min-height:618px;align-items:center;gap:clamp(28px,4vw,72px)}
.cap-wide-hero .cap-v2-hero__copy{max-width:720px}
.cap-wide-hero .label{display:block;margin-bottom:10px}
.cap-wide-hero h1{font-size:clamp(42px,4.2vw,66px);line-height:1.24}
.cap-wide-hero .cap-v2-hero__copy>p{max-width:650px;font-size:clamp(14px,1.1vw,16px);line-height:1.85}
.cap-wide-hero .cap-v2-hero__facts{margin-top:20px}
.cap-wide-hero .cap-v2-hero__actions{margin-top:24px}
.cap-wide-hero__spacer{min-height:1px}
@media (max-width:900px){
  .cap-wide-hero{min-height:0;padding:44px 0 52px;background-size:auto 58%;background-position:right bottom}
  .cap-wide-hero .cap-v2-hero__grid{grid-template-columns:1fr;min-height:0}
  .cap-wide-hero__spacer{display:none}
}

/* 指定された完成ヒーロー画像を、OpenClaw と同様にヘッダー直下へ全幅配置する。 */
.cd-hero-final{position:relative;padding-top:var(--header-h);background:#fff;overflow:hidden}
.cd-hero-final__stage{position:relative;width:100%;line-height:0}
.cd-hero-final__stage>img{position:static;display:block;width:100%;height:auto}
.cd-hero-final__actions{position:absolute;inset:0;z-index:1}
.cd-hero-final__actions a{position:absolute;top:77%;height:10%;display:block;border-radius:999px}
.cd-hero-final__actions a:first-child{left:11%;width:20%}
.cd-hero-final__actions a:last-child{left:32%;width:19%}
@media (max-width:640px){.cd-hero-final__actions a{top:75%;height:13%}}
@media (max-width:640px){
  .cd-hero-image-actions a{top:76%;height:13%}
}

/* できること：添付された完成画像を、OpenClawと同じ1942:809の全幅枠で表示する。 */
.cd-hero--openclaw-size{padding:0;background:#fff;border-bottom:0}
.cd-hero--openclaw-size::before,
.cd-hero--openclaw-size::after,
.cd-hero--openclaw-size>.wrap{display:none}
.cd-openclaw-stage{
  position:relative;
  width:100vw;
  max-width:none;
  aspect-ratio:1942 / 809;
  overflow:hidden;
  margin:0 auto;
  background:#fffdfa url('../images/can_do_hero_openclaw_ratio.png?v=20260820-2312') center / contain no-repeat;
}
.cd-openclaw-stage>.cd-hero-picture,
.cd-openclaw-stage>.cd-hero-picture img{
  display:block;
  width:100%;
  height:100%;
  /* 1942:809で再構成済みの画像を、歪めずに枠へ収める。 */
  object-fit:contain;
}
.cd-hero-motion{
  position:absolute;
  inset:0;
  z-index:1;
  overflow:hidden;
  pointer-events:none;
  background:#fffdfa;
  /* 緑の円枠と円内の絵だけを動かす。
     左右の円弧と上下15pxの移動幅を収めつつ、外側の丸・点・星は除外する。 */
  clip-path:ellipse(12% 33% at 72.5% 51%);
}
.cd-hero-motion .cd-hero-picture{display:block;width:100%;height:100%}
.cd-hero-motion img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  animation:cdHeroFloat 5.4s ease-in-out infinite;
  will-change:transform;
}
.cd-space-particles{
  position:absolute;inset:0;z-index:2;display:block;width:100%;height:100%;
  pointer-events:none;
}
@keyframes cdHeroFloat{
  0%,100%{transform:translateY(15px)}
  50%{transform:translateY(0)}
}
.cd-openclaw-actions{position:absolute;inset:0;z-index:10;pointer-events:auto}
.cd-openclaw-actions a{--hero-cta:#149c19}
.cd-openclaw-actions a{
  position:absolute;top:79%;height:10.5%;z-index:1;display:block;border-radius:999px;
  pointer-events:auto;cursor:pointer;touch-action:manipulation;
}
.cd-openclaw-actions a:first-child{left:16%;width:calc(18% + 1px)}
.cd-openclaw-actions a:last-child{left:34.8%;width:16.6%}
/* 焼き込み画像内の黒枠まで、ホバー色面が確実に覆う。 */
.cd-openclaw-actions .hero-image-hover .ibtn__hover-fill{inset:-2px;border-radius:999px}
.cd-openclaw-actions .hero-image-hover:is(:hover,:focus-visible){border-color:transparent!important}

@media (max-width:1000px){
  /* stickyヘッダーの負マージンぶんを確保して、ヒーローを下から始める。 */
  .cd-hero--openclaw-size{
    width:100vw;
    max-width:100vw;
    min-width:0;
    padding-top:var(--header-h);
    overflow:hidden;
  }
  /* 添付のモバイル完成画像（941:1672）を切り抜かず、そのまま表示する。 */
  .cd-openclaw-stage{
    width:100vw;
    max-width:100vw;
    min-width:0;
    height:calc(100vw * 1672 / 941);
    aspect-ratio:auto;
    background-image:url('../images/can_do_hero_mobile_buttons-wide.png');
  }
  .cd-openclaw-stage>.cd-hero-picture,
  .cd-openclaw-stage>.cd-hero-picture img{
    width:100vw;
    max-width:none;
    height:100%;
    object-fit:fill;
  }
  /* モバイルは完成済みヒーローを静止表示する。 */
  .cd-hero-motion{
    display:none;
  }
  .cd-space-particles{display:block}
  .cd-openclaw-actions a,
  .cd-openclaw-actions a:first-child,
  .cd-openclaw-actions a:last-child{left:12%;width:76%;height:5.5%;border-radius:999px}
  .cd-openclaw-actions a:first-child{top:48.8%}
  .cd-openclaw-actions a:last-child{top:55.7%}
}
@media (prefers-reduced-motion:reduce){
  .cd-hero-motion img{animation:none;transform:translateY(15px)}
  .cd-space-particles{display:none}
}

/* 概要の数値カードは、どちらも白いカードと濃色文字で統一する */
.cd-fig{
  background:#fff;
  color:var(--ink);
  border-color:rgba(36,41,47,.08);
  backdrop-filter:none;
}
.cd-fig p{opacity:.8;color:var(--sub)}

.catblock-art{
  width:48px;height:48px;flex:none;
  padding:5px;border-radius:14px;
  object-fit:contain;
  background:linear-gradient(160deg,#f4f7ff 0%,#eef1fd 55%,#f6f0ff 100%);
  border:1px solid var(--line);
  box-shadow:0 10px 18px -12px rgba(40,60,140,.45);
  transition:transform .45s var(--ease);
}
.catblock:hover .catblock-art{transform:translateY(-3px) scale(1.05)}


/* ------------------------------------------------------------
   2. 特徴カード（openclaw.html / hermes.html の .wall）
      カード上部に1枚だけ置く。数字（.wall-no）の上に来ます。
      こちらは受け皿を敷かず、影だけで浮かせています。
      カード自体が白い面なので、面を重ねると窮屈になるためです。
------------------------------------------------------------ */
.wall-art{
  display:block;
  width:72px;height:72px;
  margin-bottom:14px;
  object-fit:contain;
  filter:drop-shadow(0 12px 18px rgba(40,60,140,.2));
  transition:transform .45s var(--ease);
}
.wall:hover .wall-art{transform:translateY(-4px) scale(1.05)}


/* ------------------------------------------------------------
   3. 料金プラン（price.html の .plan）
      why_*.png はタイル込みの絵なので、そのまま置いています。
      「おすすめ」バッジ（.plan-flag）はカード上端の外に出るため、
      この絵とは重なりません。
------------------------------------------------------------ */
.plan-art{
  display:block;
  width:60px;height:60px;
  margin-bottom:16px;
  object-fit:contain;
  filter:drop-shadow(0 10px 16px rgba(40,60,140,.18));
  transition:transform .45s var(--ease);
}
.plan:hover .plan-art{transform:translateY(-3px) scale(1.05)}


/* ------------------------------------------------------------
   4. 画面が狭いとき
      絵を優先して文字が押し出されると読みにくいので、少しだけ縮めます。
------------------------------------------------------------ */
@media (max-width:760px){
  .catblock-art{width:40px;height:40px;border-radius:12px}
  .wall-art{width:60px;height:60px;margin-bottom:12px}
  .plan-art{width:52px;height:52px}
}


/* ------------------------------------------------------------
   5. 動きを減らす設定の端末では、拡大・移動をやめる
------------------------------------------------------------ */
@media (prefers-reduced-motion:reduce){
  .catblock-art,.wall-art,.plan-art{transition:none}
  .catblock:hover .catblock-art,
  .wall:hover .wall-art,
  .plan:hover .plan-art{transform:none}
}
