/* ==========================================================================
   components.css
   複数ページで使う部品：見出し、ボタン、CONTACT帯、記事カード、
   スマホ用メニュー、スクロール表示アニメーション
   ========================================================================== */

/* セクション見出し（英字の大見出し） --------------------------------------- */

.section-title {
  font-family: var(--font-en);
  font-size: clamp(2.5rem, 4.5vw, 4rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-align: center;
}

.section-title--lg {
  font-size: clamp(3rem, 6.25vw, 5.6rem);
}

@media (max-width: 768px) {
  .section-title,
  .section-title--lg {
    font-size: clamp(1.75rem, 8.5vw, 2.25rem);
    font-weight: 600;
  }
}

/* View More ボタン（白地・角丸の枠付き） ----------------------------------- */

.btn-more {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 168px;
  height: 53px;
  padding: 4px 32px 0;
  border: 1px solid var(--color-black);
  border-radius: 999px;
  background: #fff;
  color: var(--color-text);
  font-family: var(--font-en);
  font-size: 18px;
  letter-spacing: 0.04em;
  line-height: 1;
  transition: box-shadow 0.3s var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .btn-more:hover {
    box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
  }
}

@media (max-width: 768px) {
  .btn-more {
    width: 100%;
    height: 70px;
  }
}

/* 問い合わせボタン（黒地・白文字 → ホバーでネガポジ反転） -------------------- */

.btn-cta {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 194px;
  height: 56px;
  padding: 0 40px;
  border: 1px solid var(--color-black);
  background: var(--color-black);
  color: #fff;
  font-size: 15px;
  letter-spacing: 0.2em;
  line-height: 1;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .btn-cta:hover {
    background: var(--color-pale);
    color: var(--color-text);
  }
}

/* CONTACT帯（ページ下部の共通エリア） ------------------------------------- */

.contact-band {
  margin-top: 150px;
}

.contact-band__inner {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 604fr) minmax(0, 658fr);
  align-items: start;
  padding: 0 0 80px 34px;
}

/* 水色の背景は写真の上端より175px下から始まる */
.contact-band__inner::before {
  content: "";
  position: absolute;
  inset: 175px 0 0;
  z-index: -1;
  background: var(--color-panel);
}

.contact-band__photos {
  display: grid;
  gap: 10px;
}

.contact-band__photos img {
  width: 100%;
  object-fit: cover;
}

.contact-band__photos img:nth-child(1) {
  aspect-ratio: 604 / 350;
}

.contact-band__photos img:nth-child(2) {
  aspect-ratio: 604 / 330;
}

.contact-band__body {
  padding: 270px 40px 0;
  text-align: center;
}

.contact-band__text {
  max-width: 445px;
  margin: 48px auto 0;
  font-size: 15px;
  line-height: 1.75;
  text-align: left;
}

.contact-band__action {
  margin-top: 88px;
}

/* 英語版：現行サイトに合わせて中央揃え。Josefin Sans は文字が小さく見えるため少し大きく */
html[lang="en"] .contact-band__text {
  font-size: 17px;
  line-height: 1.6;
  text-align: center;
}

html[lang="en"] .btn-cta {
  padding-top: 4px;
}

@media (max-width: 1100px) {
  .contact-band__body {
    padding-top: 230px;
  }

  .contact-band__action {
    margin-top: 56px;
  }
}

@media (max-width: 768px) {
  .contact-band {
    margin-top: 70px;
  }

  .contact-band__inner {
    display: block;
    padding: 70px 20px;
  }

  .contact-band__inner::before {
    inset: 0;
    background: var(--color-pale);
  }

  .contact-band__photos {
    display: none;
  }

  .contact-band__body {
    padding: 0;
  }

  .contact-band__text {
    margin-top: 40px;
    line-height: 2;
  }

  .contact-band__action {
    margin-top: 56px;
  }
}

/* 記事カード（LATEST ARTICLES） -------------------------------------------- */

.article-card__thumb {
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 297 / 156;
  background: var(--color-placeholder);
  color: var(--color-text-muted);
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.article-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card__body {
  padding: 0 15px;
}

.article-card__date {
  margin-top: 16px;
  color: var(--color-text-muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.article-card__title {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.article-card__excerpt {
  margin-top: 12px;
  color: var(--color-text-sub);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.02em;
}

/* スマホ：2列でもタイトルが読めるよう、タイトルを優先して本文抜粋は省く */
@media (max-width: 768px) {
  .article-card__body {
    padding: 0;
  }

  .article-card__date {
    margin-top: 10px;
    font-size: 11px;
  }

  .article-card__title {
    display: -webkit-box;
    margin-top: 4px;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  .article-card__excerpt {
    display: none;
  }
}

/* スマホ用メニュー ---------------------------------------------------------- */

.sp-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
}

.sp-menu.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.3s var(--ease);
}

.sp-menu__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.16);
}

.sp-menu__panel {
  position: relative;
  width: min(400px, 100%);
  max-height: 100%;
  overflow-y: auto;
  padding: 12px 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  transform: translateY(24px);
  transition: transform 0.35s var(--ease);
}

.sp-menu.is-open .sp-menu__panel {
  transform: none;
}

.sp-menu__link,
.sp-menu__close {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 56px;
  padding-top: 4px;
  font-family: var(--font-en);
  font-size: 18px;
  letter-spacing: 0.06em;
  line-height: 1;
}

.sp-menu__lang {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  height: 56px;
  padding-top: 4px;
  font-family: var(--font-en);
  font-size: 16px;
  line-height: 1;
}

.sp-menu__lang a {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 8px;
  color: var(--color-link);
}

.sp-menu__close {
  gap: 6px;
  color: var(--color-text-note);
  font-size: 16px;
}

/* メニュー表示中は背景のスクロールを止める */
html.is-menu-open {
  overflow: hidden;
}

@media (min-width: 769px) {
  .sp-menu {
    display: none;
  }
}

/* スクロール表示アニメーション（フェードアップ） ------------------------------ */
/* JavaScript が有効なとき（html.js）だけ非表示から始める。
   JavaScript が動かない環境では、最初から表示される。 */

html.js .reveal {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition:
    opacity 0.7s var(--ease) var(--reveal-delay, 0s),
    transform 0.7s var(--ease) var(--reveal-delay, 0s);
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .sp-menu,
  .sp-menu.is-open,
  .sp-menu__panel {
    transition: none;
  }
}

/* 連絡手段のカード型ボタン（Instagram・LINE・メールなど） ------------------- */
/* 白いカード＋右下の影。ホバーで押し込まれたように見える。
   使い方：<a class="link-card" href="…"><svg class="link-card__icon">…</svg>
          <span class="link-card__label">公式 Instagram</span><svg class="link-card__arrow">…</svg></a> */

.link-card {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  width: min(350px, 100%);
  height: 90px;
  padding: 0 34px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 3px 3px 0 rgba(40, 90, 110, 0.22);
  color: var(--color-text);
  text-align: left;
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.link-card__icon {
  flex: none;
  width: 40px;
  height: 40px;
}

.link-card__label {
  font-size: 20px;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.link-card__arrow {
  flex: none;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

@media (hover: hover) and (pointer: fine) {
  .link-card:hover {
    box-shadow: inset 2px 2px 6px rgba(0, 0, 0, 0.15);
    opacity: 0.7;
    transform: translate(2px, 2px);
  }
}

@media (max-width: 768px) {
  .link-card {
    gap: 18px;
    width: 100%;
    height: 80px;
    padding: 0 24px;
  }

  .link-card__icon {
    width: 34px;
    height: 34px;
  }

  .link-card__label {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .link-card {
    transition: none;
  }
}

/* スマホ幅（768px 以下）とタッチ端末では動きを止める ------------------------- */
/* スクロール中のちらつき・カクつきを防ぐため、全ページ共通で次を無効にする。
   端末の種類の判定（hover / pointer）に加え、サイトのスマホ用ブレークポイント（768px）以下でも必ず止める。
   PC（769px 以上のマウス操作の端末）には影響しない。
   - スクロール表示（.reveal）：最初から完成状態で表示（reveal.js も同じ条件で監視を止めている）
   - すべての transition / animation（メニュー・モーダルの開閉も、動きなしで切り替わる）
   - タップ時の灰色のハイライト
   ※ホバーの見た目は、各ファイルで (hover: hover) and (pointer: fine) の中に限定しているため、タッチ端末では付かない
   ※写真を淡く・暗く見せる opacity / filter は、動きではなくデザインなのでそのまま */
@media (hover: none), (pointer: coarse), screen and (max-width: 768px) {
  .reveal,
  .reveal.is-visible,
  html.js .reveal,
  html.js .reveal.is-visible {
    opacity: 1 !important;
    transform: none !important;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  /* モーダルの背景。未対応ブラウザで上の指定まで無効にならないよう、別に書く */
  ::backdrop {
    animation: none !important;
  }

  a,
  button {
    -webkit-tap-highlight-color: transparent;
  }
}
