/* ============================================================
   株式会社 鋼進精機 — 精密切削加工
   1本目（税理士法人）とは意図的に別の設計言語：
   白基調→全面ダーク / 明朝→極太ゴシック / 真鍮→産業黄 / 曲線→直角
   ============================================================ */
:root {
  --bg:    #0b0e11;   /* 鋼の黒。純黒だと沈みすぎるので青を数ポイント残す */
  --bg-2:  #12161a;
  --bg-3:  #191e24;
  --line:  #262d35;
  --line-2:#38424e;
  --fg:    #e8ecf0;
  --fg-2:  #9aa5b1;
  --fg-3:  #6d7883;
  --acc:   #f2c200;   /* 工作機械の黄。安全色由来でこの業種の実物から取った色 */
  --acc-2: #ffdf5c;
  --steel: #6b93b5;

  --sec-y: clamp(72px, 9vw, 132px);
  --gut:   clamp(18px, 4vw, 40px);
  --wrap:  1280px;

  --sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
  --cond: "Barlow Condensed", "Noto Sans JP", sans-serif;
  --ease: cubic-bezier(.2,.7,.3,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-weight: 400; font-size: 15px;
  line-height: 1.85; letter-spacing: .03em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
h1, h2, h3, h4 {
  margin: 0; font-weight: 900; line-height: 1.42; letter-spacing: .02em;
  font-feature-settings: "palt"; text-wrap: balance;
}
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }

.wrap { width: min(100% - var(--gut) * 2, var(--wrap)); margin-inline: auto; }
.sec  { padding-block: var(--sec-y); position: relative; }
section[id] { scroll-margin-top: 78px; }
.sec-2 { background: var(--bg-2); }

/* ── セクション見出し：図面の記号のように振る ───────────────── */
.tag {
  display: flex; align-items: center; gap: .9em;
  font-family: var(--cond); font-size: 1rem; font-weight: 500;
  letter-spacing: .26em; color: var(--acc); text-transform: uppercase;
}
.tag .no { color: var(--fg-3); }
.tag::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.h2 { font-size: clamp(1.5rem, 3.2vw, 2.35rem); margin-top: 1.5rem; }
.h2 em { font-style: normal; color: var(--acc); }
.lede { color: var(--fg-2); font-size: .92rem; margin-top: 1.4rem; max-width: 44em; text-wrap: pretty; }

/* ── ボタン ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .9em;
  font-size: .84rem; font-weight: 700; letter-spacing: .1em;
  padding: 1.1em 2.2em; border: 1px solid transparent; cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn .arw { transition: transform .3s var(--ease); }
.btn:hover .arw { transform: translateX(4px); }
.btn-acc  { background: var(--acc); color: #14100a; }
.btn-acc:hover { background: var(--acc-2); }
.btn-line { border-color: var(--line-2); color: var(--fg); }
.btn-line:hover { border-color: var(--acc); color: var(--acc); }

/* ── ヘッダー ─────────────────────────────────────────── */
.hdr {
  position: fixed; inset: 0 0 auto; z-index: 100;
  background: rgba(11,14,17,.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background .3s var(--ease);
}
.hdr::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--acc); }
.hdr.solid { background: rgba(11,14,17,.97); }
.hdr .inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; height: 76px; }
.brand { display: flex; align-items: center; gap: .8rem; }
.brand .mark { width: 30px; height: 30px; flex: 0 0 30px; }
.brand .ja { font-weight: 900; font-size: 1.02rem; letter-spacing: .1em; display: block; line-height: 1.3; }
.brand .en { font-family: var(--cond); font-size: .68rem; letter-spacing: .3em; color: var(--fg-3); display: block; }
.gnav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 1.9rem); }
.gnav a { font-size: .8rem; color: var(--fg-2); transition: color .25s var(--ease); position: relative; padding-block: .3rem; }
.gnav a:hover { color: var(--fg); }
.gnav a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--acc); transition: width .3s var(--ease); }
.gnav a:hover::after { width: 100%; }
.gnav .tel { font-family: var(--cond); font-size: 1.16rem; letter-spacing: .04em; color: var(--fg); }
.gnav .tel::after { display: none; }
.gnav .btn { padding: .85em 1.5em; font-size: .76rem; }
.burger { display: none; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; padding: 0; }
.burger span { display: block; width: 22px; height: 2px; background: var(--fg); margin: 5px auto; transition: .3s var(--ease); }
.burger.on span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.on span:nth-child(2) { opacity: 0; }
.burger.on span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── ヒーロー ─────────────────────────────────────────── */
.hero { position: relative; min-height: min(100vh, 880px); display: flex; align-items: center; padding-top: 76px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(92deg, rgba(11,14,17,.96) 22%, rgba(11,14,17,.62) 58%, rgba(11,14,17,.8) 100%);
}
/* CAD の方眼。図面を扱う会社なので、装飾ではなく業種の記号として敷く */
.grid-ov {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 88px 88px; opacity: .5;
  mask-image: linear-gradient(100deg, #000 30%, transparent 78%);
}
.hero .wrap { position: relative; z-index: 2; min-width: 0; }
.hero-cap { font-family: var(--cond); font-size: 1rem; letter-spacing: .3em; color: var(--acc); display: flex; align-items: center; gap: 1em; flex-wrap: wrap; min-width: 0; }
.hero-cap::before { content: ""; width: 46px; height: 1px; background: currentColor; }
.hero h1 { font-size: clamp(2.1rem, 5.8vw, 4.4rem); line-height: 1.28; margin-top: 1.8rem; letter-spacing: .01em; }
.hero h1 em { font-style: normal; color: var(--acc); }
.hero h1 .u { display: inline-block; border-bottom: 3px solid var(--acc); padding-bottom: .06em; }
.hero p.sub { color: var(--fg-2); font-size: clamp(.88rem, 1.4vw, .98rem); margin-top: 1.9rem; max-width: min(33em, 100%); line-height: 2.1; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.6rem; }
.hero-spec {
  position: absolute; right: var(--gut); bottom: 0; z-index: 2;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line); background: rgba(11,14,17,.78); backdrop-filter: blur(6px);
}
.hero-spec .it { padding: 1.2rem 1.8rem; border-right: 1px solid var(--line); min-width: 0; }
.hero-spec .it:last-child { border-right: 0; }
.hero-spec .l { font-family: var(--cond); font-size: .82rem; letter-spacing: .18em; color: var(--fg-3); }
.hero-spec .v { font-family: var(--cond); font-size: 1.9rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hero-spec .v small { font-size: .5em; color: var(--fg-2); margin-left: .2em; }

/* ── 数値バー ─────────────────────────────────────────── */
.stats { border-block: 1px solid var(--line); background: var(--bg-2); }
.stats .grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats .it { padding: clamp(1.8rem, 3.4vw, 2.8rem) 1.4rem; border-right: 1px solid var(--line); }
.stats .it:last-child { border-right: 0; }
.stats .l { font-family: var(--cond); font-size: .84rem; letter-spacing: .2em; color: var(--fg-3); }
.stats .v { font-family: var(--cond); font-weight: 600; font-size: clamp(2.2rem, 4.6vw, 3.4rem); line-height: 1.1; margin-top: .5rem; font-variant-numeric: tabular-nums; }
.stats .v small { font-size: .38em; color: var(--acc); margin-left: .3em; letter-spacing: .08em; }
.stats .n { color: var(--fg-2); font-size: .76rem; margin-top: .4rem; }

/* ── 技術力 ───────────────────────────────────────────── */
.tech { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); margin-top: clamp(2.6rem, 4vw, 3.8rem); border: 1px solid var(--line); }
.tech .it { background: var(--bg); display: flex; flex-direction: column; }
.tech .ph { aspect-ratio: 4 / 3; overflow: hidden; position: relative; }
.tech .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.tech .it:hover .ph img { transform: scale(1.06); }
.tech .ph .no { position: absolute; left: 0; top: 0; z-index: 2; font-family: var(--cond); font-size: .84rem; letter-spacing: .2em; background: var(--acc); color: #14100a; padding: .3em 1em; font-weight: 600; }
.tech .bd { padding: clamp(1.5rem, 2.4vw, 2.1rem); flex: 1; display: flex; flex-direction: column; }
.tech h3 { font-size: 1.16rem; }
.tech .en { font-family: var(--cond); font-size: .84rem; letter-spacing: .2em; color: var(--fg-3); margin-top: .5rem; }
.tech p { color: var(--fg-2); font-size: .86rem; margin-top: 1.2rem; line-height: 2; }
.tech dl { margin: 1.6rem 0 0; padding-top: 1.3rem; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; gap: .55rem 1.2rem; font-size: .8rem; }
.tech dt { color: var(--fg-3); font-family: var(--cond); letter-spacing: .12em; font-size: .88rem; }
.tech dd { margin: 0; color: var(--fg); font-variant-numeric: tabular-nums; }

/* ── 対応範囲マトリクス ───────────────────────────────── */
.matrix-wrap { margin-top: clamp(2.4rem, 4vw, 3.4rem); overflow-x: auto; border: 1px solid var(--line); }
table.matrix { min-width: 720px; font-size: .84rem; }
table.matrix th, table.matrix td { border: 1px solid var(--line); padding: .85rem 1rem; text-align: center; }
table.matrix thead th { background: var(--bg-3); font-family: var(--cond); font-size: .95rem; letter-spacing: .14em; color: var(--fg-2); font-weight: 500; }
table.matrix tbody th { background: var(--bg-2); text-align: left; font-weight: 700; white-space: nowrap; }
table.matrix td { color: var(--fg-3); font-size: 1.05rem; line-height: 1.2; }
table.matrix td.y { color: var(--acc); font-weight: 700; font-size: 1.15rem; }
table.matrix tbody tr:hover th, table.matrix tbody tr:hover td { background: var(--bg-3); }
.matrix-note { display: flex; flex-wrap: wrap; gap: 1.6rem; margin-top: 1.2rem; font-size: .78rem; color: var(--fg-3); }
.matrix-note b { color: var(--acc); }

.range { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 1.6rem; }
.range .it { background: var(--bg); padding: 1.4rem 1.5rem; }
.range .l { font-family: var(--cond); font-size: .86rem; letter-spacing: .16em; color: var(--fg-3); }
.range .v { font-family: var(--cond); font-size: 1.5rem; font-weight: 600; margin-top: .3rem; font-variant-numeric: tabular-nums; }

/* ── 加工事例 ─────────────────────────────────────────── */
.works { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: clamp(2.6rem, 4vw, 3.8rem); }
.work { background: var(--bg); position: relative; }
.work .ph { aspect-ratio: 1 / 1; overflow: hidden; background: var(--bg-3); }
.work .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.work:hover .ph img { transform: scale(1.05); }
.work .bd { padding: 1.4rem 1.5rem 1.7rem; }
.work .cat { font-family: var(--cond); font-size: .82rem; letter-spacing: .18em; color: var(--acc); }
.work h3 { font-size: 1rem; margin-top: .5rem; }
.work dl { margin: 1.1rem 0 0; display: grid; grid-template-columns: 5.2em 1fr; gap: .4rem .8rem; font-size: .78rem; }
.work dt { color: var(--fg-3); }
.work dd { margin: 0; color: var(--fg-2); font-variant-numeric: tabular-nums; }

/* ── 設備一覧 ─────────────────────────────────────────── */
.equip-in { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4vw, 3.4rem); align-items: start; margin-top: clamp(2.4rem, 4vw, 3.4rem); }
.equip-ph img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border: 1px solid var(--line); }
.equip-ph .cap { font-size: .76rem; color: var(--fg-3); margin-top: .8rem; font-family: var(--cond); letter-spacing: .12em; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); }
table.tbl { min-width: 560px; font-size: .82rem; }
table.tbl th, table.tbl td { padding: .8rem 1rem; border-bottom: 1px solid var(--line); text-align: left; }
table.tbl thead th { background: var(--bg-3); font-family: var(--cond); font-size: .92rem; letter-spacing: .14em; color: var(--fg-2); font-weight: 500; white-space: nowrap; }
table.tbl tbody th { font-weight: 700; white-space: nowrap; }
table.tbl td { color: var(--fg-2); font-variant-numeric: tabular-nums; }
table.tbl td.num { text-align: right; white-space: nowrap; }
table.tbl tbody tr:last-child th, table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover td, table.tbl tbody tr:hover th { background: var(--bg-2); }

/* ── 品質 ─────────────────────────────────────────────── */
.qa-in { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 4.4vw, 4rem); align-items: center; }
.qa-ph img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line); }
.qa-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 2rem; }
.qa-list .it { background: var(--bg); padding: 1.3rem 1.5rem; display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: baseline; }
.qa-list .k { font-family: var(--cond); font-size: .88rem; letter-spacing: .16em; color: var(--acc); white-space: nowrap; }
.qa-list h3 { font-size: .96rem; }
.qa-list p { color: var(--fg-2); font-size: .82rem; margin-top: .4rem; line-height: 1.95; }
.badge-row { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.8rem; }
.badge { border: 1px solid var(--line-2); padding: .5em 1.1em; font-family: var(--cond); font-size: .88rem; letter-spacing: .12em; color: var(--fg-2); }

/* ── 流れ ─────────────────────────────────────────────── */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: clamp(2.4rem, 4vw, 3.4rem); }
.flow .st { background: var(--bg); padding: clamp(1.5rem, 2.6vw, 2.2rem); display: flex; flex-direction: column; }
.flow .no { font-family: var(--cond); font-size: 2.4rem; font-weight: 600; line-height: 1; color: var(--line-2); }
.flow h3 { font-size: 1rem; margin-top: .9rem; }
.flow p { color: var(--fg-2); font-size: .82rem; margin-top: .8rem; line-height: 1.95; }
.flow .day { align-self: flex-start; margin-top: auto; padding-top: 1.4rem; font-family: var(--cond); font-size: .88rem; letter-spacing: .12em; color: var(--acc); }

/* ── 会社概要 ─────────────────────────────────────────── */
.co-in { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4vw, 3.6rem); align-items: start; margin-top: clamp(2.4rem, 4vw, 3.4rem); }
.co-ph img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border: 1px solid var(--line); }

/* ── CTA ──────────────────────────────────────────────── */
.cta { position: relative; overflow: hidden; border-top: 1px solid var(--line); }
.cta .bg { position: absolute; inset: 0; }
.cta .bg img { width: 100%; height: 100%; object-fit: cover; }
.cta .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,14,17,.93), rgba(11,14,17,.97)); }
.cta .wrap { position: relative; z-index: 2; }
.cta-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.4rem); align-items: center; }
.cta h2 { font-size: clamp(1.5rem, 3.4vw, 2.5rem); }
.cta h2 em { font-style: normal; color: var(--acc); }
.cta p { color: var(--fg-2); font-size: .9rem; margin-top: 1.6rem; line-height: 2.1; }
.cta-box { border: 1px solid var(--line-2); background: rgba(18,22,26,.86); padding: clamp(1.6rem, 3vw, 2.4rem); }
.cta-box .l { font-family: var(--cond); font-size: .88rem; letter-spacing: .2em; color: var(--fg-3); }
.cta-box .tel { font-family: var(--cond); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 600; display: block; margin-top: .3rem; letter-spacing: .03em; }
.cta-box .hr { font-size: .78rem; color: var(--fg-3); }
.cta-box .btn { width: 100%; justify-content: center; margin-top: 1.6rem; }
.cta-box .note { font-size: .76rem; color: var(--fg-3); margin-top: 1rem; line-height: 1.8; }

/* ── フッター ─────────────────────────────────────────── */
.ftr { border-top: 1px solid var(--line); background: var(--bg-2); padding-block: clamp(48px, 6vw, 76px) 0; font-size: .82rem; color: var(--fg-2); }
.ftr-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: clamp(1.8rem, 4vw, 3.6rem); padding-bottom: 2.6rem; }
.ftr .brand { margin-bottom: 1.4rem; }
.ftr .addr { line-height: 2.05; color: var(--fg-2); }
.ftr h4 { font-family: var(--cond); font-size: .92rem; letter-spacing: .2em; color: var(--fg-3); font-weight: 500; margin-bottom: 1.1rem; }
.ftr nav { display: grid; gap: .8rem; }
.ftr nav a:hover { color: var(--acc); }
.ftr-bt { border-top: 1px solid var(--line); padding-block: 1.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem; font-size: .72rem; color: var(--fg-3); }

/* ── スクロール連動 ───────────────────────────────────── */
.rv { opacity: 0; transform: translateY(20px); transition: opacity .85s var(--ease), transform .85s var(--ease); }
.rv.in { opacity: 1; transform: none; }
.rv[data-d="1"] { transition-delay: .1s; }
.rv[data-d="2"] { transition-delay: .2s; }
.rv[data-d="3"] { transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ── レスポンシブ ─────────────────────────────────────── */
@media (max-width: 1080px) {
  .tech, .works, .flow { grid-template-columns: repeat(2, 1fr); }
  .equip-in, .qa-in, .co-in, .cta-in { grid-template-columns: 1fr; }
  .hero-spec { position: static; width: 100%; margin-top: 2.4rem; backdrop-filter: none; }
  .hero { align-items: center; padding-block: 108px 56px; min-height: 0; }
  .stats .grid { grid-template-columns: repeat(2, 1fr); }
  .stats .it:nth-child(2) { border-right: 0; }
  .stats .it:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .burger { display: block; position: relative; z-index: 95; }
  .gnav {
    position: fixed; inset: 0; background: var(--bg); flex-direction: column;
    justify-content: center; gap: 1.9rem; transform: translateX(100%);
    transition: transform .42s var(--ease); z-index: 90;
  }
  .gnav.open { transform: none; }
  .gnav a { font-size: 1rem; }
  .tech, .works, .flow, .range { grid-template-columns: 1fr; }
  .hero-spec { grid-template-columns: 1fr 1fr; }
  .hero-spec .it:last-child { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  /* 縦画面では写真の左端（暗部）しか映らないので、主題の機械側へ寄せる */
  .hero-bg img { object-position: 72% center; }
  .hero-bg::after { background: linear-gradient(180deg, rgba(11,14,17,.9) 10%, rgba(11,14,17,.66) 45%, rgba(11,14,17,.94) 100%); }
  .hero-cap { font-size: .82rem; letter-spacing: .16em; line-height: 1.7; }
  .hero-cap::before { width: 26px; flex: 0 0 26px; }
  .hero-cta { gap: .7rem; }
  .hero-cta .btn { flex: 1 1 100%; justify-content: center; padding: 1.05em 1.2em; }
  .hero-spec .it { border-right: 0; border-bottom: 1px solid var(--line); }
  .hero-spec .it:last-child { border-bottom: 0; }
  .ftr-top { grid-template-columns: 1fr; }
}
