/* Heliks Data C案 共通スタイル（index.html・lab.html・profile.html・contact.html・privacy.html）
   ・site-c-frame.css（色・文字の設定、丸いボタン、ヘッダー、フッター）のあとに読み込む
   ・基本の書式・節の見出し・ご相談の節・追従ボタン・下層ページの冒頭などをまとめる
   ・各ページの固有の見た目は、このあとに読み込む各ページのCSSに書く
   ・本番（Astro）へ移すときは、共通レイアウトのスタイルとしてそのまま使う想定 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.9 var(--ja);
  letter-spacing: .03em;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3, p, ul, ol, dl, dd, figure {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

h1, h2, h3,
.hc-head__lead {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

p {
  text-wrap: pretty;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

.skip {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: #fff;
}

.skip:focus {
  top: 12px;
}

.hc-nowrap {
  white-space: nowrap;
}

/* グラデーションの文字 */
.hc-gradtext {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- 粒子感のある丸いグラデーション ---------- */

.hc-orbs {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hc-orb {
  position: absolute;
  border-radius: 50%;
  /* 縁をぼかして空気感を出す */
  -webkit-mask-image: radial-gradient(circle, #000 52%, transparent 71%);
  mask-image: radial-gradient(circle, #000 52%, transparent 71%);
  will-change: transform;
}

.hc-orb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--grain);
  mix-blend-mode: soft-light;
  opacity: .9;
}

.hc-orb--blue {
  background: radial-gradient(circle at 32% 30%, #b3bdff 0%, #5b72ff 28%, #2448ff 55%, #1730c9 75%);
}

.hc-orb--violet {
  background: radial-gradient(circle at 30% 28%, #ece6ff 0%, #a996ff 25%, #6b5cff 52%, #4b37de 75%);
}

.hc-orb--cyan {
  background: radial-gradient(circle at 34% 30%, #f1fdff 0%, #9fe9f7 28%, #22c6e8 56%, #1495c9 76%);
}

/* ---------- 節の共通 ---------- */

.hc-section {
  position: relative;
  overflow: hidden;
  padding-block: clamp(88px, 11vw, 150px);
}

.hc-section--tint {
  background: var(--tint);
}

.hc-head {
  max-width: 860px;
  margin: 0 auto clamp(44px, 6vw, 72px);
  text-align: center;
}

.hc-head__en {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--blue);
  font-family: var(--en);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .06em;
}

.hc-head__en::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad);
}

.hc-head__en--light {
  color: #fff;
}

.hc-head__en--light::before {
  background: #fff;
}

.hc-head h2 {
  margin-top: 14px;
  font-size: clamp(30px, 3.8vw, 48px);
  font-weight: 800;
  line-height: 1.4;
}

.hc-head__lead {
  margin-top: 18px;
  color: var(--sub);
}

.hc-head__lead p + p {
  margin-top: 8px;
}

/* 画面に入ったらふわっと現れる */
.js [data-fade] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}

.js [data-fade].is-in {
  opacity: 1;
  transform: none;
}

/* 背景の淡い光 */
.hc-glow {
  position: absolute;
  z-index: 0;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(107 92 255 / .16), transparent 65%);
  pointer-events: none;
}

.hc-glow--left {
  top: 10%;
  left: -320px;
}

.hc-glow--right {
  right: -300px;
  bottom: 0;
  background: radial-gradient(circle, rgb(34 198 232 / .16), transparent 65%);
}

@keyframes hc-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-18px, 16px, 0) scale(1.07); }
}

.hc-tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.hc-tag--light {
  background: rgb(255 255 255 / .18);
  color: #fff;
}

/* ---------- ご相談 ---------- */

.hc-contact {
  position: relative;
  overflow: hidden;
  padding-block: clamp(96px, 12vw, 160px);
  background: var(--tint);
  text-align: center;
}

.hc-orbs--contact .hc-orb--cyan {
  top: -30%;
  left: -12%;
  width: min(50vw, 620px);
  aspect-ratio: 1;
  opacity: .8;
  animation: hc-drift 18s ease-in-out infinite alternate;
}

.hc-orbs--contact .hc-orb--violet {
  right: -10%;
  bottom: -40%;
  width: min(54vw, 680px);
  aspect-ratio: 1;
  opacity: .8;
  animation: hc-drift 22s ease-in-out infinite alternate-reverse;
}

/* ご相談の背景も「光のにじみ」にする（事業内容の図と同じ描き方）。
   玉のハイライトと縁のマスクをやめ、強くぼかした半透明の色を乗算で重ねる */
.hc-contact::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--grain);
  mix-blend-mode: soft-light;
  opacity: .5;
  pointer-events: none;
}

.hc-orbs--contact .hc-orb {
  -webkit-mask-image: none;
  mask-image: none;
  filter: blur(64px);
  mix-blend-mode: multiply;
  opacity: 1;
}

.hc-orbs--contact .hc-orb::after {
  display: none;
}

.hc-orbs--contact .hc-orb--cyan {
  top: -45%;
  left: -18%;
  width: min(70vw, 900px);
  background: radial-gradient(circle, rgb(70 200 235 / .5) 0%, rgb(70 200 235 / .2) 45%, transparent 70%);
}

.hc-orbs--contact .hc-orb--violet {
  right: -18%;
  bottom: -55%;
  width: min(74vw, 960px);
  background: radial-gradient(circle, rgb(140 120 255 / .5) 0%, rgb(140 120 255 / .2) 45%, transparent 70%);
}

.hc-contact__inner {
  max-width: 820px;
  padding: clamp(36px, 5vw, 64px) clamp(24px, 5vw, 64px);
  border-radius: calc(var(--radius) + 12px);
  background: rgb(255 255 255 / .82);
  backdrop-filter: blur(18px);
}

.hc-contact .hc-head__en {
  color: var(--blue);
}

.hc-contact .hc-head__en::before {
  background: var(--grad);
}

.hc-contact h2 {
  margin-top: 14px;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 800;
}

.hc-contact__body {
  margin-top: 20px;
  color: var(--sub);
}

.hc-contact__body p {
  text-wrap: balance;
}

.hc-contact__body p + p {
  margin-top: 8px;
}

.hc-contact .hc-actions {
  margin-top: 34px;
}

.hc-contact .hc-pill--white {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 14px 30px rgb(36 72 255 / .3);
}

/* ---------- 追従する丸いお問い合わせボタン ---------- */

.hc-float {
  position: fixed;
  right: clamp(16px, 2.4vw, 36px);
  bottom: clamp(16px, 2.4vw, 36px);
  z-index: 40;
  display: grid;
  place-content: center;
  justify-items: center;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 16px 36px rgb(36 72 255 / .35);
  opacity: 0;
  transform: scale(.6);
  visibility: hidden;
  transition: opacity .5s var(--ease), transform .5s var(--ease), visibility 0s .5s;
}

.hc-float.is-visible {
  opacity: 1;
  transform: scale(1);
  visibility: visible;
  transition: opacity .5s var(--ease), transform .5s var(--ease), visibility 0s;
}

.hc-float:hover {
  transform: scale(1.06);
}

.hc-float span {
  font-family: var(--en);
  font-size: 14px;
  font-weight: 700;
}

.hc-float b {
  font-size: 12px;
}

/* ---------- 下層ページ（Lab・代表プロフィール）の共通部品 ---------- */

/* パンくず */
.hc-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--sub);
  font-size: 13px;
  line-height: 1.6;
}

.hc-crumb a:hover {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* 下層ページの冒頭：淡い面に、動かない「光のにじみ」を右側にだけ置く（トップのシルクの光は使わない） */
.hc-pagehead {
  position: relative;
  overflow: hidden;
  padding-block: clamp(28px, 3vw, 40px) clamp(72px, 9vw, 120px);
  background: var(--tint);
}

.hc-pagehead::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--grain);
  mix-blend-mode: soft-light;
  opacity: .5;
  pointer-events: none;
}

.hc-orbs--page .hc-orb {
  aspect-ratio: 1;
  -webkit-mask-image: none;
  mask-image: none;
  filter: blur(64px);
  mix-blend-mode: multiply;
}

.hc-orbs--page .hc-orb::after {
  display: none;
}

.hc-orbs--page .hc-orb--violet {
  top: -45%;
  right: -12%;
  width: min(62vw, 820px);
  background: radial-gradient(circle, rgb(140 120 255 / .42) 0%, rgb(140 120 255 / .16) 45%, transparent 70%);
}

.hc-orbs--page .hc-orb--cyan {
  right: 24%;
  bottom: -70%;
  width: min(48vw, 640px);
  background: radial-gradient(circle, rgb(70 200 235 / .38) 0%, rgb(70 200 235 / .14) 45%, transparent 70%);
}

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

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .hc-contact .hc-pill {
    width: 100%;
  }

  .hc-head {
    text-align: left;
  }

  .hc-contact {
    text-align: left;
  }

  /* 縦長の画面では丸が画面外に出てしまうため、大きくして上下の端に寄せる */
  .hc-orbs--contact .hc-orb--cyan {
    top: -12%;
    left: -45%;
    width: 130vw;
  }

  .hc-orbs--contact .hc-orb--violet {
    right: -45%;
    bottom: -12%;
    width: 130vw;
  }

  .hc-orbs--page .hc-orb--violet {
    top: -18%;
    right: -55%;
    width: 120vw;
  }

  .hc-orbs--page .hc-orb--cyan {
    right: auto;
    bottom: -30%;
    left: -40%;
    width: 100vw;
  }

  /* スマホでは本文を隠さないよう、画面下の細い帯にする */
  .hc-float {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    grid-auto-flow: column;
    gap: 10px;
    align-items: center;
    width: auto;
    height: 52px;
    border-radius: 999px;
    transform: translateY(140%);
  }

  .hc-float.is-visible,
  .hc-float:hover {
    transform: none;
  }

  .hc-float span {
    font-size: 13px;
  }

  .hc-float b {
    font-size: 14px;
  }

  body {
    padding-bottom: 76px;
  }
}

/* 動きを減らす設定：すべて最初から表示し、漂う動きも止める */
@media (prefers-reduced-motion: reduce) {
  .js [data-fade] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hc-orb {
    animation: none !important;
  }

  .hc-float {
    transition: none;
  }
}
