/* たむワークス 本番トップページのスタイル。
   色の16進はここの :root と src/config.js の SITE_COLORS 以外に書かない。
   動きの数値(秒数・字送りの間隔など)は JS(SITE_MOTION)が起動時に書き込む
   カスタムプロパティを参照するだけで、ここに数値を書かない(2箇所に同じ数値を持たない)。 */

:root {
  --c-main: #1853b0;
  --c-main-dark: #123f88;
  --c-main-light: #3a74cf;
  --c-accent: #f5b400;
  --c-pastel: #eaf1fb;
  --c-card-gray: #f4f5f7;
  --c-text: #1c2333;
  --c-white: #ffffff;
  --c-line: #c9d8f0; /* 進捗の丸・トラック線（未到達） */
  --c-window-bg: #0e0b1a; /* DQ の窓（config の COLORS.bg と同じ） */
  --c-window-text: #f5f1e8; /* DQ の窓の文字（COLORS.text と同じ） */
  --shadow-nav: 0 0 10px rgba(0, 0, 0, 0.1);
  --logo-box-w: 136px; /* 左上のロゴの白い札。MV の左余白もこの幅から取る */
  --logo-box-h: 128px;

  /* site/main.js が SITE_MOTION から書き写す。ここでは既定値を持たない。 */
}

*, *::before, *::after { box-sizing: border-box; }

/* hidden 属性は display 指定より常に勝たせる（#mv-asset-error が display:flex で出っぱなしになった） */
[hidden] { display: none !important; }

html {
  font-size: 62.5%; /* 1rem = 10px */
  scroll-behavior: smooth;
}

html.is-walk-locked, html.is-walk-locked body {
  overflow: hidden;
}

body {
  margin: 0;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1.6rem;
  color: var(--c-text);
  background: var(--c-white);
}

h1, h2, h3, p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

/* ───────── ヘッダー ───────── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 2.4rem;
  pointer-events: none; /* 個々の子要素で戻す */
}

.site-header__logo {
  pointer-events: auto;
  width: var(--logo-box-w);
  height: var(--logo-box-h);
  border-radius: 0 0 40px 0;
  background: var(--c-white);
  box-shadow: var(--shadow-nav);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.site-header__logo-img {
  width: 88px;
  height: auto; /* width/height 属性があるので、幅だけ変えると縦が元の比のまま伸びる */
  image-rendering: pixelated;
}

.site-nav {
  pointer-events: auto;
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  height: 48px;
  display: flex;
  align-items: center;
  gap: 2.4rem;
  padding: 0 2.4rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-nav);
  backdrop-filter: blur(6px);
  transition: transform var(--nav-transition, 0.2s) ease-out, opacity var(--nav-transition, 0.2s) ease-out;
}

.site-nav.is-hidden {
  transform: translate(-50%, -120%);
  opacity: 0;
}

.site-nav a {
  position: relative;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  padding-bottom: 0.4rem;
}

.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--c-main);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--underline-transition, 0.2s) ease-out;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.site-header__cta {
  pointer-events: auto;
  align-self: center;
  margin-top: 16px;
  padding: 1.2rem 2.4rem;
  border-radius: 999px;
  background: var(--c-accent);
  color: var(--c-text);
  font-weight: 700;
  font-size: 1.4rem;
}

.site-header__menu-button {
  display: none;
}

.menu-panel {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--c-main-dark);
  color: var(--c-white);
  padding: 4rem 2.4rem;
}

.menu-panel__title {
  font-family: 'DotGothic16', sans-serif;
  font-size: 2rem;
  margin-bottom: 2rem;
}

.menu-panel nav {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.menu-panel nav a {
  font-family: 'DotGothic16', sans-serif;
  font-size: 1.8rem;
}

/* ───────── メインビジュアル(#top) ─────────
   段A修正(2026-09-26): .ai/plans/tamu-site/implementation-plan.md 末尾の数値どおりに置き直し。
   グレーの札(.mv::before)はページと一緒に流れて消える(sticky にしない)。
   縮む/移動するのは .mv__player だけ。 */

.mv {
  position: relative;
  overflow-x: clip; /* 冒頭の全画面の札が横にはみ出した分を切る(clip は sticky を殺さない) */
}

.mv::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  height: calc(100svh - 40px);
  min-height: 540px;
  border-radius: 40px;
  background: var(--c-card-gray);
  z-index: 0;
}

.mv__outer {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "text visual";
  column-gap: 4rem;
  padding: 0 4rem 0 calc(var(--logo-box-w) + 4rem);
  /* 場面の区間 = 外枠の高さ − 縮み(400px + 0.5画面) − 1画面。
     本文が短くても 1場面あたり 400px(4場面で 1600px)を確保する。 */
  min-height: calc(1600px + 400px + 150svh);
}

/* 歩行中は外枠ごとヘッダー(100)・MENU(200)より手前へ。外枠が z-index:1 で重なりの箱を作るため、
   中の札に 500 を付けるだけでは外に出られない。 */
html.is-walk-locked .mv__outer { z-index: 300; }
/* 本文の列は sticky で重なりの箱を作り、札(500)より手前に出てしまう。歩行中は inert なので隠す。 */
html.is-walk-locked .mv__col--text { visibility: hidden; }

.mv__col--visual { grid-area: visual; }
.mv__col--text {
  container-type: inline-size; /* .mv__h1 の字の大きさを列幅から取る */ grid-area: text; display: flex; flex-direction: column; }

/* 右列(札の通り道)。左列と同じ高さになるのは grid の行が両方を stretch するため(数値を測って揃えない)。 */
.mv__player-slot {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.mv__player {
  position: relative;
  width: min(560px, 40vw);
  aspect-ratio: 4 / 3;
  border-radius: 40px;
  overflow: hidden;
  background: var(--c-white);
  transform-origin: center center;
  will-change: transform;
}

.mv__player canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.mv__player.is-walking {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  aspect-ratio: unset;
  border-radius: 0;
  z-index: 500;
  transform: none !important;
}

/* スクロール中は JS が可視の札の右下へ置く。札が画面から外れたら隠す。 */
.mv__walk-button.is-offstage {
  visibility: hidden;
  pointer-events: none;
}

.mv__walk-button {
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  min-height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.2rem;
  background: var(--c-main);
  color: var(--c-white);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.2;
  text-align: center;
  transform-origin: right bottom;
  transition: opacity var(--mv-button-transition, 0.2s) ease-out;
}

.mv__back-button {
  position: fixed;
  left: 5%;
  top: 5%;
  z-index: 510;
  padding: 1.2rem 2.4rem;
  border-radius: 999px;
  background: var(--c-white);
  color: var(--c-text);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mv__hint {
  position: fixed;
  left: 50%;
  bottom: 3%;
  transform: translateX(-50%);
  z-index: 510;
  color: var(--c-white);
  font-family: 'DotGothic16', sans-serif;
  font-size: 1.4rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  pointer-events: none; /* 案内文は押せない。下の「しらべる」ボタンへのタップを奪わない */
}

/* 狭い画面では下端が「しらべる」ボタンと十字キーで埋まるので、案内は上へ */
@media (max-width: 768px) {
  .mv__hint { top: 16px; bottom: auto; white-space: nowrap; }
}

/* 歩行中(全画面)だけ表示。[hidden] の display:none は display:grid で必ず上書きされるので、
   ここで明示しておかないと非歩行中もグリッドとして表示され続ける(段A修正の実機バグの原因)。 */
.mv__dpad {
  position: fixed;
  right: 4%;
  bottom: 4%;
  z-index: 510;
  display: grid;
  grid-template-columns: 48px 48px 48px;
  grid-template-rows: 48px 48px 48px;
  gap: 4px;
}

.mv__dpad[hidden] {
  display: none;
}

.mv__dpad__btn {
  grid-column: 2;
  background: rgba(0, 0, 0, 0.5);
  color: var(--c-white);
  border-radius: 8px;
  font-size: 1.8rem;
}

.mv__dpad__btn--up { grid-row: 1; }
.mv__dpad__btn--left { grid-row: 2; grid-column: 1; }
.mv__dpad__btn--right { grid-row: 2; grid-column: 3; }
.mv__dpad__btn--down { grid-row: 3; }

#mv-talk-thumb {
  position: absolute;
  z-index: 520;
  top: 12%;
  left: 50%;
  width: min(calc(100% - 32px), 480px);
  transform: translateX(-50%);
  border: 3px solid var(--c-white);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

#mv-talk-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  background: var(--c-pastel);
}

.mv__dpad.is-talking { visibility: hidden; }

#mv-talk-button {
  position: fixed;
  left: 4%;
  bottom: 4%;
  z-index: 510;
  min-width: 44px;
  min-height: 44px;
  padding: 1.2rem 1.6rem;
  border-radius: 999px;
  background: var(--c-accent);
  color: var(--c-text);
  font-family: 'DotGothic16', sans-serif;
  font-size: 1.4rem;
}

.mv__player.is-walking .pixel-msgwin,
.mv__player.is-walking .pixel-choicewin {
  position: absolute;
  z-index: 530;
  font-family: 'DotGothic16', sans-serif;
  background: var(--c-window-bg);
  color: var(--c-window-text);
  border: 3px solid var(--c-white);
  border-radius: 8px;
  box-shadow: 0 0 0 3px var(--c-window-bg);
}

.mv__player.is-walking .pixel-msgwin {
  right: 16px;
  bottom: 16px;
  left: 16px;
  min-height: 7.2rem;
  padding: 1.2rem 1.6rem;
  font-size: 1.6rem;
  line-height: 1.6;
}

.pixel-msgwin__arrow { text-align: right; }

.mv__player.is-walking .pixel-choicewin {
  right: 16px;
  bottom: calc(16px + 9rem);
  min-width: 19rem;
  padding: 1rem 1.4rem;
  font-size: 1.5rem;
  line-height: 1.7;
}

/* 見出し領域: h1 の素の位置をこの領域の最下部に置く(flex+flex-end)。
   その上で position:sticky; bottom:60px を掛けるので、領域が長い(400px+100svh)ぶんだけ
   h1 は画面下に留まり続け、領域の終わりに達してから初めてふつうに上へ流れる。 */
.mv__heading-area {
  position: relative;
  height: calc(400px + 100svh);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.mv__h1 {
  position: sticky;
  bottom: 60px;
  z-index: 2;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 900;
  font-size: min(4.5rem, 8.4cqi); /* 1行目11字＋帯の余白 ≒ 11.6字が列幅に収まる大きさ */
  line-height: 1.7;
  color: var(--c-main);
}

/* 箱庭(不透明)の手前に来ても読めるよう、行ごとに白い帯を敷く。
   h1 は flex の子で block 化されるので、帯は内側の inline の span に持たせる。 */
.mv__h1-band {
  background: var(--c-white);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0 0.3em;
  border-radius: 8px;
}

/* h1 が上へ流れ去ったあとも左列が空かないよう、本文を画面上部に留める。
   1280×720 で1画面に収まる行間にしてある(収まらないと下の段落が留まったまま切れる)。 */
.mv__body {
  position: sticky;
  top: 12rem;
  width: 100%;
}

.mv__body p {
  margin-bottom: 2.4em;
  line-height: 2.4;
  transform: scale(var(--grow, 1));
  transform-origin: left center;
}

.mv__mark {
  background-image: linear-gradient(var(--c-accent), var(--c-accent));
  background-position: left bottom;
  background-repeat: no-repeat;
  background-size: calc(var(--mark, 0) * 100%) 0.38em;
}

#mv-asset-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  background: var(--c-card-gray);
}

/* ───────── 節の土台(段Bで中身を埋める) ───────── */

.section-placeholder {
  padding: 8rem 4rem;
}

.section-placeholder h2 {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 900;
  font-size: 3.2rem;
}

/* 英字の大見出し(SERVICES/SITES/APPS/FLOW/FAQ)。1字ずつ立ち上がる。 */
.reveal-heading {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 7.2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.reveal-heading__char {
  display: inline-block;
  opacity: 0;
  transform: translateY(var(--reveal-translate-y, 30%));
  transition: opacity var(--reveal-dur, 0.2s) ease-out, transform var(--reveal-dur, 0.2s) ease-out;
}

.reveal-heading__char.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 見出しの句を途中で割らない。入り切らない時だけ、この単位ごと次の行へ送る */
.u-nobr {
  display: inline-block;
}

/* 読み上げだけに渡す補足（新しいタブで開く等） */
.u-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ───────── 768px 以下 ───────── */

@media (max-width: 768px) {
  .site-nav { display: none; }

  .site-header__menu-button {
    display: block;
    pointer-events: auto;
    align-self: center;
    margin-top: 16px;
    padding: 1rem 1.6rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
  }

  :root {
    --logo-box-w: 100px;
    --logo-box-h: 92px;
  }

  .site-header__logo-img { width: 70%; height: auto; }

  /* カードなし。札は PC と同じく画面いっぱいから縮んで、上端に留まる。 */
  .mv::before {
    display: none;
  }

  .mv__outer {
    display: block;
    padding: 0 2rem 4rem;
    /* 縮み(400px + 0.5画面。main-visual.js の shrinkRangePx と同じ式)のあとに、本文が札の下をくぐる区間を足す。 */
    min-height: calc(700px + 400px + 150svh);
  }

  /* 札の親が札と同じ高さだと sticky が効かないので、右列ごと画面上端に留める(上はロゴの札の裏)。
     本文は札の下をくぐって流れるため、白で塗って透けないようにする。 */
  .mv__col--visual {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--c-white);
    padding-top: calc(var(--logo-box-h) + 1.2rem); /* ヘッダーの裏まで白で塗り、本文が隙間から透けないようにする */
    padding-bottom: 1.6rem;
    /* 外枠の左右余白(2rem)まで塗る。塗らないと、札の裏を通る本文の端がその隙間に見える */
    margin: 0 -2rem 2rem;
    padding-inline: 2rem;
  }

  .mv__player-slot {
    position: static;
    height: auto;
    display: block;
  }

  .mv__player {
    position: relative;
    width: calc(100% - 32px);
    margin: 0 auto;
    aspect-ratio: 4 / 3;
  }

  .mv__heading-area {
    height: auto;
  }

  /* 札が縮み切るまで本文を札の裏に入れない。縮みの分だけ下げておくと、縮み終わった所で札のすぐ下に来る */
  .mv__col--text {
    padding-top: calc(400px + 50svh);
  }

  /* z-index は PC で札の手前に出すためのもの。見出し領域は flex のままで static でも効くので、
     外さないと上に留めた右列(z-index 1)より手前に出て、札の上に見出しが重なる */
  .mv__h1 {
    position: static;
    z-index: auto;
    font-size: 3rem;
  }

  .mv__body {
    position: static;
    width: 100%;
    padding-bottom: 0;
  }

  /* 改行位置は PC の2列幅で決めてある。狭い画面では文の途中で切れるだけなので外す */
  .mv__body br {
    display: none;
  }

  .mv__body p {
    margin-bottom: 1.6em;
    line-height: 2;
  }

  .reveal-heading {
    font-size: 4rem;
  }
}

/* ───────── reduced motion ───────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .mv__player {
    transform: none !important;
  }

  /* 札が縮まないので、モバイルで縮みの分だけ下げていた本文の間も要らない */
  .mv__col--text {
    padding-top: 0;
  }

  .reveal-heading__char {
    transition: none;
    opacity: 1;
    transform: none;
  }

  .site-nav,
  .mv__walk-button,
  .mv__back-button {
    transition: none;
  }
}

/* ───────── #about ─────────
   左に sticky の札(vignette.js が描く canvas)、右に3段。段が画面中央を越えたら
   intro-steps.js が is-active を付け外しする(このファイルは見た目だけ)。 */

.about {
  background: var(--c-main);
  color: var(--c-white);
  padding: 10rem 4rem;
}

.about__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 6rem;
  align-items: start;
}

.about__visual {
  position: sticky;
  top: 12rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
}

.about__card {
  width: 460px;
  height: 325px;
  max-width: 100%;
  border-radius: 40px;
  overflow: hidden;
  background: var(--c-main-dark);
}

.about__canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.about__dots {
  display: flex;
  gap: 1.2rem;
}

.about__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: background-color var(--dot-transition, 0.25s) linear, transform var(--dot-transition, 0.25s) linear;
}

.about__dot.is-active {
  background: var(--c-white);
  transform: scale(1.3);
}

.about__heading {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 900;
  font-size: 3.6rem;
  line-height: 1.5;
  margin-bottom: 2.4rem;
}

.about__lead {
  line-height: 2;
  margin-bottom: 5rem;
  opacity: 0.92;
}

.about__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6rem;
}

.about__step {
  opacity: 0.5;
  transition: opacity var(--about-scene-crossfade, 0.3s) ease-out;
}

.about__step.is-active {
  opacity: 1;
}

.about__step-kicker {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  color: var(--c-accent);
  margin-bottom: 0.8rem;
}

.about__step-heading {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 900;
  font-size: 2.4rem;
  margin-bottom: 1.6rem;
}

.about__step-body {
  line-height: 2;
  opacity: 0.92;
}

.about__step-link {
  display: inline-block;
  margin-top: 2.4rem;
  padding: 1rem 2.4rem;
  border: 2px solid var(--c-white);
  border-radius: 999px;
  color: var(--c-white);
  font-weight: 700;
  transition: background-color 0.2s ease-out, color 0.2s ease-out;
}

/* #about は地が --c-main なので、白抜きのボタンにして押すと反転させる */
.about__step-link:hover,
.about__step-link:focus-visible {
  background: var(--c-white);
  color: var(--c-main);
}

/* ───────── #services ───────── */

.services {
  padding: 10rem 4rem;
  background-image: radial-gradient(var(--c-line) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  background-color: var(--c-pastel);
}

.services__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.services__kicker,
.sites__kicker {
  position: relative;
  display: inline-block;
  font-size: 2.4rem;
  font-weight: 700;
  padding-left: 2.2rem;
  margin: 2.4rem 0 2rem;
}

.services__kicker::before,
.sites__kicker::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--c-accent);
}

.services__lead,
.sites__lead {
  max-width: 640px;
  line-height: 2;
  margin-bottom: 5rem;
}

.services__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3.2rem;
}

.services__card {
  position: relative;
  background: var(--c-white);
  border-radius: 24px;
  padding: 3.2rem 2.8rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.services__thumb {
  display: block;
  width: 100%;
  height: auto; /* img の height 属性が効いたままだと aspect-ratio が無視されて縦に伸びる */
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 16px;
  background: var(--c-pastel);
  margin-bottom: 2.4rem;
}

.services__thumb--contain { object-fit: contain; }

.services__num {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: var(--c-line);
  margin-bottom: 1.2rem;
}

.services__eyebrow {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  color: var(--c-main);
  margin-bottom: 0.8rem;
}

.services__name {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.6rem;
}

.services__body {
  line-height: 1.9;
  margin-bottom: 2rem;
}

.services__tags {
  font-size: 1.3rem;
  color: var(--c-main-dark);
  margin-bottom: 2rem;
}

.services__link {
  display: inline-block;
  font-weight: 700;
  color: var(--c-main);
  border-bottom: 2px solid var(--c-main);
  padding-bottom: 0.2rem;
}

/* ───────── #sites ───────── */

.sites {
  padding: 10rem 4rem;
}

.sites__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.sites__columns {
  display: flex;
  gap: 3.2rem;
  align-items: flex-start;
  margin-top: 4rem;
}

.sites__col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3.2rem;
}

.sites__col:nth-child(2) { margin-top: 40px; }
.sites__col:nth-child(3) { margin-top: 80px; }

.sites__card {
  display: block;
  border-radius: 24px;
  overflow: hidden;
  background: var(--c-card-gray);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.sites__thumb {
  position: relative;
  aspect-ratio: 8 / 5;
  overflow: hidden;
}

.sites__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sites__arrow {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--c-white);
  color: var(--c-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.sites__meta {
  padding: 2rem;
}

.sites__card-heading {
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 1.6rem;
}

.sites__tags {
  margin: 0;
}

.sites__tag {
  position: relative;
  padding-left: 1.8rem;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  line-height: 1.6;
}

.sites__tag::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.4em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-accent);
}

.sites__tag dt {
  display: inline;
  font-weight: 700;
  margin-right: 0.4em;
}

.sites__tag dd {
  display: inline;
  margin: 0;
  color: var(--c-text);
  opacity: 0.85;
}

.sites__more {
  display: inline-block;
  margin-top: 5rem;
  padding: 1.4rem 3.2rem;
  border-radius: 999px;
  background: var(--c-main);
  color: var(--c-white);
  font-weight: 700;
}

/* ───────── #about・#services・#sites: 768px 以下 ───────── */

@media (max-width: 768px) {
  .about {
    padding: 6rem 2rem;
  }

  /* grid のままだと絵の親が1段目の区画(=絵と同じ高さ)になり sticky が効かないので、block に戻す。
     絵は画面上端(ロゴの札の裏)に留め、3段はその下をくぐって流れる。透けないよう #about の青で塗る。 */
  .about__inner {
    display: block;
  }

  .about__visual {
    top: 0;
    z-index: 1;
    background: var(--c-main);
    padding-top: calc(var(--logo-box-h) + 1.2rem);
    padding-bottom: 1.6rem;
    margin-bottom: 3.2rem;
  }

  .about__card {
    width: 100%;
    max-width: 460px;
    height: auto;
    aspect-ratio: 460 / 325;
    margin: 0 auto;
  }

  .services,
  .sites {
    padding: 6rem 2rem;
  }

  .services__list {
    grid-template-columns: 1fr;
  }

  .sites__columns {
    flex-direction: column;
    gap: 3.2rem;
  }

  .sites__col:nth-child(2),
  .sites__col:nth-child(3) {
    margin-top: 0;
  }

  /* 本文の <br> は1440幅の行長で入れた改行。狭い幅では「組織づく／りにも」と
     半端な所で折れるので外す。見出しの <br> は短いので残す。 */
  .about__lead br,
  .about__step-body br,
  .services__lead br,
  .sites__lead br {
    display: none;
  }
}

/* ───────── #about・#services・#sites: reduced motion ───────── */

@media (prefers-reduced-motion: reduce) {
  .about__step,
  .about__dot {
    transition: none;
  }
}

/* ───────── #apps ─────────
   丘の帯(scroll-strip.js が描く canvas)は position:sticky で画面に留まり、
   その裏で外枠(apps__hill-outer)がスクロールする間だけ「歩く」(段Aの mv と同じ手法)。
   帯の下は白い札(アプリ6本・PLAYGROUND・全幅ボタン)。 */

.apps {
  background: var(--c-pastel);
}

.apps__hill-outer {
  position: relative;
  height: 320vh;
}

.apps__hill-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.4rem;
  overflow: hidden;
  background: linear-gradient(180deg, var(--c-pastel) 0%, var(--c-main-light) 100%);
  border-radius: 0 0 64px 64px;
}

.apps__hill-canvas {
  image-rendering: pixelated;
  display: block;
}

.apps__say {
  position: relative;
  width: min(64rem, calc(100% - 3.2rem));
  min-height: 5.8rem;
  padding: 1.4rem 1.8rem;
  color: var(--c-window-text);
  background: var(--c-window-bg);
  border: 2px solid var(--c-white);
  box-shadow: 0 0 0 3px var(--c-window-bg);
  font-family: 'DotGothic16', sans-serif;
  font-size: 1.8rem;
  line-height: 1.6;
}

.apps__say-name {
  position: absolute;
  top: -1.8rem;
  left: 1.2rem;
  margin: 0;
  padding: 0.2rem 0.8rem;
  color: var(--c-window-text);
  background: var(--c-window-bg);
  font-size: 1.2rem;
}

.apps__say-line {
  margin: 0;
  white-space: pre-line;
}

.apps__say.is-done .apps__say-line::after {
  content: '▼';
  float: right;
  animation: apps-say-arrow 0.8s steps(2, jump-none) infinite;
}

@keyframes apps-say-arrow {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .apps__say.is-done .apps__say-line::after {
    animation: none;
  }
}

.apps__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8rem 4rem 10rem;
}

/* 見出し・本文は丘の帯より前に置く(帯が先だと、節に入った瞬間に何の節か分からない) */
.apps__inner--intro {
  padding-bottom: 4rem;
}

.apps__kicker {
  position: relative;
  display: inline-block;
  font-size: 2.4rem;
  font-weight: 700;
  padding-left: 2.2rem;
  margin: 2.4rem 0 2rem;
}

.apps__kicker::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--c-accent);
}

.apps__lead {
  max-width: 640px;
  line-height: 2;
  margin-bottom: 5rem;
}

.apps__card {
  position: relative;
  background: var(--c-white);
  border-radius: 32px;
  padding: 4rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.apps__shot {
  display: block;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 3.2rem;
}

.apps__shot img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.apps__badge {
  display: inline-block;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.08em;
  color: var(--c-white);
  background: var(--c-main);
  padding: 0.6rem 1.6rem;
  border-radius: 999px;
  margin-bottom: 3.2rem;
}

.apps__list {
  list-style: none;
  margin: 0 0 4rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.4rem;
}

.apps__app {
  border-top: 1px solid var(--c-line);
  padding-top: 1.6rem;
}

.apps__app-name {
  font-weight: 700;
  font-size: 1.6rem;
  margin-bottom: 0.6rem;
}

.apps__app-note {
  font-size: 1.3rem;
  color: var(--c-text);
  opacity: 0.75;
}

.apps__button {
  display: block;
  text-align: center;
  padding: 1.6rem 3.2rem;
  border-radius: 999px;
  background: var(--c-main);
  color: var(--c-white);
  font-weight: 700;
}

/* ───────── #flow ─────────
   番号の丸を縦線でつなぎ、段の間を点線で区切る。中身は静止(JSなし)。 */

.flow {
  padding: 10rem 4rem;
}

.flow__inner {
  max-width: 900px;
  margin: 0 auto;
}

.flow__kicker {
  position: relative;
  display: inline-block;
  font-size: 2.4rem;
  font-weight: 700;
  padding-left: 2.2rem;
  margin: 2.4rem 0 2rem;
}

.flow__kicker::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--c-accent);
}

.flow__lead {
  line-height: 2;
  margin-bottom: 4rem;
}

.flow__card {
  list-style: none;
  margin: 0;
  padding: 4rem;
  background: var(--c-card-gray);
  border-radius: 32px;
}

.flow__step {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  column-gap: 2.4rem;
  padding-bottom: 3.6rem;
}

.flow__step:not(:last-child) {
  border-bottom: 1px dashed var(--c-line);
  margin-bottom: 3.6rem;
}

.flow__num {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--c-main);
  color: var(--c-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
}

/* 縦線は段の箱に付け、丸の下端(48px)から次の段の丸の上端まで伸ばす。
   段の下には border 1px と margin-bottom 3.6rem があるので、その分だけ下にはみ出させる。 */
.flow__step:not(:last-child)::before {
  content: '';
  position: absolute;
  top: 48px;
  left: 23px;
  bottom: calc(-3.6rem - 1px);
  width: 2px;
  background: var(--c-line);
}

.flow__step-heading {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
}

.flow__step-text {
  line-height: 1.9;
  opacity: 0.9;
}

/* ───────── #faq ─────────
   左は sticky の見出し(768px以下では非sticky)、右は Q/A を全部開いたまま並べる。 */

.faq {
  padding: 10rem 4rem;
  background: var(--c-pastel);
}

.faq__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 6rem;
  align-items: start;
}

.faq__heading-col {
  position: sticky;
  top: 14rem;
}

.faq__kicker {
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 1.6rem;
}

.faq__list {
  margin: 0;
}

.faq__item {
  padding: 3.2rem 0;
  border-bottom: 1px solid var(--c-line);
}

.faq__item:first-child {
  padding-top: 0;
}

.faq__q,
.faq__a {
  display: flex;
  gap: 1.6rem;
  align-items: flex-start;
  line-height: 1.9;
}

.faq__q {
  font-weight: 700;
  font-size: 1.7rem;
  margin-bottom: 1.6rem;
}

.faq__a {
  opacity: 0.85;
}

.faq__q-icon,
.faq__a-icon {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
}

.faq__q-icon {
  background: var(--c-main);
  color: var(--c-white);
}

.faq__a-icon {
  border: 2px solid var(--c-main);
  color: var(--c-main);
}

/* ───────── #contact + フッター ─────────
   相談の札が青いフッターに半分重なる(margin-bottom を負にして footer の上に乗せる)。
   フッターが見えたらナビだけ上に逃げる動きは header.js の watchFooterForNav が
   #site-footer を id で見ているので、ここでは何もしなくてよい。 */

.contact {
  position: relative;
  z-index: 2;
  padding: 8rem 4rem 0;
}

.contact__card {
  max-width: 1200px;
  margin: 0 auto -18rem;
  background: var(--c-white);
  border-radius: 40px;
  padding: 6rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 4rem;
}

.contact__heading {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 900;
  font-size: 3.6rem;
  margin-bottom: 2.4rem;
}

.contact__body {
  line-height: 2;
  margin-bottom: 3.2rem;
}

.contact__parade-canvas {
  image-rendering: pixelated;
  display: block;
  width: 200px;
  height: auto;
}

.contact__actions {
  align-self: center;
  border: 2px solid var(--c-line);
  border-radius: 24px;
  padding: 3.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.contact__button {
  display: block;
  text-align: center;
  padding: 1.4rem 2rem;
  border-radius: 999px;
  font-weight: 700;
}

.contact__button--primary {
  background: var(--c-main);
  color: var(--c-white);
}

.contact__button--secondary {
  background: transparent;
  border: 2px solid var(--c-main);
  color: var(--c-main);
}

.site-footer {
  position: relative;
  padding: 22rem 4rem 4rem;
  background: var(--c-main-dark);
  color: var(--c-white);
  font-size: 1.3rem;
}

.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.site-footer__top {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3.2rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 2.4rem;
}

.site-footer__name {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
}

.site-footer__rep {
  opacity: 0.8;
}

.site-footer__heading {
  position: relative;
  display: inline-block;
  padding-left: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.6rem;
}

.site-footer__heading::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.4em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-accent);
}

.site-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.site-footer__links a {
  color: var(--c-white);
  opacity: 0.85;
}

.site-footer__copyright {
  opacity: 0.7;
}

/* フッターの右下に置く。上端に置くと、フッターに食い込んだ相談カードの右端に重なる幅がある(1280px など) */
.site-footer__top-link {
  position: absolute;
  z-index: 3;
  bottom: 4rem;
  right: 4rem;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  background: var(--c-accent);
  color: var(--c-text);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.1em;
  padding: 1.6rem 0.8rem;
  border-radius: 999px;
}

/* ───────── #apps・#flow・#faq・#contact・フッター: 768px 以下 ───────── */

@media (max-width: 768px) {
  /* 帯を1画面ぶん敷くと、細い絵の上下が空いて何もない画面になる。
     帯を低くして画面の中ほどに留める(進み方は scroll-strip.js が sticky の top と高さから取る)。 */
  .apps__hill-outer {
    height: 200svh;
  }

  .apps__hill-sticky {
    top: 20svh;
    height: 60svh;
    border-radius: 32px;
  }

  .apps__inner {
    padding: 6rem 2rem 8rem;
  }

  .apps__say {
    font-size: 1.5rem;
  }

  .apps__inner--intro {
    padding-bottom: 3.2rem;
  }

  /* 390幅で「まず、話してみ／る。」と2字だけ落ちるので詰める */
  .contact__heading {
    font-size: 2.8rem;
  }

  /* 本文の <br> は1440幅の行長で入れた改行(B1 と同じ扱い) */
  .apps__lead br {
    display: none;
  }

  .apps__list {
    grid-template-columns: 1fr;
  }

  .apps__lead br {
    display: none;
  }

  .flow {
    padding: 6rem 2rem;
  }

  .faq {
    padding: 6rem 2rem;
  }

  .faq__inner {
    grid-template-columns: 1fr;
    gap: 3.2rem;
  }

  /* 段Aの #about と同じ理由(親の高さ=見出しの高さで sticky が効かない)で、
     768px以下は非stickyにする(自分で決めていいこと)。 */
  .faq__heading-col {
    position: static;
    top: auto;
  }

  .contact {
    padding: 6rem 2rem 0;
  }

  .contact__card {
    grid-template-columns: 1fr;
    padding: 4rem 2.4rem;
    margin-bottom: -14rem;
  }

  .contact__body br {
    display: none;
  }

  .site-footer {
    padding: 18rem 2rem 3.2rem;
  }

  .site-footer__top {
    grid-template-columns: 1fr;
    gap: 2.4rem;
  }

  /* 狭い幅では右下の縦書きがリンク列に重なる。コピーライトの下に横向きで置く */
  .site-footer__top-link {
    position: static;
    display: inline-block;
    margin-top: 2.4rem;
    writing-mode: horizontal-tb;
    padding: 1rem 2rem;
  }
}

/* ───────── フッター: reduced motion ─────────
   丘の帯と行列は、それぞれ scroll-strip.js / contact.js が
   isReducedMotion() を見て最初のコマだけ描き、ループを止める(このファイルの役目はなし)。
   ここでは見た目のがたつきだけ止める。 */

@media (prefers-reduced-motion: reduce) {
  .site-footer__top-link {
    transition: none;
  }
}
