/*
 * 事業内容 (page-business.php)。
 * 6つの分野は「図面の紙」。パソコンでは紙を重ね、次の紙が下からせり上がる（.sheets.is-pinned。fields-sheets.js が付ける）。
 * スマホと「動きを減らす」設定では重ねずに、上から順に並べる。
 */

/* ---------- 図面の紙 ---------- */
.sheets { position: relative; }
.sheets__viewport { position: relative; }
/* clip：/business/#maritime のように開いたとき、ブラウザーが枠の中を勝手にずらさないように（hidden だとずらされる） */
.sheets.is-pinned .sheets__viewport { position: sticky; top: 0; height: 100svh; overflow: hidden; overflow: clip; }
.sheet { position: relative; color: var(--ink); background: var(--bg); }
.sheets.is-pinned .sheet { position: absolute; inset: 0; overflow: hidden; will-change: transform; box-shadow: 0 -24px 60px -30px rgba(14, 20, 56, .35); }
.sheet-in { position: relative; transform-origin: 50% 30%; }
.sheets.is-pinned .sheet-in { position: absolute; inset: 0; will-change: transform; }

/* 紙の色（分野ごとに空気を変える） */
.tone-paper { --bg: var(--paper); }
.tone-white { --bg: var(--card); }
.tone-pale { --bg: var(--card-2); }
.tone-dark { --bg: var(--navy); color: #fff; }
.tone-dark.is-deep { --bg: var(--navy-deep); }
/* 線画の後ろの方眼（中心ほど濃い） */
.sheet::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 64px 64px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 68% 55%, #000 0%, transparent 60%); mask-image: radial-gradient(ellipse at 68% 55%, #000 0%, transparent 60%); }
.tone-dark::after { background: linear-gradient(var(--line-dark) 1px, transparent 1px) 0 0 / 64px 64px, linear-gradient(90deg, var(--line-dark) 1px, transparent 1px) 0 0 / 64px 64px; }

/* 紙の上端：朱の切断線と、位置の読み取り値 */
.sheet__edge { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--accent); z-index: 3; opacity: var(--edge, 0); box-shadow: 0 0 14px 1px rgba(224, 80, 42, .45); }
.sheet__edge span { position: absolute; right: calc(var(--gutter) + 8px); top: 6px; color: var(--accent); font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.sheet__edge span:first-child { left: calc(var(--gutter) + 8px); right: auto; }
.sheet__edge em { font-style: normal; }

.sheet canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.bigword { position: absolute; right: -4vw; bottom: 2vh; z-index: 0; margin: 0; font-family: var(--font-en); font-weight: 500; text-transform: uppercase; font-size: 21vw; line-height: .8; letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1px var(--line); white-space: nowrap; pointer-events: none; }
.tone-dark .bigword { -webkit-text-stroke-color: var(--line-dark); }

/* 分野の説明（紙の左側） */
.sheet__txt { position: absolute; z-index: 2; left: var(--gutter); top: calc(var(--header) + 96px); bottom: 32px; width: min(480px, 36vw); overflow: hidden; }
.admin-bar .sheet__txt { top: calc(var(--header) + 128px); }
.txt-in { will-change: transform; }
.sheet__no { display: flex; align-items: baseline; gap: 16px; }
.sheet__no b { font-family: var(--font-en); font-weight: 400; font-size: 72px; line-height: .9; letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 1px var(--navy-soft); }
.tone-dark .sheet__no b { -webkit-text-stroke-color: rgba(255, 255, 255, .7); }
.sheet__no .mono { color: var(--accent); }
.sheet h2 { margin: 16px 0 0; font-size: clamp(24px, 2.3vw, 34px); font-weight: 700; letter-spacing: .08em; line-height: 1.4; }
.tone-paper h2, .tone-white h2, .tone-pale h2 { color: var(--navy); }
.sheet__catch { margin-top: 8px; font-size: 16px; font-weight: 500; letter-spacing: .05em; }
.sheet__ov { margin-top: 18px; font-size: 14px; line-height: 1.9; color: var(--muted); }
.sheet__note { margin-top: 12px; padding: 8px 12px; border-left: 2px solid var(--accent); font-size: 13px; background: rgba(28, 37, 102, .05); }
.sheet__h { margin: 20px 0 0; font-weight: 400; color: var(--muted); }
.sheet__sys { margin: 8px 0 0; border-top: 1px solid var(--line); }
.sheet__sys > div { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sheet__sys dt { font-weight: 700; font-size: 14px; letter-spacing: .04em; }
.sheet__sys dd { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.sheet .chips { margin-top: 8px; gap: 6px; }
.sheet .chips li { font-size: 11px; padding: 3px 10px; }
.tone-dark .sheet__ov, .tone-dark .sheet__sys dd, .tone-dark .sheet__h { color: rgba(255, 255, 255, .72); }
.tone-dark .sheet__sys, .tone-dark .sheet__sys > div { border-color: var(--line-dark); }
.tone-dark .sheet__note { background: rgba(255, 255, 255, .06); }

/* 紙の上のタブ（いま何枚目か。押すとその分野へ移動） */
.sheets__tabs { display: none; }
.sheets.is-pinned .sheets__tabs { position: absolute; z-index: 5; left: var(--gutter); right: var(--gutter); top: calc(var(--header) + 20px); display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid var(--line); background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: var(--radius); overflow: hidden; }
.admin-bar .sheets.is-pinned .sheets__tabs { top: calc(var(--header) + 52px); }
.sheets__tabs button { border: 0; border-left: 1px solid var(--line); background: none; color: var(--muted); padding: 8px 12px; text-align: left; cursor: pointer; display: grid; transition: background .4s var(--ease), color .4s; font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; }
.sheets__tabs button:first-child { border-left: 0; }
.sheets__tabs b { font-family: var(--font-jp); font-weight: 500; font-size: 12px; letter-spacing: .06em; color: var(--ink); transition: color .4s; }
.sheets__tabs .is-on { background: var(--navy); color: rgba(255, 255, 255, .7); }
.sheets__tabs .is-on b { color: #fff; }

/* ---------- 対応技術：線が上から下へ走り、通ったところの技術に色が付く ---------- */
.tech { padding-block: var(--section) 0; }
.tech__grid { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.tech__col { padding: 20px 24px 32px 0; border-right: 1px solid var(--line); }
.tech__col + .tech__col { padding-left: 24px; }
.tech__col:last-child { border-right: 0; }
.tech__col h3 { font-size: 16px; font-weight: 700; letter-spacing: .08em; margin: 0 0 20px; }
.tech__col .chips li { color: var(--navy); background: var(--paper); }
.js-motion .tech__col .chips li { color: var(--muted); border-color: var(--line); transition: color .4s, border-color .4s; }
.js-motion .tech__col .chips li::before { background: color-mix(in srgb, var(--muted) 35%, transparent); transition: background .5s var(--ease-out); }
.js-motion .tech__grid.in .chips li { color: var(--navy); border-color: color-mix(in srgb, var(--navy) 40%, transparent); }
.js-motion .tech__col .chips li.is-lit::before { background: var(--dot, var(--navy)); animation: tech-dot .6s var(--ease-out); }
.js-motion .tech__col .chips li.is-lit { animation: tech-lit 1s var(--ease-out); }
@keyframes tech-dot { 0% { transform: scale(2.2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot, var(--navy)) 30%, transparent); } 100% { transform: scale(1); } }
@keyframes tech-lit { 0% { background: var(--accent); color: #fff; border-color: var(--accent); } }
.tech__scan { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--accent); box-shadow: 0 0 12px 2px rgba(224, 80, 42, .35); opacity: 0; pointer-events: none; }
.js-motion .tech__grid.in .tech__scan { animation: tech-scan 1.8s var(--ease) forwards; }
@keyframes tech-scan { 0% { top: 0; opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

/* スマホと「動きを減らす」設定：紙は重ねず、線画を上に止めて文章をその上に滑らせる */
@media (max-width: 960px) {
  .sheet { padding-bottom: 48px; }
  .sheet canvas { position: sticky; top: var(--header); height: 46svh; display: block; }
  .bigword, .sheet__edge { display: none; }
  .sheet__txt { position: relative; inset: auto; width: auto; padding: 24px var(--gutter) 0; background: var(--bg); box-shadow: 0 -12px 24px -12px rgba(14, 20, 56, .25); }
  .tech__grid { grid-template-columns: 1fr 1fr; }
  .tech__col { padding: 16px 12px 24px 0 !important; border-right: 0; border-bottom: 1px solid var(--line); }
  .tech__col:nth-child(odd) { border-right: 1px solid var(--line); }
  .tech__col:nth-child(even) { padding-left: 12px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet canvas { position: relative; height: 50svh; display: block; }
  .sheet__txt { position: relative; inset: auto; width: auto; max-width: 640px; padding: 0 var(--gutter) 48px; }
  .bigword, .sheet__edge { display: none; }
}
