/* ============================================================
 * works-single.css
 * 制作実績の個別ページ（works-single.php / parts/works/）専用スタイル
 *
 * 形は atoboo.jp の実績ページを写したもの。骨組みは Arkhe Blocks のブロック用 CSS が作る。
 * このファイルが持つのは次の4つ:
 *   0. 色と書体（subaco.co.jp のもの）と、atoboo.jp が CSS エディターで持っている見た目にあたる分
 *   1. ブロックごとに自動で出る個別の値（余白・カラム幅・波形の高さ）
 *   2. スクリーンショット（縦長のパネルで PC とスマホを並べる）
 *   3. 価格の目安（Reference Pricing）
 * ============================================================ */

/* ------------------------------------------------------------
 * 0. 色と書体、ラベルや見出しの見た目
 * ------------------------------------------------------------ */

.sba-work {
  --sba-work-accent: var(--sba-pr-teal-dark);   /* 矢印・ボタン・該当するラベル */
  --sba-work-box: #e9e7e2;                      /* スライダーの箱・表の合計行（地より一段濃い） */
  --sba-work-line: rgba(26, 26, 26, 0.2);
  color: var(--sba-pr-text);
  font-family: 'Noto Sans JP', sans-serif;
}

/* 地の色を画面の幅いっぱいに敷く（ほかのページと同じ地の色） */
body.sba-work-single .l-content {
  background: var(--sba-pr-tinted);
}

/* 「Client Works」の見出し */
.sba-work-page-heading .ark-block-heading__main {
  font-family: 'Outfit', 'Noto Sans JP', sans-serif;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.sba-work .ark-block-heading[data-sub="bottom"] .ark-block-heading__line {
  margin: 0.2rem 0 0.8rem;
}

.sba-work-client-heading {
  font-weight: 600;
  letter-spacing: 0.15em;
}

/* 「Project Overview」などの英字の小見出し */
.sba-work-lead-copy,
.sba-work-lead-copy .ark-block-heading__main {
  font-family: 'Outfit', 'Noto Sans JP', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.1em;
}

@media screen and (min-width: 1000px) {
  .sba-work-lead-copy,
  .sba-work-lead-copy .ark-block-heading__main {
    font-size: 1.4rem;
  }

  .sba-work .ark-block-heading .ark-block-heading__sub {
    font-size: 1rem;
  }
}

/* 「制作したホームページのジャンル」の箱 */
.sba-work-genre-box-container {
  margin: 1rem;
  padding-top: 3rem;
}

@media all and (min-width: 1000px) {
  .sba-work-genre-box-container {
    max-width: 40vw;
    margin: 3rem auto;
    padding-top: 1rem;
  }
}

.sba-work-genre-box.ark-block-notice {
  background-color: #fff;
}

.sba-work-genre-box.is-style-stronger > .ark-block-notice__head {
  background-color: var(--sba-pr-charcoal);
  color: #fff;
}

.sba-work-labels ul {
  list-style-type: none;
  display: flex;
  flex-wrap: wrap;
  padding-inline-start: 0;
}

.sba-work-labels ul li {
  font-size: 0.8rem;
}

.sba-work-label {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  margin: 0.25rem;
}

.sba-work-label.-on {
  color: #fff;
  background-color: var(--sba-work-accent);
}

.sba-work-label.-off {
  color: rgba(26, 26, 26, 0.5);
  background-color: rgba(26, 26, 26, 0.07);
}

/* Look and Feel（濃い地の上） */
.sba-work-look ul {
  list-style-type: none;
  display: flex;
  flex-wrap: wrap;
  padding-inline-start: 0;
}

@media all and (min-width: 1000px) {
  .sba-work-look ul {
    max-width: 45vw;
  }
}

.sba-work-look__item {
  color: var(--sba-pr-tinted-thin);
  background-color: rgba(245, 244, 242, 0.08);
  padding: 0.25rem 0.5rem;
  margin: 0.25rem;
  letter-spacing: 0.15em;
}

.sba-work-look__item.-on {
  color: var(--sba-pr-charcoal);
  background-color: var(--sba-pr-tinted);
  font-weight: bold;
}

.sba-work-slider-section {
  max-width: 1400px;
  margin: 4rem auto;
}

.sba-work .ark-block-section__bodyInner {
  padding-bottom: 0;
}

.sba-work-home-link .ark-block-button__icon {
  border: none;
}

.sba-work-home-link .ark-block-button__link {
  color: var(--sba-work-accent);
}

/* ------------------------------------------------------------
 * 1. ブロックごとの個別の値（atoboo.jp の実績ページと同じ値）
 * ------------------------------------------------------------ */

/* 見出しの上の余白（固定ヘッダーの分を含む） */
.sba-work {
  padding-top: 120px;
}

.sba-work-sec-head {
  --arkb-padding: 0rem 0rem 4rem 0rem;
}

.sba-work-sec-overview {
  color: var(--sba-pr-tinted-text);
  --arkb-svg-height--top: 6.2vw;
  --arkb-svg-height--bottom: 6.2vw;
}

/* 波形は地の色で切り抜く */
.sba-work-sec-overview .ark-block-section__svg {
  fill: var(--sba-pr-tinted);
}

.sba-work-genre-list,
.sba-work-look-list {
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
}

.sba-work-shots-container {
  --arkb-padding: 6rem 6rem 6rem 6rem;
}

.sba-work-cols-main > .ark-block-columns__inner > .ark-block-column {
  --arkb-clmn-w--pc: 100%;
}

.sba-work-cols-meta {
  --arkb-clmn-w--tab: 100%;
}

.sba-work-cols-meta > .ark-block-columns__inner > .ark-block-column:nth-child(1),
.sba-work-cols-meta > .ark-block-columns__inner > .ark-block-column:nth-child(2) {
  --arkb-clmn-w--pc: 25%;
  --arkb-clmn-w--tab: 50%;
}

.sba-work-cols-meta > .ark-block-columns__inner > .ark-block-column:nth-child(3) {
  --arkb-clmn-w--pc: 50%;
}

.sba-work-back {
  justify-content: flex-start;
}

@media not all and (min-width: 1000px) {
  .sba-work-shots-container {
    --arkb-padding: 1rem 1rem 1rem 1rem;
  }
}

/* 濃い地の上の外部リンク: 青字と下線はやめ、白い文字の右にアイコンを付けて示す */
.sba-work-sec-overview a.sba-work-extlink {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  color: var(--sba-pr-tinted);
  text-decoration: none;
}

.sba-work-sec-overview a.sba-work-extlink:hover,
.sba-work-sec-overview a.sba-work-extlink:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.sba-work-sec-overview a.sba-work-extlink:focus-visible {
  outline: 2px solid var(--sba-pr-tinted);
  outline-offset: 3px;
}

.sba-work-extlink__icon {
  flex: none;
  width: 0.95em;
  height: 0.95em;
}

.sba-work-client-note {
  font-size: 0.85em;
  opacity: 0.85;
}

/* ------------------------------------------------------------
 * 2. スクリーンショット
 * 地より一段濃い箱に、縦長のパネルを並べる。
 * ------------------------------------------------------------ */

.sba-work-shots {
  position: relative;
  background: var(--sba-work-box);
  padding: 14px 15px 16px;
}

/* 自動送りの一時停止・再開（右上） */
.sba-work-shots__pause {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #fff;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.sba-work-shots__pause::before {
  content: "";
  position: absolute;
  top: 12px;
  right: 0;
  width: 28px;
  height: 28px;
  background: #555;
}

.sba-work-shots__pause svg {
  position: absolute;
  top: 18px;
  right: 6px;
}

.sba-work-shots__pause[hidden],
.sba-work-shots__pause .-play,
.sba-work-shots__pause.is-paused .-pause {
  display: none;
}

.sba-work-shots__pause.is-paused .-play {
  display: block;
}

.sba-work-shots__pause:focus-visible {
  outline: 2px solid var(--sba-work-accent);
  outline-offset: -2px;
}

/* ページ名（「Top Page」など） */
.sba-work-shot__name {
  font-family: 'Outfit', 'Noto Sans JP', sans-serif;
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.4;
  color: rgba(26, 26, 26, 0.38);
  margin: 0 0 12px;
}

.sba-work-shot[hidden] {
  display: none;
}

/* JS が動かないときは全ページが縦に並ぶ */
.sba-work-shot + .sba-work-shot {
  margin-top: 40px;
}

.sba-work-shots.is-slider .sba-work-shot + .sba-work-shot {
  margin-top: 0;
}

.sba-work-shots__nav {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
}

.sba-work-shots__nav[hidden],
.sba-work-shots__dots[hidden] {
  display: none;
}

.sba-work-shots__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--sba-work-accent);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: opacity 0.2s;
}

.sba-work-shots__arrow:hover {
  opacity: 0.6;
}

.sba-work-shots__dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 4px;
}

.sba-work-shots__dot {
  position: relative;
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.sba-work-shots__dot::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2px solid var(--sba-pr-charcoal);
  border-radius: 50%;
}

.sba-work-shots__dot[aria-current="true"]::before {
  background: var(--sba-pr-charcoal);
}

.sba-work-shots__arrow:focus-visible,
.sba-work-shots__dot:focus-visible {
  outline: 2px solid var(--sba-work-accent);
  outline-offset: 2px;
}

/* 縦に長いページ全体の画像を、同じ高さの列に等分して横に並べる。
 * 箱は 幅 1 × 高さ --box で一定（スライドを送っても高さが変わらない）。
 * 1スライドの列数 --per・1列の幅 --w（箱の幅に対する割合）・1列に入る高さ ÷ 幅 --seg は、
 * PHP が画像の縦横比から決める。 */
.sba-work-shot__panels {
  --per: var(--per-wide, 3);
  --w: var(--w-wide, 0.3333);
  --seg: var(--seg-wide, 1.68);
  --box: 0.56;
  --gap: clamp(8px, 1.2vw, 16px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: var(--gap);
  aspect-ratio: 1 / var(--box);
}

.sba-work-shot__panel {
  flex: none;
  width: calc((100% - (var(--per) - 1) * var(--gap)) * var(--w));
  aspect-ratio: 1 / var(--seg);
  position: relative;
  overflow: hidden;
  container-type: size;
}

.sba-work-shot__panel.is-off-wide {
  display: none;
}

/* ページ全体の画像。--i 列目の位置まで、パネルの高さ分ずつ上へずらす */
.sba-work-shot__page {
  position: relative;
  transform: translateY(calc(var(--i, 0) * -100cqh));
}

.sba-work-shot__page img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
}

/* 画像のうち見せる範囲1つ分（見せない範囲があるとき、その前後で分かれる） */
.sba-work-shot__band {
  overflow: hidden;
}

/* 最上部に重ねるファーストビューの画像 */
.sba-work-shot__page .sba-work-shot__fv {
  position: absolute;
  top: 0;
  left: 0;
}

/* スライドを送るときの横への動き */
@keyframes sba-work-shot-next {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: none; }
}

@keyframes sba-work-shot-prev {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: none; }
}

.is-enter-next { animation: sba-work-shot-next 0.35s ease-out; }
.is-enter-prev { animation: sba-work-shot-prev 0.35s ease-out; }

/* スライダーの下のモックアップ。
 * デバイスの枠（SVG）の画面の位置に、スクリーンショットを重ねる。
 * 位置と大きさは、すべて全体の幅に対する割合。 */
/* 横幅はスライダーの箱と同じ（最大 1400px から左右 6rem を引いた幅） */
.sba-work-mockup {
  box-sizing: border-box;
  max-width: 1400px;
  margin: 4rem auto 0;
  padding-inline: 6rem;
}

@media not all and (min-width: 1000px) {
  .sba-work-mockup {
    padding-inline: 1rem;
  }
}

/* デバイスの枠とはめ込みの規則は works-mockup.css（一覧のカードと共用） */

/* ------------------------------------------------------------
 * 3. 価格の目安（Reference Pricing）
 * ------------------------------------------------------------ */

.sba-work-pricing {
  margin-top: 5rem;
  color: var(--sba-pr-text);
}

.sba-work-pricing__inner {
  max-width: 800px;
}

.sba-work-pricing__title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

.sba-work-pricing__sub {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 2.5rem 0 0.9rem;
}

.sba-work-pricing__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.7;
}

.sba-work-pricing__table th,
.sba-work-pricing__table td {
  padding: 12px 14px;
  border: 1px solid var(--sba-work-line);
  text-align: left;
  vertical-align: top;
  font-weight: 400;
  background: transparent;
}

.sba-work-pricing__table thead th {
  background: var(--sba-pr-charcoal);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
}

.sba-work-pricing__table tbody th {
  font-weight: 500;
}

/* 「内容」の列は折り返さない（1行だけ2行に折れるのを避ける）。列はいちばん長い名前の幅になり、
 * 残りを「ひとこと」の列が受ける。スマホ幅では1件ずつ縦に積むので、この指定は掛けない。
 * 比較の表（--compare）は1列めが長い文になるので外す（atoboo.jp と同じ） */
@media (min-width: 601px) {
  .sba-work-pricing__table:not(.sba-work-pricing__table--compare) tbody th {
    white-space: nowrap;
  }
}

.sba-work-pricing__table tfoot th,
.sba-work-pricing__table tfoot td {
  font-weight: 700;
  font-size: 1rem;
  background: var(--sba-work-box);
}

.sba-work-pricing__table .sba-work-pricing__price {
  white-space: nowrap;
  font-weight: 700;
}

.sba-work-pricing__note {
  font-size: 0.85rem;
}

.sba-work-pricing__scale {
  margin: 1.75rem 0 0;
}

.sba-work-pricing__scale p + p {
  margin-top: 0.4em;
}

.sba-work-pricing__table--compare {
  margin-top: 2rem;
}

.sba-work-pricing__closing {
  margin-top: 1.75rem;
  font-weight: 700;
}

.sba-work-pricing__table--compare {
  max-width: 560px;
}

/* 比較の表の1行めは実例（太字で示す） */
.sba-work-pricing__table--compare tbody tr:first-child th {
  font-weight: 700;
}

.sba-work-pricing__compare-note {
  margin: 1.25rem 0 0;
}

.sba-work-pricing__compare-note p + p {
  margin-top: 0.4em;
}

.sba-work-pricing__years {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--sba-work-line);
}

.sba-work-pricing__caution {
  font-size: 0.82rem;
  opacity: 0.75;
}

.sba-work-pricing__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1rem;
}

.sba-work-pricing__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 28px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--sba-work-accent);
  border: 1px solid var(--sba-work-accent);
  border-radius: 2px;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

.sba-work-pricing__link--primary,
.sba-work-pricing__link:hover {
  background: var(--sba-work-accent);
  color: #fff;
}

.sba-work-pricing__link--primary:hover {
  background: transparent;
  color: var(--sba-work-accent);
}

.sba-work-back {
  margin-top: 4rem;
}

/* ------------------------------------------------------------
 * スマホ
 * ------------------------------------------------------------ */

@media (max-width: 600px) {
  /* スマホ幅では箱を縦長にする（列の数と幅は PHP が決めた値を使う） */
  .sba-work-shot__panels {
    --per: var(--per-narrow, 2);
    --w: var(--w-narrow, 0.5);
    --seg: var(--seg-narrow, 2.5);
    --box: 1.26;
  }

  .sba-work-shot__panel.is-off-wide {
    display: block;
  }

  .sba-work-shot__panel.is-off-narrow,
  .sba-work-shot__panel[hidden] {
    display: none;
  }

  /* JS が動かないときは、全部の列を折り返して並べる */
  .sba-work-shots:not(.is-slider) .sba-work-shot__panels {
    flex-wrap: wrap;
    aspect-ratio: auto;
  }

  /* 内訳の表は1件ずつ縦に積む */
  .sba-work-pricing__table:not(.sba-work-pricing__table--compare) thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .sba-work-pricing__table:not(.sba-work-pricing__table--compare) tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    border: 1px solid var(--sba-work-line);
    border-bottom: 0;
  }

  .sba-work-pricing__table:not(.sba-work-pricing__table--compare) tfoot tr {
    border-bottom: 1px solid var(--sba-work-line);
  }

  .sba-work-pricing__table:not(.sba-work-pricing__table--compare) th,
  .sba-work-pricing__table:not(.sba-work-pricing__table--compare) td {
    border: 0;
    padding: 12px 12px 0;
  }

  .sba-work-pricing__table:not(.sba-work-pricing__table--compare) .sba-work-pricing__note {
    grid-column: 1 / -1;
    padding: 2px 12px 12px;
    opacity: 0.8;
  }

  .sba-work-pricing__table:not(.sba-work-pricing__table--compare) tfoot th,
  .sba-work-pricing__table:not(.sba-work-pricing__table--compare) tfoot td {
    padding-bottom: 12px;
  }

  .sba-work-pricing__table:not(.sba-work-pricing__table--compare) tfoot td:last-child {
    display: none;
  }

  .sba-work-pricing__links {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .is-enter-next,
  .is-enter-prev {
    animation: none;
  }

  .sba-work-shots__arrow,
  .sba-work-pricing__link {
    transition: none;
  }
}
