/* トップページの移植セクション（views/partials/home_about.php ／ home_service.php）
   ------------------------------------------------------------------
   採用サイト(/recruit) の about-mission と about-service をそのまま移植したもの。
   レイアウト・比率・アニメーションの数値は採用サイトの style.css と同値。
   トンマナだけコーポレートHPに合わせている:
     - EN書体      Figtree      → montserrat（HPの .font-montserrat と同じ）
     - アクセント色 青×橙グラデ → #0080b6 単色（HPの .text-primary と同値。橙は使わない）
     - 装飾ブロブ（橙のにじみ）は不使用
   ブレークポイントは採用サイトに合わせて 767px（HPのTailwind sm: 640px とは別）。

   ★ --hs-u について
   採用サイトは 1440px 以下で html の font-size 自体を vw で縮めており（16/1440*100vw）、
   PCレイアウトの全数値がビューポート幅に比例して縮む前提で組まれている。
   HPの html は 16px 固定なので、そのまま rem で移植すると 768〜1279px でカードや事業図が潰れる。
   そこで「1200px 幅で 1px になる可変px」を --hs-u として定義し、採用サイトのカンプ値(px)を
   calc(N * var(--hs-u)) で書くことで同じ縮み方を再現している。1200px 以上では 1px に固定。
   本文サイズだけは採用サイトと同じく px の下限を持たせている（採用サイトの max(1rem, 16 * --fixed-px) 相当）。

   /css/style.css はビルド済みTailwindで新規クラスを足せないため、このファイルに独立して書く。
   読み込みは router.php のトップページルート（extra_head）から。 */

:root {
  --hs-black: #222;
  --hs-white: #fff;
  --hs-accent: #0080b6;
  --hs-gray: #f3f3f3;
  --hs-en: montserrat, sans-serif;
  --hs-ease: cubic-bezier(0.165, 0.84, 0.44, 1);
  /* 64px = section の左右パディング48px + 縦スクロールバーの想定幅16px */
  --hs-u: min(1px, (100vw - 64px) / 1200);
}

/* ================= ABOUT（ミッション） =================
   採用サイトの about-mission。帯・ウォーターマークは 青×橙グラデ → #0080b6 単色に置き換えている。

   ★ 帯の作り方が採用サイトと違う点
   採用サイトは文字に transform: scaleX(1.2) をかけ、帯の幅は
   「1.2倍後の見た目の幅」を実測した固定px（29.625rem / 59.9375rem）で持っている。
   transform はレイアウト幅を変えないためこうするしかないのだが、
   HPは本文フォントが kinto-sans で採用サイト(Noto Sans JP)と字幅が違うので、
   その固定pxをそのまま持ってくると帯と文字がズレる。
   そこで帯自体を width: fit-content にして scaleX を帯ごとかける方式に変えた。
   見た目は同じで、フォントが変わっても帯が文字にぴったり合う。 */

.hs-mission {
  position: relative;
  /* 絶対配置のウォーターマーク（下端646px）と写真（下端565px）が
     次のセクションに食い込まないよう、器の高さを確保しておく */
  min-height: calc(565 * var(--hs-u));
  padding-block-start: calc(24 * var(--hs-u));
}

.hs-mission__body {
  position: relative;
  z-index: 1;
}

.hs-mission__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(9 * var(--hs-u));
}

.hs-mission__band {
  display: flex;
  align-items: center;
  width: -moz-fit-content;
  width: fit-content;
  height: calc(58 * var(--hs-u));
  padding-inline: calc(2 * var(--hs-u));
  background-color: var(--hs-accent);
  transform: scaleX(1.2);
  transform-origin: left center;
}

.hs-mission__scale {
  display: block;
  font-size: calc(48 * var(--hs-u));
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.09em;
  white-space: nowrap;
  color: var(--hs-white);
  translate: 0 calc(-2 * var(--hs-u));
}

/* --a/--b がPC、--c/--d がSPの折り返し */
.hs-mission__band--c,
.hs-mission__band--d {
  display: none;
}

.hs-mission__lead {
  display: flex;
  flex-direction: column;
  gap: calc(16 * var(--hs-u));
  margin-block-start: calc(40 * var(--hs-u));
  font-size: 1.125rem; /* SERVICEセクションのリード文と同じ18px。採用サイトは24pxだが大きすぎたため */
  font-weight: 500;
  line-height: 1.8;
}

/* 背景の飾り文字。読み上げからは aria-hidden で外してある */
.hs-mission__watermark {
  position: absolute;
  top: calc(420 * var(--hs-u));
  /* 採用サイトは画面左端から外にはみ出して "O" が切れる作りだが、
     HPは文字を小さくしたぶん切れ方が目立つので、はみ出しは本文カラムから25pxだけにして
     "OUR MISSION" が全部読める位置に置いている */
  left: calc(-25 * var(--hs-u));
  z-index: 0;
  font-family: var(--hs-en);
  font-size: calc(93 * var(--hs-u));
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
  white-space: nowrap;
  color: var(--hs-accent);
  opacity: 0.2;
}

/* 写真2枚は本文の右に重ねて置く（採用サイトのカンプどおり絶対配置） */
.hs-mission__photos {
  position: absolute;
  top: calc(210 * var(--hs-u));
  right: 0;
  z-index: 1;
  width: calc(277 * var(--hs-u));
}

.hs-mission__photo {
  margin: 0;
}

.hs-mission__photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.25rem;
}

.hs-mission__photo--02 {
  position: absolute;
  top: calc(206 * var(--hs-u));
  right: calc(321 * var(--hs-u));
  width: calc(172 * var(--hs-u));
}

.hs-br-pc {
  display: inline;
}

/* ================= SERVICE ================= */

/* ---------------- イントロ（テキスト＋事業図） ---------------- */

.hs-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(48 * var(--hs-u));
}

.hs-intro__text {
  display: flex;
  flex-direction: column;
  gap: calc(32 * var(--hs-u));
  width: calc(678 * var(--hs-u));
  max-width: 100%;
}

.hs-intro__title {
  font-size: calc(48 * var(--hs-u));
  font-weight: 700;
  line-height: 1.4;
}

.hs-intro__lead {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.8;
}

/* ---------------- 事業図（画像ではなく円と文字だけで組む） ----------------
   位置・大きさはすべて枠に対する割合。幅 --dg を変えるだけでSPへ縮む */

.hs-diagram {
  --dg: calc(461.13 * var(--hs-u));
  position: relative;
  flex-shrink: 0;
  width: var(--dg);
  aspect-ratio: 461.13 / 460;
}

/* 円と軌道は採用サイトでは黒(#222)。HPのトンマナに合わせて primary の青にしている */
.hs-diagram__ring {
  position: absolute;
  top: 10.924%;
  left: 10.537%;
  width: 78.937%;
  height: 79.241%;
  border: 2px solid var(--hs-accent);
  border-radius: 50%;
}

.hs-diagram__core,
.hs-diagram__satellite-inner {
  border-radius: 50%;
  background-color: var(--hs-accent);
  color: var(--hs-white);
  text-align: center;
}

.hs-diagram__core {
  position: absolute;
  top: 27.267%;
  left: 26.786%;
  width: 46.44%;
  aspect-ratio: 1;
}

.hs-diagram__logo,
.hs-diagram__of,
.hs-diagram__value {
  position: absolute;
}

.hs-diagram__logo {
  top: 36.446%;
  left: 13.556%;
  width: 59.552%;
  aspect-ratio: 127.531 / 39.84;
  background-color: currentcolor;
  -webkit-mask-image: url(/assets/images/logo_mark.svg);
  mask-image: url(/assets/images/logo_mark.svg);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.hs-diagram__of,
.hs-diagram__value {
  font-size: calc(var(--dg) * 0.03904);
  font-weight: 700;
  line-height: 1.22;
  white-space: nowrap;
}

.hs-diagram__of {
  top: 41.583%;
  left: 75.681%;
}

.hs-diagram__value {
  top: 57.951%;
  left: 33.187%;
}

.hs-diagram__satellite {
  position: absolute;
  width: 28.645%;
  aspect-ratio: 1;
}

.hs-diagram__satellite-inner {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.hs-diagram__satellite--hr {
  top: 0;
  left: 15.161%;
}

.hs-diagram__satellite--ai {
  top: 15.448%;
  left: 71.353%;
}

.hs-diagram__satellite--dm {
  top: 56.45%;
  left: 0;
  width: 29.183%;
}

.hs-diagram__satellite--web {
  top: 71.285%;
  left: 56.145%;
}

.hs-diagram__satellite-label {
  display: flex;
  flex-direction: column;
  font-family: var(--hs-en);
  font-size: calc(var(--dg) * 0.0347);
  font-weight: 700;
  line-height: 1.2;
}

/* ---------------- 黒パネル＋事業カード ---------------- */

.hs-panel-section {
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.hs-panel {
  position: relative;
  isolation: isolate;
  margin-block-start: calc(48 * var(--hs-u));
  padding-block: calc(96 * var(--hs-u)) calc(82 * var(--hs-u));
  border-radius: 1rem 1rem 0 0;
  background-color: var(--hs-black);
}

/* max-width にパディング分を足して、上のイントロ(.wrapper: max-width 1200px)と左端を揃える */
.hs-panel__list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: calc(16 * var(--hs-u));
  width: 100%;
  max-width: 1248px;
  margin-inline: auto;
  padding-inline: 24px;
}

.hs-card {
  display: flex;
  align-items: center;
  gap: calc(64 * var(--hs-u));
  padding: calc(64 * var(--hs-u)) calc(61 * var(--hs-u));
  border-radius: 0.5rem;
  background-color: var(--hs-gray);
  color: var(--hs-black);
}

.hs-card--white {
  background-color: var(--hs-white);
}

.hs-card__photo {
  flex-shrink: 0;
  width: calc(376 * var(--hs-u));
  margin: 0;
}

.hs-card__photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 0.5rem;
  box-shadow: 0 0 1rem rgba(0, 0, 0, 0.08);
}

.hs-card__body {
  display: flex;
  flex-direction: column;
  gap: calc(24 * var(--hs-u));
  min-width: 0;
  flex: 1 1 auto;
}

.hs-card__head {
  display: flex;
  flex-direction: column;
  gap: calc(8 * var(--hs-u));
}

.hs-card__category {
  font-family: var(--hs-en);
  font-size: max(10px, calc(16 * var(--hs-u)));
  font-weight: 700;
  line-height: 1.2;
  color: var(--hs-accent);
}

.hs-card__title {
  font-size: calc(32 * var(--hs-u));
  font-weight: 700;
  line-height: 1.4;
}

.hs-card__text {
  display: flex;
  flex-direction: column;
  gap: calc(16 * var(--hs-u));
  translate: 0 0.125rem;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.6;
}

.hs-card__services {
  padding-inline-start: 1.5rem;
  list-style: disc;
}

/* カードのリンク。HPの render_button（青のピル + 矢印 + hoverで白へ反転）と同じ見え方にしている。
   ビルド済みTailwindのクラスは使えないためここで直接組む。外部リンクだけアイコンが別（⧉） */

.hs-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: calc(12 * var(--hs-u));
}

.hs-card__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: max(10px, calc(16 * var(--hs-u)));
  min-height: max(40px, calc(52 * var(--hs-u)));
  padding-inline: max(16px, calc(28 * var(--hs-u))) max(14px, calc(24 * var(--hs-u)));
  border-radius: 999px;
  background-color: var(--hs-accent);
  color: var(--hs-white);
  font-size: max(14px, calc(15 * var(--hs-u)));
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.hs-card__link:hover,
.hs-card__link:focus-visible {
  background-color: var(--hs-white);
  color: var(--hs-accent);
}

.hs-card__link-icon {
  flex-shrink: 0;
  display: block;
  width: max(14px, calc(20 * var(--hs-u)));
  overflow: hidden;
}

.hs-card__link-icon svg {
  display: block;
  width: 100%;
  height: auto;
}

/* HPのボタンと同じく、hoverで矢印が右へ抜けて左から入り直す */
.hs-card__link:hover .hs-card__link-icon svg {
  animation: hs-arrow-slide 0.4s ease;
}

@keyframes hs-arrow-slide {
  0% { transform: translateX(0); opacity: 1; }
  49% { transform: translateX(120%); opacity: 0; }
  50% { transform: translateX(-120%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hs-card__link:hover .hs-card__link-icon svg {
    animation: none;
  }
}

/* ---------------- SP（採用サイトと同じ 767px 以下） ---------------- */

@media screen and (max-width: 767px) {
  /* SPは採用サイトと同じく固定rem。PC側の calc(N * --hs-u) を素通しにするため 1px に戻す */
  :root {
    --hs-u: 1px;
  }

  /* --- ABOUT（ミッション） --- */

  .hs-mission__title {
    gap: 0.25rem;
  }

  .hs-mission__band {
    height: 2rem;
  }

  .hs-mission__scale {
    font-size: 1.5rem;
    translate: 0 -0.0625rem;
  }

  .hs-mission__band--b {
    display: none;
  }

  .hs-mission__band--c,
  .hs-mission__band--d {
    display: flex;
  }

  .hs-mission__lead {
    gap: 0.75rem;
    margin-block-start: 1.75rem;
    font-size: 1rem;
    line-height: 1.6;
  }

  /* SPは絶対配置をやめて本文の下に流し込む。
     採用サイトは direction:rtl で画面右端に文字をはみ出させているが、
     PC側と同じく「切れない」方針に揃えて、左揃えでカラム内に収めている。
     除数6.8は「文字幅 ÷ フォントサイズ」の実測値(Montserrat 700・letter-spacing -0.06em で6.53)に
     余白ぶんを足したもの。320/375/414pxで実測して画面内に収まることを確認している。 */
  .hs-mission__watermark {
    position: static;
    z-index: auto;
    margin-block-start: 0.875rem;
    font-size: min(3.5rem, (100vw - 3rem) / 6.8);
  }

  .hs-mission__photos {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: auto;
    margin-block-start: 1rem;
  }

  .hs-mission__photo--02 {
    position: static;
    width: auto;
  }

  .hs-br-pc {
    display: none;
  }

  /* --- SERVICE --- */

  .hs-intro {
    flex-direction: column;
    align-items: flex-start;
    gap: 2.9375rem;
  }

  .hs-intro__text {
    width: 100%;
    gap: 0.8125rem;
  }

  .hs-intro__title {
    font-size: 1.75rem;
  }

  .hs-intro__lead {
    font-size: 1.0625rem;
    line-height: 1.6;
  }

  .hs-diagram {
    --dg: 19.9375rem;
    align-self: center;
    max-width: 100%;
  }

  .hs-panel {
    margin-block-start: 4rem;
    padding-block: 4rem 4.9375rem;
  }

  .hs-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2.5rem 1rem;
  }

  .hs-card__photo {
    width: 100%;
  }

  .hs-card__body {
    gap: 1rem;
    width: 100%;
  }

  .hs-card__title {
    font-size: 1.5rem;
  }

  .hs-card__text {
    font-size: 0.9375rem;
  }

  .hs-card__links {
    width: 100%;
    gap: 0.75rem;
  }

  .hs-card__link {
    width: 100%;
    min-height: 3.25rem;
  }
}

/* ---------------- スクロールリビール ----------------
   .hs-js は home_service.php の先頭のインラインスクリプトが <html> に付ける。
   JSが動かない環境では初期状態（透明・縮小）を一切適用せず、本文がそのまま見える */

@media (prefers-reduced-motion: no-preference) {
  /* ABOUT: 帯は左から拭うように出す */
  .hs-js .hs-mission__title .hs-mission__scale {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 1s cubic-bezier(0.65, 0, 0.35, 1);
  }

  .hs-js .hs-mission__title.is-visible .hs-mission__scale {
    clip-path: inset(0 0 0 0);
  }

  .hs-js .hs-mission__body .hs-mission__lead {
    opacity: 0;
    translate: 0 0.5rem;
    transition: opacity 0.8s var(--hs-ease) 0.2s, translate 0.8s var(--hs-ease) 0.2s;
  }

  .hs-js .hs-mission__body.is-visible .hs-mission__lead {
    opacity: 1;
    translate: 0 0;
  }

  .hs-js .hs-mission__photos .hs-mission__photo {
    opacity: 0;
    translate: 0 0.75rem;
    transition: opacity 0.8s var(--hs-ease) 0s, translate 0.8s var(--hs-ease) 0s;
  }

  .hs-js .hs-mission__photos .hs-mission__photo--02 {
    transition-delay: 0.12s;
  }

  .hs-js .hs-mission__photos.is-visible .hs-mission__photo {
    opacity: 1;
    translate: 0 0;
  }

  .hs-js .hs-intro__text .hs-intro__title,
  .hs-js .hs-intro__text .hs-intro__lead {
    opacity: 0;
    translate: 0 0.5rem;
    transition: opacity 0.8s var(--hs-ease) 0s, translate 0.8s var(--hs-ease) 0s;
  }

  .hs-js .hs-intro__text .hs-intro__lead {
    transition-delay: 0.12s;
  }

  .hs-js .hs-intro__text.is-visible .hs-intro__title,
  .hs-js .hs-intro__text.is-visible .hs-intro__lead {
    opacity: 1;
    translate: 0 0;
  }

  .hs-js .hs-card {
    opacity: 0;
    translate: 0 0.75rem;
    transition: opacity 0.8s var(--hs-ease) 0s, translate 0.8s var(--hs-ease) 0s;
  }

  .hs-js .hs-card.is-visible {
    opacity: 1;
    translate: 0 0;
  }

  .hs-js .hs-diagram__ring {
    transform: scale(0);
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
  }

  .hs-js .hs-diagram__core {
    clip-path: circle(0%);
    transition: clip-path 1.1s cubic-bezier(0.77, 0, 0.175, 1) 0.1s;
  }

  .hs-js .hs-diagram__logo,
  .hs-js .hs-diagram__of,
  .hs-js .hs-diagram__value {
    translate: 0 100%;
    transition: translate 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) 0.75s;
  }

  .hs-js .hs-diagram__of,
  .hs-js .hs-diagram__value {
    transition-delay: 0.9s;
  }

  .hs-js .hs-diagram__satellite {
    rotate: -30deg;
    transition: rotate 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) 0.19s;
  }

  .hs-js .hs-diagram__satellite-inner {
    scale: 0;
    transition: scale 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) 0.19s;
  }

  .hs-js .hs-diagram__satellite-label {
    opacity: 0;
    translate: 0 40%;
    transition: opacity 0.4s ease 0.67s, translate 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) 0.67s;
  }

  /* 円は「中心から生えて回り込む」ように見せるため、回転の支点を中心円側に置く */
  .hs-js .hs-diagram__satellite--hr {
    transform-origin: 121.6% 176%;
  }

  .hs-js .hs-diagram__satellite--ai {
    transform-origin: -74.5% 122.2%;
  }

  .hs-js .hs-diagram__satellite--dm {
    transform-origin: 171.3% -20.2%;
  }

  .hs-js .hs-diagram__satellite--web {
    transform-origin: -21.4% -72.2%;
  }

  .hs-js .hs-diagram.is-visible .hs-diagram__ring {
    transform: scale(1);
  }

  .hs-js .hs-diagram.is-visible .hs-diagram__core {
    clip-path: circle(50%);
  }

  .hs-js .hs-diagram.is-visible .hs-diagram__logo,
  .hs-js .hs-diagram.is-visible .hs-diagram__of,
  .hs-js .hs-diagram.is-visible .hs-diagram__value {
    translate: 0 0;
  }

  .hs-js .hs-diagram.is-visible .hs-diagram__satellite {
    rotate: 0deg;
  }

  .hs-js .hs-diagram.is-visible .hs-diagram__satellite-inner {
    scale: 1;
  }

  .hs-js .hs-diagram.is-visible .hs-diagram__satellite-label {
    opacity: 1;
    translate: 0 0;
  }
}

/* ================= 追従ENTRYボタン（右下） =================
   採用サイト(/recruit) の .c-entry-float の移植。リングの背後は移植元どおり**素通し**で、
   円の径・二層の比率・回転の周期も同値。
   トンマナはHP準拠に置き換えている:
     - 円の塗り  橙#e65420→青#0080b6 のグラデ → #0080b6 単色（--hs-accent。橙は使わない）
     - ホバー    グラデの位置ずらし → 色の反転（HPの render_button と同じ）
     - EN書体    Figtree → montserrat（--hs-en）
     - 遷移先    /recruit/entry/（募集要項）→ /recruit/（採用サイトのトップ）
     - 和文      「募集要項」→「採用情報」（遷移先が募集要項一覧ではなくなるため）

   ★ リングの色（既定は白。明るい面の上でだけ黒にする）
   移植元は白のみ。採用サイトは黒背景なのでそれで成立するが、HPトップは明暗が混在するため
   明るい面では黒に切り替える。切り替えの判定は home_entry_float.php のスクリプトが行う。

   ⚠️ **既知の限界（不具合ではない・仕様として選んだもの）**
   SERVICE 区間（y=1800〜3600 付近）は暗いパネルの上に明るいカードが乗っており、
   リングが**暗い面と明るい面に同時にまたがる**。リングが1色である以上、
   そこでは常にどちらか一方の側が背景に溶ける。多数決で「広いほうの面」に合わせている。
   実測の詳細は home_entry_float.php のコメントを参照。
   これを完全に解くには不透明な地を敷くしかないが、移植元のデザインを踏襲する方針のため採らない。

   色をCSS側から与える必要があるので、SVGは background-image ではなく **mask-image** で敷いている。

   ★ 寸法の考え方（移植元と変えたところ）
   --hs-u はこのファイル冒頭の説明のとおり「1200px幅で1pxになる可変px」。
   移植元はPC値(150px)を vw で縮め、767px以下だけ固定値(114px)に切り替えているため、
   767→768px の境目で 114px→88px と**画面が広いほうが小さくなる**段差ができる（実測）。
   HPは移植元の vw 前提に縛られないので、可変px側に SP値の下限（max()）を敷いて段差を消した。
   結果、1264px以上は移植元と同じ150px、そこから下は114pxまで滑らかに縮んで止まる。
   ラベルと文字サイズは下限＝上限（80px / 16px / 14px）になるので固定値で書いている。 */

.hs-entry {
  position: fixed;
  right: max(16px, calc(48 * var(--hs-u)));
  bottom: max(17px, calc(38 * var(--hs-u)));
  /* ヘッダー(z-999)・ナビモーダル(z-40)より下。モーダルを開いたら覆われる */
  z-index: 30;
  display: grid;
  place-items: center;
  width: max(114px, calc(150 * var(--hs-u)));
  height: max(114px, calc(150 * var(--hs-u)));
  opacity: 0;
  translate: 0 20px;
  pointer-events: none;
  transition: opacity 0.6s ease, translate 0.6s ease;
}

.hs-entry.is-shown {
  opacity: 1;
  translate: 0 0;
  pointer-events: auto;
}

.hs-entry__ring,
.hs-entry__circle {
  position: absolute;
  inset: 0;
}

.hs-entry__ring {
  background-color: var(--hs-white);
  -webkit-mask-image: url(../assets/images/entry_ring.svg);
  mask-image: url(../assets/images/entry_ring.svg);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  animation: hs-entry-ring-spin 16s linear infinite;
  transition: background-color 0.3s ease;
}

/* 明るい面の上に来たときだけ黒。付与は home_entry_float.php のスクリプト */
.hs-entry.is-on-light .hs-entry__ring {
  background-color: var(--hs-black);
}

.hs-entry__circle {
  inset: 10%;
  border-radius: 50%;
  background-color: var(--hs-accent);
  /* 移植元と同じ落ち影 */
  box-shadow: 0 0 calc(8 * var(--hs-u)) rgba(0, 0, 0, 0.16);
  transition: background-color 0.4s ease;
}

.hs-entry__label {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
  color: var(--hs-white);
  text-align: center;
  transition: color 0.4s ease;
}

.hs-entry__en {
  font-family: var(--hs-en);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.hs-entry__ja {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

/* ホバー＝色の反転（HPの render_button と同じ。bg-primary/text-white → bg-white/text-primary） */
.hs-entry:hover .hs-entry__circle {
  background-color: var(--hs-white);
}

.hs-entry:hover .hs-entry__label {
  color: var(--hs-accent);
}

@keyframes hs-entry-ring-spin {
  from {
    rotate: 0deg;
  }

  to {
    rotate: 360deg;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hs-entry {
    transition: opacity 0.6s ease;
    translate: 0 0;
  }

  .hs-entry__ring {
    animation: none;
  }
}

/* ⚠️ このファイルは 767px以下で --hs-u を 1px に戻している（上の @media 参照。SP は固定remで組むため）。
   そのため calc(N * var(--hs-u)) はSPでカンプ値の素通しになり、上の max() の下限が効かない
   （150px のまま出る）。ENTRYボタンはSPでも可変px前提の値なので、ここで実値に固定する。
   サイズは 768px 側の下限(114px)と同値にしてあるので、境目で段差が出ない。 */
@media screen and (max-width: 767px) {
  .hs-entry {
    right: 16px;
    bottom: 17px;
    width: 114px;
    height: 114px;
  }

  .hs-entry__circle {
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.16);
  }
}
