/* =========================================================
   site.css — 全ページ共通の土台（invest-aitech v4 試作 07）
   白い紙 × 青のインク。深い紺は「ご相談」とフッターだけ。
   トップは site.css → style.css、下層は site.css → 各ページの css の順に読む。
   ========================================================= */

/* ---------- ページ間の移動（cross-document View Transitions） ----------
   ・ヘッダーは動かさず、本文だけが上から「刷り上がる」ように切り替わる
   ・事例カードの画面は、詳細ページの画面へそのまま移る（名前は site.js が遷移の瞬間だけ付ける） */
@view-transition { navigation: auto; }
html.vt-local { view-transition-name: none; } /* ページ内の切り替え演出の間は、ページ全体を動かさない */

:root {
  --paper: #f4f7fc;
  --paper-2: #eaf0f9;
  --white: #ffffff;
  --ink: #0b1630;
  --ink-2: #26344f;
  --ink-3: #46536b;
  --note: #3d4a5f;
  --line: #dde5f1;
  --line-2: #c8d5e8;
  --blue: #2563eb;
  --blue-2: #1d4ed8;
  --blue-3: #1e40af;
  --blue-ink: #13265c;
  --blue-l: #60a5fa;
  --blue-xl: #93c5fd;
  --blue-soft: #dbeafe;
  --blue-mist: #eef4ff;
  --navy: #0a1a3f;
  --navy-3: #071330;

  --header-h: 72px;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --stage-h: 100vh;

  --f-jp: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  --f-head: "Zen Kaku Gothic New", "Noto Sans JP", "Hiragino Sans", sans-serif;
  --f-num: "Geist", "Noto Sans JP", system-ui, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SFMono-Regular", monospace;
  /* 数字・英字の見出し・章番号は Geist（02 の数字の書体）。本文の Noto Sans JP・見出しの Zen Kaku Gothic New と並べても線の太さがそろう。
     細い線と太い線の差が大きい装飾的なセリフ体は使わない（v4 の約束） */
  --ease: cubic-bezier(.2, .7, .1, 1);
}

.site-header { view-transition-name: site-header; }
.proto-label { view-transition-name: proto-label; }
::view-transition-group(case-media) { animation-duration: .6s; animation-timing-function: var(--ease); }
::view-transition-old(case-media), ::view-transition-new(case-media) { height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: vtOut .32s var(--ease) both; }
  ::view-transition-new(root) { animation: vtIn .62s var(--ease) both; }
}
@keyframes vtOut { to { opacity: 0; transform: translateY(-10px); } }
@keyframes vtIn {
  from { clip-path: inset(0 0 100% 0); transform: translateY(14px); }
  to { clip-path: inset(0 0 0 0); transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
@media (prefers-reduced-motion: no-preference) {
  html.smooth { scroll-behavior: smooth; }
}
body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--f-jp);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, canvas, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; }
a { color: inherit; }
p, li, dd, dt, h1, h2, h3, h4, figcaption, span { word-break: auto-phrase; }
p, li { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; }
::selection { background: var(--blue-soft); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}
.contact :focus-visible, .site-footer :focus-visible, .cta-band :focus-visible, .on-navy :focus-visible { outline-color: #93c5fd; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}
.sr-only {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important; border: 0 !important;
}
.skip {
  position: fixed; left: 12px; top: 12px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--navy); color: #fff; text-decoration: none; font-size: 14px;
  transform: translateY(-160%);
  transition: transform .2s;
}
.skip:focus { transform: none; }

.i {
  width: 16px; height: 16px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- 読了バー（scroll-driven） ---------- */
.progress {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: 3px;
  background: linear-gradient(90deg, var(--blue-2), var(--blue-l));
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}
@supports (animation-timeline: scroll()) {
  .progress { animation: progress linear both; animation-timeline: scroll(root); }
}
@keyframes progress { to { transform: scaleX(1); } }

/* ---------- buttons ---------- */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: var(--h);
  padding: 0 1.35em;
  border: 1px solid transparent;
  border-radius: 12px;
  font-family: var(--f-head); font-weight: 700; font-size: 15.5px;
  letter-spacing: .03em; line-height: 1.3;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s, box-shadow .25s, border-color .25s, color .25s;
}
.btn .i { transition: transform .25s var(--ease); }
.btn:hover .i { transform: translateX(3px); }
.btn-primary {
  background: var(--blue); color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.22) inset, 0 12px 26px -14px rgba(37,99,235,.85);
}
.btn-primary:hover { background: var(--blue-2); transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,.88); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-2); transform: translateY(-1px); }
.btn-white { background: #fff; color: var(--navy); box-shadow: 0 14px 30px -16px rgba(0,0,0,.6); }
.btn-white:hover { background: #e9f1ff; transform: translateY(-1px); }
.btn-line { background: rgba(255,255,255,.05); color: #fff; border-color: rgba(191,219,254,.45); }
.btn-line:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.btn-lg { --h: 56px; font-size: 16px; padding: 0 1.6em; }
.btn-sm { --h: 40px; font-size: 14px; padding: 0 1.15em; border-radius: 10px; }
.btn .soon, .soon {
  display: inline-flex; align-items: center; padding: 0 8px; border-radius: 999px;
  font-family: var(--f-jp); font-size: 12px; font-weight: 700; line-height: 1.7; letter-spacing: .04em;
  color: var(--blue-2); background: var(--blue-mist); border: 1px solid #cfe0fb;
}
.btn-line .soon, .on-navy .soon { color: #dbeafe; background: rgba(255,255,255,.08); border-color: rgba(191,219,254,.35); }
.link-btn { padding: 0; border: 0; background: none; color: inherit; cursor: pointer; text-align: left; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color .3s, border-color .3s, backdrop-filter .3s;
}
.site-header.is-scrolled {
  background: rgba(244, 247, 252, .8);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: rgba(200, 213, 232, .75);
}
.header-inner {
  width: min(100% - 2 * var(--gutter), 1320px);
  height: 100%; margin-inline: auto;
  display: flex; align-items: center; gap: 28px;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-head); font-weight: 900; font-size: 19px; letter-spacing: .01em;
  color: var(--ink); text-decoration: none; margin-right: auto;
}
.logo-mark { width: 28px; height: 28px; }
.gnav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.gnav a {
  position: relative; display: block; padding: 8px 14px;
  font-size: 14.5px; font-weight: 500; color: var(--ink-2); text-decoration: none;
  border-radius: 8px;
}
.gnav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 1.5px;
  background: var(--blue); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.gnav a:hover, .gnav a[aria-current] { color: var(--blue-2); }
.gnav a:hover::after, .gnav a[aria-current]::after { transform: scaleX(1); }
.gnav a[aria-current="page"] { font-weight: 700; }
.menu-btn {
  display: none; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line-2); background: rgba(255,255,255,.85);
  flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer;
}
.menu-btn span { width: 18px; height: 1.6px; background: var(--ink); border-radius: 2px; }

.mnav {
  margin: 0; inset: 0 0 auto 0; width: 100%; max-width: none; height: auto;
  padding: 18px var(--gutter) 24px;
  border: 0; border-bottom: 1px solid var(--line);
  background: rgba(244, 247, 252, .97);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 30px 60px -30px rgba(11, 22, 48, .4);
  color: var(--ink);
}
.mnav ul { list-style: none; margin: 0; padding: 0; display: grid; }
.mnav a:not(.btn) {
  display: block; padding: 14px 4px;
  font-family: var(--f-head); font-weight: 700; font-size: 18px;
  color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line);
}
.mnav a[aria-current="page"] { color: var(--blue-2); }
.mnav .btn { margin-top: 18px; width: 100%; }
.mnav-close, .mnav-tech {
  display: block; margin: 14px auto 0; padding: 8px 18px;
  border-radius: 999px; border: 1px solid var(--line-2); background: #fff;
  color: var(--ink-2); font-size: 14px; cursor: pointer;
}
.mnav-tech { margin-top: 18px; }
.sp-br { display: none; }
.mnav::backdrop { background: rgba(11, 22, 48, .2); }
.no-popover [popover] { display: none; position: fixed; z-index: 80; }
.no-popover [popover].is-open { display: block; opacity: 1; translate: none; }

/* ---------- header tools / tech panel / toast / label ---------- */
.tools { display: flex; align-items: center; gap: 6px; }
.tool-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; min-width: 38px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .8);
  color: var(--ink-2); font-family: var(--f-jp); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: border-color .2s, color .2s, background-color .2s;
}
.tool-btn:hover { border-color: var(--blue); color: var(--blue-2); background: #fff; }
.tool-btn .i { width: 14px; height: 14px; }
.tool-btn .i-play { display: none; }
.tool-btn[aria-pressed="true"] { color: var(--blue-2); border-color: #9cbcf4; }
.tool-btn[aria-pressed="true"] .i-pause { display: none; }
.tool-btn[aria-pressed="true"] .i-play { display: block; fill: currentColor; stroke: none; }
.tool-tech { padding: 0 13px 0 11px; }
#techBtn { anchor-name: --tech; }

.tech-panel {
  position: fixed; inset: 82px 16px auto auto; margin: 0;
  width: min(440px, calc(100vw - 32px)); max-height: min(72vh, 640px); overflow: auto;
  padding: 22px 22px 18px; border-radius: 18px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  box-shadow: 0 34px 70px -30px rgba(11, 22, 48, .55);
  opacity: 0; translate: 0 10px;
  transition: opacity .25s, translate .3s var(--ease), display .3s allow-discrete, overlay .3s allow-discrete;
}
.tech-panel:popover-open { opacity: 1; translate: 0 0; }
@starting-style {
  .tech-panel:popover-open { opacity: 0; translate: 0 10px; }
}
@supports (position-anchor: --tech) {
  .tech-panel {
    position-anchor: --tech;
    inset: auto;
    top: anchor(bottom); right: anchor(right);
    margin-top: 12px;
  }
}
.tech-panel::backdrop { background: rgba(11, 22, 48, .12); }
.tp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tp-title { margin: 0; font-family: var(--f-head); font-weight: 900; font-size: 1.2rem; color: var(--ink); }
.tp-close {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2);
  background: #fff; color: var(--ink-2); font-size: 18px; line-height: 1; cursor: pointer;
}
.tp-lead { margin: 8px 0 0; font-size: 14px; color: var(--ink-3); }
.tp-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.tp-list li { padding: 10px 12px; border-radius: 12px; background: var(--paper); font-size: 13.5px; line-height: 1.7; }
.tp-list b { display: block; font-family: var(--f-head); font-size: 14.5px; color: var(--blue-ink); }

.toast {
  position: fixed; left: 50%; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 70;
  max-width: min(92vw, 520px); padding: 12px 18px; border-radius: 12px;
  background: var(--navy); color: #fff; font-size: 14px; line-height: 1.6;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6);
  opacity: 0; translate: -50% 16px; pointer-events: none;
  transition: opacity .3s, translate .35s var(--ease);
}
.toast.is-on { opacity: 1; translate: -50% 0; }

.proto-label {
  position: fixed; left: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 55;
  margin: 0; padding: 3px 9px; border-radius: 6px;
  font-size: 12px; letter-spacing: .06em; line-height: 1.5;
  color: #fff; background: rgba(11, 22, 48, .78);
  pointer-events: none;
}

/* =========================================================
   共通の部品（見出し・バッジ・リンク）
   ========================================================= */
.sec { position: relative; z-index: 1; padding: clamp(64px, 7.5vw, 108px) 0; }
.sec-head { margin-bottom: clamp(28px, 4vw, 44px); }
.sec-head-split {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 20px 64px; align-items: end;
}
.sec-head-split .sec-lead { margin: 0 0 6px; }
.sec-label {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 0 18px;
  font-size: 13.5px; font-weight: 700; letter-spacing: .14em; color: var(--blue-2);
}
.sec-num {
  font-family: var(--f-mono); font-size: 12.5px; font-weight: 500; letter-spacing: .02em;
  color: var(--blue); padding: 2px 9px; border-radius: 999px;
  border: 1px solid #bed1f5; background: rgba(255, 255, 255, .75);
}
.sec-title {
  margin: 0;
  font-family: var(--f-head); font-weight: 900;
  font-size: clamp(1.8rem, 3.2vw, 2.85rem);
  line-height: 1.3; letter-spacing: -.015em; color: var(--ink);
  font-feature-settings: "palt";
}
.sec-title .em { color: var(--blue); }
.sec-lead { margin: 22px 0 0; max-width: 34em; font-size: 16px; color: var(--ink-3); }
.sec-label-inv { color: #bcd3ff; }
.sec-label-inv .sec-num { color: #bfdbfe; background: rgba(255, 255, 255, .06); border-color: rgba(191, 219, 254, .35); }

.more-link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 24px;
  font-family: var(--f-head); font-weight: 700; font-size: 15.5px;
  color: var(--blue-2); text-decoration: none;
}
.more-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.more-link .i { transition: transform .25s var(--ease); }
.more-link:hover .i { transform: translateX(3px); }

.badge {
  display: inline-flex; align-items: center; gap: 7px; margin: 0 0 14px;
  padding: 4px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; color: var(--blue-2);
  background: var(--blue-mist); border: 1px solid #cfe0fb;
}
.badge-award { background: linear-gradient(90deg, #eef4ff, #dfeaff); }
.live-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }
.tech-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0; padding: 0; }
.tech-tags li {
  padding: 2px 9px; border-radius: 6px;
  font-family: var(--f-mono); font-size: 12.5px; color: var(--ink-2);
  background: #fff; border: 1px solid var(--line-2);
}
.rel-k {
  padding: 1px 6px; border-radius: 6px; text-align: center;
  font-size: 12px; font-weight: 700; color: var(--blue-2);
  border: 1px solid #c9daf8; background: #fff; line-height: 1.6;
}
.notice { margin: 12px 0 0; font-size: 13px; line-height: 1.7; color: var(--note); }
.ext::after {
  content: ""; display: inline-block; width: 11px; height: 11px; margin-left: 6px; vertical-align: -1px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 3h7v7M13 3 6.5 9.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 3h7v7M13 3 6.5 9.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- 下層ページの最初の画面（page hero） ---------- */
.phero {
  position: relative; z-index: 1; overflow: hidden; isolation: isolate;
  padding: calc(var(--header-h) + clamp(28px, 4.5vw, 60px)) 0 clamp(40px, 5vw, 72px);
}
.phero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(37, 99, 235, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, .07) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(60% 75% at 74% 45%, #000 10%, transparent 80%);
  mask-image: radial-gradient(60% 75% at 74% 45%, #000 10%, transparent 80%);
}
.phero::after {
  content: ""; position: absolute; z-index: -1; right: -8%; top: 46%;
  width: min(64vw, 900px); aspect-ratio: 1; translate: 0 -50%;
  background: radial-gradient(closest-side, rgba(147, 197, 253, .3), rgba(219, 234, 254, .16) 55%, transparent 74%);
  pointer-events: none;
}
.phero-grid { display: grid; grid-template-columns: minmax(0, 6.4fr) minmax(0, 5.6fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.phero-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.phero-eyebrow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 18px;
  font-size: 13.5px; font-weight: 700; letter-spacing: .14em; color: var(--blue-2);
}
.phero-eyebrow .en {
  font-family: var(--f-num); font-weight: 600; letter-spacing: 0;
  font-size: 22px; line-height: 1; color: var(--blue-ink);
}
.phero-title {
  margin: 0; font-family: var(--f-head); font-weight: 900; color: var(--ink);
  font-size: clamp(2.1rem, 4.8vw, 4.2rem); line-height: 1.16; letter-spacing: -.025em;
  font-feature-settings: "palt";
}
.phero-title .em {
  background: linear-gradient(100deg, #1e40af 0%, #2563eb 45%, #3b82f6 75%, #2563eb 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.phero-title .sub { display: block; margin-top: 12px; font-size: .38em; font-weight: 700; letter-spacing: .02em; color: var(--ink-3); line-height: 1.5; }
.phero-lead { margin: 22px 0 0; max-width: 36em; font-size: clamp(15.5px, 1.15vw, 17px); line-height: 1.95; color: var(--ink-2); }
.phero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.phero-visual { position: relative; min-height: 360px; }

/* パンくず */
.crumbs { margin: 0 0 22px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin: 0; padding: 0; font-size: 13px; color: var(--ink-3); }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before {
  content: ""; width: 5px; height: 5px; margin: 0 12px; border: solid var(--blue-l); border-width: 1.5px 1.5px 0 0; transform: rotate(45deg);
}
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--blue-2); text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current] { color: var(--ink); font-weight: 700; }

/* ---------- 点描の図（fx.js が描く。WebGL が使えないときは Canvas 2D の静止画） ---------- */
.fx { position: relative; width: 100%; height: 100%; min-height: inherit; }
.fx canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.fx-cap {
  position: absolute; left: 12px; bottom: 10px; z-index: 1; margin: 0;
  padding: 2px 11px; border-radius: 999px;
  font-size: 12.5px; color: var(--ink-3); line-height: 1.7;
  background: rgba(255, 255, 255, .88); border: 1px solid var(--line);
}
.fx-hint {
  position: absolute; right: 12px; top: 10px; z-index: 1; margin: 0;
  padding: 2px 11px; border-radius: 999px;
  font-size: 12.5px; color: var(--blue-2); line-height: 1.7;
  background: rgba(255, 255, 255, .9); border: 1px solid #cfe0fb;
}
.fx-frame {
  position: relative; overflow: hidden; border-radius: 22px; border: 1px solid #dfe7f4;
  background:
    radial-gradient(closest-side, rgba(191, 219, 254, .45), transparent 80%) 50% 50% / 90% 90% no-repeat,
    linear-gradient(rgba(37, 99, 235, .055) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(37, 99, 235, .055) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(180deg, #fbfcff, #eef3fc);
}

/* ---------- アプリの画面の枠（ブラウザ風） ---------- */
.device {
  overflow: hidden; border-radius: 16px;
  background: #0b1222; border: 1px solid #d2dcea;
  box-shadow: 0 26px 50px -30px rgba(11, 22, 48, .55);
}
.device-bar {
  display: flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px;
  background: #f1f5fb; border-bottom: 1px solid var(--line);
}
.device-bar i { width: 9px; height: 9px; border-radius: 50%; background: #cbd5e1; }
.device-bar span {
  min-width: 0; margin-left: 10px; padding: 0 10px;
  font-family: var(--f-mono); font-size: 12px; line-height: 20px; color: var(--ink-3);
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.device-screen {
  position: relative; display: block; aspect-ratio: 16 / 9;
  background: #0b1222 50% 50% / cover no-repeat;
}
.device-screen.screen-43 { aspect-ratio: 4 / 3; }
.device-screen.screen-1610 { aspect-ratio: 16 / 10; }
.device-screen video, .device-screen img { width: 100%; height: 100%; object-fit: cover; }
.device-screen img.top { object-position: 50% 0; }
.js .case-video { opacity: 0; transition: opacity .6s ease; }
.js .case-video.is-live { opacity: 1; }
.play-btn {
  position: absolute; left: 50%; bottom: 14px; translate: -50% 0;
  padding: 10px 18px 10px 40px; border-radius: 999px; border: 0; white-space: nowrap;
  background: rgba(255, 255, 255, .94) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 3.5 12 8l-7 4.5z' fill='%232563eb'/%3E%3C/svg%3E") 16px 50% / 16px no-repeat;
  color: var(--ink); font-size: 14px; font-weight: 700; cursor: pointer;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5);
}
.play-btn small { font-size: 12px; font-weight: 500; color: var(--ink-3); }

/* ---------- 絞り込み（制作物の一覧・記事の一覧で共通） ---------- */
.filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.filter legend { float: left; margin-right: 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .12em; color: var(--ink-3); }
.filter label { position: relative; cursor: pointer; }
.filter input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.filter span {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  font-size: 14px; line-height: 1.4; color: var(--ink);
  background: #fff; border: 1px solid var(--line-2);
  transition: background-color .2s, border-color .2s, color .2s;
}
.filter span b { font-family: var(--f-mono); font-weight: 500; font-size: 12px; color: var(--ink-3); }
.filter label:hover span { border-color: var(--blue); }
.filter input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.filter input:checked + span b { color: #bcd0f3; }
.filter input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.filter-count { margin: 0 0 0 auto; font-size: 13px; color: var(--ink-3); }
.filter-count b { font-family: var(--f-mono); font-weight: 500; color: var(--ink); }

/* ---------- 章立ての読み物（左に目次、右に本文） ---------- */
.chapters { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.toc { position: sticky; top: calc(var(--header-h) + 28px); }
.toc-h { margin: 0 0 10px; font-size: 12.5px; font-weight: 700; letter-spacing: .14em; color: var(--ink-3); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line-2); }
.toc ol a {
  position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 4px;
  padding: 7px 0 7px 16px; font-size: 14px; line-height: 1.55; color: var(--ink-3); text-decoration: none;
  transition: color .2s;
}
.toc ol a::before {
  content: ""; position: absolute; left: -1.5px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px;
  background: var(--blue); transform: scaleY(0); transition: transform .3s var(--ease);
}
.toc ol a span { font-family: var(--f-mono); font-size: 12px; color: var(--blue-l); padding-top: 2px; }
.toc ol a:hover { color: var(--ink); }
.toc ol a[aria-current="true"] { color: var(--ink); font-weight: 700; }
.toc ol a[aria-current="true"]::before { transform: scaleY(1); }
.toc ol a[aria-current="true"] span { color: var(--blue); }
.toc-cta { margin-top: 22px; display: grid; gap: 8px; }
.toc-cta .btn { width: 100%; }

.chapter { padding: 0 0 clamp(48px, 6vw, 80px); }
.chapter + .chapter { padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line); }
.ch-label { display: flex; align-items: baseline; gap: 14px; margin: 0 0 14px; font-size: 13.5px; font-weight: 700; letter-spacing: .12em; color: var(--blue-2); }
.ch-no {
  font-family: var(--f-num); font-weight: 500; letter-spacing: -.02em;
  font-size: 44px; line-height: 1; color: var(--blue);
}
.ch-title {
  margin: 0; font-family: var(--f-head); font-weight: 900; color: var(--ink);
  font-size: clamp(1.55rem, 2.5vw, 2.2rem); line-height: 1.35; letter-spacing: -.01em;
  font-feature-settings: "palt";
}
.ch-text { margin: 18px 0 0; max-width: 40em; font-size: 16.5px; line-height: 1.95; color: var(--ink-2); }

/* ---------- ご相談の帯（下層ページの最後） ---------- */
.cta-band {
  position: relative; z-index: 1; overflow: hidden; isolation: isolate;
  padding: clamp(60px, 7vw, 100px) 0;
  color: #dbe6fb;
  background:
    radial-gradient(90% 80% at 88% 8%, #17377d 0%, transparent 60%),
    radial-gradient(60% 60% at 0% 100%, #0e2a63 0%, transparent 70%),
    var(--navy);
}
.cta-rosette {
  position: absolute; z-index: -1; right: -16%; top: 50%;
  width: min(1000px, 120vw); aspect-ratio: 1;
  translate: 0 -50%; pointer-events: none; opacity: .7;
}
@media (prefers-reduced-motion: no-preference) {
  .cta-rosette { animation: rot 200s linear infinite; }
}
@keyframes rot { to { transform: rotate(360deg); } }
.cta-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(28px, 5vw, 72px); align-items: end; }
.cta-title {
  margin: 0; font-family: var(--f-head); font-weight: 900; color: #fff;
  font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.28; letter-spacing: -.01em;
  font-feature-settings: "palt";
}
.cta-lead { margin: 18px 0 0; font-size: 16.5px; color: #cddbf6; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.cta-side { display: grid; gap: 14px; }
.mail-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px;
  padding: 14px 16px; border-radius: 14px;
  border: 1px solid rgba(191, 219, 254, .22); background: rgba(255, 255, 255, .04);
}
.mail-label { font-size: 12.5px; letter-spacing: .1em; color: #adc4ec; }
.mail-link {
  font-family: var(--f-mono); font-size: 16px; color: #fff; text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .35);
}
.mail-link:hover { border-bottom-color: #fff; }
.copy-btn {
  margin-left: auto; padding: 4px 13px; border-radius: 8px;
  font-size: 13px; color: #dbe6fb; background: transparent;
  border: 1px solid rgba(191, 219, 254, .38); cursor: pointer;
}
.copy-btn:hover { background: rgba(255, 255, 255, .08); }
.cta-terms { display: grid; gap: 10px; margin: 0; }
.cta-terms div { display: grid; grid-template-columns: 6em minmax(0, 1fr); gap: 12px; }
.cta-terms dt { font-size: 13px; color: #adc4ec; padding-top: 2px; }
.cta-terms dd { margin: 0; font-size: 15px; color: #e6eefc; }

/* ---------- footer ---------- */
.site-footer {
  position: relative; z-index: 1; overflow: hidden;
  padding: clamp(56px, 8vw, 96px) 0 calc(48px + env(safe-area-inset-bottom));
  background: var(--navy-3); color: #c3d3ef;
}
.foot-grid {
  display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 32px;
}
.logo-inv { color: #fff; }
.foot-desc { margin: 12px 0 0; font-size: 14px; color: #a9bde0; }
.foot-h { margin: 0 0 10px; font-size: 12.5px; font-weight: 700; letter-spacing: .12em; color: #92abd7; }
.foot-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.foot-nav a, .foot-nav .link-btn { font-size: 14.5px; color: #dbe6fb; text-decoration: none; line-height: 1.85; }
.foot-nav a:hover, .foot-nav .link-btn:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.foot-nav a[aria-current="page"] { color: #fff; font-weight: 700; }
.foot-nav .soon { margin-left: 6px; color: #bfdbfe; background: rgba(255,255,255,.06); border-color: rgba(191,219,254,.3); }
.foot-sns { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
.copyright { margin: 40px 0 0; font-size: 13px; color: #92abd7; }

/* ---------- 数字（外部評価・実績）: Geist の等幅数字 ---------- */
.num { font-family: var(--f-num); font-weight: 600; letter-spacing: -.035em; font-variant-numeric: tabular-nums lining-nums; }

/* ---------- 読み取りの光（02 の外部評価の「カーテン」を共通部品に）----------
   [data-curtain] を付けた要素が画面に入ると、site.js が data-read="go" を付け、光の帯が左から右へ一度だけ通る。
   時間で再生するのでスクロールを途中で止めても数字が薄いまま残らない。--i で順番に遅らせる。
   帯の中で薄くしたい数字には .curtain-fig を付ける（.fig-big / .fig-word も対象） */
[data-curtain] { position: relative; overflow: hidden; isolation: isolate; }
@media (prefers-reduced-motion: no-preference) {
  html:not(.motion-paused) [data-curtain][data-read="go"]::before {
    content: ""; position: absolute; z-index: 3; top: 0; bottom: 0; left: 0; width: 24%; pointer-events: none;
    background: linear-gradient(90deg, rgba(96, 165, 250, 0), rgba(96, 165, 250, .16) 70%, rgba(37, 99, 235, .42) 97%, rgba(255, 255, 255, .92) 98.5%, rgba(37, 99, 235, 0));
    animation: curtainScan 1.15s cubic-bezier(.45, 0, .25, 1) calc(var(--i, 0) * .16s) both;
  }
  html:not(.motion-paused) [data-curtain][data-read="go"] :is(.curtain-fig, .fig-big, .fig-word, .en-big, .en-word) {
    animation: curtainFig 1s ease-out calc(.3s + var(--i, 0) * .16s) both;
  }
}
@keyframes curtainScan { 0% { transform: translateX(-110%); opacity: 1; } 85% { opacity: 1; } 100% { transform: translateX(440%); opacity: 0; visibility: hidden; } }
@keyframes curtainFig { 0% { opacity: 1; } 24% { opacity: .32; } 100% { opacity: 1; } }

/* ---------- 選抜の点の図（486 個の点から 24 個）: canvas.sel-dots[data-total][data-hit] を site.js が描く ---------- */
.sel-dots { display: block; width: 100%; height: 64px; }

/* =========================================================
   MOTION
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  .js .phero-copy > * { animation: fadeUp .9s var(--ease) both; }
  .js .phero-copy > :nth-child(2) { animation-delay: .06s; }
  .js .phero-copy > :nth-child(3) { animation-delay: .14s; }
  .js .phero-copy > :nth-child(4) { animation-delay: .22s; }
  .js .phero-copy > :nth-child(5) { animation-delay: .3s; }
  .js .phero-copy > :nth-child(n+6) { animation-delay: .38s; }
  .js .phero-visual { animation: fadeIn 1.2s .2s var(--ease) both; }
  @supports (animation-timeline: view()) {
    .rise {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 75%;
    }
  }
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

.motion-paused *, .motion-paused *::before, .motion-paused *::after { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}

/* =========================================================
   RESPONSIVE（共通部品）
   ========================================================= */
@media (max-width: 1279px) {
  .tool-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tool-tech { padding: 0 10px; }
  .gnav a { padding: 8px 10px; }
}
@media (max-width: 1023px) {
  .gnav { display: none; }
  .menu-btn { display: inline-flex; }
  .header-inner { gap: 10px; }
  .sec-head-split { grid-template-columns: minmax(0, 1fr); }
  .phero-grid { grid-template-columns: minmax(0, 1fr); }
  .phero-visual { min-height: 300px; }
  .chapters { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .cta-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .sp-br { display: inline; }
  .header-inner { gap: 8px; }
  .logo { font-size: 17px; gap: 8px; }
  .logo-mark { width: 26px; height: 26px; }
  .tool-tech { display: none; }
  .header-cta { --h: 38px; padding: 0 .9em; font-size: 13.5px; }
  .btn { white-space: normal; text-align: center; }
  .btn-lg { --h: 52px; font-size: 15.5px; padding: 0 1.2em; }
  .sec-title { font-size: 1.62rem; }
  .phero-actions .btn, .cta-actions .btn { flex: 1 1 100%; }
  .phero-title .sub { font-size: .46em; }
  .phero-visual { min-height: 260px; }
  .ch-no { font-size: 36px; }
  .ch-text { font-size: 15.5px; }
  .filter-count { flex-basis: 100%; margin: 4px 0 0; }
  .copy-btn { margin-left: 0; }
  .cta-terms div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .tool-btn { height: 40px; min-width: 40px; }
  .tool-btn .i { width: 16px; height: 16px; }
}
