/* 日本防衛DX サイト共通CSS。色はここの変数だけで決める */
:root {
  --bg: #050505;
  --bg2: #0d0d10;
  --panel: #151519;
  --line: #24242a;
  --line2: #3a3a42;
  --tx: #f2f2f4;
  --tx2: #b4b4bc;
  --tx3: #7a7a84;
  --accent: #e0263b;
  --accent2: #c9ccd3;
  --warn: #ffb547;
  --r: 14px;
  --font: 'Noto Sans JP', system-ui, sans-serif;
  --en: 'Inter', 'Noto Sans JP', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--tx); font-family: var(--font); font-size: 16px; line-height: 1.85; letter-spacing: .02em; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { word-break: keep-all; overflow-wrap: anywhere; margin: 0; line-height: 1.4; font-weight: 700; letter-spacing: .03em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 40px); }
.pc { display: none; }
@media (min-width: 820px) { .pc { display: inline; } }

/* 見出し・ラベル */
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; color: var(--accent); margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ''; width: 18px; height: 1px; background: var(--accent); }
.h2 { font-size: clamp(26px, 3.4vw, 40px); margin-bottom: 40px; }
.h3 { font-size: 20px; }
.lead { color: var(--tx2); font-size: clamp(15px, 1.5vw, 17px); }
.lead-sm { color: var(--tx2); }
.lead-sm strong { color: var(--tx); }
.body-lg { color: var(--tx2); font-size: 17px; line-height: 2.1; }
.tag { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--accent); border: 1px solid rgba(224, 38, 59, .35); border-radius: 999px; padding: 2px 10px; }
.num { font-family: var(--mono); font-size: 13px; color: var(--tx3); letter-spacing: .1em; }
.arr { display: inline-block; margin-left: 10px; transition: transform .2s; }
a:hover .arr { transform: translateX(4px); }

/* ボタン */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 2px; background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; padding: 14px 26px; border-radius: 10px; border: 0; font: inherit; font-weight: 700; cursor: pointer; transition: background .2s, box-shadow .2s; }
.btn:hover { background: #f03a4f; box-shadow: 0 0 0 6px rgba(224, 38, 59, .12); }
.btn-ghost { background: transparent; color: var(--tx); border: 1px solid var(--line2); }
.btn-ghost:hover { background: var(--panel); box-shadow: none; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-lg { padding: 18px 36px; font-size: 17px; }
.more { color: var(--tx2); text-decoration: none; font-size: 14px; white-space: nowrap; }
.more:hover { color: var(--accent); }

/* ヘッダー */
.hd { position: sticky; top: 0; z-index: 50; background: rgba(5, 5, 5, .85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.hd-in { width: min(1240px, 100% - 32px); margin-inline: auto; height: 68px; display: flex; align-items: center; justify-content: space-between; }
.hd-logo { text-decoration: none; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark { width: 38px; height: auto; }
.logo-txt { display: flex; flex-direction: column; line-height: 1.15; }
.logo-txt b { font-family: var(--en); font-size: 16px; font-weight: 800; letter-spacing: .08em; }
.logo-txt small { font-size: 10px; letter-spacing: .12em; color: var(--tx3); }
.hd-nav { display: none; align-items: center; gap: 22px; font-size: 14px; }
.hd-nav a:not(.btn) { text-decoration: none; color: var(--tx2); transition: color .2s; }
.hd-nav a:not(.btn):hover, .hd-nav a[aria-current] { color: var(--tx); }
.hd-nav a[aria-current] { box-shadow: 0 2px 0 var(--accent); }
.hd-menu { width: 44px; height: 44px; background: none; border: 1px solid var(--line2); border-radius: 10px; display: grid; place-content: center; gap: 6px; cursor: pointer; }
.hd-menu span { width: 18px; height: 1.5px; background: var(--tx); transition: transform .25s; }
.hd-menu[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.hd-menu[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
.sp-nav { border-top: 1px solid var(--line); padding: 8px 20px 24px; background: var(--bg); }
.sp-nav a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 700; }
.sp-nav small { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: var(--accent); font-weight: 400; }
@media (min-width: 1100px) { .hd-nav { display: flex; } .hd-menu, .sp-nav { display: none !important; } }

/* ヒーロー */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 20%, transparent 75%); opacity: .55; }
.hero::after { content: ''; position: absolute; width: 640px; height: 640px; right: -160px; top: -200px; background: radial-gradient(circle, rgba(224, 38, 59, .22), transparent 65%); pointer-events: none; }
.hero-in { position: relative; z-index: 1; display: grid; gap: 48px; padding: clamp(64px, 10vw, 128px) 0 clamp(64px, 9vw, 112px); align-items: center; }
.hero h1 { font-size: clamp(38px, 6.4vw, 74px); font-weight: 900; line-height: 1.25; letter-spacing: .04em; margin-bottom: 26px; }
.hero .lead { margin-bottom: 36px; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 14px; }
@media (min-width: 960px) { .hero-in { grid-template-columns: 1.1fr .9fr; } }

/* ターミナル風の図 */
.term { background: rgba(16, 16, 19, .94); border: 1px solid var(--line2); border-radius: var(--r); box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 0 1px rgba(224, 38, 59, .06); overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line2); }
.term-bar span { margin-left: 10px; font-family: var(--mono); font-size: 11px; color: var(--tx3); }
.term-body { margin: 0; padding: 20px 18px 24px; font-family: var(--mono); font-size: clamp(11px, 1.15vw, 13px); line-height: 1.95; color: var(--tx2); overflow-x: auto; }
.c-dim { color: var(--tx3); } .c-ok { color: var(--accent); } .c-warn { color: var(--warn); } .c-acc { color: var(--tx); }
.cursor { animation: blink 1.1s steps(1) infinite; color: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }
.js .term-body code > span, .js .term-body code { }

/* セクション */
.sec { padding: clamp(72px, 9vw, 120px) 0; }
.sec-alt { background: var(--bg2); border-block: 1px solid var(--line); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 40px; }
.sec-head .h2 { margin-bottom: 0; }

/* カード */
.cards3, .cards4 { display: grid; gap: 18px; }
@media (min-width: 760px) { .cards3 { grid-template-columns: repeat(3, 1fr); } .cards4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .cards4 { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 30px 26px; }
.card h3 { font-size: 19px; margin: 12px 0 10px; }
.card p { color: var(--tx2); font-size: 15px; }

/* サービス */
.svc { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
@media (min-width: 760px) { .svc { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .svc:not(.svc-2) { grid-template-columns: repeat(4, 1fr); } }
.svc-item { background: var(--bg2); padding: 32px 26px 36px; text-decoration: none; transition: background .25s; position: relative; }
.sec-alt .svc-item { background: var(--bg); }
a.svc-item:hover { background: var(--panel); }
a.svc-item::after { content: '→'; position: absolute; right: 24px; top: 30px; color: var(--tx3); transition: color .2s, transform .2s; }
a.svc-item:hover::after { color: var(--accent); transform: translateX(3px); }
.svc-item h3, .svc-item .h3 { font-size: 20px; margin: 16px 0 10px; }
.svc-item p { color: var(--tx2); font-size: 15px; }

/* 開発 */
.dev { display: grid; gap: 40px; align-items: start; }
@media (min-width: 900px) { .dev { grid-template-columns: 1.2fr 1fr; } }
.dev-txt .lead-sm { font-size: 17px; margin-bottom: 26px; }
.stack { display: flex; flex-wrap: wrap; gap: 10px; }
.stack span { font-family: var(--mono); font-size: 13px; color: var(--tx2); background: var(--panel); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 14px; }

/* チェックリスト */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 28px; color: var(--tx2); }
.checks li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

/* 事例 */
.cases { display: grid; gap: 18px; }
@media (min-width: 900px) { .cases { grid-template-columns: repeat(3, 1fr); } }
.case { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 30px 26px; text-decoration: none; transition: border-color .25s, transform .25s; }
.case:hover { border-color: var(--accent); transform: translateY(-3px); }
.case h3 { font-size: 18px; margin: 16px 0 12px; }
.case p { color: var(--tx2); font-size: 14px; }

/* 流れ */
.flow { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; counter-reset: f; }
@media (min-width: 900px) { .flow { grid-template-columns: repeat(4, 1fr); } }
.flow li { border-top: 2px solid var(--line2); padding-top: 22px; position: relative; }
.flow li::before { content: ''; position: absolute; top: -2px; left: 0; width: 40px; height: 2px; background: var(--accent); }
.flow b { font-family: var(--mono); color: var(--accent); font-size: 13px; }
.flow h3 { font-size: 19px; margin: 6px 0 8px; }
.flow p { color: var(--tx2); font-size: 15px; }

/* 下層ページの頭 */
.ph { padding: clamp(64px, 9vw, 112px) 0 clamp(40px, 6vw, 64px); border-bottom: 1px solid var(--line); background: radial-gradient(ellipse 60% 120% at 85% 0%, rgba(224, 38, 59, .14), transparent 60%); }
.ph h1 { font-size: clamp(32px, 5vw, 56px); font-weight: 900; margin-bottom: 18px; }
.ph .lead { max-width: 720px; }
.ph p + p { margin-top: 28px; }
.toc { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.toc a { font-size: 14px; text-decoration: none; color: var(--tx2); border: 1px solid var(--line2); border-radius: 999px; padding: 6px 14px; }
.toc a:hover { color: var(--accent); border-color: var(--accent); }

/* 詳細ブロック */
.detail { display: grid; gap: 22px; padding: 48px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.detail:first-child { padding-top: 0; }
.detail:last-child { border-bottom: 0; padding-bottom: 0; }
@media (min-width: 900px) { .detail { grid-template-columns: 1fr 1.25fr; gap: 56px; } }
.detail-h .num { display: block; margin-bottom: 10px; }
.detail-h h2 { font-size: clamp(22px, 2.6vw, 30px); margin: 14px 0 10px; }
.detail-lead { color: var(--accent); font-weight: 700; }
.detail-b > p { color: var(--tx2); margin-bottom: 22px; }

/* 技術・会社概要の表 */
.tech, .tbl { margin: 0; border-top: 1px solid var(--line); }
.tech > div, .tbl > div { display: grid; gap: 4px 32px; padding: 20px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 760px) { .tech > div, .tbl > div { grid-template-columns: 200px 1fr; } }
.tech dt, .tbl dt { font-weight: 700; color: var(--tx); }
.tech dd, .tbl dd { margin: 0; color: var(--tx2); }
.tbl a { color: var(--accent); }

/* 文章ページ */
.prose h2 { font-size: 19px; margin: 40px 0 10px; }
.prose p { color: var(--tx2); }
.prose a { color: var(--accent); }

/* フォーム */
.form { display: grid; gap: 22px; }
.f-row { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; }
.f-row > span, .f-row legend { font-weight: 700; font-size: 15px; padding: 0; }
.req { font-size: 11px; color: #fff; background: var(--accent); border-radius: 4px; padding: 1px 6px; margin-left: 8px; vertical-align: 2px; font-weight: 700; }
.form input:not([type=checkbox]), .form textarea { width: 100%; font: inherit; color: var(--tx); background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; padding: 14px 16px; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(224, 38, 59, .12); }
.f-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-block; border: 1px solid var(--line2); border-radius: 999px; padding: 8px 16px; font-size: 14px; color: var(--tx2); cursor: pointer; transition: all .2s; }
.chip input:checked + span { border-color: var(--accent); color: var(--accent); background: rgba(224, 38, 59, .08); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.f-agree { display: flex; align-items: center; gap: 10px; color: var(--tx2); font-size: 15px; }
.f-agree input { width: 18px; height: 18px; accent-color: var(--accent); }
.f-agree a { color: var(--accent); }
.form .btn { justify-self: start; }
.f-msg { color: var(--warn); min-height: 1em; }
.f-alt { margin-top: 32px; color: var(--tx3); font-size: 14px; }
.f-alt a { color: var(--tx2); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* CTA・フッター */
.cta { border-top: 1px solid var(--line); background: radial-gradient(ellipse 70% 100% at 50% 100%, rgba(224, 38, 59, .12), transparent 70%), var(--bg2); }
.cta-in { text-align: center; padding: clamp(72px, 9vw, 112px) 0; }
.cta .eyebrow { justify-content: center; }
.cta h2 { font-size: clamp(26px, 3.6vw, 40px); margin-bottom: 16px; }
.cta p { color: var(--tx2); margin-bottom: 34px; }
.ft { border-top: 1px solid var(--line); padding: 56px 0 28px; }
.ft-in { display: grid; gap: 32px; }
@media (min-width: 860px) { .ft-in { grid-template-columns: 1fr auto; } }
.ft-co a { text-decoration: none; display: inline-block; margin-bottom: 14px; }
.ft-co p { color: var(--tx3); font-size: 13px; }
.ft-nav { display: flex; flex-wrap: wrap; gap: 12px 24px; font-size: 14px; align-content: start; }
.ft-nav a { color: var(--tx2); text-decoration: none; }
.ft-nav a:hover { color: var(--accent); }
.ft-copy { text-align: center; color: var(--tx3); font-family: var(--mono); font-size: 11px; margin-top: 48px; letter-spacing: .08em; }

/* スクロールで出てくる動き（JSが動くときだけ） */
.js [data-appear] { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.js [data-appear].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js [data-appear] { opacity: 1; transform: none; transition: none; } .cursor { animation: none; } html { scroll-behavior: auto; } }

/* 前サイトから引き継いだ要素（ロゴ画像・写真つきカード・記事） */
.logo-img { height: 40px; width: auto; }
.ft .logo-img { height: 48px; }
.biz { display: grid; gap: 18px; }
@media (min-width: 760px) { .biz { grid-template-columns: repeat(2, 1fr); } }
.biz-item { display: grid; grid-template-rows: auto 1fr; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; transition: border-color .25s, transform .25s; }
.biz-item:hover { border-color: var(--accent); transform: translateY(-3px); }
.biz-item figure { margin: 0; aspect-ratio: 16 / 9; overflow: hidden; background: #111; }
.biz-item img { width: 100%; height: 100%; object-fit: cover; }
.biz-item .biz-b { padding: 24px 24px 28px; }
.biz-item h3 { font-size: 20px; margin: 12px 0 8px; }
.biz-item p { color: var(--tx2); font-size: 15px; }
.biz-new { position: relative; }
.biz-new::before { content: 'NEW'; position: absolute; z-index: 1; top: 14px; left: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; background: var(--accent); color: #fff; padding: 3px 10px; border-radius: 4px; }
.mission { text-align: center; }
.mission .eyebrow { justify-content: center; }
.mission h2 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 18px; }
.mission p { color: var(--tx2); }
.omoi { display: grid; gap: 40px; }
@media (min-width: 900px) { .omoi { grid-template-columns: 1fr 1fr; } }
.omoi h3 { font-size: 20px; margin-bottom: 14px; padding-left: 14px; border-left: 3px solid var(--accent); }
.omoi p { color: var(--tx2); margin-bottom: 14px; }
.omoi-intro { color: var(--tx2); margin-bottom: 40px; max-width: 860px; }
.news { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.news a { display: grid; gap: 4px 32px; padding: 20px 4px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background .2s; }
.news a:hover { background: var(--panel); }
.news time { font-family: var(--mono); font-size: 13px; color: var(--tx3); }
@media (min-width: 760px) { .news a { grid-template-columns: 130px 1fr; } }
.article { color: var(--tx2); }
.article time { font-family: var(--mono); color: var(--tx3); display: block; margin-bottom: 24px; }
.article p { margin-bottom: 14px; }
.article h2 { color: var(--tx); font-size: 20px; margin: 36px 0 12px; padding-left: 14px; border-left: 3px solid var(--accent); }
.article .back { display: inline-block; margin-top: 40px; color: var(--tx); }
.photo { margin: 0; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #111; }
.photo img { width: 100%; height: auto; }
