/* data に flow（ご依頼の流れ）や memo（依頼メモ）があるサイトだけが読む。style.css の色（--navy など）を使う */

/* ご依頼の流れ（濃い帯。「数字で見る」の代わり） */
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid color-mix(in srgb, var(--paper) 22%, transparent); }
.steps li { position: relative; padding: 28px 30px 30px 0; border-bottom: 1px solid color-mix(in srgb, var(--paper) 22%, transparent); }
.steps li:not(:last-child)::before { content: ""; position: absolute; right: 14px; top: 44px; width: 9px; height: 9px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); opacity: .4; }
.steps i { display: block; font-style: normal; font-family: var(--font-display); font-weight: 900; font-size: clamp(38px, 4.4vw, 60px); line-height: 1; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.steps h3 { font-family: var(--font-display); font-weight: 900; font-size: 19px; letter-spacing: .04em; margin: 16px 0 6px; }
.steps p { font-size: 13.5px; line-height: 1.8; opacity: .75; }
body.dark .flow h2 em { color: var(--steel); }   /* 紺（墨）の上で accent は沈むので */
@media (max-width: 800px) {
  .steps { grid-template-columns: 1fr; }
  .steps li { display: grid; grid-template-columns: 3.2em 1fr; column-gap: 10px; padding: 20px 0; }
  .steps li:not(:last-child)::before { display: none; }
  .steps i { grid-row: span 2; font-size: 34px; }
  .steps h3 { margin: 2px 0 4px; font-size: 18px; }
}

/* 依頼メモ */
.request .lead { margin-top: 16px; max-width: 30em; }
/* PC: 左に見出しと「送られる文面」（入力に合わせて追従）、右にフォーム。スマホは 見出し→フォーム→文面 の順 */
@media (min-width: 801px) {
  .request .two { grid-template-areas: "head form" "side form"; grid-template-rows: auto 1fr; row-gap: 36px; }
  .request .two > .rv { grid-area: head; }
  .request .memo { grid-area: form; }
  .request .memo-side { grid-area: side; align-self: start; position: sticky; top: 120px; }
  .request .memo-side .note { text-align: left; }
}
.memo-side { display: grid; gap: 14px; }
.memo { display: grid; gap: 18px; }
.memo label, .memo .lb { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; margin-bottom: 6px; }
.memo label small { font-weight: 400; font-size: 11.5px; opacity: .6; margin-left: .6em; }
.memo .in { width: 100%; min-height: 48px; border: 1.5px solid var(--rule); background: #fff; border-radius: 10px; padding: 11px 14px; font: inherit; font-size: 16px; line-height: 1.4; color: var(--ink); -webkit-appearance: none; appearance: none; }
.memo .in:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.memo .in::placeholder { color: color-mix(in srgb, var(--navy) 38%, transparent); }
.memo .row { display: flex; gap: 10px; }
.memo .row .in { flex: 1; min-width: 0; }
.memo .row .t { flex: 0 0 128px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { border: 1.5px solid var(--rule); background: #fff; color: var(--ink); border-radius: 999px; padding: 8px 15px; font: inherit; font-size: 14px; line-height: 1.3; letter-spacing: .03em; cursor: pointer; transition: background-color .2s, color .2s; }
.chips button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--paper); }
.m3 { display: flex; align-items: center; gap: 10px; }
.m3 .in { width: 112px; flex: none; text-align: right; font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.m3 > span { font-weight: 700; }
.send { display: grid; justify-items: center; gap: 2px; margin-top: 6px; padding: 16px; border-radius: 14px; background: var(--navy); color: var(--paper); text-align: center; transition: transform .2s; }
.send:hover { transform: translateY(-1px); }
.send b { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: .06em; }
.send small { font-size: 12px; opacity: .75; letter-spacing: .03em; }
.memo .copy { justify-self: center; background: none; border: 0; padding: 4px; font: inherit; font-size: 13px; color: inherit; text-decoration: underline; text-underline-offset: 3px; opacity: .7; cursor: pointer; }
.memo .status { font-size: 12.5px; text-align: center; }
.memo .status:empty { display: none; }
.memo-side .prev { border-left: 3px solid var(--accent); padding: 12px 16px; background: color-mix(in srgb, var(--steel) 30%, transparent); border-radius: 0 8px 8px 0; }
.memo-side .prev b { display: block; font-size: 11px; letter-spacing: .2em; opacity: .6; margin-bottom: 4px; }
.memo-side .prev pre { margin: 0; font: inherit; font-size: 13.5px; line-height: 1.75; white-space: pre-wrap; word-break: break-all; }
.memo-side .note { font-size: 12px; opacity: .6; text-align: center; }

/* 打設量の横の型枠。手前の板（.fw）は半透明にして、生コン（.cc）の高さを横から見せる */
.form-ill { width: 116px; height: auto; margin-left: auto; overflow: visible; }
.form-ill .fl { fill: color-mix(in srgb, var(--steel) 40%, var(--paper)); }
.form-ill .rb line { stroke: var(--navy); stroke-width: .8; opacity: .45; }
.form-ill .bw { fill: color-mix(in srgb, var(--steel) 70%, var(--paper)); stroke: color-mix(in srgb, var(--navy) 35%, transparent); stroke-width: .6; }
.form-ill .ct { fill: color-mix(in srgb, var(--steel) 70%, var(--accent)); }
.form-ill .cf { fill: color-mix(in srgb, var(--steel) 40%, var(--accent)); }
.form-ill .cr { fill: color-mix(in srgb, var(--steel) 22%, var(--accent)); }
.form-ill .fw { fill: var(--accent); fill-opacity: .14; stroke: var(--navy); stroke-width: 1; stroke-linejoin: round; }
.form-ill .rim { fill: none; stroke: var(--navy); stroke-width: 1.2; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .chips button, .send { transition: none; } }

/* 写真（data に photos / special / gallery があるサイトだけ） */
.photo { margin: 0; overflow: hidden; border-radius: 6px; background: color-mix(in srgb, var(--steel) 45%, var(--paper)); }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.about-ph { aspect-ratio: 4 / 3; }

/* ご依頼の流れ: PC は右に写真（縦長）、左に見出しと4つの段取り（2×2）。スマホは 見出し→写真→段取り */
.flow .with-ph { display: grid; grid-template-columns: 1fr minmax(260px, 34%); grid-template-areas: "head ph" "steps ph"; column-gap: clamp(32px, 5vw, 72px); align-items: start; }
.flow .with-ph .flow-head { grid-area: head; }
.flow .with-ph .flow-ph { grid-area: ph; aspect-ratio: 3 / 4; align-self: center; }
.flow .with-ph .steps { grid-area: steps; grid-template-columns: repeat(2, 1fr); column-gap: 32px; }
.flow .with-ph .steps li { padding-right: 0; }
.flow .with-ph .steps li::before { display: none; }
body.dark .flow .photo { background: transparent; }
@media (max-width: 800px) {
  .flow .with-ph { grid-template-columns: 1fr; grid-template-areas: "head" "ph" "steps"; }
  .flow .with-ph .flow-ph { margin-top: 28px; aspect-ratio: 4 / 5; }
  .flow .with-ph .steps { grid-template-columns: 1fr; }
}

/* 特殊工事（事業内容の下の別枠） */
.special { margin-top: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: minmax(220px, 36%) 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; padding-top: clamp(28px, 4vw, 44px); border-top: 1px solid var(--rule); }
.special .photo { aspect-ratio: 4 / 5; }
.special .photo img { object-position: 50% 62%; }
.special .tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .2em; padding: 4px 12px; border: 1.5px solid currentColor; border-radius: 999px; }
.special h3 { margin-top: 14px; font-family: var(--font-display); font-weight: 900; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.45; letter-spacing: .03em; }
.special p { margin-top: 12px; font-size: 14.5px; opacity: .85; max-width: 30em; }
@media (max-width: 700px) { .special { grid-template-columns: 1fr; } }

/* 現場から: PC は4列か3列（--cols、build が決める）、スマホは2列。押すと大きく開く */
.gallery { --gap: clamp(12px, 1.8vw, 22px); margin-top: 36px; display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: var(--gap); container-type: inline-size; }
.gallery li { display: grid; gap: 8px; align-content: start; }
.gallery .shot { display: block; padding: 0; border: 0; border-radius: 6px; overflow: hidden; aspect-ratio: 4 / 3; background: color-mix(in srgb, var(--steel) 45%, var(--paper)); cursor: zoom-in; }
.gallery .shot img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery .shot:hover img { transform: scale(1.04); }
.gallery p { font-size: 12.5px; line-height: 1.6; opacity: .75; }
/* 奇数枚のときは1枚目を2列ぶんの横長に（端が1枠だけ空かないように）。高さはとなりの写真とそろえる */
.gallery.lead li:first-child { grid-column: span 2; }
.gallery.lead li:first-child .shot { aspect-ratio: auto; height: calc((100cqw - (var(--cols, 4) - 1) * var(--gap)) / var(--cols, 4) * 0.75); }
.gallery.lead li:first-child .shot img { object-position: 50% 42%; }
@media (max-width: 800px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery.lead li:first-child .shot { height: auto; aspect-ratio: 16 / 9; }
}

.lb { padding: 0; border: 0; background: transparent; max-width: min(96vw, 1200px); max-height: 92vh; overflow: visible; }
.lb::backdrop { background: color-mix(in srgb, var(--navy) 88%, transparent); }
.lb figure { margin: 0; display: grid; gap: 10px; justify-items: center; }
.lb img { display: block; max-width: min(96vw, 1200px); max-height: calc(92vh - 48px); width: auto; height: auto; border-radius: 4px; }
.lb figcaption { color: var(--paper); font-size: 13.5px; letter-spacing: .04em; }
.lb-x { position: fixed; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--paper); color: var(--navy); font-size: 26px; line-height: 1; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .gallery .shot img { transition: none; } }
