/* 案件の見た目（このファイルだけを案件ごとに書く）
 * 値は DNA.md の実測を tokens.css の変数にしてから使う（色・大きさを直接書かない）
 * 決まり：1つの部品は1か所にだけ書く。末尾に足して上書きしない。!important を使わない
 * 土台（base.css）の指定を変えたいときは、ここで上書きせず、キットの改善として報告する
 */

/* ---- 共通：ロゴ・ラベル・見出し・本文（DNA.md 0.8 の D3〜D5） ---- */
/* 社名（ヘッダー・PC の左の帯）：支給ロゴのオレンジのマークだけを使い、社名はフォントイメージの書体で書く（10-29 責任者指示） */
.brand { display: flex; align-items: center; gap: 0.35em; width: var(--logo-w); font-family: var(--font-head); color: var(--color-main); white-space: nowrap; }
.brand__mark { flex: none; width: calc(var(--mark-h) * 370 / 192); height: var(--mark-h); background: url("assets/logo-mark.png") center / contain no-repeat; }   /* 画像要素にすると土台の .logo img（幅いっぱい）が効くので背景で描く */
.brand__name { display: grid; line-height: 1.15; letter-spacing: 0.04em; }
.brand__pre { font-size: var(--fs-ui); }
.brand__main { font-size: var(--brand-fs); }
.brand--rail { --mark-h: clamp(40px, 4vw, 64px); --brand-fs: clamp(22px, 2.2vw, 34px); gap: 0.5em; width: 100%; }   /* 左の帯の幅（画面の幅に連動）からはみ出さない大きさ */
.brand--rail .brand__pre { font-size: 17px; }
/* 募集要項・エントリーのボタン（ヘッダー・PC の右の帯）も社名と同じ書体。この書体は太さが1つだけなので、太字の合成はさせない */
.hb, .btn { font-family: var(--font-head); font-synthesis: none; }
.head { position: relative; display: grid; gap: var(--sp-1); }
.head--center { justify-items: center; text-align: center; }
/* ラベルの後ろの淡い丸（参考の下層の頭） */
.head--dot::before {
  content: ""; position: absolute; z-index: -1; left: calc(var(--dot) * -0.3); top: calc(var(--dot) * -0.45);
  width: var(--dot); height: var(--dot); border-radius: 50%; background: var(--color-pale);
}
.en-label { font-family: var(--font-en); font-weight: 700; font-size: var(--fs-ui); line-height: 1; letter-spacing: 0.1em; color: var(--color-main); }
.hd { font-family: var(--font-head); font-weight: 400; font-size: var(--fs-head); line-height: var(--lh-head); letter-spacing: var(--ls-head); color: var(--color-main); }
.hd--center { text-align: center; }
.hd--s { font-size: var(--fs-head-s); }
.hd__key { color: var(--color-accent); }
/* 改行は文節の <wbr> だけで折る（iPhone の Safari は auto-phrase が効かない。AGENTS.md 2.13） */
.hd, .txt, .closing, .ask__body { word-break: keep-all; overflow-wrap: anywhere; }
.txt { display: grid; gap: var(--sp-p); }
.txt--center { text-align: center; }
.body { line-height: var(--lh-body); letter-spacing: var(--ls-body); }
.closing { font-family: var(--font-head); font-weight: 400; font-size: var(--fs-close); line-height: var(--lh-head); text-align: center; color: var(--color-main); }

/* ---- 押せる所：上下2本線で挟んだ「くわしく見る　→」（D9） ---- */
.more {
  display: flex; align-items: center; justify-content: space-between; justify-self: center; width: var(--more-w); padding: 0.85em 0.6em;
  font-family: var(--font-head); font-weight: 400; letter-spacing: 0.12em; color: var(--color-main); text-decoration: none;
  border-block: var(--line-w) solid var(--color-main);
}
.more--center { align-self: center; }   /* 中身の並びは縦のフレックスなので justify-self ではなく align-self で中央へ（p3・p8） */
.more__ar { width: 1.3em; height: 1.3em; transition: translate var(--dur-hover) var(--ease-out); }
@media (hover: hover) { .more:hover .more__ar { translate: 0.35em 0; } }

/* ---- p1 町と工場（10-29 責任者指示）：絵は横幅いっぱいで下端にそろえ、左右を切らない（上の空は地と同じ色なので、画面が低いときは空だけが切れる）。
 * 人物は別の絵を絵の中の位置（％）に重ね、常に小さく動かす。本文は絵の上に1行ずつ地の色の帯を敷く ---- */
.town { position: relative; flex: 1 1 auto; min-height: 0; margin-inline: calc(var(--gutter) * -1); overflow: hidden; }
.town__box { position: absolute; inset: auto 0 0 0; aspect-ratio: 1024 / 1536; translate: 0 var(--town-shift); -webkit-mask: var(--town-fade); mask: var(--town-fade); }   /* 下端の草を5%だけ画面の外へ（建物を本文の帯から離す）。上ほど透明にして本文を読ませる（先方修正 10-30①） */
.town__img { display: block; width: 100%; height: 100%; }
.town__p { position: absolute; height: auto; transform-origin: 50% 100%; }
.town__p--family { left: 3.5%; top: 78.3%; width: 23%; animation: town-walk 11s linear infinite, town-step 0.48s ease-in-out infinite alternate; }
.town__p--mech-talk { left: 43%; top: 73.1%; width: 6.25%; animation: town-talk 2.6s ease-in-out infinite alternate; }
.town__p--customer { left: 50.3%; top: 74.1%; width: 5.76%; animation: town-nod 3.4s ease-in-out infinite alternate; }
.town__p--mech-lift { left: 76.4%; top: 72.7%; width: 2.93%; animation: town-work 0.8s ease-in-out infinite alternate; }
.town__p--mech-hood { left: 87.9%; top: 72.8%; width: 5.08%; animation: town-lean 2.2s ease-in-out infinite alternate; }
@keyframes town-walk { 0% { translate: -12% 0; opacity: 0; } 8%, 86% { opacity: 1; } 100% { translate: 60% 0; opacity: 0; } }
@keyframes town-step { to { transform: translateY(-1.6%); } }
@keyframes town-talk { from { transform: rotate(-2deg); } to { transform: rotate(1.5deg); } }
@keyframes town-nod { from { transform: rotate(0deg); } to { transform: rotate(2.5deg); } }
@keyframes town-work { from { transform: translateY(0) rotate(-1deg); } to { transform: translateY(-2%) rotate(1.5deg); } }
@keyframes town-lean { from { transform: rotate(0deg); } to { transform: rotate(5deg); } }
@media (prefers-reduced-motion: reduce) { .town__p { animation: none; } }
.town__txt { position: relative; display: grid; gap: var(--town-gap); padding-inline: var(--gutter); }
/* メインキャッチ＝社名を大きく（見本の画像のとおり 株式会社／宮本モータース）。サブキャッチ＝本文をキャッチの書体で */
.town__catch { font-family: var(--font-head); font-weight: 400; font-size: var(--fs-catch); line-height: 1.3; letter-spacing: 0.06em; color: var(--color-main); }
.town__catch-pre { font-size: 0.62em; }
.town__sub { font-family: var(--font-head); font-synthesis: none; font-size: 1.18em; --lh-body: var(--town-lh); }   /* 本文をひと回り大きく（先方修正 10-30①） */
.town__txt .ln { display: inline; padding: 0.2em 0.45em; background: var(--ground-text); -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* ---- 地のあしらい（先方修正 10-30④）：車・タイヤ・スパナの線画を、かなり薄く大きく1ページに1つ。画面の端から覗かせ、本文の後ろ（.page__inner より下）に置く
 * 形＝.deco--car／--tire／--wrench、置き場所＝.deco--tr（右上）／--br（右下）／--bl（左下）／--tl（左上）／--rb（右下を上げて斜めに全体を見せる。p6 先方修正 10-30「簡素に見える」） ---- */
.deco::before, .deco--pair::after {
  content: ""; position: absolute; z-index: 1; width: calc(var(--deco-w) * var(--deco-k)); aspect-ratio: var(--deco-r); inset: var(--deco-at);
  background: var(--color-deco); -webkit-mask: var(--deco-img) center / contain no-repeat; mask: var(--deco-img) center / contain no-repeat;
  rotate: var(--deco-rot); pointer-events: none;
}
.deco--car { --deco-img: var(--deco-car); --deco-r: 240 / 140; --deco-k: 1.25; }
.deco--tire { --deco-img: var(--deco-tire); --deco-r: 1; --deco-k: 1; }
.deco--wrench { --deco-img: var(--deco-wrench); --deco-r: 240 / 64; --deco-k: 1.3; }
.deco--tr { --deco-at: 9% -24% auto auto; --deco-rot: -14deg; }
.deco--br { --deco-at: auto -22% -7% auto; --deco-rot: 12deg; }
.deco--bl { --deco-at: auto auto -6% -24%; --deco-rot: -10deg; }
.deco--tl { --deco-at: 10% auto auto -26%; --deco-rot: 18deg; }
.deco--rb { --deco-at: auto -10% 7% auto; --deco-rot: -28deg; }
/* 2本目の工具を上部に（p6 先方修正 10-30「上部が空いていて簡素に見える」→ スパナ系をもう1つ）。形は両口スパナ、左上から覗かせ、右下の1本目と向きを違える */
.deco--pair::after { --deco-img: var(--deco-spanner); --deco-r: 240 / 64; --deco-k: 1.15; --deco-at: 11% auto auto -16%; --deco-rot: 21deg; }

/* ---- p4〜p9（10-29 全ページ化）：写真カード・線画・メリットの番号・消す線・2つの道・願いの一文 ---- */
.hd--l { font-size: calc(var(--fs-head) * 1.4); }
.merit { display: inline-flex; align-items: center; gap: 0.5em; font-size: var(--fs-ui); letter-spacing: 0.1em; color: var(--color-accent); }
.merit::after { content: ""; width: 2.4em; height: var(--line-w); background: currentColor; }
.photo { margin-inline: calc(var(--gutter) * -0.4); }
.photo__img { display: block; width: 100%; height: var(--photo-h); object-fit: cover; border-radius: var(--radius-box); }
/* p4：写真の下端に、仕事の4つ（点検・整備・車検・修理）を線のアイコンにして参考の丸に入れ、半分重ねて手描きの線でつなぐ（飾り。本文と同じ語を重ねないよう文字にしない。10原則5） */
.photo--work { position: relative; margin-bottom: calc(var(--step-d) * 0.5); }
.steps { position: absolute; inset: auto 4% calc(var(--step-d) * -0.5); display: flex; justify-content: space-between; list-style: none; }
.steps__i { display: grid; place-items: center; width: var(--step-d); height: var(--step-d); color: var(--color-main); background: var(--color-base); border: var(--line-w) solid var(--color-main); border-radius: 50%; }
.steps__ic { width: 46%; height: 46%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.steps__i:nth-child(2) { --pf-delay: 120ms; }
.steps__i:nth-child(3) { --pf-delay: 240ms; }
.steps__i:nth-child(4) { --pf-delay: 360ms; }
.steps__line { position: absolute; left: 8%; right: 8%; bottom: 0; width: 84%; height: 1em; translate: 0 50%; overflow: visible; }
.steps__line path { fill: none; stroke: var(--color-main); stroke-width: var(--line-w); stroke-linecap: round; vector-effect: non-scaling-stroke; --pf-dur: 900ms; }
.body--lead { font-family: var(--font-head); font-size: 1.12em; line-height: 1.8; color: var(--color-main); }
.illust { position: relative; }
.illust__img { display: block; width: 100%; height: var(--illust-h); object-fit: contain; }
.illust--s { --illust-h: var(--illust-h-s); }
.illust--xs { --illust-h: var(--illust-h-xs); }
.illust--way { --illust-h: var(--illust-h-way); }
.strike { font-family: var(--font-head); font-size: 1.2em; line-height: 1.6; color: var(--color-main); }
.strike__q { position: relative; z-index: 0; display: inline-block; }
/* 「〜だから偉い。」に、ページに入ってから緑の線を左から引いて消す（飾りの線は疑似要素で描く。AGENTS.md 2.8） */
.strike__q::after {
  content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: 42%; height: 0.2em; border-radius: 0.1em;   /* 先方修正 10-30②：色を濃くした分、線を細くして字を読ませる */
  background: var(--strike-band); transform-origin: 0 50%; scale: 0 1; transition: scale 500ms var(--ease-out);
}
.strike__q.is-on::after { scale: 1 1; transition-delay: 450ms; }
.strike__q.is-on + br + .strike__q.is-on::after { transition-delay: 800ms; }
@media (prefers-reduced-motion: reduce) { .strike__q::after { scale: 1 1; transition: none; } }
.way { display: grid; gap: var(--sp-way); padding-left: 1em; border-left: var(--line-w) solid var(--color-accent); }
.way__item { display: grid; gap: var(--sp-1); }
.way__tag { display: flex; align-items: center; gap: 0.4em; font-family: var(--font-head); font-size: 1.1em; line-height: 1.3; color: var(--color-main); }
.way__tag::before { content: ""; width: 0.55em; height: 0.55em; background: var(--color-accent); }
.wish { display: block; font-family: var(--font-head); font-size: 1.45em; line-height: 1.5; color: var(--color-accent); }
.ln--key { font-family: var(--font-head); font-size: 1.1em; color: var(--color-main); }
.page--dots .illust::before {
  content: ""; position: absolute; z-index: -1; left: 12%; top: -8%;
  width: calc(var(--illust-h) * 0.9); height: calc(var(--illust-h) * 0.9); border-radius: 50%; background: var(--color-pale);
}

/* ---- p2 問いかけ：白の面＋ロゴの「Love cars?」と同じ吹き出し（シート F4）＋線画の後ろの淡い丸 ---- */
.page--white { background: var(--color-white); }
.ask { position: relative; display: grid; justify-items: center; gap: var(--sp-1); }
.ask__list { display: grid; gap: calc(var(--tail) + var(--sp-1)); width: 100%; list-style: none; }
.ask__q:nth-child(1) { justify-self: start; --pf-delay: 200ms; --pf-float-phase: -1200ms; }
.ask__q:nth-child(2) { justify-self: end; --pf-delay: 320ms; --pf-float-phase: -2600ms; }
.ask__q:nth-child(2) .ask__body::after { left: 78%; }
.ask__q:nth-child(3) { justify-self: center; --pf-delay: 440ms; }
/* 参考の淡い丸（あしらい）：参考と同じく線画の後ろに少しずらして1つ＋見出しの右上の空き（画面の端にかかる）に1つ。文字・吹き出しには重ねない */
.page--dots .head::after {
  content: ""; position: absolute; z-index: -1; right: calc(var(--gutter) * -1 - var(--dot) * 0.45); top: 0.4em;
  width: var(--dot); height: var(--dot); border-radius: 50%; background: var(--color-pale);
}
.page--dots .ask__fig::before {
  content: ""; position: absolute; z-index: -1; left: calc(50% - var(--talk-h) * 1.05); top: -6%;
  width: calc(var(--talk-h) * 0.95); height: calc(var(--talk-h) * 0.95); border-radius: 50%; background: var(--color-pale);
}
.ask__body {
  position: relative; display: block; padding: 0.45em 1em;
  font-weight: 700; line-height: 1.6; color: var(--color-main);
  background: var(--color-white); border: var(--line-w) solid var(--color-main); border-radius: var(--radius-bubble);
}
.ask__body::after {
  content: ""; position: absolute; left: 22%; bottom: calc(var(--tail) * -0.5 - var(--line-w) * 0.5);
  width: var(--tail); height: var(--tail); translate: -50% 0; rotate: 45deg;
  background: var(--color-white); border-right: var(--line-w) solid var(--color-main); border-bottom: var(--line-w) solid var(--color-main);
}
.ask__fig { position: relative; width: 100%; }
.ask__img { display: block; width: 100%; height: var(--talk-h); object-fit: contain; }

/* ---- p3 コンセプト：横一本の線（SVG・描かれる）＋横並びの整備士（R3） ---- */
.row { position: relative; margin-inline: calc(var(--gutter) * -1); }
.row__line { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: var(--row-line-h); overflow: visible; }
.row__line path { fill: none; stroke: var(--color-accent); stroke-width: var(--line-w); stroke-linecap: round; vector-effect: non-scaling-stroke; }
.row__fig { position: relative; }
.row__img { display: block; width: 100%; height: auto; max-height: var(--row-h); object-fit: contain; object-position: center bottom; --pf-dist: 64px; --pf-dur: 900ms; }

/* ---- 下層ページの頭（D6）：淡い地・右上に大きな線画・下端は波形 ---- */
.sub-head {
  position: relative; display: grid; align-content: end; min-height: calc(var(--sub-h) - var(--header-h)); margin-inline: calc(var(--gutter) * -1);
  padding: 1em var(--gutter) 3.2em; background: var(--color-pale);
  -webkit-mask: var(--wave-bottom); mask: var(--wave-bottom);
}
.sub-head__art { position: absolute; right: 0; top: 0; width: 72%; height: auto; --pf-y-from: 1; --pf-dur: 1100ms; }
.sub-head .head--dot::before { background: var(--color-base); }

/* ---- 工場の写真：上下を波形に切った全幅の帯（D12・参考 R4） ---- */
.band { margin-inline: calc(var(--gutter) * -1); -webkit-mask: var(--wave-both); mask: var(--wave-both); }
.band__img { display: block; width: 100%; height: var(--band-h); object-fit: cover; }

/* ---- 募集要項の表（D7）：項目名＝濃い焦げ茶の帯・値＝白地。全体を角丸の白い箱 ---- */
.spec { overflow: hidden; background: var(--color-white); border-radius: var(--radius-box); box-shadow: 0 0 0 1px var(--color-line); }
.spec__dt { padding: 0.55em 1em; font-weight: 700; text-align: center; letter-spacing: 0.06em; color: var(--color-on-dark); background: var(--color-main); }
.spec__dd { padding: 1.1em 1.2em 1.3em; line-height: 2; letter-spacing: 0.06em; font-weight: 500; }


/* ---- エントリーのフォーム（D8）：項目名＋丸札・点線の区切り・角の入力欄・角丸の送信 ---- */
.ef-form { display: grid; gap: 0; }
.ef { padding-block: 1.3em; border-bottom: 2px dotted var(--color-line); }
.ef__label { font-size: var(--fs-label); font-weight: 500; letter-spacing: 0.06em; }
.badge {
  display: inline-block; padding: 0.15em 0.85em; font-size: var(--fs-ui); line-height: 1.5; letter-spacing: 0.08em;
  color: var(--color-on-dark); background: var(--color-accent-2); border: 1px solid var(--color-accent-2); border-radius: var(--radius-pill);
}
.badge--opt { color: var(--color-accent-2); background: var(--color-white); }
.ef__submit { display: inline-flex; align-items: center; justify-content: center; gap: 1em; margin-top: 1.6em; font-family: var(--font-head); font-weight: 400; letter-spacing: 0.12em; }

/* ---- オープニング（D10）：タイヤから出た一本の線が、社名の輪郭を一筆でなぞる（参考：糸玉→社名。描き終えて約0.2秒で抜ける。全体 約2.2秒） ---- */
.intro {
  position: fixed; inset: 0; z-index: 100; display: grid; place-content: center;
  background: var(--color-base); animation: intro-out 0.4s ease var(--intro-out, 1.8s) forwards;
}
.intro__svg { width: min(86vw, 560px); height: auto; overflow: visible; }
.intro__ln {
  fill: none; stroke: var(--color-main); stroke-width: var(--line-w); stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 1;
}
.intro.is-on .intro__ln { animation: intro-draw var(--ln-dur, 0.3s) linear var(--ln-at, 0s) forwards; }
@keyframes intro-draw { to { stroke-dashoffset: 0; } }
@keyframes intro-out { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .intro { display: none; } }

/* ---- PC の左右の帯：同じ線画を下に大きく置いて漂わせる（AGENTS.md 2.9。会社名・ボタンには重ねない） ---- */
.rail-art { position: absolute; left: 6%; right: 6%; bottom: 6dvh; opacity: 0.85; --pf-dur: 4.8s; }
.rail-art--r { --pf-delay: -2.4s; }
.rail-art__img { display: block; width: 100%; height: auto; }
