/* トップページだけで使う部分（共通は rm.css）

   物語の骨組み（2026-11-08 オーナー指示「空間を、価値へ。をメインテーマにストーリー性を」）
     序   空間を、価値へ。（.flow で4幕を先に見せる）
     第1幕 空間   なぜ必要か／地下
     第2幕 点     どんな技術か／測る・共有する
     第3幕 かたち 図面・BIM／デジタルツイン
     第4幕 価値   解析・応用／事例／プロダクト
     結び  あなたの空間も、価値へ。
   各幕の頭に .act（今どこか）を置き、パソコンでは右端の .journey が今の幕を示す。 */

/* ---------- 物語の道しるべ ---------- */
.flow {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 16px;
  padding-top: 18px; border-top: 1px solid var(--night-line);
}
.flow li { grid-column: span 3; display: grid; gap: 4px; align-content: start; }
.flow b {
  font-size: clamp(1.15rem, 1.8vw, 1.6rem); font-weight: 800; line-height: 1.3; letter-spacing: .04em;
  font-feature-settings: "palt" 1;
}
.flow li:not(:last-child) b::after { content: "→"; margin-left: .45em; font-weight: 400; color: var(--night-faint); }
.flow li:last-child b { color: var(--blue-night); }
.flow span { font-size: .75rem; line-height: 1.6; letter-spacing: .06em; color: var(--night-dim); }
@media (max-width: 599px) { .flow li { grid-column: span 6; } }
/* 動画の進みに合わせて、今の幕だけを明るくし、上の線を伸ばす（rm.js が is-sync・is-now・--p を付ける） */
.flow li { position: relative; }
.flow.is-sync li { opacity: .42; transition: opacity .6s; }
.flow.is-sync li.is-now { opacity: 1; }
.flow.is-sync li.is-now::before {
  content: ""; position: absolute; left: 0; top: -19px; height: 2px; width: var(--p, 0%);
  background: var(--blue-night);
}
@media (max-width: 599px) { .flow.is-sync li:nth-child(n+3).is-now::before { top: -10px; } }

.act { display: flex; flex-wrap: wrap; align-items: baseline; font-size: .8125rem; font-weight: 700; letter-spacing: .14em; color: var(--fg-faint); }
/* 矢印は inline-block にして、今の幕の下線が矢印に伸びないようにする */
.act span + span::before { content: "→"; display: inline-block; margin: 0 .8em; font-weight: 400; letter-spacing: 0; color: var(--fg-faint); }
.act .is-on { color: var(--accent); text-decoration: underline 2px; text-underline-offset: 8px; }

.journey {
  position: fixed; z-index: 40; top: 50%; right: max(14px, calc(var(--gutter) / 2 - 12px)); transform: translateY(-50%);
  display: none; flex-direction: column; gap: 6px;
  --j-dim: rgba(238, 242, 244, .42); --j-on: #fff;
  transition: opacity .4s;
}
.journey[data-on="paper"] { --j-dim: rgba(16, 18, 22, .36); --j-on: var(--ink); }
.journey a {
  writing-mode: vertical-rl; text-orientation: upright;
  padding: 8px 6px; font-size: .75rem; font-weight: 700; letter-spacing: .32em; text-decoration: none;
  color: var(--j-dim); border-right: 2px solid transparent; transition: color .3s, border-color .3s;
}
.journey a.is-on { color: var(--j-on); border-right-color: var(--blue); }
@media (min-width: 1200px) { .journey.is-shown { display: flex; } }
/* 英語は縦に1字ずつ積むと読めないので、横倒しにする */
html[lang="en"] .journey a { text-orientation: mixed; letter-spacing: .16em; font-size: .6875rem; text-transform: uppercase; }
html[lang="en"] .way__verb { letter-spacing: -.02em; }
html[lang="en"] .flow b { letter-spacing: 0; }

.chapter--tight { padding-top: clamp(64px, 8vw, 120px); }
.ways__title { margin-bottom: clamp(32px, 4vw, 56px); }

/* ---------- 0. ヒーロー ---------- */
.hero {
  position: relative; min-height: max(100svh, 600px);
  display: grid; align-items: end; overflow: hidden;
}
/* 最初の絵は動画の下に敷く（スマホとパソコンで出し分けるため poster 属性ではなく picture） */
.hero__poster { position: absolute; inset: 0; }
.hero__poster img { width: 100%; height: 100%; object-fit: cover; }
/* 動画は再生が始まってから見せる（rm.js が is-playing を付ける）。自動再生が止められたときや
   動きを減らす設定では、下の最初の絵（夕景）がそのまま見える */
.hero__media {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .8s;
}
.hero__media.is-playing, .no-js .hero__media { opacity: 1; }
/* AI で作った絵が映っている間だけ出す札（rm.js が is-on を付け外しする） */
.hero__ai {
  position: absolute; z-index: 2; right: var(--gutter); top: calc(var(--header-h) + 12px);
  padding: 4px 10px; border-radius: 3px; background: rgba(4, 7, 11, .45);
  font-size: .6875rem; letter-spacing: .1em; color: rgba(255, 255, 255, .86);
  opacity: 0; transition: opacity .5s;
}
.hero__ai.is-on { opacity: 1; }
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 7, 11, .55) 0%, rgba(4, 7, 11, 0) 22%),
    linear-gradient(0deg, rgba(4, 7, 11, .92) 0%, rgba(4, 7, 11, .55) 34%, rgba(4, 7, 11, 0) 64%);
}
.hero__body {
  position: relative; z-index: 1;
  padding-block: calc(var(--header-h) + 40px) clamp(56px, 8vh, 104px);
  display: grid; gap: clamp(20px, 2.4vw, 32px);
}
.hero__body .t-hero { max-width: 9.5em; }
.hero__body .label { color: var(--night-dim); }
.hero__lead { font-size: var(--t-lead); line-height: 2; letter-spacing: .05em; color: var(--night-dim); max-width: 30em; }
.hero__caption { font-size: .6875rem; letter-spacing: .1em; color: var(--night-faint); margin-top: 4px; }
@media (max-width: 899px) {
  .hero__body { padding-bottom: 32px; }
}

/* ---------- 1. なぜ ---------- */
.why__list { counter-reset: why; display: grid; gap: 0; border-top: 1px solid var(--line); }
.why__item {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap);
  padding: clamp(28px, 3.4vw, 44px) 0; border-bottom: 1px solid var(--line);
}
.why__num {
  grid-column: 1 / span 2;
  font-family: "Inter", sans-serif; font-weight: 800; font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1; letter-spacing: -.03em; color: var(--accent);
}
.why__item h3 { grid-column: 3 / span 4; }
.why__item p { grid-column: 7 / -1; color: var(--fg-dim); }
@media (max-width: 899px) {
  .why__num, .why__item h3, .why__item p { grid-column: 1 / -1; }
  .why__item h3 { margin-top: 14px; }
  .why__item p { margin-top: 8px; }
}
.why__foot { margin-top: clamp(40px, 5vw, 64px); }

/* ---------- 2. 点群（WebGL） ---------- */
.pc {
  position: relative; height: min(78vh, 760px); min-height: 420px;
  border-radius: 6px; overflow: hidden; background: #020407;
  touch-action: pan-y;
}
@media (max-width: 899px) { .pc { height: auto; min-height: 0; aspect-ratio: 4 / 5; } }
.pc canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; cursor: grab; }
.pc canvas:active { cursor: grabbing; }
.pc__fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.pc.is-live .pc__fallback { opacity: 0; transition: opacity 1.2s; pointer-events: none; }
.pc__hud {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; flex-wrap: wrap; align-items: end; justify-content: flex-start; gap: 12px;
  padding: 18px 20px; pointer-events: none;
  background: linear-gradient(0deg, rgba(2, 4, 7, .8), rgba(2, 4, 7, 0));
}
.pc__note { margin-top: 14px; }
.pc__btns { display: flex; gap: 8px; pointer-events: auto; }
.pc__btns button {
  min-height: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22);
  font-size: .75rem; font-weight: 600; letter-spacing: .08em; color: #fff;
}
.pc__btns button[aria-pressed="true"] { background: #fff; color: var(--ink); }
.pc__count {
  position: absolute; left: 20px; top: 18px; z-index: 2; pointer-events: none;
  font-family: "Inter", sans-serif; font-variant-numeric: tabular-nums;
}
.pc__count b { display: block; font-size: clamp(1.6rem, 3vw, 2.6rem); font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.pc__count span { display: block; margin-top: 6px; font-size: .6875rem; letter-spacing: .14em; color: var(--night-dim); }
.tech__body { margin-top: clamp(40px, 5vw, 72px); row-gap: 40px; }

/* ---------- 3. 活かし方 ---------- */
.ways { border-top: 1px solid var(--line); }
.way {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 24px;
  padding: clamp(40px, 5vw, 72px) 0; border-bottom: 1px solid var(--line); align-items: start;
}
.way__text { grid-column: 1 / span 5; display: grid; gap: 14px; align-content: start; }
.way__media { grid-column: 6 / -1; display: grid; gap: var(--gap); }
.way__media--two { grid-template-columns: 1fr 1fr; }
.way__num { font-family: "Inter", sans-serif; font-size: .75rem; font-weight: 700; letter-spacing: .2em; color: var(--accent); }
.way__verb { font-size: clamp(2rem, 4.2vw, 3.8rem); font-weight: 800; line-height: 1.1; letter-spacing: -.01em; font-feature-settings: "palt" 1; }
.way__copy { font-size: var(--t-h3); font-weight: 700; line-height: 1.55; }
.way__text p.t-body { font-size: .9375rem; }
.way__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.way__term { font-size: .8125rem; line-height: 1.85; color: var(--fg-dim); padding-left: 14px; border-left: 2px solid var(--accent); }
.way__term dfn { font-style: normal; font-weight: 700; color: var(--fg); margin-right: .4em; }
@media (max-width: 899px) {
  .way__text, .way__media { grid-column: 1 / -1; }
  .way__media--two { grid-template-columns: 1fr; }
}

/* ---------- 4. デジタルツイン ---------- */
.cinema { position: relative; min-height: min(92vh, 900px); display: grid; align-items: end; overflow: hidden; }
.cinema__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cinema__shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(4, 7, 11, .94) 0%, rgba(4, 7, 11, .5) 38%, rgba(4, 7, 11, .08) 70%); }
.cinema__body { position: relative; z-index: 1; padding-block: 160px clamp(56px, 7vw, 96px); display: grid; gap: 24px; }
.cinema__note { position: absolute; z-index: 1; right: var(--gutter); top: calc(var(--header-h) + 16px); font-size: .6875rem; letter-spacing: .1em; color: rgba(255, 255, 255, .78); text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.twin__body { row-gap: 40px; align-items: start; }
.twin__after { padding-top: clamp(56px, 7vw, 104px); }
.twin__term { margin-bottom: 28px; }

/* ---------- 5. 地下 ---------- */
.under__grid { row-gap: 48px; align-items: start; }
.under__facts { margin-top: 40px; }
.under__text, .cases__text { margin-top: 14px; font-size: .9375rem; }
.cases__list { margin-top: 24px; }
.cases__note { margin-top: 14px; }
.track__stats { margin-top: 28px; }
.channel__title { margin-top: 0; }  /* 上の小さな英字を外した（2026-11-17） */
.channel__text { margin-top: 18px; }
.channel__btns { margin-top: 32px; }
.company__title { margin-top: 0; }  /* 上の小さな英字を外した（2026-11-17） */
.company__text { margin-top: 22px; }
.company__more { margin-top: 28px; }
.company__grid .trust { margin-top: 36px; }
.news-rows { margin-top: 18px; }
.news-more { margin-top: 20px; }
.ask__title { margin-top: 0; }  /* 上の小さな英字を外した（2026-11-17） */
.ask__lead { margin-top: 26px; }

/* ---------- 6. 事例 ---------- */
.cases__main { row-gap: 40px; align-items: start; }
.cases__list { display: grid; gap: 0; border-top: 1px solid var(--line); counter-reset: c; }
.cases__list li { display: grid; grid-template-columns: 3.2em 1fr; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.cases__list li::before { counter-increment: c; content: "0" counter(c); font-family: "Inter", sans-serif; font-weight: 700; font-size: .75rem; color: var(--accent); letter-spacing: .1em; padding-top: .3em; }
.industries { margin-top: clamp(72px, 9vw, 128px); }
.ind-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-top: 28px; }
@media (max-width: 1099px) { .ind-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) {
  .ind-grid { gap: 12px; }
  .ind__body { padding: 12px 12px 16px; }
  .ind h3 { font-size: .9375rem; }
  .ind p { font-size: .75rem; line-height: 1.75; }
}
@media (max-width: 339px) { .ind-grid { grid-template-columns: 1fr; } }
.ind { background: var(--card); box-shadow: 0 0 0 1px var(--line); border-radius: 4px; overflow: hidden; }
.ind .media { border-radius: 0; aspect-ratio: 3 / 2; }
.ind__body { padding: 18px 20px 22px; }
.ind h3 { font-size: 1.0625rem; line-height: 1.5; }
.ind p { margin-top: 6px; font-size: .8125rem; line-height: 1.85; color: var(--fg-dim); }
.track { margin-top: clamp(72px, 9vw, 128px); }
.press { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 28px; }

/* ---------- 8. チャンネル ---------- */
.channel { padding-block: clamp(80px, 10vw, 140px); }
.channel__grid { align-items: center; row-gap: 32px; }
.channel__mark { display: inline-flex; align-items: center; gap: 12px; font-size: .75rem; font-weight: 700; letter-spacing: .2em; color: var(--night-dim); }
.channel__mark::before { content: ""; width: 40px; height: 28px; border-radius: 7px; background: #ff0033 no-repeat center / 11px 13px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 12'%3E%3Cpath d='M0 0l10 6-10 6z' fill='%23fff'/%3E%3C/svg%3E"); }
.channel__thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.channel__thumbs a { display: block; border-radius: 4px; overflow: hidden; position: relative; }
.channel__thumbs img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; transition: transform .6s var(--ease); }
.channel__thumbs a:hover img { transform: scale(1.04); }
.channel__thumbs span { display: block; padding: 10px 2px 0; font-size: .75rem; line-height: 1.7; color: var(--night-dim); }

/* ---------- 9. 会社 ---------- */
.company__grid { row-gap: 56px; align-items: start; }
.trust { display: flex; align-items: center; gap: 18px; padding: 18px 20px; border-radius: 6px; background: var(--card); box-shadow: 0 0 0 1px var(--line); text-decoration: none; }
.trust img { width: 56px; height: 56px; flex: none; }
.trust > span { display: block; color: var(--fg); }
.trust b { display: block; font-size: .9375rem; }
.trust > span > span { display: block; margin-top: 2px; font-size: .75rem; color: var(--fg-dim); line-height: 1.7; }

/* ---------- 10. 相談 ---------- */
.ask { padding-block: clamp(110px, 14vw, 200px); background: radial-gradient(60% 55% at 78% 45%, rgba(21, 87, 255, .26), rgba(4, 7, 11, 0) 100%), var(--night); }
.ask .btn-row { margin-top: 40px; }
.ask__tel { display: block; margin-top: 28px; font-family: "Inter", sans-serif; font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 700; letter-spacing: .04em; text-decoration: none; }
.ask__tel small { display: block; font-family: var(--font); font-size: .75rem; font-weight: 400; color: var(--night-faint); letter-spacing: .08em; }

/* ---------- 一語ポスター（2026-11-09 から。rm.css の末尾の節と対） ---------- */
/* ヒーローの一語「空間を、価値へ。」：パソコンは1行、スマホは2行 */
.hero__body .head { gap: clamp(18px, 2vw, 30px); }
.flow b { font-size: 1rem; }
.why__num { font-size: .75rem; font-weight: 700; letter-spacing: .2em; line-height: 1.6; }
.way__verb { font-size: inherit; line-height: 1; }
.pc__count b { font-size: var(--t-statement); }
.ask__tel { font-size: var(--t-statement); }
.ind h3 { font-size: 1rem; }
.cinema__body .head { max-width: 100%; }

/* ---------- 帯（2026-11-17）----------
   オーナーの依頼「ヒーロー画像があったりなかったりしないように統一化」。画像の無かった5章（立場・空間・理由・会社・相談）に、
   同じ枠の大きな画像を見出しのすぐ下に置く。枠はパソコン 21:9、スマホ 4:3。枠の中は1〜4枚（--c×--r、スマホは --sc×--sr）。
   画像は tools/build_media.py の bands、HTML は tools/insert_bands.py が書く */
.band { margin: 0 0 clamp(48px, 6vw, 96px); }
.band__frame {
  display: grid; gap: 2px; aspect-ratio: 21 / 9; border-radius: 8px; overflow: hidden; background: var(--bg);  /* 継ぎ目は章の地の色 */
  grid-template-columns: repeat(var(--c, 1), minmax(0, 1fr)); grid-template-rows: repeat(var(--r, 1), minmax(0, 1fr));
}
.band__frame picture, .band__frame img { display: block; width: 100%; height: 100%; min-height: 0; }
.band__frame picture { background: var(--night-2); }  /* 読み込むまでの地 */
.band__frame img { object-fit: cover; }
.band__note { margin-top: 14px; color: var(--fg-faint); }
@media (max-width: 899px) {
  .band__frame { aspect-ratio: 4 / 3; grid-template-columns: repeat(var(--sc, 1), minmax(0, 1fr)); grid-template-rows: repeat(var(--sr, 1), minmax(0, 1fr)); }
  .band__frame .band__pc { display: none; }
}
.ask .band { margin: 40px 0 0; }
.twin__tour { margin-top: clamp(56px, 7vw, 104px); }  /* 双子の章の Matterport の3Dツアー（2026-11-17） */
.twin__tour .t-h3 + .t-body { margin-top: 12px; }
.twin__tour figcaption { margin-top: 14px; font-size: var(--t-small); color: var(--fg-faint); }
