*, *::before, *::after { box-sizing: border-box; }

/* 方向：図面と仕様書。紺 1 色とスチールグレー、表と数値が主役、左揃えで詰めて組む */
:root {
  --paper: #ffffff;
  --steel-1: #f1f3f5;
  --steel-2: #e2e6ea;
  --ink: #18212b;
  --ink-2: #3f4a56;
  --ink-3: #5a6571;
  --line: rgba(24, 33, 43, .14);
  --line-strong: rgba(24, 33, 43, .7);
  --navy: #1b2f4a;
  --navy-deep: #13223a;
  --sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Meiryo", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, 0, 0, 1);
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
}

h1, h2, h3 { line-height: 1.4; margin: 0; font-weight: 600; }
p { margin: 0 0 12px; }
a:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.section-dark a:focus-visible, .site-footer a:focus-visible { outline-color: #fff; }

.container { width: min(1160px, 100% - 48px); margin-inline: auto; }
.fake { font-size: .55em; font-weight: 400; color: inherit; opacity: .72; }

/* header */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--line-strong); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--navy); text-decoration: none; white-space: nowrap; }
.logo svg { width: 28px; height: 28px; flex-shrink: 0; }
.nav { display: flex; gap: 24px; align-items: center; font-size: .875rem; }
.nav a { color: var(--ink-2); text-decoration: none; transition: color 160ms var(--ease); }
.nav a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 4px; }
.nav .nav-cta { background: var(--navy); color: #fff; padding: 8px 16px; border-radius: 4px; transition: background-color 160ms var(--ease); }
.nav .nav-cta:hover { background: var(--navy-deep); color: #fff; text-decoration: none; }

/* hero */
.hero { background: var(--steel-1); border-bottom: 1px solid var(--line); padding: 72px 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero-label { font-size: .875rem; color: var(--ink-3); margin-bottom: 16px; padding-left: 12px; border-left: 2px solid var(--navy); line-height: 1.4; }
.hero h1 { font-size: clamp(1.875rem, 4.4vw, 2.875rem); color: var(--navy); margin-bottom: 24px; }
.hero-lead { font-size: clamp(1rem, 2vw, 1.125rem); color: var(--ink-2); margin: 0; max-width: 32em; }

.drawing { margin: 0; background: var(--paper); border: 1px solid var(--line-strong); padding: 16px; }
.drawing svg { display: block; width: 100%; height: auto; }
.d-grid path { stroke: rgba(24, 33, 43, .07); stroke-width: 1; fill: none; }
.d-part rect, .d-part path { fill: var(--steel-2); stroke: var(--navy); stroke-width: 2; }
.d-part path { fill: none; }
.d-center path { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 16 4 2 4; fill: none; }
.d-dim path { stroke: var(--ink-3); stroke-width: 1; fill: none; }
.d-dim .d-arrow { fill: var(--ink-3); stroke: none; }
.d-text text { font-family: var(--mono); font-size: 17px; fill: var(--ink-2); }
.d-text .d-tol { fill: var(--navy); }

/* sections */
section[id] { scroll-margin-top: 68px; }
.section { padding: 88px 0; }
.section-alt { background: var(--steel-1); }
.section-dark { background: var(--navy); color: #fff; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; padding-bottom: 12px; border-bottom: 1px solid var(--line-strong); }
.section-title { font-size: 1.5rem; }
.stats-note { font-size: .8125rem; color: var(--ink-3); margin: 0; }

/* business */
.business { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.biz { padding: 4px 32px 0 0; }
.biz + .biz { padding-left: 32px; border-left: 1px solid var(--line); }
.icon { width: 24px; height: 24px; fill: none; stroke: var(--navy); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; margin-bottom: 12px; }
.biz h3 { font-size: 1.125rem; color: var(--navy); margin-bottom: 8px; }
.biz p { color: var(--ink-2); font-size: .9375rem; margin: 0; }

/* stats */
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: var(--paper); border: 1px solid var(--line); }
.stats li { padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.stats li + li { border-left: 1px solid var(--line); }
.stat-label { font-size: .8125rem; color: var(--ink-3); }
.stat-num { font-size: clamp(2.25rem, 4.6vw, 3.25rem); font-weight: 500; line-height: 1; color: var(--navy); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat-num small { font-size: .875rem; font-weight: 400; color: var(--ink-2); margin-left: 4px; letter-spacing: 0; }

.equipment { margin-top: 48px; }
.equipment h3 { font-size: 1.0625rem; margin-bottom: 12px; }

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; background: var(--paper); font-size: .9375rem; }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.spec-table { border-top: 2px solid var(--navy); }
.spec-table thead th { font-size: .8125rem; font-weight: 400; color: var(--ink-3); background: var(--steel-1); border-bottom: 1px solid var(--line-strong); }
.spec-table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; width: 5em; }
.spec-table tbody tr:hover { background: var(--steel-1); }

/* works */
.works { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.work { border: 1px solid var(--line); border-top: 2px solid var(--navy); padding: 0 0 20px; background: var(--paper); }
.work > *:not(.work-thumb) { margin-left: 20px; margin-right: 20px; }
.work-thumb { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; background: var(--steel-1); border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.t-part { fill: var(--steel-2); stroke: var(--navy); stroke-width: 1.5; stroke-linejoin: round; }
.t-dim { fill: none; stroke: var(--ink-3); stroke-width: 1; }
.t-center { fill: none; stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 10 3 2 3; }
.work-no { font-family: var(--mono); font-size: .8125rem; color: var(--ink-3); margin-bottom: 4px; }
.work-tag { font-size: .8125rem; color: var(--navy); margin-bottom: 4px; }
.work h3 { font-size: 1.0625rem; margin-bottom: 8px; }
.work p:last-child { font-size: .875rem; color: var(--ink-2); margin-bottom: 0; }

/* company */
.company-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.company-table { border-top: 2px solid var(--navy); }
.company-table th { width: 9em; font-weight: 400; color: var(--ink-3); white-space: nowrap; }

/* recruit */
.banner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; padding: 32px 0 32px 24px; border-left: 2px solid var(--navy); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.banner-label { font-size: .8125rem; color: var(--ink-3); margin-bottom: 8px; }
.banner h2 { font-size: 1.375rem; color: var(--navy); margin-bottom: 8px; }
.banner p:last-child { color: var(--ink-2); margin: 0; }
.banner-action { display: grid; gap: 8px; justify-items: start; }

/* buttons */
.btn { display: inline-block; padding: 14px 28px; border-radius: 4px; text-decoration: none; font-weight: 600; font-size: .9375rem; transition: background-color 160ms var(--ease), color 160ms var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-outline { border: 1px solid var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--steel-2); }

/* contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.section-dark .section-title { margin-bottom: 12px; }
.section-dark p { color: #d5dce5; margin: 0; }
.contact-actions { display: grid; gap: 16px; justify-items: start; }
.tel { font-family: var(--mono); font-size: 1.25rem; font-variant-numeric: tabular-nums; color: #fff !important; }
.tel small { display: block; font-family: var(--sans); font-size: .8125rem; color: #b8c4d3; }
.section-dark .stats-note { color: #b8c4d3; }

/* footer */
.site-footer { background: var(--navy-deep); color: #b8c4d3; padding: 32px 0 40px; font-size: .8125rem; }
.site-footer p { margin: 4px 0; }
.site-footer a { color: #fff; }
.sample-label { font-size: .9375rem; font-weight: 600; color: #fff; }

/* 出現：scroll-triggered fade-up（shared/reveal.js） */
.reveal-on [data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity 480ms var(--ease), transform 480ms var(--ease); transition-delay: var(--reveal-delay, 0ms); }
.reveal-on [data-reveal].is-in { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .works { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .drawing { max-width: 560px; }
}

@media (max-width: 760px) {
  .header-inner { height: auto; padding: 8px 0 0; flex-wrap: wrap; row-gap: 0; }
  .nav { gap: 16px; font-size: .8125rem; flex-wrap: wrap; }
  .nav a { padding: 8px 0; }
  .nav .nav-cta { padding: 8px 12px; }
  section[id] { scroll-margin-top: 104px; }
  .business { grid-template-columns: 1fr; }
  .biz, .biz + .biz { padding: 20px 0; border-left: none; border-bottom: 1px solid var(--line); }
  .biz:first-child { padding-top: 0; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats li:nth-child(3) { border-left: none; }
  .stats li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .company-grid, .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .banner { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 480px) {
  .container { width: calc(100% - 40px); }
  .hero { padding: 48px 0; }
  .section { padding: 64px 0; }
  .section-title { font-size: 1.3125rem; }
  .works { grid-template-columns: 1fr; }
  .stats li { padding: 16px; }
  th, td { padding: 10px 12px; }
  .company-table th { width: 6.5em; white-space: normal; }
  .drawing { padding: 8px; }
}

/* 印刷・PDF では出現前の要素も表示する */
@media print {
  .reveal-on [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
