/* ============================================================
   トップページ（index.html）の調整
   style.css の上に読み込む。このファイルを外せば元の見た目に戻る
   ============================================================ */
body.home {
  --line-soft: #e6e9ed;
  --c-aws: #ff9900; --c-aws-fg: #232f3e; --c-genai: #1f6f6b; --c-aidev: #2b3038; --c-aitrend: #b4372e;
}

/* ---------- 1. 最初の表示：文字がすぐ見えるよう、動きを短く・軽く ---------- */
@media (prefers-reduced-motion: no-preference) {
  .home .hero h1 .ln > span { animation-duration: .7s; }
  .home .hero h1 .ln:nth-child(1) > span { animation-delay: 0s; }
  .home .hero h1 .ln:nth-child(2) > span { animation-delay: .08s; }
  .home .hero h1 em { animation-delay: .6s; }
  .home .hero .eyebrow { animation-duration: .5s; }
  .home .hero .sub { animation-duration: .6s; animation-delay: .25s; }
  .home .hero .actions { animation-duration: .6s; animation-delay: .35s; }
  .home .hero-visual { animation-duration: 1s; animation-delay: .1s; }
  .home .hero-foot { animation-duration: .6s; animation-delay: .45s; }
}

/* ---------- 2. ボタンの強弱：お問い合わせを赤い塗り、サービスは白枠 ---------- */
.home .btn.hero-primary { background: var(--red); border-color: var(--red); color: #fff; }
.home .btn.hero-primary:hover { background: var(--red-dark, #b81f16); border-color: var(--red-dark, #b81f16); color: #fff; }
.home .btn.hero-ghost { background: #fff; border-color: var(--ink); color: var(--ink); }
.home .btn.hero-ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- 3. 灰色の帯：画面の端まで広げず、中央にまとめる ---------- */
.home .section.mist { max-width: calc(var(--wrap) + 120px); margin-inline: auto; border-radius: 32px; }
@media (max-width: 1260px) { .home .section.mist { margin-inline: clamp(0px, 1.5vw, 20px); } }
@media (max-width: 860px) { .home .section.mist { margin-inline: 0; border-radius: 24px; } }

/* ---------- 6. 提供サービス：余白を広げて読みやすく ---------- */
.home .svc { padding: 34px 30px 30px; gap: 16px; }
.home .svc p { line-height: 1.9; }
.home .svc h3 { line-height: 1.55; }
.home .svc .out { padding-top: 14px; }
.home .svc .out li { font-size: 12.5px; background: #f3f4f6; }

/* ---------- 最新の技術ブログ ---------- */
.home-blog .head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: 32px; }
.home-blog .head p { color: var(--steel); margin-top: 12px; max-width: 620px; }
.home-blog .more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14.5px; color: var(--ink); text-decoration: none; border-bottom: 1.5px solid var(--red); padding-bottom: 2px; }
.home-blog .more:hover { color: var(--red); }
.home-blog .list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.home-blog .item {
  display: flex; flex-direction: column; gap: 12px; padding: 24px 24px 20px; background: #fff; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line-soft); border-top: 3px solid #c9cdd3; border-radius: 12px; transition: box-shadow .2s, border-color .2s;
}
.home-blog .item:hover { box-shadow: 0 6px 20px rgb(22 24 29 / .06); }
.home-blog .item.c-aws { border-top-color: var(--c-aws); }
.home-blog .item.c-genai { border-top-color: var(--c-genai); }
.home-blog .item.c-aidev { border-top-color: var(--c-aidev); }
.home-blog .item.c-aitrend { border-top-color: var(--c-aitrend); }
.home-blog .cat { align-self: flex-start; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; padding: 1px 9px; border-radius: 4px; color: #fff; }
.home-blog .cat.c-aws { background: var(--c-aws); color: var(--c-aws-fg); }
.home-blog .cat.c-genai { background: var(--c-genai); }
.home-blog .cat.c-aidev { background: var(--c-aidev); }
.home-blog .cat.c-aitrend { background: var(--c-aitrend); }
.home-blog .item b { font-family: var(--serif); font-weight: 800; font-size: 17px; line-height: 1.65; transition: color .2s; }
.home-blog .item:hover b { color: var(--red); }
.home-blog .item time { margin-top: auto; font-size: 12.5px; color: var(--steel); }

/* ---------- 採用の案内 ---------- */
.home-recruit .box {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 40px; align-items: center;
  padding: 36px 44px; border-radius: 22px; border: 1px solid #f2dcd8;
  background: radial-gradient(420px 220px at 100% 0%, rgb(240 116 58 / .14), transparent 70%), linear-gradient(135deg, #fdf3f1, #f6f3fa);
}
.home-recruit .eyebrow { margin-bottom: 8px; }
.home-recruit h2 { font-size: clamp(21px, 2.3vw, 27px); line-height: 1.55; }
.home-recruit p { color: #4f5661; margin-top: 8px; font-size: 15px; }
.home-recruit .go { display: inline-flex; align-items: center; gap: 8px; padding: 11px 24px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; transition: background .2s; }
.home-recruit .go:hover { background: var(--red); }

@media (max-width: 860px) {
  .home-blog .list { grid-template-columns: 1fr; }
  .home-recruit .box { grid-template-columns: 1fr; padding: 28px 22px; }
  .home .svc { padding: 26px 20px; }
}
@media (prefers-reduced-motion: reduce) { .home-blog .item, .home-recruit .go { transition: none; } }

/* ---------- 提供サービス：01・02 の枠も、03（研修）と同じく、マウスを乗せると浮く ---------- */
.home .svc-grid { transition: transform .2s, border-color .2s, box-shadow .2s; }
.home .svc-grid:hover { transform: translateY(-2px); border-color: var(--red); box-shadow: 0 10px 26px rgb(22 24 29 / .06); }
.home .svc { transition: background .2s; }
.home .svc:hover { background: #fcfcfd; }
@media (prefers-reduced-motion: reduce) { .home .svc-grid, .home .svc-grid:hover { transition: none; transform: none; } }

/* ヒーロー下の4項目：クリックで、アニメーションのその場面へ移る */
.home .hero-tags li { cursor: pointer; transition: color .2s; }
.home .hero-tags li:hover { color: var(--red); }
.home .hero-tags li:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; border-radius: 4px; }
/* スマホ：上段のアニメを小さめに（文字と見出しが先に目に入るように） */
@media (max-width: 600px) {
  .home .hero-visual { width: min(68vw, 260px); max-width: 260px; justify-self: center; }
}

/* ---------- お知らせ：ヒーローのすぐ下に、控えめな一覧で ---------- */
.home-news { padding-top: 8px; }
.home-news .news-box {
  display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 8px 40px; align-items: start;
  padding: 28px 36px; background: #fff; border: 1px solid var(--line-soft); border-radius: 16px;
}
.home-news h2 { font-size: 20px; line-height: 1.4; display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }
.home-news h2 .eyebrow { margin: 0; }
.home-news ul { list-style: none; margin: 0; padding: 0; }
.home-news li + li { border-top: 1px solid var(--line-soft); }
.home-news .row { display: grid; grid-template-columns: 92px 74px minmax(0, 1fr); gap: 14px; align-items: baseline; padding: 12px 0; color: var(--ink); text-decoration: none; font-size: 14.5px; line-height: 1.7; }
.home-news a.row:hover .t { color: var(--red); }
.home-news time { color: var(--steel); font-size: 13px; font-variant-numeric: tabular-nums; }
.home-news .k { justify-self: start; font-size: 11.5px; font-weight: 700; padding: 1px 9px; border-radius: 4px; border: 1px solid currentColor; white-space: nowrap; }
.home-news .k-info { color: #4f5661; }
.home-news .k-blog { color: var(--c-genai); }
.home-news .k-recruit { color: var(--red); }
.home-news .t { transition: color .2s; }
@media (max-width: 860px) {
  .home-news .news-box { grid-template-columns: 1fr; padding: 22px 20px; }
}

/* ============================================================
   品質の底上げ（2026-11-29）：見た目の構成は変えず、細部を整える
   ============================================================ */
/* 1. 日本語の改行：見出しや短い文が、単語の途中で切れないように（Chrome・Edge 119以降。他は従来どおり） */
.home h1, .home h2, .home h3, .home blockquote, .home .lead-in,
.home .both-points strong, .home .home-blog .item b, .home .facts span, .home .hero-tags li, .home .svc-group-label p {
  word-break: auto-phrase;
}
.home p, .home .both-points span, .home .svc p { text-wrap: pretty; }
.home .facts span { display: block; margin-top: 4px; text-wrap: balance; }

/* 2. 強みの4項目：見出しが1文字だけ次の行に落ちないよう、右側を広く */
@media (min-width: 861px) {
  .home .both { grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); gap: 64px; }
  .home .both-points { gap: 32px 40px; }
}

/* 3. カードに軽い浮き上がり（2つの柱・ブログ） */
.home .pillar { transition: transform .25s ease, box-shadow .25s ease; }
.home .pillar:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgb(22 24 29 / .22); }
.home-blog .item { transition: box-shadow .2s, border-color .2s, transform .25s ease; }
.home-blog .item:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgb(22 24 29 / .22); }

/* 4. キーボード操作時のフォーカス表示をそろえる */
.home a:focus-visible, .home button:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }

/* 5. スクロールで、各ブロックが静かに現れる（JavaScriptが使えるときだけ） */
@media (prefers-reduced-motion: no-preference) {
  .reveal-on .home-rv { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .8s cubic-bezier(.2, .8, .2, 1); }
  .reveal-on .home-rv.in { opacity: 1; transform: none; }
}
/* 6. スマホ：数字の帯と、最後のお問い合わせの文字組み */
.home .facts strong { white-space: nowrap; }
@media (max-width: 600px) {
  .home .facts strong { font-size: 24px; }
  .home .facts span { font-size: 12px; line-height: 1.6; letter-spacing: 0; }
  .home .facts div { padding: 16px 14px 16px; }
  .home .cta-band h2 { font-size: 19px; line-height: 1.6; }
  .home .cta-band h2 br { display: none; }
  .home .cta-band .tel small { display: block; margin: 2px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .home .pillar, .home .pillar:hover, .home-blog .item, .home-blog .item:hover { transition: none; transform: none; }
}
@media (max-width: 860px) {
  .home-news h2 { flex-direction: row; align-items: baseline; gap: 12px; padding-top: 0; }
  .home-news .row { grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; }
  .home-news .t { grid-column: 1 / -1; }
}
