/* corp-3d: 揚重・建設向けコーポレート（トップ1枚）。色は build.mjs が data.json から :root に差し込む */
:root {
  --navy: #1a1a1a;
  --paper: #f7f6f2;
  --accent: #4f4d48;
  --steel: #c9c7c1;
  --ink: var(--navy);
  --rule: color-mix(in srgb, var(--navy) 16%, transparent);
  --font-display: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-body: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --gutter: clamp(20px, 5vw, 64px);
  --max: 1160px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-weight: 400; font-size: 15px; line-height: 1.9; letter-spacing: 0.03em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background-color .6s ease, color .6s ease;
}
body.dark { background: var(--navy); color: var(--paper); }
body.dark .header { background: color-mix(in srgb, var(--navy) 88%, transparent); border-color: color-mix(in srgb, var(--paper) 14%, transparent); }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
h1, h2, h3, p, dl, dd, dt, ul { margin: 0; }
ul { padding: 0; list-style: none; }
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }

/* loader */
.loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--paper); transition: opacity .5s ease, visibility .5s; }
.loader.done { opacity: 0; visibility: hidden; }
.loader .word { font-family: var(--font-display); font-weight: 900; font-size: clamp(40px, 9vw, 96px); letter-spacing: 0.06em; color: var(--navy); line-height: 1; }
.loader .word span { display: inline-block; opacity: 0; transform: translateY(0.3em); animation: stamp .45s cubic-bezier(.2,.8,.2,1) forwards; }
.loader .bar { width: clamp(80px, 12vw, 140px); height: 3px; background: var(--accent); margin-top: 20px; transform-origin: left; animation: grow 1.1s ease .2s both; }
@keyframes stamp { to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* header */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; gap: 24px; padding: 14px var(--gutter); background: color-mix(in srgb, var(--paper) 86%, transparent); border-bottom: 1px solid var(--rule); transition: background-color .6s, border-color .6s; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .mark { width: 36px; height: 36px; flex: none; }
.brand b { display: block; font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: 0.08em; line-height: 1.2; }
.brand small { display: block; font-size: 9px; letter-spacing: 0.3em; opacity: .55; }
.nav { display: flex; gap: clamp(16px, 2.4vw, 32px); margin-left: auto; font-size: 13px; letter-spacing: 0.06em; }
.nav a { display: inline-flex; gap: 6px; align-items: baseline; }
.nav a i { font-style: normal; font-size: 10px; color: var(--accent); font-weight: 700; }
.tel { text-align: right; line-height: 1.3; }
.tel b { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: 0.04em; }
.tel small { display: block; font-size: 9.5px; letter-spacing: 0.2em; opacity: .6; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 26px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; letter-spacing: 0.08em; border: 0; cursor: pointer; transition: transform .2s, filter .2s; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn.ghost { background: transparent; color: inherit; border: 1.5px solid currentColor; }
@media (min-width: 901px) { .header { backdrop-filter: blur(10px); } }
@media (max-width: 900px) { .header { background: var(--paper); } body.dark .header { background: var(--navy); } .nav, .tel { display: none; } .header .btn { margin-left: auto; padding: 10px 18px; font-size: 13px; } }

/* hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; }
/* canvas はページと一緒にスクロールさせない（固定して中身だけ動かす。スマホのカクつき対策、ステラと同じ） */
.hero canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; z-index: 0; pointer-events: none; will-change: opacity; }
body.lift-on .hero { z-index: 55; }   /* スマホ: 紋章になった建物をヘッダー（z 50）の上に出す。下の固定バー（60）よりは下 */
@media (min-width: 901px) { .hero { z-index: 3; } }   /* PC: 建物が写真枠の後ろに隠れて切れないよう、いつも手前（右上の余白にいるので本文には重ならない） */
.hero .grid { position: absolute; inset: 0; z-index: 1; background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px); background-size: 72px 72px; opacity: .35; mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent); }
.hero .wrap { position: relative; z-index: 2; width: 100%; padding-top: 110px; padding-bottom: 80px; }
.hero h1 { font-family: var(--font-display); font-weight: 900; font-size: clamp(40px, 7.2vw, 96px); line-height: 1.14; letter-spacing: 0.02em; max-width: 12em; }
.hero h1 span { display: block; opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.hero.in h1 span { opacity: 1; transform: none; }
.hero.in h1 span:nth-child(2) { transition-delay: .12s; } .hero.in h1 span:nth-child(3) { transition-delay: .24s; }
.hero .lead { margin-top: 28px; padding-left: 20px; border-left: 3px solid var(--accent); font-family: var(--font-display); font-weight: 700; font-size: clamp(16px, 2vw, 22px); line-height: 1.7; max-width: 24em; }
.hero .sub { margin-top: 18px; max-width: 34em; font-size: 15px; opacity: .85; }
.hero .scroll { z-index: 2; position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); font-size: 10px; letter-spacing: 0.3em; opacity: .5; display: grid; justify-items: center; gap: 8px; }
.hero .scroll::after { content: ""; width: 1px; height: 36px; background: currentColor; animation: drop 1.6s ease-in-out infinite; }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@media (max-width: 900px) { .hero .grid { display: none; } }
/* 3D の代わりの静止画（reduced-motion・WebGL なし・three.js が読めないとき） */
.hero .still { display: none; position: absolute; z-index: 1; right: max(var(--gutter), calc(50% - var(--max) / 2 + var(--gutter))); top: 50%; width: min(30vw, 400px); transform: translateY(-16%); pointer-events: none; }
.hero.still-on .still { display: block; }
.hero.still-on canvas { display: none; }
@media (max-width: 900px) { .hero .still { top: auto; bottom: 90px; right: 3vw; width: 38vw; transform: none; opacity: .45; } }

/* sections */
section { scroll-margin-top: 80px; position: relative; z-index: 1; }
/* セクション背景の大きな英字の透かし。fx.js がスクロールに合わせて --wm（-1〜1）を入れ、少しだけ横に流す */
section[data-wm] { overflow-x: clip; }
section[data-wm]::before {
  content: attr(data-wm); position: absolute; z-index: -1; top: clamp(12px, 3vw, 40px); right: calc(var(--gutter) * 0.6);
  font-family: var(--font-display); font-weight: 900; line-height: 1; letter-spacing: -0.01em; white-space: nowrap;
  font-size: min(15vw, 200px, calc(84vw / (var(--n, 8) * 0.72)));   /* 文字数から、画面幅に収まる大きさにする */
  color: currentColor; opacity: .045; pointer-events: none; user-select: none;
  transform: translateX(calc(var(--wm, 0) * 3vw)); will-change: transform;
}
.contact[data-wm]::before { top: auto; bottom: clamp(12px, 3vw, 40px); }
.footer { position: relative; z-index: 1; }
.blk { padding-block: clamp(72px, 10vw, 140px); }
.eyebrow { display: flex; align-items: center; gap: 14px; font-size: 11px; letter-spacing: 0.28em; opacity: .6; margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--accent); }
.blk h2 { font-family: var(--font-display); font-weight: 900; font-size: clamp(26px, 3.6vw, 40px); line-height: 1.35; letter-spacing: 0.02em; }
h2 em { font-style: normal; color: var(--accent); }
.two { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 800px) { .two { grid-template-columns: 1fr; } }
.intro p { font-size: 15.5px; max-width: 34em; }
.ph { aspect-ratio: 4/3; background: color-mix(in srgb, var(--steel) 55%, var(--paper)); border: 1px dashed var(--rule); display: grid; place-items: center; color: color-mix(in srgb, var(--navy) 55%, transparent); font-size: 12px; letter-spacing: .12em; border-radius: 6px; }
body.dark .ph { background: color-mix(in srgb, var(--paper) 8%, transparent); color: color-mix(in srgb, var(--paper) 55%, transparent); border-color: color-mix(in srgb, var(--paper) 25%, transparent); }

/* numbers (dark) */
.numbers { padding-block: clamp(72px, 10vw, 140px); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 40px; border-top: 1px solid color-mix(in srgb, var(--paper) 22%, transparent); }
.stat { padding: 32px 24px 32px 0; border-bottom: 1px solid color-mix(in srgb, var(--paper) 22%, transparent); }
.stat .l { font-size: 12px; letter-spacing: .2em; opacity: .65; }
.stat .v { font-family: var(--font-display); font-weight: 900; font-size: clamp(44px, 6vw, 84px); line-height: 1.1; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; margin-top: 6px; }
.stat .v small { font-size: .38em; font-weight: 700; margin-left: .15em; }
.stat .v.txt { font-size: clamp(26px, 3vw, 40px); line-height: 1.3; padding-top: .35em; }
.stat .n.tmp { color: var(--accent); font-weight: 700; }
.stat .n { font-size: 12.5px; opacity: .7; margin-top: 8px; }
@media (max-width: 800px) { .stats { grid-template-columns: 1fr; } .stat { padding: 22px 0; } }

/* business */
.biz { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 3vw, 40px); margin-top: 40px; }
.biz article { display: grid; gap: 14px; }
.biz h3 { font-family: var(--font-display); font-weight: 900; font-size: 22px; letter-spacing: .04em; display: flex; align-items: baseline; gap: 12px; }
.biz h3::before { content: ""; width: 10px; height: 10px; background: var(--accent); flex: none; transform: translateY(-2px); }
.biz p { font-size: 14.5px; opacity: .85; max-width: 30em; }
.biz .ph { aspect-ratio: 16/10; }
@media (max-width: 700px) { .biz { grid-template-columns: 1fr; } }

/* safety */
.safety .list { margin-top: 36px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; border-top: 1px solid var(--rule); }
.safety .list li { padding-top: 22px; }
.safety h3 { font-family: var(--font-display); font-weight: 900; font-size: 18px; letter-spacing: .04em; margin-bottom: 8px; }
.safety p { font-size: 14px; opacity: .85; }
@media (max-width: 700px) { .safety .list { grid-template-columns: 1fr; gap: 20px; } }

/* recruit band */
.recruit { background: var(--navy); color: var(--paper); padding-block: clamp(64px, 8vw, 110px); position: relative; overflow: hidden; }
.recruit::after { content: ""; position: absolute; right: -8%; top: -30%; width: 42%; aspect-ratio: 1; background: var(--accent); transform: rotate(18deg); opacity: .9; clip-path: polygon(0 40%, 100% 0, 100% 60%, 0 100%); }
.recruit .wrap { position: relative; z-index: 1; display: grid; gap: 16px; max-width: 760px; margin-inline: auto var(--gutter); }
.recruit h2 { font-family: var(--font-display); font-weight: 900; font-size: clamp(24px, 3.2vw, 36px); line-height: 1.4; }
.recruit p { max-width: 30em; opacity: .9; }
.recruit .btn { justify-self: start; margin-top: 8px; }
@media (min-width: 900px) { .recruit .wrap { margin-inline: auto; } }

/* contact */
.contact .two { align-items: stretch; }
.contact .ways { display: grid; gap: 14px; margin-top: 28px; }
.way { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 18px 22px; border: 1px solid var(--rule); border-radius: 10px; }
.way .k { font-size: 11px; letter-spacing: .2em; opacity: .6; width: 4.5em; }
.way .v { font-family: var(--font-display); font-weight: 900; font-size: clamp(22px, 3vw, 30px); letter-spacing: .03em; line-height: 1.2; }
.way .v small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 12px; opacity: .65; letter-spacing: .08em; margin-top: 4px; }
.company { border-top: 1px solid var(--rule); }
.company div { display: grid; grid-template-columns: 7em 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.company dt { font-weight: 700; opacity: .75; }

/* スマホ下固定の電話／LINE（機会損失を防ぐ。PC では出さない） */
.fab { display: none; }
@media (max-width: 900px) {
  .fab { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--rule); border-top: 1px solid var(--rule); padding-bottom: env(safe-area-inset-bottom); }
  .fab a { display: grid; justify-items: center; gap: 1px; padding: 10px 8px 9px; background: var(--accent); color: #fff; text-align: center; line-height: 1.2; }
  .fab a.line { background: #06c755; }
  .fab a.alt { background: var(--navy); }
  body.dark .fab a.alt { background: var(--paper); color: var(--navy); }   /* 紺の背景で溶けないように */
  .fab b { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: .06em; }
  .fab small { font-size: 10px; opacity: .85; letter-spacing: .04em; }
  body { padding-bottom: 60px; }
  .footer { padding-bottom: 72px; }
}

/* footer */
.footer { padding: 32px var(--gutter) 40px; border-top: 1px solid var(--rule); font-size: 12px; opacity: .7; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* reveal: 「吊り上げる」動き。上からワイヤーで吊られて降り、少し揺れて止まる（揚重の会社だけの動き） */
.rv { position: relative; opacity: 0; transform: translateY(-44px); transform-origin: 50% 0; }
.rv.in { animation: hang 1.25s cubic-bezier(.3,.7,.3,1) calc(var(--i, 0) * 140ms) both; }
.rv::after { content: ""; position: absolute; left: 50%; bottom: 100%; width: 1px; height: 120px; background: linear-gradient(to top, currentColor, transparent); opacity: 0; pointer-events: none; }
.rv.in::after { animation: wire 1.25s ease calc(var(--i, 0) * 140ms) both; }
@keyframes hang {
  0% { opacity: 0; transform: translateY(-44px) rotate(-1.2deg); }
  45% { opacity: 1; transform: translateY(5px) rotate(.7deg); }
  68% { transform: translateY(-2px) rotate(-.35deg); }
  86% { transform: translateY(1px) rotate(.12deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes wire { 0% { opacity: 0; } 20% { opacity: .35; } 60% { opacity: .35; } 100% { opacity: 0; transform: translateY(-40px); } }

/* 階数表示（エレベーターの階数ランプ）。PC は左端に縦、スマホはヘッダーの建物の横に今の階だけ */
.lift { position: fixed; left: max(10px, calc(var(--gutter) / 2 - 16px)); top: 50%; transform: translateY(-50%); z-index: 40; display: grid; gap: 4px; padding: 8px 0; }
.lift a { position: relative; display: flex; align-items: center; gap: 8px; height: 26px; font-size: 11px; letter-spacing: .08em; color: inherit; opacity: .38; transition: opacity .3s, color .3s; }
.lift a b { width: 28px; height: 22px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 3px; font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.lift a span { opacity: 0; transform: translateX(-4px); transition: opacity .25s, transform .25s; white-space: nowrap; background: var(--paper); color: var(--navy); padding: 1px 6px; border-radius: 3px; }
.lift a:hover { opacity: .9; } .lift a:hover span { opacity: 1; transform: none; }
.lift a.on { opacity: 1; color: var(--accent); }
.lift a.on b { background: var(--accent); border-color: var(--accent); color: #fff; }
.lift .car { position: absolute; left: -9px; top: 0; width: 4px; height: 22px; background: var(--accent); border-radius: 2px; transition: transform .6s cubic-bezier(.5,0,.3,1); }
.lift-sp { display: none; }
@media (max-width: 900px) {
  .lift { display: none; }
  .lift-sp { position: fixed; z-index: 56; top: 17px; left: calc(55% - 58px); display: flex; align-items: center; gap: 3px; height: 26px; padding: 0 6px; border-radius: 4px; background: var(--navy); color: var(--paper); font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
  .lift-sp i { font-style: normal; font-size: 8px; color: var(--accent); transition: transform .3s; }
  .lift-sp.down i { transform: rotate(180deg); }
  body.dark .lift-sp { background: var(--paper); color: var(--navy); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .loader { display: none; }
  .hero h1 span, .rv { opacity: 1; transform: none; transition: none; }
  .rv.in, .rv.in::after { animation: none; }
  .lift .car { transition: none; }
  .hero .scroll::after { animation: none; }
  section[data-wm]::before { transform: none; }
}
