/* ============================================================
 * works-single.css
 * 制作実績の個別ページ（works-single.php / parts/works/）専用スタイル
 *
 * 見た目の大半は、今の実績ページ（居酒屋ぼんばぁ）と同じく
 * Arkhe Blocks のブロック用 CSS と、CSS エディターの arkc-* が作る。
 * このファイルが持つのは次の3つだけ:
 *   1. ブロックごとに自動で出る個別の値（余白・カラム幅・波形の高さ）
 *   2. スクリーンショット（縦長のパネルで PC とスマホを並べる）
 *   3. 価格の目安（Reference Pricing）
 * ============================================================ */

/* ------------------------------------------------------------
 * 1. ブロックごとの個別の値（ぼんばぁのページと同じ値）
 * ------------------------------------------------------------ */

/* 見出しの上の余白（ぼんばぁのページでは投稿タイトルの下の余白にあたる分） */
.atb-work {
  padding-top: 80px;
}

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

.atb-work-sec-overview {
  color: #fff;
  --arkb-svg-height--top: 6.2vw;
  --arkb-svg-height--bottom: 6.2vw;
}

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

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

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

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

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

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

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

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

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

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

.atb-work-sec-overview a.atb-work-extlink:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

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

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

/* ------------------------------------------------------------
 * 2. スクリーンショット
 * ぼんばぁのスライダーと同じ薄い地の箱に、縦長のパネルを並べる。
 * ------------------------------------------------------------ */

.atb-work-shots {
  position: relative;
  background: #ebebdb;
  padding: 14px 15px 16px;
}

/* 自動送りの一時停止・再開（ぼんばぁのスライダーと同じ右上） */
.atb-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;
}

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

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

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

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

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

/* ページ名（ぼんばぁのスライダーの「Top Page」に合わせた文字） */
.atb-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: #a5a58a;
  margin: 0 0 12px;
}

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

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

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

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

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

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

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

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

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

.atb-work-shots__dot::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2px solid #333;
  border-radius: 50%;
}

.atb-work-shots__dot[aria-current="true"]::before {
  background: #333;
}

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

/* 縦に長いページ全体の画像を、同じ高さの列に等分して横に並べる。
 * 箱は 幅 1 × 高さ --box で一定（スライドを送っても高さが変わらない）。
 * 1スライドの列数 --per・1列の幅 --w（箱の幅に対する割合）・1列に入る高さ ÷ 幅 --seg は、
 * PHP が画像の縦横比から決める。 */
.atb-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);
}

.atb-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;
}

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

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

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

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

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

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

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

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

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

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

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

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

.atb-work-pricing {
  margin-top: 5rem;
  color: var(--atb-olive);
}

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

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

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

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

.atb-work-pricing__table th,
.atb-work-pricing__table td {
  padding: 12px 14px;
  border: 1px solid rgba(63, 59, 0, 0.25);
  text-align: left;
  vertical-align: top;
  font-weight: 400;
  background: transparent;
}

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

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

/* 内訳の表の「内容」の列は折り返さない（1行だけ2行に折れるのを防ぐ）。
 * 列の幅がいちばん長い名前に合い、残りを「ひとこと」の列が受ける。
 * 600px 以下は1件ずつ縦に積む形なので掛けない。比較の表は1列めが長いので掛けない */
@media (min-width: 601px) {
  .atb-work-pricing__table:not(.atb-work-pricing__table--compare) tbody th {
    white-space: nowrap;
  }
}

.atb-work-pricing__table tfoot th,
.atb-work-pricing__table tfoot td {
  font-weight: 700;
  font-size: 1rem;
  background: #ebebdb;
}

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

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

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

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

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

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

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

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

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

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

.atb-work-pricing__years {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(63, 59, 0, 0.25);
}

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

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

.atb-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(--atb-olive);
  border: 1px solid var(--atb-olive);
  border-radius: 2px;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

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

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

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

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

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

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

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

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

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

  .atb-work-pricing__table:not(.atb-work-pricing__table--compare) tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    border: 1px solid rgba(63, 59, 0, 0.25);
    border-bottom: 0;
  }

  .atb-work-pricing__table:not(.atb-work-pricing__table--compare) tfoot tr {
    border-bottom: 1px solid rgba(63, 59, 0, 0.25);
  }

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

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

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

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

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

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

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