/* 企業研修・講演会・地域活動など */

.act {
  position: relative;
  height: 536px;
  overflow: hidden;
}

/* デザイン幅 1280 の中での位置（%）で置き、広い画面では中央に寄せる */
.act-inner {
  position: relative;
  width: min(1280px, 100%);
  height: 100%;
  margin: 0 auto;
}

.act-text {
  position: absolute;
  left: max(213px, calc(213 / 1280 * 100%));
  top: 123px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  --t: clamp(30px, 3.594vw, 46px);  /* 46 / 1280 */
  --s: clamp(13px, 1.172vw, 15px);  /* 15 / 1280 */
}

.act-title {
  background: var(--paper);
  color: var(--ink);
  line-height: 1;
  white-space: nowrap;
}

.act-title { margin-bottom: 10px; }

/* 写真の上に白い帯を敷くセクション（トーキョーコーヒー・地域活動）：タイトル・英字・説明文、どの白い帯も、
   左右の余白を同じ --p にそろえる（帯の端から文字までの距離）。帯のない所は --p = 0 で、文字の左端を写真の左端にそろえる */
.act--bleed .act-text { --p: var(--s); --pd: calc(var(--s) * 1.13); }  /* --pd：説明文の帯は、右側が少し広いので、左を 2px ほど足して、左右を合わせる */

/* タイトル・英字はアウトライン化した SVG。--l / --r は、画像の中で文字が始まる位置と終わる位置。
   白い帯の幅は「文字の幅 ＋ 左右の余白 2 つ」にして、画像の余白は使わない */
.act-title > span {
  display: block;
  font-size: 0;
  overflow: hidden;
  width: calc((var(--r) - var(--l)) / var(--w) * var(--wimg) + 2 * var(--p, 0px));
}
.act-title > span { --wimg: min(calc(var(--t) * var(--w) / 46), calc(100vw - var(--gutter) * 2 - 2 * var(--p, 0px))); }

.act-title img {
  display: block;
  width: var(--wimg);
  max-width: none;
  height: auto;
  margin-left: calc(var(--p, 0px) - var(--l) / var(--w) * var(--wimg));
}

/* 説明文：行ごとの白い帯の上に、全行ぶんの SVG を重ねる */
.act-desc {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.act-line {
  display: block;
  width: calc(var(--s) * var(--w) / 15);
  height: calc(var(--s) * 2);
  background: var(--paper);
}

.act-line + .act-line { margin-top: calc(var(--s) * -5 / 15); }

.act-desc-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(var(--s) * var(--w) / 15);
  max-width: none;
  height: auto;
  transform: translateX(calc(var(--x, 0) / var(--w) * 100% + var(--pd, 0px)));
}

.act-photo {
  position: absolute;
  left: max(calc(213 / 1280 * 100% + 416px), calc(629 / 1280 * 100%));
  top: 129px;
  width: calc(379 / 1280 * 100%);
  max-width: 379px;
}

.act-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 379 / 339;
  object-fit: cover;
}

.act-photo--low { top: 159px; }

/* 写真を全面に敷くセクション */
.act-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- スマホ ---------- */

@media (max-width: 767px) {
  .act { height: auto; padding: 88px var(--gutter) 64px; }
  .act#corporate { padding-top: 124px; }
  .act-inner { height: auto; }
  .act-text { position: relative; left: 0; top: 0; --t: 24px; --s: 12px; }
  .act-title img { max-width: calc(100vw - var(--gutter) * 2); }
  .act-photo,
  .act-photo--low { position: relative; left: 0; top: 0; width: 100%; max-width: none; margin-top: 24px; }

  .act--bleed { min-height: 460px; display: flex; align-items: flex-end; }
  .act--bleed .act-inner { width: 100%; }

}
