/* 新テーマ（H-B のデザイン）のサービスページ（ウェブ・グラフィック・撮影・ドローン・マーケティング）。
   組み替えは inc/v2/service.php。縦積み（スマホ・動きを減らす設定・失敗時）が土台で、html.is-hscroll のときだけ横の帯にする。
   部品は計画の表のとおり: 見出しのマス（.service-hero）、コピー枠（.service-intro・CTA・お問い合わせ）、
   2段グリッド（[data-h-grid]）、FAQ（トップと同じ問いの一覧）、サービスの一覧のカード */

/* --------------------------------------------------------------------------
   縦積み
   -------------------------------------------------------------------------- */
/* セクションの中の入れ物（div.container）は余白を持たない。セクション自身にも container の class があるので、div に限る */
.service-detail div.container { max-width: none; margin: 0; padding: 0; }

/* 見出しのマス: 写真の上に、地の色の面で大見出しとリードを置く（写真の明るさに左右されずに読める） */
.service-hero {
  display: flex;
  align-items: flex-end;
  min-height: min(88svh, 760px);
  padding: 0 !important;
  background-color: var(--h-bg-2);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}
.service-hero > .container {
  width: 100%;
  margin-top: 38svh;
  padding: clamp(24px, 4vw, 48px) var(--h-gutter) clamp(28px, 4vw, 48px);
  background: var(--h-bg);
}
/* 上の「.service-detail div.container」（余白 0）のほうが詳細度が高く、縦積みで大見出しとリードが画面の左端 x=0 に付いていた
   （点検の中2、2026-09-26）。見出しのマスの面には、上の指定どおりの余白を戻す（上の余白の 38svh は今の見た目のまま戻さない） */
.service-detail .service-hero > div.container { padding: clamp(24px, 4vw, 48px) var(--h-gutter) clamp(28px, 4vw, 48px); }
.service-detail .service-hero--no-bg > div.container { padding-top: clamp(48px, 8vw, 96px); }
.service-hero__title {
  margin: 0;
  font-family: var(--h-font-display);
  font-size: clamp(44px, 1.6rem + 6vw, 112px);
  font-stretch: 112%;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.service-hero__title-sub {
  display: block;
  margin-top: 18px;
  font-family: var(--h-font-mono);
  font-size: 0.8125rem;
  font-stretch: 100%;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.06em;
  color: var(--h-muted);
}
.service-hero__title-sub::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--h-accent);
  vertical-align: 0.15em;
}
.service-hero__subtitle { margin: 22px 0 0; max-width: 34em; font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem); font-weight: 700; line-height: 1.8; }

/* 見出しの列 */
.h-svc-head h2,
.service-section-title {
  margin: 0;
  font-size: clamp(28px, 1rem + 2.2vw, 46px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.service-section-desc { margin: 16px 0 0; max-width: 30em; color: var(--h-muted); font-size: 0.9375rem; line-height: 1.9; }
.h-svc-head { margin-bottom: 28px; }

/* コピー枠: 紹介文 */
.service-intro__text p { margin: 0 0 1.2em; max-width: 34em; font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.3125rem); line-height: 1.9; }
.service-intro__text strong { font-weight: 700; background: linear-gradient(transparent 62%, rgb(252 77 104 / 0.22) 62%); }
.service-cta-button { margin-top: 28px; }

/* 2段グリッドのマス（縦積みでは、幅に合わせて並ぶカード） */
[data-h-grid] {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--h-line);
  border-left: 1px solid var(--h-line);
}
[data-h-grid] > * {
  margin: 0;
  padding: 22px 22px 26px;
  border-right: 1px solid var(--h-line);
  border-bottom: 1px solid var(--h-line);
}

/* お悩み */
.pain-title { display: block; font-size: 1.125rem; font-weight: 700; }
.pain-desc { display: block; margin-top: 10px; color: var(--h-muted); font-size: 0.875rem; line-height: 1.8; }

/* 選ばれる理由 */
.feature-num { display: block; font-family: var(--h-font-mono); font-size: 0.75rem; letter-spacing: 0.08em; color: var(--h-muted); }
.feature-card h3 { margin: 14px 0 0; font-size: 1.1875rem; font-weight: 700; line-height: 1.5; }
.feature-card p { margin: 12px 0 0; color: var(--h-muted); font-size: 0.875rem; line-height: 1.9; }

/* 制作物・納品物 */
.service-offering__list strong,
.service-deliverables strong { display: block; font-size: 1.125rem; font-weight: 700; }
.service-offering__list span,
.service-deliverables span { display: block; margin-top: 10px; color: var(--h-muted); font-size: 0.875rem; line-height: 1.8; }

/* 流れ */
.service-flow__list .step-num { display: block; font-family: var(--h-font-display); font-size: 44px; font-stretch: 112%; font-weight: 700; line-height: 1; }
.service-flow__list strong { display: block; margin-top: 16px; font-size: 1.0625rem; font-weight: 700; line-height: 1.5; }
.service-flow__list p { margin: 10px 0 0; color: var(--h-muted); font-size: 0.875rem; line-height: 1.8; }

/* 料金 */
.price-row { display: grid; align-content: space-between; gap: 18px; }
.price-item { font-size: 0.9375rem; font-weight: 700; line-height: 1.6; }
.price-val { font-family: var(--h-font-display); font-size: clamp(1.375rem, 1rem + 1vw, 1.875rem); font-weight: 700; line-height: 1.2; }
.price-note { margin: 20px 0 0; max-width: 30em; color: var(--h-muted); font-size: 0.8125rem; line-height: 1.9; }
/* /service/web/ の料金の後の、スモールスタートの LP への案内（計画 plans/lp-small-start-seo-r5.md の工程7）。リンクは本文の色で下線、押せる高さを確保 */
.price-pack { margin: 16px 0 0; max-width: 30em; font-size: 0.9375rem; line-height: 1.9; }
.price-pack a { display: inline-block; padding-block: 10px; font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.28em; }

/* FAQ: トップの FAQ と同じ形（問いの一覧。押した問いの下に答えが開き、開くのは1件だけ。site.js の setupServiceFaq）。
   閉じた答えは hidden（読み上げの aria-hidden と合わせる）。JS の前にも閉じて見えるよう、html.js では is-open の答えだけを出す */
.service-faq__list { margin: 0; border-top: 1px solid var(--h-ink); }
.h-svc-qa { border-bottom: 1px solid var(--h-line); }
.service-faq__list dt {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  min-height: 60px;
  padding: 12px 4px;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.6;
  cursor: pointer;
}
.service-faq__list dt::before { content: "Q."; font-family: var(--h-font-mono); font-size: 0.75rem; font-weight: 500; color: var(--h-muted); }
.service-faq__list .icon-vertical { position: relative; width: 14px; height: 14px; transition: transform 0.35s var(--h-ease); }
.service-faq__list .icon-vertical::before,
.service-faq__list .icon-vertical::after { content: ""; position: absolute; inset: 6px 0 auto; height: 1.5px; background: currentColor; }
.service-faq__list .icon-vertical::after { transform: rotate(90deg); }
.service-faq__list dt.is-open .icon-vertical { transform: rotate(45deg); }
.service-faq__list dd { margin: 0; padding: 0 4px 20px 38px; font-size: 0.875rem; line-height: 2; }
.service-faq__list dd[hidden],
html.js .service-faq__list dd:not(.is-open) { display: none; }
.service-faq__list dt:focus-visible { outline: 3px solid var(--h-focus); outline-offset: 4px; box-shadow: 0 0 0 7px var(--h-focus-halo); }

/* サービスの一覧（page-service）: 写真のない見出しのマスと、サービスのカード */
.service-hero--no-bg { min-height: 0; }
.service-hero--no-bg > .container { margin-top: 0; padding-top: clamp(48px, 8vw, 96px); }
.service-cards-stack { padding: 0 !important; border-top: 1px solid var(--h-line); }
.service-card { border-bottom: 1px solid var(--h-line); }
.service-card__image { overflow: hidden; aspect-ratio: 16 / 10; }
.service-card__image-bg { width: 100%; height: 100%; background-size: cover; background-position: center; }
.service-card__content { display: flex; flex-direction: column; padding: 24px var(--h-gutter) 32px; }
.service-card__number { font-family: var(--h-font-display); font-size: 40px; font-stretch: 112%; font-weight: 700; line-height: 1; }
.service-card__label { margin-top: 10px; font-family: var(--h-font-mono); font-size: 0.75rem; letter-spacing: 0.08em; color: var(--h-muted); }
.service-card__title { margin: 14px 0 0; font-size: clamp(1.5rem, 1rem + 1.4vw, 2rem); font-weight: 700; line-height: 1.3; }
.service-card__desc { margin: 14px 0 0; max-width: 34em; color: var(--h-muted); font-size: 0.875rem; line-height: 1.9; }
.service-card__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  margin-top: 20px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--h-ink);
  font-size: 0.875rem;
  font-weight: 700;
}
.service-card__link svg { width: 18px; height: 18px; transition: transform 0.3s var(--h-ease); }
.service-card__link:hover svg { transform: translateX(4px); }

/* 帯の進み具合の線は、横の帯のときだけ */
.h-band-progress { display: none; }

/* --------------------------------------------------------------------------
   横の帯（html.is-hscroll）
   -------------------------------------------------------------------------- */
html.is-hscroll .h-stage--band { --h-nav-space: 40px; }

/* 見出しのマス: 左に地の色の面（大見出しとリード）、右に写真 */
html.is-hscroll .service-hero {
  width: calc(var(--H) * 1.75);
  align-items: stretch;
  min-height: 0;
  padding: 0 0 0 calc(var(--H) * 0.78) !important;
  background-origin: content-box;
  background-clip: content-box;
}
html.is-hscroll .service-hero > .container {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--H) * 0.78);
  margin: 0;
  display: grid;
  align-content: end;
  padding: 40px clamp(28px, 3vw, 48px) var(--h-cell-bottom, 40px);
}
html.is-hscroll .service-hero__title { font-size: clamp(48px, 1rem + 4.6vw, 104px); }

/* コピー枠 */
html.is-hscroll .service-intro {
  width: calc(var(--H) * 1.05);
  display: grid;
  align-content: center;
}
/* マーケティング・SNS の紹介文（「結論」の囲み .service-aio を持つもの）の囲みと CTA は、今のテーマの写しの style で上の余白が 3rem。
   文字だけを拡大すると余白も2倍になり、画面の高さのマスからはみ出す。横の帯では、標準の文字の大きさのときと同じ 48px に固定する
   （見た目は変わらない）。ほかのページの紹介の CTA（style なし、28px など）には効かせない */
html.is-hscroll .service-intro:has(.service-aio) :is(.service-aio, .service-cta-button) { margin-top: 48px !important; }

/* 見出しの列 + 2段×n列のマス */
html.is-hscroll .service-detail .h-track > section:has(> [data-h-grid]) {
  display: flex;
  align-items: stretch;
  padding-right: 0;
}
html.is-hscroll .h-svc-head {
  flex: none;
  width: calc(var(--H) * 0.5);
  margin: 0;
  padding-right: 32px;
  align-self: end;
}
html.is-hscroll [data-h-grid] {
  flex: none;
  height: 100%;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  grid-auto-columns: calc(var(--H) * 0.44);
  border-top: 0;
}
/* 中身があふれたときだけマスの中をスクロールする。overscroll-behavior: contain は付けない（付けると、あふれていないマスの上でも
   ホイールの縦のスクロールがページへ渡らず、帯が進まない。2026-09-26、ゆんの指摘「スクロールしづらい」） */
html.is-hscroll [data-h-grid] > * {
  border: 0;
  overflow-y: auto;
  padding: 26px 26px 28px;
}
/* 短い文のマス: 見出しを上に、説明を下に置き、マスの高さを使う（帯の上の余白を空けすぎない） */
html.is-hscroll .service-pain__list > li,
html.is-hscroll .service-offering__list > li,
html.is-hscroll .service-flow__list > li,
html.is-hscroll .feature-card {
  display: flex;
  flex-direction: column;
}
html.is-hscroll .pain-title,
html.is-hscroll .service-offering__list strong { font-size: clamp(1.25rem, 0.8rem + 1vw, 1.75rem); line-height: 1.4; }
html.is-hscroll .pain-desc,
html.is-hscroll .service-offering__list span { margin-top: auto; padding-top: 16px; font-size: 0.9375rem; }
html.is-hscroll .service-flow__list .step-num { font-size: clamp(56px, 2rem + 3vw, 96px); }
html.is-hscroll .service-flow__list .step-content { margin-top: auto; }
html.is-hscroll .feature-card h3 { margin-top: auto; font-size: clamp(1.1875rem, 0.8rem + 0.8vw, 1.5rem); }
html.is-hscroll .service-features__grid[data-h-grid] { grid-auto-columns: calc(var(--H) * 0.6); }
html.is-hscroll .service-price__table[data-h-grid] { grid-auto-columns: calc(var(--H) * 0.5); }
html.is-hscroll .price-note,
html.is-hscroll .price-pack {
  flex: none;
  width: calc(var(--H) * 0.36);
  margin: 0;
  padding: 0 32px 0 24px;
  align-self: end;
}

/* FAQ: 見出しの列 + 問いの一覧の列（トップの FAQ と同じ形）。答えが長いときは答えの中だけを、
   背の低い画面で一覧が列に収まらないときは一覧の中だけを縦にスクロールする */
html.is-hscroll .service-detail .h-track > section.service-faq { display: flex; align-items: stretch; }
html.is-hscroll .service-faq__list {
  flex: none;
  width: calc(var(--H) * 0.78);
  max-height: 100%;
  padding: 12px;
  border-top: 0;
  overflow-y: auto;
  scroll-padding-block: 12px;
}
html.is-hscroll .service-faq__list > .h-svc-qa:first-child { border-top: 1px solid var(--h-ink); }
html.is-hscroll .service-faq__list dt { min-height: 0; padding: calc(var(--H) * 0.016) 8px; font-size: 0.9375rem; }
html.is-hscroll .service-faq__list dt.is-open { background: var(--h-ink); color: var(--h-bg); }
html.is-hscroll .service-faq__list dt.is-open::before { color: var(--h-night-muted); }
html.is-hscroll .service-faq__list dd {
  max-height: calc(var(--H) * 0.3);
  overflow: auto;
  padding: 12px 8px 14px 38px;
  line-height: 1.9;
}

/* 撮影・映像の納品物: 今のテンプレートの style（margin-top）を帯の中では使わない */
html.is-hscroll .service-deliverables { margin-top: 0 !important; }

/* サービスの一覧: 写真のない見出しのマスと、上に写真・下に文の縦長のカードを横に並べる */
html.is-hscroll .service-hero--no-bg { width: calc(var(--H) * 1.05); padding: 0 !important; }
html.is-hscroll .service-hero--no-bg > .container { position: static; width: 100%; height: 100%; padding: 40px clamp(28px, 3vw, 48px) var(--h-cell-bottom, 40px); }
html.is-hscroll .service-detail .h-track > section.service-cards-stack { display: flex; padding: 0 !important; border-top: 0; }
html.is-hscroll .service-card { flex: none; width: calc(var(--H) * 0.66); height: 100%; border-bottom: 0; }
html.is-hscroll .service-card__inner { display: grid; grid-template-rows: 44% minmax(0, 1fr); height: 100%; }
html.is-hscroll .service-card__image { aspect-ratio: auto; }
html.is-hscroll .service-card__content { overflow-y: auto; padding: 22px 26px var(--h-cell-bottom, 28px); }
html.is-hscroll .service-card__link { margin-top: auto; }

/* 帯の進み具合（舞台の下端の細い線。site.js が --h-band-progress を 0〜1 で更新する） */
html.is-hscroll .h-band-progress {
  display: block;
  position: absolute;
  left: clamp(28px, 3vw, 48px);
  right: clamp(28px, 3vw, 48px);
  bottom: 18px;
  z-index: 4;
  height: 1px;
  background: var(--h-line);
  pointer-events: none;
}
html.is-hscroll .h-band-progress::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--h-ink);
  transform-origin: left center;
  transform: scaleX(var(--h-band-progress, 0));
}

/* 背の低い画面（1280×680・1366×768 など）: マスの余白と大きな数字を小さくし、マスと紹介文の幅を広げて、文字をマスに収める */
@media (max-height: 820px) {
  html.is-hscroll [data-h-grid] { grid-auto-columns: calc(var(--H) * 0.54); }
  html.is-hscroll [data-h-grid] > * { padding: 18px 20px 20px; }
  html.is-hscroll .service-intro { width: calc(var(--H) * 1.4); }
  html.is-hscroll .service-intro__text p { font-size: 1.125rem; }
  html.is-hscroll .service-card { width: calc(var(--H) * 0.74); }
  html.is-hscroll .service-card__inner { grid-template-rows: 38% minmax(0, 1fr); }
  html.is-hscroll .service-faq__list dt { font-size: 0.875rem; }
  html.is-hscroll .service-card__content { padding: 16px 20px 18px; }
  html.is-hscroll .service-card__number { font-size: 1.875rem; }
  html.is-hscroll .service-card__title { margin-top: 8px; font-size: 1.375rem; }
  html.is-hscroll .service-card__desc { margin-top: 8px; font-size: 0.8125rem; line-height: 1.8; }
  html.is-hscroll .service-flow__list .step-num { font-size: 48px; }
  html.is-hscroll .pain-title,
  html.is-hscroll .service-offering__list strong { font-size: 1.25rem; }
}
