/* =========================================================
   T-M・サポート — トップページ専用スタイル

   index.php でのみ読み込む。DESIGN_GUIDELINES.md に準拠。

   トップの役割は全部を説明することではなく、
   「家のことで困ったら、この人たちにまず相談すればいい」と
   理解してもらい、詳細ページか相談へ進んでもらうこと。

   セクションごとに密度・レイアウト・背景を変えて、
   同じカードグリッドが連続しないようにしている。
   ========================================================= */

:root {
    --hm-ink: #16233A;
    --hm-navy: #2C4773;
    --hm-body: #4E5966;
    --hm-mute: #5F6874;
    --hm-red: #C32B38;
    --hm-line: #DFD8CA;
    --hm-paper: #FBF8F2;
}

.hm { background: #fff; color: var(--hm-ink); }
.hm-wrap { max-width: 1180px; margin: 0 auto; padding-inline: 24px; }
.hm-narrow { max-width: 820px; margin-inline: auto; }

.hm-label {
    display: block;
    font-size: 12px; font-weight: 700; letter-spacing: .2em;
    color: var(--hm-red); margin: 0 0 18px;
}

/* ---------------------------------------------------------
   01 ヒーロー ── 左に文字、右に写真。
   写真の上に文字を重ねない。集合写真は5人が横一列に並んでいて、
   どこに文字を置いても誰かの顔にかかるため。
   分けたことで覆い（暗いグラデーション）も不要になり、
   顔と現場の様子がそのまま見えるようになっている。
   数値バー（最短当日／24時間／幅広く／無料）は置かない。
   --------------------------------------------------------- */
.hm-hero { background: var(--hm-ink); color: #fff; padding: 0; }
.hm-hero-inner {
    display: grid;
    /* 1列目は「本文の左端まで」の余白。100% はスクロールバーを含まないので、
       他ページの .hm-wrap（最大1180px・内側24px）と左端がぴったり揃う。 */
    grid-template-columns:
        minmax(24px, calc((100% - 1180px) / 2 + 24px))
        minmax(0, 46fr)
        minmax(0, 54fr);
    align-items: center;
    min-height: clamp(500px, 43vw, 640px);
}
.hm-hero-copy {
    grid-column: 2;
    padding-block: clamp(52px, 5vw, 76px);
    padding-inline: 0 clamp(32px, 4.2vw, 68px);
}

.hm-hero-media {
    grid-column: 3;
    position: relative; align-self: stretch;
    overflow: hidden; background: #0E1626;
}
/* 写真はゆっくりしたクロスフェードで切り替わる（main.js） */
.hm-hero-slide {
    position: absolute; inset: 0;
    opacity: 0; transition: opacity 1.6s ease;
}
.hm-hero-slide.is-active { opacity: 1; }
.hm-hero-slide img {
    width: 100%; height: 100%;
    /* --focus は写真ごとに index.php 側で指定 */
    object-fit: cover; object-position: center var(--focus, 40%);
    /* 写真を暗くしない。人物の顔と現場の様子がわかることを優先。 */
    filter: brightness(1.05) saturate(1.03);
}
@media (prefers-reduced-motion: reduce) {
    .hm-hero-slide { transition: none; }
}

/* 縦積み。写真が先、文字が後。写真を切り抜きすぎないよう4:3のまま置く。 */
/* 1120px より狭いとコピー欄が足りず、本文が3行に折れる。その手前で縦積みにする。 */
@media (max-width: 1120px) {
    .hm-hero-inner { grid-template-columns: 1fr; min-height: 0; }
    .hm-hero-media { grid-column: 1; order: -1; aspect-ratio: 4 / 3; }
    .hm-hero-copy { grid-column: 1; padding: clamp(34px, 6.5vw, 52px) 24px clamp(40px, 8vw, 58px); }
}

.hm-hero .hm-label { color: rgba(255,255,255,.72); margin-bottom: 16px; }
.hm-hero h1 {
    font-size: clamp(30px, 4.4vw, 54px);
    font-weight: 900; line-height: 1.36; letter-spacing: -.015em;
    color: #fff; margin: 0 0 22px;
    word-break: auto-phrase;
}
.hm-hero p {
    /* 行長は em（全角1文字）で決める。ch は数字の幅なので日本語だと狭くなる。 */
    font-size: clamp(15px, 1.35vw, 17px);
    line-height: 2.05; color: rgba(255,255,255,.86);
    margin: 0 0 30px; max-width: 31em;
    word-break: auto-phrase;
}
.hm-hero p strong { color: #fff; font-weight: 800; }

.hm-hero-actions { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; }

/* 写真の切り替え。丸ではなく細い横線にして、サイトの罫線の表現に合わせる。
   見た目は小さいが、::after で指1本ぶんの当たり判定を確保している。 */
.hm-hero-dots { display: flex; gap: 10px; margin-top: clamp(28px, 3.2vw, 40px); }
.hm-hero-dots button {
    position: relative;
    width: 28px; height: 3px; padding: 0; border: 0; border-radius: 0;
    background: rgba(255,255,255,.32);
    cursor: pointer;
    transition: background-color .2s ease;
}
.hm-hero-dots button::after { content: ""; position: absolute; inset: -13px -5px; }
.hm-hero-dots button:hover { background: rgba(255,255,255,.6); }
.hm-hero-dots button[aria-current="true"] { background: #EFD638; }
.hm-hero-dots button:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { .hm-hero-dots button { transition: none; } }
.hm-btn {
    display: inline-flex; align-items: center; gap: 12px;
    padding: 17px 34px;
    font-size: 15.5px; font-weight: 800; letter-spacing: .02em;
    text-decoration: none; border-radius: 2px;
    background: var(--hm-red); color: #fff;
    transition: background-color .18s ease;
}
.hm-btn:hover { opacity: 1; background: #A81F2B; }
.hm-hero-sub {
    display: inline-flex; align-items: center; gap: 11px;
    font-size: 14.5px; font-weight: 700; color: #fff; text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.5); padding-bottom: 5px;
    transition: border-color .18s ease;
}
.hm-hero-sub::after {
    content: ""; width: 8px; height: 8px;
    border-right: 1.5px solid currentColor; border-top: 1.5px solid currentColor;
    transform: rotate(45deg); transition: margin-left .2s ease;
}
.hm-hero-sub:hover { opacity: 1; border-color: #fff; }
.hm-hero-sub:hover::after { margin-left: 6px; }

/* ---------------------------------------------------------
   02 相談できること ── 罫線INDEX。カードにしない。
   --------------------------------------------------------- */
.hm-services { padding: clamp(52px, 8vw, 104px) 0; }
.hm-sec-head { margin-bottom: clamp(30px, 4.5vw, 52px); }
.hm-sec-head h2 {
    font-size: clamp(23px, 3.6vw, 38px);
    font-weight: 900; line-height: 1.5; margin: 0 0 16px;
    word-break: auto-phrase;
}
/* 行長は em（全角1文字）で決める。ch は数字の幅なので、日本語だと1.6倍ほど狭くなる。 */
/* 行長は em（全角1文字）で決める。ch は数字の幅なので日本語だと狭くなる。
   ここは見出し直下の導入文なので、PCで1行に収まる長さまで許している。 */
.hm-sec-head p { font-size: 15.5px; line-height: 2.15; color: var(--hm-body); max-width: 56em; margin: 0 0 12px; }
.hm-sec-head p:last-child { margin-bottom: 0; }

.hm-svc-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--hm-line); }
@media (max-width: 760px) { .hm-svc-grid { grid-template-columns: 1fr; } }

.hm-svc {
    display: grid; grid-template-columns: auto 1fr auto;
    align-items: center; gap: 0 clamp(14px, 2vw, 24px);
    padding: clamp(20px, 2.6vw, 28px) 0;
    border-bottom: 1px solid var(--hm-line);
    text-decoration: none; color: inherit;
    transition: background-color .18s ease;
}
@media (min-width: 761px) {
    .hm-svc:nth-child(odd)  { padding-right: clamp(20px, 3vw, 40px); border-right: 1px solid var(--hm-line); }
    .hm-svc:nth-child(even) { padding-left: clamp(20px, 3vw, 40px); }
}
.hm-svc:hover { opacity: 1; background: var(--hm-paper); }
.hm-svc-grid + .hm-link { margin-top: clamp(26px, 3.5vw, 40px); }
.hm-svc-no {
    font-size: clamp(21px, 3vw, 30px);
    font-weight: 800; color: var(--hm-red); line-height: 1;
    letter-spacing: -.02em; font-variant-numeric: tabular-nums; min-width: 1.9em;
}
.hm-svc .nm { display: block; font-size: clamp(15px, 2vw, 17.5px); font-weight: 800; line-height: 1.55; margin-bottom: 5px; }
.hm-svc .sb { display: block; font-size: 12.5px; color: var(--hm-mute); line-height: 1.7; }
.hm-svc .ar {
    width: 9px; height: 9px;
    border-right: 1.5px solid var(--hm-red); border-top: 1.5px solid var(--hm-red);
    transform: rotate(45deg); transition: margin-left .2s ease; margin-left: 4px;
}
.hm-svc:hover .ar { margin-left: 12px; }

/* ---------------------------------------------------------
   04 人 ── 「いつもの人が来てくれる」
   --------------------------------------------------------- */
.hm-people { padding: clamp(52px, 8vw, 104px) 0; }
.hm-people-grid {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(28px, 5vw, 68px); align-items: center;
}
@media (max-width: 860px) { .hm-people-grid { grid-template-columns: 1fr; gap: 28px; } }
.hm-people h2 {
    font-size: clamp(22px, 3.4vw, 36px);
    font-weight: 900; line-height: 1.55; margin: 0 0 24px;
    word-break: auto-phrase;
}
/* 行長は em（全角1文字）で決める。ch は数字の幅なので日本語だと狭くなる。 */
.hm-people p { font-size: 15.5px; line-height: 2.15; color: var(--hm-body); margin: 0 0 10px; max-width: 34em; }
.hm-people p:last-of-type { margin-bottom: 30px; }
.hm-people figure { margin: 0; }
/* height 属性が付いていると aspect-ratio が効かないので auto に戻す */
.hm-people figure img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 30%; display: block; border-radius: 2px; }
.hm-people figcaption { margin-top: 10px; font-size: 12.5px; color: var(--hm-mute); line-height: 1.8; }

/* テキストリンク（サイト共通の形） */
.hm-link {
    display: inline-flex; align-items: center; gap: 12px;
    font-size: 15px; font-weight: 800; color: var(--hm-navy);
    text-decoration: none; padding: 12px 0;
    border-bottom: 2px solid var(--hm-navy);
    transition: color .18s ease, border-color .18s ease;
}
.hm-link::after {
    content: ""; width: 8px; height: 8px;
    border-right: 1.5px solid currentColor; border-top: 1.5px solid currentColor;
    transform: rotate(45deg); transition: margin-left .2s ease;
}
.hm-link:hover { opacity: 1; color: var(--hm-red); border-color: var(--hm-red); }
.hm-link:hover::after { margin-left: 8px; }

/* ---------------------------------------------------------
   05 誠実 ── 理念の全文は載せない
   --------------------------------------------------------- */
.hm-value { background: var(--hm-ink); color: #fff; padding: clamp(56px, 8vw, 112px) 0; }
.hm-value .hm-label { color: rgba(255,255,255,.55); }
.hm-value h2 {
    font-size: clamp(24px, 4vw, 42px);
    font-weight: 900; line-height: 1.5; color: #fff; margin: 0 0 30px;
}
.hm-value ul { list-style: none; margin: 0 0 34px; padding: 0; max-width: 35em; }
.hm-value li {
    font-size: clamp(15.5px, 2vw, 18px);
    line-height: 1.9; color: rgba(255,255,255,.86);
    padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.14);
}
.hm-value p { font-size: 15px; line-height: 2.15; color: rgba(255,255,255,.7); margin: 0 0 30px; max-width: 38em; }
.hm-value .hm-link { color: #fff; border-color: rgba(255,255,255,.6); }
.hm-value .hm-link:hover { color: #fff; border-color: #fff; }

/* ---------------------------------------------------------
   06 料金 ── 料金表は載せない。ページへの導入に徹する。
   --------------------------------------------------------- */
.hm-price { padding: clamp(52px, 8vw, 104px) 0; }
.hm-price-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 68px); align-items: start; }
@media (max-width: 860px) { .hm-price-grid { grid-template-columns: 1fr; gap: 26px; } }
.hm-price h2 { font-size: clamp(22px, 3.4vw, 36px); font-weight: 900; line-height: 1.5; margin: 0 0 22px; word-break: auto-phrase; }
.hm-price p { font-size: 15.5px; line-height: 2.15; color: var(--hm-body); margin: 0 0 20px; max-width: 30em; }
.hm-price-facts { border-top: 1px solid var(--hm-line); }
.hm-price-facts div {
    display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
    padding: 15px 0; border-bottom: 1px solid var(--hm-line);
    font-size: 15px; line-height: 1.8;
}
.hm-price-facts b { font-weight: 800; color: var(--hm-navy); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* .hm-price p より詳しく書かないと font-size が効かない */
.hm-price p.hm-price-note { font-size: 13px; color: var(--hm-mute); margin: 14px 0 0; line-height: 1.9; max-width: none; }

/* ---------------------------------------------------------
   07 仕事の一例 ── 写真サイズに強弱をつける
   --------------------------------------------------------- */
.hm-works { background: var(--hm-paper); padding: clamp(52px, 8vw, 104px) 0; }
.hm-works-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(20px, 3.4vw, 40px); }
@media (max-width: 800px) { .hm-works-grid { grid-template-columns: 1fr; } }
.hm-works-side { display: grid; gap: clamp(20px, 3.4vw, 40px); align-content: start; }

.hm-work { display: block; text-decoration: none; color: inherit; }
.hm-work:hover { opacity: 1; }
.hm-work figure { margin: 0 0 14px; overflow: hidden; background: #E8E3D8; border-radius: 2px; }
.hm-work img { width: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2,.7,.3,1); }
.hm-work.is-lead img { aspect-ratio: 4 / 3; }
.hm-work.is-small img { aspect-ratio: 16 / 10; }
.hm-work:hover img { transform: scale(1.03); }
.hm-work .cat { font-size: 11.5px; font-weight: 700; letter-spacing: .16em; color: var(--hm-mute); margin-bottom: 7px; }
.hm-work h3 { font-size: clamp(15.5px, 2.1vw, 19px); font-weight: 800; line-height: 1.6; margin: 0 0 7px; color: var(--hm-ink); transition: color .18s ease; }
.hm-work.is-lead h3 { font-size: clamp(17px, 2.5vw, 23px); }
.hm-work:hover h3 { color: var(--hm-red); }
.hm-work .meta { font-size: 13px; color: var(--hm-mute); }
.hm-works-more { margin-top: clamp(26px, 4vw, 40px); }

/* ---------------------------------------------------------
   08 FAQ ── アコーディオンだが、カードにはしない
   --------------------------------------------------------- */
.hm-faq { padding: clamp(52px, 8vw, 96px) 0; }
.hm-faq-list { border-top: 1px solid var(--hm-line); max-width: 860px; }
.hm-faq details { border-bottom: 1px solid var(--hm-line); }
.hm-faq summary {
    list-style: none; cursor: pointer;
    padding: 20px 40px 20px 0; position: relative;
    font-size: clamp(15.5px, 2vw, 17px); font-weight: 700; color: var(--hm-ink); line-height: 1.7;
}
.hm-faq summary::-webkit-details-marker { display: none; }
.hm-faq summary::after {
    content: ""; position: absolute; right: 6px; top: 50%;
    width: 10px; height: 10px; margin-top: -8px;
    border-right: 1.5px solid var(--hm-red); border-bottom: 1.5px solid var(--hm-red);
    transform: rotate(45deg); transition: transform .2s ease;
}
.hm-faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.hm-faq summary:focus-visible { outline: 3px solid var(--hm-red); outline-offset: 2px; }
.hm-faq .a { padding: 0 40px 22px 0; font-size: 15px; line-height: 2.1; color: var(--hm-body); }

/* ---------------------------------------------------------
   09 CTA ── 3枚のカードをやめる
   --------------------------------------------------------- */
.hm-cta { background: var(--hm-ink); color: #fff; padding: clamp(56px, 8vw, 112px) 0; }
.hm-cta h2 {
    font-size: clamp(23px, 3.8vw, 40px);
    font-weight: 900; line-height: 1.5; color: #fff; margin: 0 0 24px;
    word-break: auto-phrase;
}
/* 行長は em（全角1文字）で決める。ch は数字の幅なので日本語だと狭くなる。 */
.hm-cta p { font-size: 15.5px; line-height: 2.15; color: rgba(255,255,255,.78); max-width: 36em; margin: 0 0 34px; }
.hm-cta-tel {
    display: inline-block;
    font-size: clamp(28px, 5vw, 44px); font-weight: 900; letter-spacing: .02em;
    color: #fff; text-decoration: none; line-height: 1.2;
    font-variant-numeric: tabular-nums;
    border-bottom: 3px solid var(--hm-red); padding-bottom: 4px;
}
.hm-cta-tel:hover { opacity: 1; color: #fff; }
.hm-cta-hours { font-size: 14px; color: rgba(255,255,255,.62); line-height: 2; margin: 20px 0 34px; }
.hm-cta .hm-link { color: #fff; border-color: rgba(255,255,255,.6); }
.hm-cta .hm-link:hover { color: #fff; border-color: #fff; }

/* ---------------------------------------------------------
   フォーカス・モーション配慮
   --------------------------------------------------------- */
.hm a:focus-visible, .hm-cta a:focus-visible { outline: 3px solid var(--hm-red); outline-offset: 3px; }
.hm-hero a:focus-visible, .hm-value a:focus-visible, .hm-cta a:focus-visible { outline-color: #fff; }
@media (prefers-reduced-motion: reduce) {
    .hm *, .hm-cta * { transition: none !important; }
    .hm-work:hover img { transform: none; }
}
