/* AXentia ニューラルネットワーク版トップ
   基調：ブランドの紺とアイスブルー。暖色は「人の判断」を示すときだけ使う。 */
:root {
  --abyss: #030a12;
  --navy: #0b1d2e;
  --ice: #a9c3e5;
  --signal: #5fe3cf;
  --human: #ff9e3d;
  --paper: #e8eef5;
  --mute: #8a9bb0;
  --line: rgba(169, 195, 229, 0.18);
  --glass: rgba(4, 13, 23, 0.74);

  --f-ja: "M PLUS 1", "Hiragino Kaku Gothic ProN", sans-serif;
  --f-display: "Dela Gothic One", "M PLUS 1", sans-serif;
  --f-latin: "Unbounded", "M PLUS 1", sans-serif;
  --f-hud: "Martian Mono", "M PLUS 1", monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--abyss);
  color: var(--paper);
  font-family: var(--f-ja);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; z-index: 0; touch-action: none; }

/* ボタン */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: 2px;
  font-weight: 700; font-size: 14px; letter-spacing: 0.04em; white-space: nowrap;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 36px; padding: 0 16px; font-size: 13px; }
.btn-solid { background: var(--paper); color: var(--abyss); }
.btn-solid:hover { background: #fff; }
.btn-line { border: 1px solid rgba(232, 238, 245, 0.42); }
.btn-line:hover { border-color: var(--paper); background: rgba(232, 238, 245, 0.06); }
.text-link {
  font-size: 13px; color: var(--ice);
  border-bottom: 1px solid rgba(169, 195, 229, 0.35); padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.text-link:hover { color: #fff; border-color: #fff; }

/* 接続ボタン：輪がゆっくり回る、このページで唯一の常時の動き */
.btn-connect {
  position: relative; min-height: 56px; padding: 0 28px 0 60px;
  background: rgba(95, 227, 207, 0.08); border: 1px solid rgba(95, 227, 207, 0.55);
  color: #fff; font-size: 15px;
}
.btn-connect:hover { background: rgba(95, 227, 207, 0.16); border-color: var(--signal); }
.btn-connect:disabled { opacity: 0.45; cursor: progress; }
.btn-connect-ring {
  position: absolute; left: 20px; top: 50%; width: 22px; height: 22px; margin-top: -11px;
  border-radius: 50%; border: 1.5px solid var(--signal); border-right-color: transparent;
  animation: spin 2.4s linear infinite;
}
.btn-connect-ring::after {
  content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--signal);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ヘッダー */
.hd {
  position: fixed; inset: 0 0 auto; z-index: 20; height: 72px;
  display: flex; align-items: center; gap: 36px; padding: 0 var(--gutter);
  background: linear-gradient(rgba(3, 10, 18, 0.85), rgba(3, 10, 18, 0));
}
.logo img { width: 150px; height: auto; display: block; }
.hd-nav { display: flex; gap: 28px; margin-right: auto; font-size: 13px; color: #c3cfdd; }
.hd-nav a:hover { color: #fff; }

/* 待機中のトップ */
.hero {
  position: fixed; z-index: 5; left: var(--gutter); bottom: clamp(48px, 11vh, 120px);
  max-width: 640px;
  transition: opacity 0.6s var(--ease), transform 0.8s var(--ease);
}
.hero-co { font-size: 13px; color: var(--ice); letter-spacing: 0.12em; margin-bottom: 20px; }
.hero h1 {
  font-size: clamp(38px, 5.4vw, 84px); font-weight: 900; line-height: 1.12; letter-spacing: -0.02em;
  text-shadow: 0 2px 40px rgba(3, 10, 18, 0.8);
}
.hero-lead { margin: 24px 0 32px; font-size: clamp(15px, 1.3vw, 17px); color: #cdd8e5; max-width: 32em; }
.hero-act { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.hero-hint { margin-top: 28px; font-family: var(--f-hud); font-size: 12px; color: var(--mute); letter-spacing: 0.06em; }
.sp { display: none; }

body:not(.is-offline) .hero { opacity: 0; transform: translateY(-24px); pointer-events: none; visibility: hidden; transition: opacity 0.6s var(--ease), transform 0.8s var(--ease), visibility 0s linear 0.6s; }

/* 接続ログ */
.boot {
  position: fixed; z-index: 6; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-family: var(--f-hud); font-size: 14px; letter-spacing: 0.06em; color: var(--ice);
  pointer-events: none; min-width: 300px;
}
.boot p { opacity: 0; animation: bootline 0.3s var(--ease) forwards; }
.boot p b { color: var(--signal); font-weight: 500; }
@keyframes bootline { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

/* 接続後の操作盤 */
.sectors, .status, .nav-hint, .panels { transition: opacity 0.6s var(--ease); }
body:not(.is-online) .sectors,
body:not(.is-online) .status,
body:not(.is-online) .nav-hint { opacity: 0; pointer-events: none; visibility: hidden; transition: opacity 0.6s var(--ease), visibility 0s linear 0.6s; }

.sectors {
  position: fixed; z-index: 10; left: var(--gutter); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 28px;
}
.sectors ol { list-style: none; display: flex; flex-direction: column; gap: 4px; border-left: 1px solid var(--line); }
.sectors ol button {
  display: flex; align-items: baseline; gap: 12px; padding: 8px 16px; margin-left: -1px;
  border-left: 1px solid transparent; font-size: 14px; color: var(--mute); text-align: left;
  transition: color 0.2s, border-color 0.2s;
}
.sectors ol button b { font-family: var(--f-hud); font-weight: 500; font-size: 12px; }
.sectors ol button:hover { color: var(--paper); }
.sectors ol button[aria-current="true"] { color: #fff; border-left-color: var(--signal); }
.sectors ol button[aria-current="true"] b { color: var(--signal); }
.sectors-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-left: 16px; }

.status {
  position: fixed; z-index: 10; left: var(--gutter); bottom: 24px;
  display: flex; gap: 24px; font-family: var(--f-hud); font-size: 11px; letter-spacing: 0.08em; color: var(--mute);
}
.status b { color: var(--ice); font-weight: 500; font-variant-numeric: tabular-nums; }
.nav-hint {
  position: fixed; z-index: 10; left: 50%; bottom: 24px; transform: translateX(-50%);
  font-size: 12px; color: var(--mute);
}

/* 区画ごとの説明パネル */
.panel {
  position: fixed; z-index: 10; right: var(--gutter); top: 96px; bottom: 64px; width: min(440px, 38vw);
  overflow-y: auto; padding: 32px 32px 28px;
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  opacity: 0; visibility: hidden; transform: translateX(16px);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease), visibility 0s linear 0.5s;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.panel.is-on {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 0.6s var(--ease) 0.35s, transform 0.7s var(--ease) 0.35s, visibility 0s;
}
/* 四隅の目盛り：計測器の窓として見せる */
.panel::before, .panel::after {
  content: ""; position: absolute; width: 14px; height: 14px; border: 0 solid var(--ice); pointer-events: none;
}
.panel::before { left: -1px; top: -1px; border-left-width: 2px; border-top-width: 2px; }
.panel::after { right: -1px; bottom: -1px; border-right-width: 2px; border-bottom-width: 2px; }
.panel h2 { font-size: clamp(24px, 2.2vw, 32px); font-weight: 900; line-height: 1.35; letter-spacing: -0.01em; }
.panel-lead { margin: 14px 0 24px; font-size: 14px; color: #c3cfdd; }
.panel-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 24px 0 14px; }
.note { font-size: 11.5px; line-height: 1.7; color: var(--mute); margin-bottom: 16px; }

/* 業務回路：メール返信のデモ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin-bottom: 12px; }
.steps button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 8px 8px 10px; font-size: 12px; line-height: 1.4; color: var(--mute); text-align: left;
  border-top: 2px solid var(--line); transition: color 0.2s, border-color 0.2s;
}
.steps button b { font-family: var(--f-hud); font-weight: 300; font-size: 11px; }
.steps button { word-break: auto-phrase; }
.steps button:hover { color: var(--paper); }
.steps button[aria-selected="true"] { color: #fff; border-top-color: var(--signal); }
.steps button[aria-selected="true"] b { color: var(--signal); }
.steps button.is-human[aria-selected="true"] { border-top-color: var(--human); }
.steps button.is-human[aria-selected="true"] b { color: var(--human); }

/* 暗い画面の中で、メールだけは紙の書類として読ませる */
.mail { display: grid; }
.mail-card {
  grid-area: 1 / 1; background: #eef3f8; color: #14212e; padding: 18px 20px 14px;
  border-left: 3px solid var(--signal);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity 0.35s var(--ease), transform 0.45s var(--ease), visibility 0s linear 0.35s;
}
.mail-card.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity 0.4s var(--ease), transform 0.5s var(--ease), visibility 0s; }
.mail-card.is-human { border-left-color: var(--human); background: #fbf3ea; }
.mail-card header { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 2px 12px; margin-bottom: 12px; }
.mail-card h3 { font-size: 16px; font-weight: 700; line-height: 1.5; grid-row: 1; grid-column: 1; }
.mail-card .chip {
  grid-row: 1; grid-column: 2; font-size: 11px; font-weight: 700; padding: 2px 8px;
  color: #0b5c50; background: rgba(95, 227, 207, 0.28);
}
.mail-card.is-human .chip { color: #8a4a08; background: rgba(255, 158, 61, 0.25); }
.mail-card .from { font-size: 12px; color: #5b6b7c; grid-column: 1 / -1; }
.mail-body p { font-size: 13.5px; line-height: 1.8; margin-bottom: 8px; }
.summary { display: grid; gap: 6px; margin-bottom: 4px; }
.summary div { display: grid; grid-template-columns: 6.5em 1fr; gap: 8px; font-size: 13.5px; padding-bottom: 6px; border-bottom: 1px solid rgba(20, 33, 46, 0.1); }
.summary dt { color: #5b6b7c; font-size: 12px; padding-top: 1px; }
.review-intro { font-size: 13.5px; margin-bottom: 8px; }
.review { list-style: none; display: grid; gap: 4px; margin-bottom: 4px; }
.review li { font-size: 13.5px; padding-left: 22px; position: relative; }
.review li::before {
  content: ""; position: absolute; left: 2px; top: 6px; width: 11px; height: 11px;
  border: 1.5px solid #b8661a; border-radius: 2px;
}
.mail-card footer { margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(20, 33, 46, 0.2); font-size: 12px; color: #4a5a6b; }
.legend { font-size: 12px; color: var(--mute); display: flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.legend .ai { background: var(--signal); }
.legend .hm { background: var(--human); }

/* 自社実証の数字 */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 18px; }
.stats > div { background: rgba(3, 10, 18, 0.9); padding: 16px 16px 14px; }
.stats dt { font-size: 12px; color: var(--mute); }
.stats dd { font-size: 14px; color: var(--ice); }
.stats dd b {
  font-family: var(--f-hud); font-weight: 500; font-size: clamp(34px, 3.2vw, 46px);
  color: #fff; margin-right: 4px; font-variant-numeric: tabular-nums; line-height: 1.2;
}
.stats p { font-size: 11px; color: var(--mute); line-height: 1.55; margin-top: 4px; }

/* 4つの事業 */
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tabs button {
  padding: 10px 4px 12px; font-family: var(--f-hud); font-weight: 500; font-size: 15px; color: var(--mute);
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color 0.2s, border-color 0.2s;
}
.tabs button:hover { color: var(--paper); }
.tabs button[aria-selected="true"] { color: #fff; border-bottom-color: var(--signal); }
.biz { display: none; }
.biz.is-on { display: block; }
.biz p { font-size: 15px; color: #cdd8e5; margin-bottom: 18px; }
.biz .biz-kind { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.tag { display: inline-block; margin-left: 10px; padding: 1px 8px; font-size: 11px; font-weight: 500; color: var(--human); border: 1px solid rgba(255, 158, 61, 0.5); vertical-align: middle; }

/* カーソルの照準 */
.reticle {
  position: fixed; z-index: 30; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  pointer-events: none; opacity: 0; transition: opacity 0.3s;
}
.reticle i { position: absolute; inset: 0; border: 1px solid rgba(169, 195, 229, 0.5); border-radius: 50%; }
.reticle i::before, .reticle i::after { content: ""; position: absolute; background: var(--ice); }
.reticle i::before { left: 50%; top: -5px; width: 1px; height: 6px; }
.reticle i::after { top: 50%; left: -5px; width: 6px; height: 1px; }
.reticle span { position: absolute; left: 40px; top: 8px; font-family: var(--f-hud); font-size: 10px; color: var(--ice); letter-spacing: 0.08em; }
.reticle.is-hot i { border-color: var(--signal); }
@media (hover: hover) and (pointer: fine) { .reticle.is-on { opacity: 1; } }

/* 読みもの */
.archive {
  position: fixed; inset: 0; z-index: 40; overflow-y: auto;
  background: rgba(3, 10, 18, 0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.archive[hidden] { display: none; }
.archive-in { max-width: 1040px; margin: 0 auto; padding: 0 var(--gutter) 64px; }
.archive-hd {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0; background: linear-gradient(rgba(3, 10, 18, 0.98) 70%, rgba(3, 10, 18, 0));
  font-family: var(--f-hud); font-size: 13px; color: var(--mute);
}
.ar-sec { padding: 56px 0; border-top: 1px solid var(--line); }
.ar-sec h2 { font-size: clamp(26px, 3vw, 40px); font-weight: 900; letter-spacing: -0.01em; margin-bottom: 28px; }
.ar-lead { margin: -16px 0 28px; color: #c3cfdd; }
.ar-sec h3 { font-size: 17px; margin-bottom: 8px; }
.ar-sec p { font-size: 15px; color: #c3cfdd; }

.process { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.process::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 1px; background: var(--line); }
.process li { position: relative; padding: 36px 20px 0 0; }
.process li::before { content: ""; position: absolute; left: 0; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--abyss); border: 1px solid var(--signal); }
.process b { position: absolute; left: 20px; top: 0; font-family: var(--f-hud); font-weight: 500; font-size: 13px; color: var(--signal); }
.process p { font-size: 14px; }
.process span { display: block; margin-top: 10px; font-family: var(--f-hud); font-size: 14px; color: var(--ice); }

.case { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.agents { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-bottom: 28px; }
.agents li { padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.agents span { font-size: 12px; color: var(--signal); }
.agents h3 { font-size: 16px; margin: 4px 0 8px; }
.agents p { font-size: 13px; }

.why { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.why > div:first-child h3 { font-size: 22px; }

.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; font-weight: 700; font-size: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 1.5px solid var(--ice); border-bottom: 1.5px solid var(--ice); transform: rotate(45deg);
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 0 22px; max-width: 46em; }

.ar-cta h2 { margin-bottom: 14px; }
.ft { padding: 48px 0 0; border-top: 1px solid var(--line); display: grid; gap: 16px; }
.ft img { width: 140px; height: auto; }
.ft p { font-size: 14px; color: var(--mute); }
.ft nav { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; color: #c3cfdd; }
.ft nav a:hover { color: #fff; }
.ft small { font-size: 12px; color: var(--mute); }

/* WebGLが使えないときは、トップと読みものをそのまま見せる */
.no-gl #gl, .no-gl .reticle, .no-gl #connect { display: none; }
.no-gl { background: radial-gradient(120% 80% at 80% 20%, #0c2a40, var(--abyss) 60%); }

/* スマートフォン */
@media (max-width: 860px) {
  .hd { height: auto; flex-wrap: wrap; gap: 8px 16px; padding-top: 10px; padding-bottom: 6px; }
  .logo img { width: 120px; }
  .hd .btn { margin-left: auto; }
  /* スマホではナビを2段目に。はみ出す分は横にスクロール */
  .hd-nav {
    order: 3; width: 100%; margin: 0; gap: 20px; font-size: 12.5px;
    overflow-x: auto; white-space: nowrap; scrollbar-width: none; padding: 4px 0 6px;
  }
  .hd-nav::-webkit-scrollbar { display: none; }
  .sp { display: inline; }
  .hero { right: var(--gutter); bottom: 32px; }
  .hero-act .btn { flex: 1 1 100%; justify-content: center; }
  .hero-hint { display: none; }

  .sectors { top: auto; bottom: 0; left: 0; right: 0; transform: none; z-index: 12; background: rgba(3, 10, 18, 0.92); border-top: 1px solid var(--line); }
  .sectors ol { flex-direction: row; border-left: 0; }
  .sectors ol li { flex: 1; }
  .sectors ol button { flex-direction: column; align-items: center; gap: 0; width: 100%; padding: 8px 2px 10px; border-left: 0; border-top: 2px solid transparent; margin: 0; font-size: 11px; }
  .sectors ol button[aria-current="true"] { border-top-color: var(--signal); }
  .sectors-foot { display: none; }
  .status, .nav-hint { display: none; }

  .panel { left: 0; right: 0; top: auto; bottom: 58px; width: auto; max-height: 52vh; padding: 22px var(--gutter) 18px; transform: translateY(16px); }
  .panel h2 { font-size: 22px; }
  .panel-lead { margin: 8px 0 16px; }

  .process { grid-template-columns: 1fr; gap: 28px; }
  .process::before { left: 4px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .process li { padding: 0 0 0 28px; }
  .process li::before { top: 6px; }
  .process b { position: static; display: block; }
  .case, .why { grid-template-columns: 1fr; gap: 28px; }
  .agents { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
}

/* 書体の役割：見出しは Dela Gothic One、英字と数字は Unbounded、本文は M PLUS 1、計測値だけ等幅 */
.hero h1, .panel h2, .ar-sec h2, .biz .biz-kind {
  font-family: var(--f-display); font-weight: 400;
}
.hero h1 { letter-spacing: 0.02em; line-height: 1.24; font-size: clamp(34px, min(4.6vw, 7.4vh), 76px); }
.panel h2, .ar-sec h2 { letter-spacing: 0.03em; line-height: 1.4; }
.panel h2 { font-size: clamp(22px, 1.9vw, 28px); }
.ar-sec h3 { font-weight: 700; letter-spacing: 0.04em; }
.hero-co { font-size: 13px; font-weight: 500; letter-spacing: 0.24em; }
.stats dd b, .tabs button, .logo-latin { font-family: var(--f-latin); }
.stats dd b { font-weight: 600; font-size: clamp(28px, 2.4vw, 38px); letter-spacing: -0.02em; }
.stats dd { white-space: nowrap; }
.tabs button { font-weight: 600; font-size: 13px; letter-spacing: 0; }
.status, .hero-hint, .boot, .reticle span, .process span, .process b, .sectors ol button b { font-size: 11px; font-weight: 300; }
.boot { font-size: 12px; }
.status { gap: 28px; letter-spacing: 0; }
.status b { margin-left: 6px; }

/* スマホのメールデモ：表示中のカードだけを出し、長いカードに合わせた余白を作らない */
@media (max-width: 860px) {
  .mail { display: block; }
  .mail-card { display: none; }
  .mail-card.is-on { display: block; }
}
@media (max-width: 860px) {
  .steps button { padding: 8px 3px 10px; font-size: 11.5px; letter-spacing: -0.01em; }
}
