/* ==========================================================================
   Site footer (Figma node 2002:633 "08_FOOTER")
   ========================================================================== */

.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-fg);
  padding-block: clamp(48px, 6vw, 80px);
}

.site-footer a {
  color: var(--color-footer-fg);
}

/* Figma: navブロックはページ左端から529px(container内467px)始まり */
.site-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 427px) minmax(0, 1fr);
  gap: 40px;
  margin-bottom: 48px;
}

.site-footer__logo {
  display: inline-block;
  margin-bottom: 24px;
}

.site-footer__brand img {
  height: 44px;
  width: auto;
}

/* 4分割したアイコンを個別リンクにする。元は1枚絵だったため、
   アイコン間の余白も画像に含まれていた。切り出し後は gap で作る
   (元画像の実測は12.5〜16pxとばらついていたので14pxに揃えた)。 */
.site-footer__social {
  display: flex;
  align-items: center;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__social img {
  height: 24px;
  width: auto;
}

/* "Keep navigating."の上端をロゴの下辺(ロゴ高さ44px)に揃える */
.site-footer__nav-block {
  padding-top: 44px;
}

.site-footer__nav-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.9px;
  margin-bottom: 20px;
}

/* Figma: 3列(ABOUT/PHILOSOPHY/BOOKS, ESSAYS/TEACHING/CIRCLE, CONTACT)。
   CONTACTの列だけ2行目に"Join the Compass Circle"が続く。
   列ピッチは167px(529/696/853)。
   3列目のCTAが行の高さを押し広げて他列の行間が不揃いになるのを防ぐため、
   列ごとに独立したフローにしている */
.site-footer__nav {
  display: grid;
  grid-template-columns: 167px 167px max-content;
}

.site-footer__nav-col {
  display: flex;
  flex-direction: column;
  align-items: start;
}

.site-footer__nav a {
  font-family: var(--font-nav);
  font-size: 15px;
  line-height: 2;
}

.site-footer__circle-cta {
  font-family: var(--font-sans);
  font-size: 15px;
  white-space: nowrap;
  margin-top: 24px;
}

/* Figma: コピーライトは右寄せのブロック。行は左揃えのまま右に寄る */
.site-footer__bottom {
  display: grid;
  justify-content: end;
  justify-items: start;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 900px) {
  .site-footer__top {
    grid-template-columns: 1fr;
  }

  /* 3列目(CONTACT)は2段目に回し、CTAが折り返せるようにする */
  .site-footer__nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 24px;
  }

  .site-footer__circle-cta {
    white-space: normal;
  }

  .site-footer__bottom {
    justify-content: start;
  }
}
