/* =========================================================
   Shannon LLC — home (front page) — 角丸・製品推しレイアウト
   トップと /products/ でのみ読み込む。共通部品は styles.css / pages.css。
   ========================================================= */

/* ---------------- Hero（旧デザインどおり白地＋パーティクル、左寄せのコピーのみ） ---------------- */
.hero__headline {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: clamp(44px, 6.4vw, 92px);
  line-height: 1.02;
  letter-spacing: -.035em;
  margin-bottom: 26px;
}
.hero__axis {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 18px;
}
.hero__axis span + span::before { content: "·"; margin: 0 12px; color: var(--muted-2); }
.hero__sub { margin: 0 0 40px; }

/* ヒーローの登場アニメーション（見出し→ラベル→本文→ボタンの順にフェードアップ） */
@keyframes heroIn {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to { opacity: 1; transform: none; }
}
.hero .eyebrow, .hero__headline--product, .hero__ctas, .demo {
  animation: heroIn .9s cubic-bezier(.2, .6, .2, 1) both;
}
.hero__headline--product { animation-delay: .1s; }
.hero__ctas { animation-delay: .22s; }
.demo { animation-delay: .3s; }
.hero__headline .line:nth-child(2) { animation-delay: .1s; }
.hero__axis { animation-delay: .22s; }
.hero__sub { animation-delay: .32s; }
.hero__ctas { animation-delay: .42s; }
@media (prefers-reduced-motion: reduce) {
  .hero .eyebrow, .hero__headline--product, .hero__ctas, .demo { animation: none; }
}

/* 製品画像はわずかに縮んだ状態からふわっと浮き上がる */
.prow__media[data-reveal] { transform: translate3d(0, 28px, 0) scale(.97); }
.prow__media[data-reveal].is-in { transform: none; }
.prow__card img { transition: transform .6s cubic-bezier(.2, .6, .2, 1); }
.prow__card:hover img { transform: scale(1.02); }

/* ---------------- News ticker（ヒーロー直下。最新 3 件を数秒ごとに入れ替える） ---------------- */
.news-ticker { margin-top: 0; }
.news-ticker__inner { padding: 22px 0; font-size: 15px; gap: 20px; }
/* 3 件を同じマスに重ね、is-on だけ見せる（高さは一番長い項目に合わせて固定） */
.news-ticker__stack { flex: 1 1 auto; min-width: 0; display: grid; }
.news-ticker__stack .news-ticker__link {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .45s ease, transform .45s ease;
  pointer-events: none;
}
.news-ticker__stack .news-ticker__link.is-on { opacity: 1; transform: none; pointer-events: auto; }
.news-ticker__dots { flex: none; display: flex; gap: 6px; }
.news-ticker__dots i { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: background .3s ease, transform .3s ease; }
.news-ticker__dots i.is-on { background: var(--ink); transform: scale(1.2); }
@media (max-width: 720px) {
  .news-ticker__inner { padding: 18px 0; font-size: 14.5px; gap: 14px; }
  .news-ticker__link { flex-wrap: wrap; gap: 8px 12px; }
  .news-ticker__title { flex-basis: 100%; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
  .news-ticker__cat { display: inline-block; }
  .news-ticker__arrow { display: none; }
}

/* ---------------- Section header (split lead) ---------------- */
.home-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.home-head__lead {
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
  max-width: 460px;
  margin: 0;
}
/* 「一覧を見る」ピル */
.home-morelink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}
.home-morelink:hover { border-color: rgba(91,108,255,.4); transform: translateY(-1px); box-shadow: var(--shadow); }
.home-morelink .ul { background: none; padding-bottom: 0; }

/* ---------------- Products（自社製品: 文章＋大きな製品画像を左右交互に） ---------------- */
.prow-list { display: grid; gap: clamp(48px, 7vw, 104px); }
.prow {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.prow--flip .prow__media { order: -1; }
.prow__title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.25;
  margin: 0 0 14px;
}
.prow__logo { height: 34px; width: auto; display: block; }
.prow__brandmark { display: inline-flex; align-items: center; gap: 10px; }
.prow__brandmark img { height: 30px; width: auto; }
.prow__sub {
  font-family: var(--font-jp);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
  margin: -6px 0 12px;
}
.prow__tag {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-3);
  white-space: nowrap;
}
.prow__body {
  font-size: 15.5px;
  line-height: 1.95;
  color: var(--ink-3);
  margin: 0 0 26px;
  max-width: 520px;
}
/* 画像カードは薄い影で浮かせ、後ろに淡い角丸のブロックをずらして敷く */
.prow__media { position: relative; padding: 24px 0 32px 32px; }
.prow--flip .prow__media { padding: 24px 32px 32px 0; }
.prow__media::before {
  content: "";
  position: absolute;
  inset: 0 -4% 0 12%;
  border-radius: 28px;
  background: var(--bg-muted);
  z-index: 0;
}
.prow--flip .prow__media::before { inset: 0 12% 0 -4%; }
.prow__card {
  position: relative;
  z-index: 1;
  display: block;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  aspect-ratio: 16 / 10;
  box-shadow: 0 30px 60px -28px rgba(17,19,24,.28), 0 4px 16px -8px rgba(17,19,24,.10);
  transition: transform .25s ease, box-shadow .25s ease;
}
.prow__card:hover { transform: translateY(-3px); box-shadow: 0 36px 70px -30px rgba(17,19,24,.32), 0 6px 18px -8px rgba(17,19,24,.12); }
.prow__card img,
.prow__card video { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.prow__card--diagram img { object-fit: contain; padding: 14px; }
@media (max-width: 860px) {
  .prow { grid-template-columns: 1fr; gap: 24px; }
  .prow__media, .prow--flip .prow__media { order: -1; padding: 12px 0 20px 16px; }
  .prow__media::before, .prow--flip .prow__media::before { inset: 0 -4% 0 10%; }
}

/* ホームのカードは 1px の枠を弱め、薄い影で浮かせる（neoscorp 風） */
#services .service-card, .works-scroll .case-card, .works-scroll .insight-card, .ptile {
  border-color: rgba(17,19,24,.06);
  box-shadow: 0 12px 32px -20px rgba(17,19,24,.22);
}

/* ---------------- 取扱製品（製品カード） ---------------- */
/* 製品カード（白カード。自社製品は画面・映像、取扱製品はロゴまたは写真） */
.ptile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.ptile {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  color: var(--ink);
  transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease;
}
.ptile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(91,108,255,.3); }
.ptile__media {
  position: relative;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 28px;
  background: #f6f7fa;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.ptile__media img { max-width: 100%; max-height: 60px; width: auto; height: auto; object-fit: contain; }
.ptile__media--photo { padding: 0; background: #0b0d1a; }
.ptile__media--photo img { width: 100%; height: 100%; max-height: none; object-fit: cover; }
.ptile__wordmark {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -.02em;
  color: var(--ink);
}
.ptile__body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.ptile__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ptile__title { font-size: 17px; font-weight: 700; margin: 0; }
.ptile__tag {
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.ptile__text { font-size: 13.5px; line-height: 1.8; color: var(--muted); margin: 0; }
.ptile__more {
  margin-top: auto;
  padding-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.ptile__more .arrow { transition: transform .2s ease; }
.ptile:hover .ptile__more .arrow { transform: translateX(3px); }
@media (max-width: 1020px) { .ptile-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ptile-grid { grid-template-columns: 1fr; } .ptile__media { height: 150px; } }


/* ---------------- Services（4枚を2×2の角丸カードで） ---------------- */
#services .services { grid-template-columns: repeat(2, 1fr); }
#services .services > .service-card,
#services .services > .service-card:last-child { grid-column: auto; }
@media (max-width: 720px) { #services .services { grid-template-columns: 1fr; } }

/* ---------------- /products/ のロゴカード（ProductCards.astro） ---------------- */
.prod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.prod-grid--logos { grid-template-columns: repeat(4, 1fr); gap: 20px; }
.prod-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease;
}
.prod-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(91,108,255,.3); }
.prod-card--logo .prod-card__media {
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 28px;
  background: #f6f7fa;
  border-bottom: 1px solid var(--line);
}
.prod-card--logo .prod-card__media img { width: auto; height: auto; max-width: 100%; max-height: 60px; object-fit: contain; }
.prod-card__wordmark {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -.02em;
  color: var(--ink);
  text-align: center;
  line-height: 1.15;
}
.prod-card__brand { display: inline-flex; align-items: center; gap: 14px; }
.prod-card--logo .prod-card__media .prod-card__mark { width: 44px; height: 44px; max-height: none; }
.prod-card__brand .prod-card__wordmark { font-family: var(--font-jp); font-weight: 700; font-size: 24px; }
.prod-card__text { padding: 20px 22px 22px; }
.prod-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.prod-card__title { font-size: 17px; font-weight: 700; margin: 0; }
.prod-card__tag {
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.prod-card__body { font-size: 13.5px; line-height: 1.8; color: var(--muted); margin: 0; }
@media (max-width: 1020px) { .prod-grid--logos { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .prod-grid, .prod-grid--logos { grid-template-columns: 1fr; gap: 20px; } }

/* ---------------- News list（お知らせページと同じ罫線区切りの行。カードにはしない） ---------------- */
.news-list { display: block; border-top: 0; }
.news-row {
  display: grid;
  grid-template-columns: 110px 150px 1fr 28px;
  gap: 24px;
  align-items: center;
  padding: 20px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  transition: background .2s ease;
}
.news-row:hover { background: var(--bg-alt); }
.news-row__date { font-family: var(--font-ui); font-size: 13px; font-weight: 600; color: var(--muted); }
.news-row__cat {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  text-align: center;
  color: var(--ink-3);
  background: #fff;
}
.news-row__title { font-size: 15px; font-weight: 500; }
.news-row .ul { background: none; padding-bottom: 0; }
.news-row__arrow { justify-self: end; color: var(--muted); }
@media (max-width: 720px) {
  .news-row {
    grid-template-columns: auto 1fr;
    grid-template-areas: "date cat" "title title";
    gap: 8px 14px;
    padding: 16px 18px;
  }
  .news-row__date { grid-area: date; }
  .news-row__cat { grid-area: cat; justify-self: start; }
  .news-row__title { grid-area: title; }
  .news-row__arrow { display: none; }
}

/* ---------------- Hero: 動くデモを全面の背景に、コピーを左下に（zeals 風） ---------------- */
.hero--stage {
  position: relative;
  padding: 0;
  min-height: clamp(560px, 82vh, 840px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #f6f7fa;
  color: #fff;
}
.hero__stage { position: absolute; inset: 0; z-index: 0; }
.hero__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10,12,20,0) 38%, rgba(10,12,20,.42) 72%, rgba(10,12,20,.78) 100%),
    linear-gradient(90deg, rgba(10,12,20,.35) 0%, rgba(10,12,20,0) 55%);
}
.hero--stage .hero__inner { position: relative; z-index: 2; max-width: none; padding-bottom: clamp(40px, 6vw, 72px); padding-top: 120px; width: 100%; }
.hero__copy { max-width: 560px; }
.hero--stage .eyebrow { color: rgba(255,255,255,.85); margin-bottom: 16px; }
.hero--stage .eyebrow::before { background: rgba(255,255,255,.8); }
.hero__headline--product { margin: 0 0 26px; }
.hero__headline--product img { height: clamp(44px, 5vw, 76px); width: auto; display: block; filter: drop-shadow(0 6px 24px rgba(0,0,0,.25)); }
@media (max-width: 720px) {
  .hero--stage { min-height: clamp(480px, 68vh, 600px); }
  .hero--stage .hero__inner { padding-top: 40px; padding-bottom: 28px; }
  .hero__headline--product { margin-bottom: 20px; }
}

/* ヒーローの登場アニメーション */
@keyframes heroIn {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to { opacity: 1; transform: none; }
}
.hero .eyebrow, .hero__headline--product, .hero__ctas {
  animation: heroIn .9s cubic-bezier(.2, .6, .2, 1) both;
}
.hero__headline--product { animation-delay: .1s; }
.hero__ctas { animation-delay: .22s; }
@media (prefers-reduced-motion: reduce) {
  .hero .eyebrow, .hero__headline--product, .hero__ctas { animation: none; }
}

.demo { position: relative; }
/* 全面モード: 枠・影なしでヒーローいっぱいに広げ、文字は画面幅に応じて拡大 */
.demo--full, .demo--full .demo__frame, .demo--full .demo__stage { position: absolute; inset: 0; }
.demo--full .demo__frame { border-radius: 0; border: 0; box-shadow: none; }
.demo--full .demo__stage { aspect-ratio: auto; }
.demo--full { font-size: clamp(11px, 1.05vw, 16px); }
.demo--full .demo__scene--admin { font-size: 1em; }
.demo--full .demo__side { width: 22%; padding: 2em 1.4em; }
.demo--full .demo__logo { height: 1.4em; margin-bottom: 1.6em; }
.demo--full .demo__side li { font-size: 1em; padding: .55em .8em; }
.demo--full .demo__main { padding: 2em 2.4em; }
.demo--full .demo__main h4 { font-size: 1.35em; }
.demo--full .demo__main p { font-size: .95em; margin-bottom: 1em; }
.demo--full .demo__search { height: 2.4em; line-height: 2.4em; font-size: .95em; max-width: 46%; }
.demo--full .demo__tags span { font-size: .9em; padding: .2em .8em; }
.demo--full .demo__tags { margin: .9em 0 1em; }
.demo--full .demo__grid { gap: .9em; max-width: 78%; }
.demo--full .demo__card b { font-size: .85em; }
.demo--full .demo__toast { font-size: 1em; right: 2em; bottom: 2em; padding: .6em 1.2em; }
.demo--full .demo__scene--code { padding: 3em clamp(24px, 8vw, 120px); }
.demo--full .demo__scene--code pre { font-size: clamp(11px, 1.1vw, 17px); }
.demo--full .demo__editor-bar { font-size: 1em; }
.demo--full .demo__site { padding: 2em clamp(24px, 6vw, 96px); }
.demo--full .demo__site-bar i { height: .8em; width: 4.4em; }
.demo--full .demo__site-bar i:first-child { width: 6.6em; height: 1.2em; }
.demo--full .demo__site-hero i { height: 1.1em; margin-bottom: 1em; }
.demo--full .demo__site-hero .demo__site-btn { width: 9em; height: 2.2em; }
.demo--full .demo__site-cols i { height: 7em; }
.demo--full .demo__widget { width: 34%; min-width: 260px; max-width: 420px; right: clamp(16px, 4vw, 64px); top: 8%; bottom: 8%; font-size: 1.05em; }
@media (max-width: 720px) {
  .demo--full { font-size: 11px; }
  .demo--full .demo__side { display: none; }
  .demo--full .demo__grid { max-width: none; }
  /* 縦画面: 会話ウィジェットは上寄せにして、下に重なるコピーと分ける */
  .demo--full .demo__widget { width: 66%; min-width: 0; right: 14px; top: 16px; bottom: 44%; }
  .demo--full .demo__video { aspect-ratio: 16 / 10; }
  /* 下に重なるコピーとぶつからないよう、トーストは上に出す */
  .demo--full .demo__toast { top: 14px; bottom: auto; right: 14px; }
  .demo--full .demo__scene--code { padding: 20px 18px; }
  .demo--full .demo__scene--code pre { font-size: 10px; }
  .demo--full .demo__widget { bottom: 36%; }
}
.demo__frame {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 34px 70px -30px rgba(17,19,24,.32), 0 6px 18px -8px rgba(17,19,24,.10);
}
.demo__chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  background: #f3f4f6;
  border-bottom: 1px solid var(--line);
}
.demo__chrome > span { width: 9px; height: 9px; border-radius: 50%; background: #d7d9de; }
.demo__url {
  margin-left: 10px;
  flex: 1;
  height: 20px;
  line-height: 20px;
  padding: 0 10px;
  border-radius: 6px;
  background: #fff;
  font: 500 10.5px/20px var(--font-mono);
  color: var(--muted);
  font-style: normal;
  letter-spacing: .01em;
}
.demo__stage { position: relative; aspect-ratio: 16 / 10; background: #fff; }
.demo__scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .5s ease;
  pointer-events: none;
  font-family: var(--font-jp);
}
.demo__scene.is-on { opacity: 1; }

/* 1) 管理画面 */
.demo__scene--admin { display: flex; }
.demo__side {
  width: 27%;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: #fafbfc;
}
.demo__logo { height: 14px; width: auto; margin: 2px 0 18px 4px; }
.demo__side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.demo__side li { font-size: 11px; color: var(--muted); padding: 6px 8px; border-radius: 6px; }
.demo__side li.is-active { background: #fff; color: var(--ink); font-weight: 600; border: 1px solid var(--line); }
.demo__main { flex: 1; padding: 18px 20px; position: relative; min-width: 0; }
.demo__main h4 { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink); }
.demo__main p { margin: 3px 0 10px; font-size: 10px; color: var(--muted); }
.demo__search {
  height: 24px;
  line-height: 24px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 10px;
  color: var(--muted-2);
  max-width: 62%;
}
.demo__tags { display: flex; gap: 5px; margin: 8px 0 10px; }
.demo__tags span { font-size: 9.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.demo__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.demo__card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid var(--line);
  background: #eef0f3;
  aspect-ratio: 4 / 3;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.demo__card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.demo__card b {
  position: absolute;
  left: 6px; bottom: 6px;
  font-size: 9px;
  font-weight: 600;
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
  padding: 2px 7px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .2s ease, transform .2s ease;
}
.demo__card.is-selected { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(17,19,24,.10); transform: translateY(-1px); }
.demo__card.is-selected b { opacity: 1; transform: none; }
.demo__toast {
  position: absolute;
  right: 16px; bottom: 14px;
  font-size: 10.5px;
  font-weight: 600;
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
  padding: 6px 12px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease;
}
.demo__toast.is-on { opacity: 1; transform: none; }
.demo__cursor {
  position: absolute;
  left: 60%; top: 80%;
  z-index: 2;
  opacity: 0;
  transition: left 1s cubic-bezier(.2,.7,.2,1), top 1s cubic-bezier(.2,.7,.2,1), opacity .3s ease, transform .12s ease;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.25));
}
.demo__cursor.is-on { opacity: 1; }
.demo__cursor.is-click { transform: scale(.85); }

/* 2) 埋め込みコード */
.demo__scene--code { background: #0f1218; padding: 22px; }
.demo__editor { height: 100%; display: flex; flex-direction: column; }
.demo__editor-bar { font: 500 10.5px var(--font-mono); color: rgba(255,255,255,.45); margin-bottom: 12px; }
.demo__scene--code pre { margin: 0; font: 400 11.5px/1.85 var(--font-mono); color: #e6e8ee; white-space: pre; overflow: hidden; }
.demo__line { display: block; min-height: 1.85em; }
.demo__line.is-typing::after { content: ""; display: inline-block; width: 6px; height: 1.1em; margin-left: 2px; vertical-align: -2px; background: #e6e8ee; animation: demoBlink .9s steps(2) infinite; }
@keyframes demoBlink { to { opacity: 0; } }

/* 3) サイト上のチャット */
.demo__scene--site { background: #f6f7fa; }
.demo__site { position: absolute; inset: 0; padding: 18px 22px; }
.demo__site-bar { display: flex; gap: 10px; align-items: center; height: 26px; margin-bottom: 26px; }
.demo__site-bar i { display: block; height: 8px; width: 48px; border-radius: 4px; background: #dfe2e8; }
.demo__site-bar i:first-child { width: 72px; height: 12px; background: var(--ink); opacity: .85; }
.demo__site-hero i { display: block; height: 12px; border-radius: 6px; background: #dfe2e8; margin-bottom: 10px; }
.demo__site-hero .demo__site-btn { width: 96px; height: 22px; border-radius: 999px; background: var(--ink); opacity: .85; margin-top: 16px; }
.demo__site-cols { display: flex; gap: 12px; margin-top: 26px; width: 58%; }
.demo__site-cols i { flex: 1; height: 70px; border-radius: 10px; background: #e6e9ee; }
.demo__widget {
  position: absolute;
  right: 16px; top: 14px; bottom: 14px;
  width: 46%;
  min-width: 210px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 20px 40px -20px rgba(17,19,24,.35);
  overflow: hidden;
  font-size: 10.5px;
}
.demo__widget-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--line); }
.demo__live { display: inline-flex; align-items: center; gap: 5px; font: 600 8.5px var(--font-mono); letter-spacing: .08em; color: var(--ink-3); }
.demo__live::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #22c55e; animation: demoPulse 1.4s ease-in-out infinite; }
@keyframes demoPulse { 50% { opacity: .35; } }
.demo__video { flex: none; aspect-ratio: 4 / 3; background: #e9edf2; }
/* 会話部分だけがスクロールし、顔は隠れない */
.demo__msgs { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 10px; scrollbar-width: none; }
.demo__msgs::-webkit-scrollbar { display: none; }
.demo__video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.demo__bubble {
  margin: 8px 10px 0;
  padding: 6px 9px;
  border-radius: 10px;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .3s ease, transform .3s ease;
}
.demo__bubble.is-on { opacity: 1; transform: none; }
.demo__bubble--user { margin-left: 28%; background: var(--ink); color: #fff; border-bottom-right-radius: 3px; }
.demo__bubble--avatar { margin-right: 18%; background: #f1f3f6; color: var(--ink); border-bottom-left-radius: 3px; min-height: 2.2em; }

@media (max-width: 520px) {
  .demo__stage { aspect-ratio: 4 / 3; }
  .demo__side { display: none; }
  .demo__widget { width: 60%; min-width: 0; right: 10px; top: 10px; bottom: 10px; }
  .demo__video { aspect-ratio: 16 / 10; }
  .demo__video video { object-position: center top; }
  .demo__bubble--user { margin-left: 18%; }
  .demo__scene--code { padding: 16px; }
  .demo__scene--code pre { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .demo__scene, .demo__cursor, .demo__bubble, .demo__toast { transition: none; }
}

/* ---------------- 製品カードの動くデモ（警備サイン: AI 配置 ／ 規程ログ: AI 法令レビュー） ----------------
   カード幅を基準（cqw）に寸法を決めるので、どの幅でも同じ見え方（動画のように拡縮）になる。 */
.prow__card { container-type: inline-size; }
.prow__card--demo { background: #fff; }
.pd {
  position: absolute;
  inset: 0;
  display: flex;
  font-family: var(--font-jp);
  font-size: 1.7cqw;
  color: #111318;
  background: #fff;
  overflow: hidden;
  pointer-events: none;
}
.pd__side {
  width: 22%;
  flex: none;
  background: #fafbfc;
  border-right: 1px solid #e7e8ec;
  padding: 2.2cqw 1.8cqw;
}
.pd__brand { font-size: 2.1cqw; font-weight: 700; letter-spacing: -.01em; margin-bottom: 2.2cqw; color: #111318; }
.pd__brand--kl { color: #1f3a6b; }
.pd__user { font-size: 1.5cqw; font-weight: 600; margin-bottom: 2cqw; line-height: 1.3; }
.pd__user small { display: block; font-size: 1.15cqw; font-weight: 400; color: #8b9096; }
.pd__side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6cqw; }
.pd__side li { font-size: 1.5cqw; color: #555a63; padding: .8cqw 1.2cqw; border-radius: .8cqw; white-space: nowrap; }
.pd__side li.pd__group { color: #2f3f8f; font-weight: 600; margin-top: .6cqw; }
.pd__side li.pd__sub { padding-left: 3cqw; }
.pd__side li.is-active { background: #eef0f8; color: #2f3f8f; font-weight: 600; }
.pd--kl .pd__side li.is-active { background: #e9eef6; color: #1f3a6b; }
.pd__main { flex: 1; min-width: 0; position: relative; padding: 2.4cqw 2.6cqw; }
.pd__bar { display: flex; align-items: center; gap: 1.6cqw; margin-bottom: 1.6cqw; }
.pd__bar h4 { margin: 0; font-size: 2.4cqw; font-weight: 700; }
.pd__month { font-size: 1.4cqw; color: #555a63; border: 1px solid #e7e8ec; border-radius: .7cqw; padding: .6cqw 1.2cqw; }
.pd__ai {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: .7cqw;
  font: 600 1.45cqw/1 var(--font-jp);
  color: #fff; background: #4f46e5;
  border: 0; border-radius: .8cqw;
  padding: 1cqw 1.6cqw;
  box-shadow: 0 .6cqw 1.6cqw -.6cqw rgba(79,70,229,.6);
  transition: transform .15s ease;
}
.pd__ai.is-press { transform: scale(.96); }
.pd__spark { color: #ffd54a; font-size: 1.2em; line-height: 1; }
.pd__grid { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 1.3cqw; }
.pd__grid th, .pd__grid td { border: 1px solid #e7e8ec; height: 4.6cqw; padding: 0; text-align: center; }
.pd__grid thead th { background: #f3f4f7; color: #555a63; font-weight: 600; font-size: 1.25cqw; line-height: 1.15; }
.pd__grid thead th small { display: block; font-size: 1cqw; font-weight: 500; color: #8b9096; }
.pd__grid thead th.is-off { background: #eceef3; }
.pd__grid tbody th { width: 22%; text-align: left; padding: 0 1cqw; font-weight: 600; font-size: 1.3cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #fbfbfc; }
.pd__grid thead th:first-child { width: 22%; }
.pd__chip {
  display: inline-block;
  font-size: 1.15cqw; font-weight: 600;
  color: #166534; background: #dcfce7;
  border-radius: 999px; padding: .35cqw .9cqw;
  opacity: 0; transform: scale(.6);
  transition: opacity .25s ease, transform .3s cubic-bezier(.2,.8,.3,1.3);
}
.pd__chip.is-on { opacity: 1; transform: none; }
.pd__modal {
  position: absolute; inset: 0;
  background: rgba(17,19,24,.28);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .25s ease;
}
.pd__modal.is-on { opacity: 1; }
.pd__modal-box {
  width: 44%; background: #fff; border-radius: 1.2cqw; padding: 2cqw 2.2cqw;
  box-shadow: 0 2cqw 5cqw -2cqw rgba(0,0,0,.4);
  display: grid; gap: 1.1cqw;
  transform: translateY(1cqw); transition: transform .25s ease;
}
.pd__modal.is-on .pd__modal-box { transform: none; }
.pd__modal-head { font-size: 1.8cqw; font-weight: 700; display: flex; align-items: center; gap: .6cqw; margin-bottom: .4cqw; }
.pd__modal-box label { display: flex; align-items: center; gap: .9cqw; font-size: 1.4cqw; color: #2e323a; }
.pd__check { width: 1.6cqw; height: 1.6cqw; border-radius: .35cqw; background: #4f46e5; position: relative; }
.pd__check::after { content: ""; position: absolute; left: .5cqw; top: .2cqw; width: .45cqw; height: .85cqw; border: solid #fff; border-width: 0 .25cqw .25cqw 0; transform: rotate(45deg); }
.pd__gen { margin-top: .6cqw; font: 600 1.45cqw/1 var(--font-jp); color: #fff; background: #4f46e5; border: 0; border-radius: .8cqw; padding: 1.1cqw; }
.pd__toast {
  position: absolute; right: 2.4cqw; bottom: 2.2cqw;
  font-size: 1.4cqw; font-weight: 600; color: #fff; background: #111318;
  border-radius: 999px; padding: .9cqw 1.6cqw;
  opacity: 0; transform: translateY(.8cqw); transition: opacity .25s ease, transform .25s ease;
}
.pd__toast.is-on { opacity: 1; transform: none; }
.pd__cursor {
  position: absolute; left: 50%; top: 80%; z-index: 3;
  width: 2.4cqw; height: auto;
  opacity: 0;
  transition: left .9s cubic-bezier(.2,.7,.2,1), top .9s cubic-bezier(.2,.7,.2,1), opacity .3s ease, transform .12s ease;
  filter: drop-shadow(0 .3cqw .6cqw rgba(0,0,0,.3));
}
.pd__cursor svg { width: 100%; height: auto; }
.pd__cursor.is-on { opacity: 1; }
.pd__cursor.is-click { transform: scale(.85); }

/* 規程ログ */
.pd__sub-text { margin: -.6cqw 0 1.6cqw; font-size: 1.35cqw; color: #767b80; }
.pd__laws { width: 100%; border-collapse: collapse; font-size: 1.45cqw; }
.pd__laws th { text-align: left; font-size: 1.15cqw; font-weight: 500; color: #8b9096; padding: 0 1cqw .8cqw; border-bottom: 1px solid #e7e8ec; }
.pd__laws td { padding: 1.05cqw 1cqw; border-bottom: 1px solid #eff0f3; vertical-align: middle; }
.pd__law { font-weight: 600; white-space: nowrap; }
.pd__date { color: #767b80; font-size: 1.3cqw; white-space: nowrap; }
.pd__st { display: inline-block; font-size: 1.15cqw; font-weight: 600; padding: .35cqw .9cqw; border-radius: .5cqw; white-space: nowrap; }
.pd__st--ok { color: #8b9096; }
.pd__st--warn { color: #1f3a6b; background: #e9eef6; }
.pd__st--idle { color: #8b9096; }
.pd__st--run { color: #1f3a6b; background: #e9eef6; }
.pd__st--run::after { content: ""; display: inline-block; width: .9cqw; height: .9cqw; margin-left: .6cqw; border: .2cqw solid #1f3a6b; border-right-color: transparent; border-radius: 50%; vertical-align: -.1cqw; animation: pdSpin .8s linear infinite; }
@keyframes pdSpin { to { transform: rotate(360deg); } }
.is-target [data-run], .is-target [data-done], .is-target [data-see] { display: none; }
.is-target.is-run [data-idle], .is-target.is-run [data-review] { display: none; }
.is-target.is-run [data-run] { display: inline-block; }
.is-target.is-done [data-idle], .is-target.is-done [data-review] { display: none; }
.is-target.is-done [data-done] { display: inline-block; }
.is-target.is-done [data-see] { display: inline-block; }
.pd__act { text-align: right; white-space: nowrap; }
.pd__btn { font: 600 1.25cqw/1 var(--font-jp); color: #111318; background: #fff; border: 1px solid #d7d9de; border-radius: .6cqw; padding: .8cqw 1.3cqw; }
.pd__btn--dark { color: #fff; background: #1f3a6b; border-color: #1f3a6b; }
.pd__panel {
  position: absolute; left: 2.6cqw; right: 2.6cqw; bottom: 2cqw;
  background: #fff; border: 1px solid #e7e8ec; border-radius: 1.2cqw;
  box-shadow: 0 2cqw 5cqw -2cqw rgba(0,0,0,.35);
  padding: 1.6cqw 2cqw;
  opacity: 0; transform: translateY(1.5cqw); transition: opacity .3s ease, transform .3s ease;
}
.pd__panel.is-on { opacity: 1; transform: none; }
.pd__panel-head { font-size: 1.5cqw; font-weight: 700; display: flex; align-items: center; gap: .6cqw; margin-bottom: 1cqw; }
.pd__diff { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4cqw; }
.pd__diff b { display: block; font-size: 1.1cqw; font-weight: 600; color: #8b9096; letter-spacing: .04em; margin-bottom: .4cqw; }
.pd__diff p { margin: 0; font-size: 1.3cqw; line-height: 1.6; color: #2e323a; }
.pd__diff mark { background: #fff1a8; color: #7a5a00; padding: 0 .3cqw; border-radius: .2cqw; }
.pd__note { margin-top: 1.1cqw; padding: 1cqw 1.2cqw; border-radius: .8cqw; background: #e9eef6; color: #1f3a6b; font-size: 1.3cqw; line-height: 1.6; min-height: 3.6cqw; }
.pd__note:empty { display: none; }
@media (prefers-reduced-motion: reduce) {
  .pd__chip, .pd__modal, .pd__toast, .pd__cursor, .pd__panel { transition: none; }
}

/* Our Services のカードは 2×2 で幅があるぶん、文字と余白を詰める */
#services .service-card { padding: 34px 32px 30px; }
#services .service-card__num { font-size: 12px; margin-bottom: 14px; }
#services .service-card h3 { font-size: 21px; margin: 0 0 10px; }
#services .service-card p { font-size: 14.5px; line-height: 1.8; margin: 0 0 18px; }
#services .service-card__cta { font-size: 13px; }
@media (max-width: 720px) {
  #services .service-card { padding: 26px 22px 24px; }
  #services .service-card h3 { font-size: 19px; }
  #services .service-card p { font-size: 14px; }
}
