/* ==========================================================
   全ページ共通の追加スタイル
   ・ヘッダーの WORKS（開閉メニュー）
   ・お問い合わせフォームの「ご用件」選択
   ========================================================== */

/* ---------- ヘッダー（PC）: WORKS ---------- */
.header-works {
  position: relative;
}

.header-works__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: "Barlow", sans-serif;
  font-weight: 500;
  font-size: 20px;
  color: var(--g-color-white);
  line-height: 1;
  letter-spacing: 0.05em;
}

.header-works__toggle::after {
  content: '';
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
}

.header-works.is-open .header-works__toggle::after {
  transform: rotate(-135deg);
  margin-top: 3px;
}

.header-works__panel {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 260px;
  padding-top: 16px;
  transform: translate(-50%, -6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 10;
}

.header-works.is-open .header-works__panel {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.header-works__list {
  padding: 8px;
  border-radius: 16px;
  background: var(--g-color-white);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
}

.header-link ul li .header-works__list a {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  font-family: 'LINE Seed JP_TTF', sans-serif;
  font-size: 15px;
  font-weight: bold;
  line-height: 1.5;
  letter-spacing: 0.05em;
  color: #404040;
  transition: background 0.2s ease, color 0.2s ease;
}

.header-link ul li .header-works__list a::after {
  display: none;
}

.header-link ul li .header-works__list a:hover {
  background: #EAF6FD;
  color: #00A0E9;
}

.header-works__list a small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #707070;
}

/* ---------- ヘッダー（スマホの全画面メニュー）: WORKS ---------- */
.header-sp-works__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: "Barlow", sans-serif;
  font-weight: 500;
  font-size: 4.8vh;
  line-height: 1.5;
  letter-spacing: 0.05em;
  color: var(--g-color-white);
}

.header-sp-works__toggle span {
  display: inline-flex;
  align-items: center;
  gap: 0.8vh;
  font-family: 'LINE Seed JP_TTF', sans-serif;
  font-weight: bold;
  font-size: 2vh;
}

.header-sp-works__toggle span::after {
  content: '';
  width: 0.9vh;
  height: 0.9vh;
  margin-top: -0.5vh;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
}

.header-sp-works.is-open .header-sp-works__toggle span::after {
  transform: rotate(-135deg);
  margin-top: 0.5vh;
}

.header-sp-works__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}

.header-sp-works.is-open .header-sp-works__panel {
  grid-template-rows: 1fr;
}

.header-sp-works__inner {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.header-sp-full-menu ul li .header-sp-works__inner a {
  display: block;
  font-family: 'LINE Seed JP_TTF', sans-serif;
  font-size: 2.2vh;
  font-weight: bold;
  line-height: 1.5;
  letter-spacing: 0.05em;
  margin-top: 1.2vh;
  padding: 0.9vh 3vh;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 100px;
}

/* ---------- お問い合わせフォーム: ご用件の選択 ---------- */
.sec-contact__elem-radio {
  width: 100%;
  max-width: 569px;
  padding-top: 10px;
}

.sec-contact__elem-radio .wpcf7-radio {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

.sec-contact__elem-radio .wpcf7-list-item {
  margin: 0;
}

.sec-contact__elem-radio .wpcf7-list-item label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.sec-contact__elem-inp.sec-contact__elem-radio input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
}

.sec-contact__elem-radio .wpcf7-list-item-label {
  position: relative;
  padding-left: 34px;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 0.05em;
  line-height: 1.8;
  color: var(--g-color-white);
}

.sec-contact__elem-radio .wpcf7-list-item-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--g-color-white);
  box-shadow: inset 3px 3px 4px #00000016;
}

.sec-contact__elem-radio .wpcf7-list-item-label::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 50%;
  width: 12px;
  height: 12px;
  transform: translateY(-50%) scale(0);
  border-radius: 50%;
  background: #00A0E9;
  transition: transform 0.2s ease;
}

.sec-contact__elem-radio input[type="radio"]:checked + .wpcf7-list-item-label::after {
  transform: translateY(-50%) scale(1);
}

.sec-contact__elem-radio input[type="radio"]:focus-visible + .wpcf7-list-item-label::before {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ==========================================================
   1500px 以下（rem が画面幅に比例）
   ========================================================== */
@media screen and (max-width: 1500px) {
  .header-works__toggle {
    font-size: 20rem;
    gap: 6rem;
  }

  .header-works__toggle::after {
    width: 6rem;
    height: 6rem;
    margin-top: -3rem;
  }

  .header-works.is-open .header-works__toggle::after {
    margin-top: 3rem;
  }

  .sec-contact__elem-radio {
    max-width: 569rem;
    padding-top: 10rem;
  }

  .sec-contact__elem-radio .wpcf7-list-item-label {
    font-size: max(14px, 18rem);
  }
}

/* ==========================================================
   768px 以下（スマートフォン）
   ========================================================== */
@media screen and (max-width: 768px) {
  .sec-contact__elem-radio {
    max-width: 100%;
    padding-top: 0;
  }

  .sec-contact__elem-radio .wpcf7-radio {
    flex-direction: column;
    gap: 10rem;
  }

  .sec-contact__elem-radio .wpcf7-list-item-label {
    font-size: 15rem;
    padding-left: 32rem;
  }

  .sec-contact__elem-radio .wpcf7-list-item-label::before {
    width: 22rem;
    height: 22rem;
  }

  .sec-contact__elem-radio .wpcf7-list-item-label::after {
    left: 5rem;
    width: 12rem;
    height: 12rem;
  }
}

/* 全画面メニュー: 項目が1つ増えた分、ロゴに重ならないよう全体を少し詰める。
   WORKS を開いている間は、さらに詰めて画面内に収める。 */
@media screen and (max-width: 768px) {
  .header-sp-full-menu ul li:not(:last-child) {
    margin-bottom: 1.8vh;
  }

  .header-sp-full-menu ul li > a,
  .header-sp-works__toggle {
    font-size: 4.2vh;
  }

  .header-sp-full-menu ul li > a span,
  .header-sp-works__toggle span {
    font-size: 1.8vh;
  }

  .header-sp-full-menu ul li .header-sp-works__inner a {
    font-size: 1.9vh;
    margin-top: 0.9vh;
    padding: 0.6vh 2.6vh;
  }

  .header-sp-full-menu ul:has(.header-sp-works.is-open) li:not(:last-child) {
    margin-bottom: 1vh;
  }

  .header-sp-full-menu ul:has(.header-sp-works.is-open) li.header-sp-wantedly a img {
    height: 5vh;
  }

  .header-sp-full-menu ul li,
  .header-sp-full-menu ul li.header-sp-wantedly a img {
    transition: margin 0.35s ease, height 0.35s ease;
  }
}

/* ---------- 「ディレクション実績」の鍵アイコン ---------- */
.works-lock {
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  margin-left: 0.35em;
  vertical-align: -0.1em;
}

/* ---------- サービス区画: 長い見出しがスマホで折り返さないようにする ---------- */
@media screen and (max-width: 768px) {
  .sec-service__elem-txt > span._long {
    font-size: 19rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
  }
}

/* ---------- トップ: ABOUT 区画の下余白をソラマメデザインのサイトと同じ値にそろえる ---------- */
.sec-about {
  padding-bottom: 150px;
}

@media screen and (max-width: 1500px) {
  .sec-about {
    padding-bottom: 150rem;
  }
}

@media screen and (max-width: 768px) {
  .sec-about {
    padding-bottom: 25rem;
  }
}

/* ---------- トップ: やまなかのイラスト（マウスを乗せると震え、押すとPROFILEへ） ---------- */
.about-man-link {
  display: inline-block;
  cursor: pointer;
}

.about-man-link img {
  transform-origin: 50% 60%;
}

.about-man-link:hover img,
.about-man-link:focus-visible img {
  animation: about-man-shake 0.35s linear infinite;
}

@keyframes about-man-shake {
  0%   { transform: translate(0, 0) rotate(0deg); }
  20%  { transform: translate(-2px, 1px) rotate(-3deg); }
  40%  { transform: translate(2px, -1px) rotate(3deg); }
  60%  { transform: translate(-2px, -1px) rotate(-2deg); }
  80%  { transform: translate(2px, 1px) rotate(2deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
  .about-man-link:hover img,
  .about-man-link:focus-visible img {
    animation: none;
  }
}

/* ---------- メインビジュアル: キャラクターのひとこと吹き出し ---------- */
.fv-greeting-target {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.fv-greeting {
  position: absolute;
  top: 30px;
  left: calc(50% + 150px);
  z-index: 2;
  width: max-content;
  max-width: none;
  padding: 18px 30px;
  border-radius: 34px 34px 34px 0;
  background: var(--g-color-white);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  color: #404040;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.05em;
  text-align: left;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px) scale(0.92);
  transform-origin: 0 100%;
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.fv-greeting.is-show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media screen and (max-width: 1500px) {
  .fv-greeting {
    top: 30rem;
    left: calc(50% + 150rem);
    padding: 18rem 30rem;
    border-radius: 34rem 34rem 34rem 0;
    font-size: max(13px, 17rem);
  }
}

@media screen and (max-width: 768px) {
  .fv-greeting {
    top: -34rem;
    left: 50%;
    max-width: calc(100vw - 48rem);
    padding: 10rem 18rem;
    border-radius: 20rem 20rem 20rem 0;
    font-size: 13rem;
    white-space: normal;
    transform-origin: 50% 100%;
    transform: translate(-50%, 8rem) scale(0.92);
  }

  .fv-greeting.is-show {
    transform: translate(-50%, 0) scale(1);
  }
}

/* ---------- TOPのコラムカード：サムネイルを16:9に（アイキャッチが切れないように） ---------- */
.sec-work__elem-img {
  height: auto;
  aspect-ratio: 16 / 9;
}

@media screen and (max-width: 1500px) {
  .sec-work__elem-img {
    height: auto;
  }
}

@media screen and (max-width: 768px) {
  .sec-work__elem-img {
    height: auto;
  }
}
