@charset "UTF-8";

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --background-base: #ffffff;
  --background-glow-cool: #c6e6ff;
  --background-glow-warm: #fff5c6;
  --text-primary: #000000;
  --text-navigation: #000000;
  --ring-teal: #56ccc9;
  --ring-red: #dd5f5f;
  --ring-purple: #ba42a9;
  --ring-yellow: #ede469;
  --cursor-trail: #ff9ccf;
  --split-gray: #888;   /* 説明文：黒に変わる前・戻った後の色 */
  --split-black: #000;

  --font-ud: "tbudgothic-std", sans-serif;
  --font-jp: "Noto Sans JP", sans-serif;
  /* 数字：Mac / iOS は DIN Alternate、それ以外は近い書体の Barlow */
  --font-num: "DIN Alternate", "Barlow", sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* 出現タイミング（TOP：ヘッダー → 3D ロゴ → バッジ 3 つ → 肩書き・キャッチコピー） */
  --header-start: 1s;
  --logo-start: 1.7s;   /* 読み込みが遅れた場合は、読み込み完了後すぐ */
  --badge-start: 2.3s;
  --role-start: 2.9s;
  --copy-start: 3.1s;
  --copy-step: 0.045s;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--background-base);
  color: var(--text-primary);
  font-family: var(--font-ud);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

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

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

p,
h1 {
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ==========================================================================
   固定背景（グロー + グリッド）：スクロールしない
   ========================================================================== */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/*
  ぼかし円：filter: blur() は使わず、Figma のガウスぼかし（半径476 / σ150）を
  近似した放射グラデーションで描画。transform のみをアニメーションさせるので
  GPU 合成だけで動き、再描画が発生しない。
  要素サイズ = 円952 + ぼかし300×2 = 1552
*/
.glow,
.grid-mask {
  position: absolute;
  width: 1552px;
  height: 1552px;
  will-change: transform;
}

.glow--cool,
.grid-mask--cool {
  --x: -593px;
  --y: -479px;
  left: var(--x);
  top: var(--y);
  animation: drift-cool 3s ease-in-out infinite;
}

.glow--warm,
.grid-mask--warm {
  --x: calc(50vw - 148px);
  --y: 65px;
  left: var(--x);
  top: var(--y);
  animation: drift-warm 3s ease-in-out infinite;
}

.glow--cool {
  background: radial-gradient(closest-side,
    rgb(198 230 255 / 1) 0%,
    rgb(198 230 255 / 0.98) 22.7%,
    rgb(198 230 255 / 0.84) 42%,
    rgb(198 230 255 / 0.5) 61.3%,
    rgb(198 230 255 / 0.16) 80.7%,
    rgb(198 230 255 / 0) 100%);
}

.glow--warm {
  background: radial-gradient(closest-side,
    rgb(255 245 198 / 1) 0%,
    rgb(255 245 198 / 0.98) 22.7%,
    rgb(255 245 198 / 0.84) 42%,
    rgb(255 245 198 / 0.5) 61.3%,
    rgb(255 245 198 / 0.16) 80.7%,
    rgb(255 245 198 / 0) 100%);
}

/* xy 100px 程度をゆらゆら移動し、3秒ごとに元の位置へ戻る */
@keyframes drift-cool {
  0%, 100% { transform: translate3d(0, 0, 0); }
  33%      { transform: translate3d(100px, 45px, 0); }
  66%      { transform: translate3d(40px, 100px, 0); }
}

@keyframes drift-warm {
  0%, 100% { transform: translate3d(0, 0, 0); }
  33%      { transform: translate3d(-90px, -100px, 0); }
  66%      { transform: translate3d(-100px, -30px, 0); }
}

/* 白グリッド側は逆方向に同じだけ動かし、グリッド自体は静止して見せる */
@keyframes drift-cool-inv {
  0%, 100% { transform: translate3d(0, 0, 0); }
  33%      { transform: translate3d(-100px, -45px, 0); }
  66%      { transform: translate3d(-40px, -100px, 0); }
}

@keyframes drift-warm-inv {
  0%, 100% { transform: translate3d(0, 0, 0); }
  33%      { transform: translate3d(90px, 100px, 0); }
  66%      { transform: translate3d(100px, 30px, 0); }
}

/* --- グリッド ------------------------------------------------------------ */
.grid {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

.grid--blue {
  opacity: 0.6;
}

/* グローの範囲だけ白グリッドが見えるマスク（青グリッドの上に重ねて白で覆う） */
.grid-mask {
  -webkit-mask-image: radial-gradient(closest-side, #000 40%, transparent 68%);
  mask-image: radial-gradient(closest-side, #000 40%, transparent 68%);
}

.grid-mask .grid {
  /* KV の原点に合わせる（パターンの位置を青グリッドと一致させる） */
  left: calc(var(--x) * -1);
  top: calc(var(--y) * -1);
  width: 100vw;
  height: 100lvh;
  will-change: transform;
}

.grid-mask--cool .grid { animation: drift-cool-inv 3s ease-in-out infinite; }
.grid-mask--warm .grid { animation: drift-warm-inv 3s ease-in-out infinite; }

/* 円が画面を埋めた後の黄色い全面背景 */
.bg-fill {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--ring-yellow);
  opacity: 0;
  pointer-events: none;
}

.bg-fill.is-active {
  opacity: 1;
}

/* ==========================================================================
   スクロールするコンテンツ
   ========================================================================== */
.main {
  position: relative;
  z-index: 1;
}

/* --- KV と説明文 --------------------------------------------------------- */
/* 3D ロゴとバッジが KV の下端で切れないよう、KV と説明文をまとめた範囲で表示する（横方向のはみ出しのみ隠す） */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  overflow: clip visible;
}

/* --- KV ------------------------------------------------------------------ */
.kv {
  --kv-h: max(100svh, 640px);
  position: relative;
  height: var(--kv-h);
}

.kv__role {
  /* 肩書きは、ロゴ・バッジの後に出現 */
  --header-start: var(--role-start);
  position: absolute;
  z-index: 3;
  top: 71px;
  left: 32px;
  font-size: 24px;
  line-height: 1.45;
}

/* --- メインビジュアル（Spline） ----------------------------------------- */
.kv__visual {
  /* ロゴ中心の縦位置（KV の高さに対する割合）。キャッチコピーとは重ならないよう js/main.js で調整 */
  --logo-y: 0.5;
  position: absolute;
  inset: 0;
  z-index: 1;
  perspective: 1600px;
  transform-style: preserve-3d;
  will-change: transform, opacity;
}

.kv__visual-inner {
  position: absolute;
  /* 描画は KV の大きさのみ。ロゴの大きさは JS でカメラのズームを横幅に合わせて調整 */
  inset: 0;
  opacity: 0;
  /* 少し下からふわっと出現。--appear-delay は --logo-start までの残り時間（js/main.js） */
  transform: translate3d(0, 48px, 0);
  transition:
    opacity 1.2s var(--ease-out) var(--appear-delay, 0s),
    transform 1.6s var(--ease-out) var(--appear-delay, 0s);
}

.kv__visual.is-loaded .kv__visual-inner {
  /* 少し透かす */
  opacity: 0.7;
  transform: translate3d(0, 0, 0);
  /* 出現が終わったら、上下にゆっくり浮遊 */
  animation: logo-float 6s linear calc(var(--appear-delay, 0s) + 1.6s) infinite;
}

/* 元の位置を中心に上下 30px（上 15px 〜 下 15px）を、片道 3 秒で往復。元の位置から動き出し、元の位置へ戻って繰り返す */
@keyframes logo-float {
  0%   { translate: 0 0; animation-timing-function: cubic-bezier(0.33, 0.66, 0.66, 1); }
  25%  { translate: 0 -15px; animation-timing-function: ease-in-out; }
  75%  { translate: 0 15px; animation-timing-function: cubic-bezier(0.33, 0, 0.66, 0.34); }
  100% { translate: 0 0; }
}

.kv__canvas {
  display: block;
  width: 100%;
  height: 100%;
  /* マウス追従のため、ポインターはページ側で受け取る */
  pointer-events: none;
}

/* WebGL 非対応時の静止画（Figma の配置を中心そのままで 2 倍：幅 1714px → 3429px、9.49° 回転）。横幅に比例 */
.kv__fallback {
  position: absolute;
  left: 51.87%;
  top: 48%;
  width: 238%;
  aspect-ratio: 1714.43 / 721.26;
  overflow: hidden;
  transform: translate(-50%, -50%) rotate(9.49deg);
}

.kv__fallback[hidden],
.kv__canvas[hidden] {
  display: none;
}

.kv__fallback img {
  position: absolute;
  left: -42.74%;
  top: -56.55%;
  width: 175.4%;
  height: 253.67%;
  max-width: none;
}

/* --- バッジ -------------------------------------------------------------- */
/* 画面に固定（スクロールしても動きが変わらない）。--badges-h（画面の高さ）は js/main.js で設定 */
.kv__badges {
  position: fixed;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  will-change: opacity;
}

/*
  .badge        … translate：下から上へ流れる ／ transform：左右にゆらゆら
  .badge__inner … translate：マウスが重なった時に少し逃げる ／ rotate：流れる間に 1 回転
  （個別プロパティ translate / rotate を使い、各動きが互いに干渉しないようにする）
*/
.badge {
  --scale: 1;
  /* 開始のずれは js/main.js で設定（下は JS が動かない場合の値） */
  --rise: 24s;
  --delay: calc(var(--i) * 4s);
  position: absolute;
  left: var(--left);
  top: 100%;
  width: calc(var(--size) * var(--scale) * 1px);
  animation:
    badge-rise var(--rise) linear var(--delay) infinite both,
    badge-sway var(--sway) ease-in-out calc(var(--i) * -0.9s) infinite alternate;
  will-change: translate, transform, opacity;
}

.badge__inner {
  --px: 0px;
  --py: 0px;
  border-radius: 50%;
  pointer-events: auto;
  translate: var(--px) var(--py);
  transition: translate 0.6s var(--ease-out), scale 0.6s var(--ease-out);
  animation: badge-spin var(--rise) linear var(--delay) infinite both;
  will-change: translate, rotate;
}

.badge__inner.is-hover {
  scale: 1.06;
}

.badge img {
  width: 100%;
  height: auto;
}

/* 最初に画面内にいる 3 つ（data-intro）：ロゴの後に 1 つずつポンと出現 */
.badge[data-intro] img {
  animation: badge-pop 0.7s var(--ease-out) calc(var(--badge-start) + var(--intro, 0) * 0.15s) both;
}

@keyframes badge-pop {
  from { opacity: 0; transform: scale(0.6); }
}

/* バッジからこぼれ落ちる・噴き出る丸（js/main.js で生成して動かす） */
.badge-dot {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  pointer-events: none;
  will-change: transform, opacity;
}

/* 画面の下端から出てくる間にフェードイン、上端付近でフェードアウト */
@keyframes badge-rise {
  0%   { translate: 0 0; opacity: 0; }
  10%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { translate: 0 calc(var(--badges-h, 100vh) * -1 - 100%); opacity: 0; }
}

@keyframes badge-spin {
  from { rotate: 0deg; }
  to   { rotate: calc(var(--spin) * 360deg); }
}

@keyframes badge-sway {
  from { transform: translate3d(-24px, 0, 0); }
  to   { transform: translate3d(24px, 0, 0); }
}

/* --- ヘッダー ------------------------------------------------------------ */
.header {
  position: fixed;
  z-index: 12;
  top: 25px;
  left: 32px;
  right: 42px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
}

.header__logo {
  grid-column: 1;
  grid-row: 1;
  margin-top: 9px;
  line-height: 0;
}

.header__logo img {
  width: 196px;
  height: auto;
}

.header__nav {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  display: flex;
  gap: 74px;
  font-size: 20px;
  line-height: 40px;
  color: var(--text-navigation);
}

/*
  ナビゲーションのリンク（INFO / CONTACT）
  hover：通常の文字が右へサッと抜けて消え、代わりに同じ文字が左から入る（最後に少し行き過ぎて戻る）
         少し遅れて、下線（2px）が左から伸びる。表示中のページは最初から下線を表示
*/
.nav-link {
  /* 文字が行き過ぎて戻る時に端が切れないよう、隠す範囲を左右に広げる（文字の位置は変えない）
     リンク（.reveal）と文字の枠（.nav-link__label）の両方で広げる */
  --pad: 8px;
  margin: 0 calc(var(--pad) * -1);
  padding: 0 var(--pad);
}

.nav-link .reveal__inner {
  position: relative;
  vertical-align: top;
}

.nav-link__label {
  position: relative;
  display: block;
  margin: 0 calc(var(--pad) * -1);
  padding: 0 var(--pad);
  overflow: hidden;
}

.nav-link__text {
  display: block;
  transition: transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.nav-link__text--hover {
  position: absolute;
  inset: 0 var(--pad);
  transform: translate3d(calc(-100% - var(--pad) * 2), 0, 0);
}

.nav-link__line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s var(--ease-out);
}

@media (hover: hover) {
  .nav-link:hover .nav-link__text {
    transform: translate3d(calc(100% + var(--pad) * 2), 0, 0);
  }

  .nav-link:hover .nav-link__text--hover {
    transform: translate3d(0, 0, 0);
  }

  .nav-link:hover .nav-link__line {
    transform: scaleX(1);
    transition: transform 0.45s var(--ease-out) 0.2s;
  }
}

.nav-link[aria-current="page"] .nav-link__line {
  transform: scaleX(1);
}

.header__menu.reveal {
  display: none;
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  line-height: 0;
}

/* フレーム（マスク）の下から出現・フレーム外は非表示 */
.reveal {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}

.reveal__inner {
  display: inline-block;
  transform: translate3d(0, 105%, 0);
  animation: slide-up 1s var(--ease-out) both;
  animation-delay: calc(var(--header-start) + var(--d, 0s));
}

@keyframes slide-up {
  from { transform: translate3d(0, 105%, 0); }
  to   { transform: translate3d(0, 0, 0); }
}

/* --- キャッチコピー ------------------------------------------------------ */
.kv__copy {
  position: absolute;
  z-index: 3;
  top: 203px;
  left: 32px;
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: 39.129px;
  line-height: 1.6;
  white-space: nowrap;
}

.kv__copy-line {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}

.kv__copy-line > span {
  display: inline-block;
  transform: translate3d(0, 105%, 0);
  animation: slide-up 0.9s var(--ease-out) both;
  animation-delay: calc(var(--copy-start) + var(--i) * var(--copy-step));
}

/* --- 説明文 -------------------------------------------------------------- */
.about {
  position: relative;
  /* 下の余白：最後の段落までスクロールで出し切れるように */
  padding: 244px 32px 30vh;
}

.about__lead {
  /* バッジより手前に表示 */
  position: relative;
  z-index: 3;
  max-width: 866px;
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: 31.991px;
  line-height: 2;
}

.about__lead p + p {
  margin-top: 1em;
}

/*
  1 行ずつ、非表示からフェードインしながら下から出現（スクロール連動・戻すと消える）
  .split-line … JS で実際の改行位置ごとにまとめた 1 行。--t（0〜1）を JS で更新
*/
.split-line {
  display: block;
  /* --t：下から出現 ／ --e：ヘッダーに近づいたらフェードアウト */
  opacity: calc(var(--t, 0) * var(--e, 1));
  transform: translate3d(0, calc((1 - var(--t, 0)) * 40px), 0);
}

/*
  文字の色：最初はグレー → 左から黒に変わる（--c：0〜1）→ フェードアウトの少し前に左からグレーに戻る（--g：0〜1）
  行の幅いっぱいのグラデーションを文字の形で切り抜き、境目（20%）をぼかして左から右へ動かす
*/
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .split-line {
    width: fit-content;
    color: transparent;
    background-image: linear-gradient(90deg,
      var(--split-gray) calc(var(--g, 0) * 120% - 20%),
      var(--split-black) calc(var(--g, 0) * 120%),
      var(--split-black) calc(var(--c, 0) * 120% - 20%),
      var(--split-gray) calc(var(--c, 0) * 120%));
    -webkit-background-clip: text;
    background-clip: text;
  }
}

/* --- 円の拡大 ------------------------------------------------------------ */
/* セクションの高さ分スクロールする間、ステージを画面に固定して円を拡大させる */
.rings {
  position: relative;
  /* 画面 4 枚分で円が広がりきり、残り 1 枚分は黄色の画面のまま制作期間を表示 */
  height: 500vh;
}

.rings__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  overflow: hidden;
  contain: strict;
}

/* 直径（--d）は js/main.js がスクロール量から計算 */
.ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--d, 0px);
  height: var(--d, 0px);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ring--teal   { background: var(--ring-teal); }
.ring--red    { background: var(--ring-red); }
.ring--purple { background: var(--ring-purple); }
.ring--yellow { background: var(--ring-yellow); }

/* 円が画面を覆いきったらステージ自体も黄色に（固定解除で画面が動いても途切れない） */
.rings__stage.is-filled {
  background: var(--ring-yellow);
}

/* --- 制作期間 ------------------------------------------------------------ */
.days {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 32px;
}

.days__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: 100%;
  max-width: 802px;
  font-family: var(--font-jp);
  color: var(--text-primary);
  text-align: center;
}

.days__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: 700;
  font-size: 32px;
  line-height: 1.6;
}

.days__title .mask {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
}

.days__title-lead {
  font-size: 40px;
}

.days__title-num {
  font-size: 54px;
}

.days__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.days__cols {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 612px;
}

.days__col-mask {
  width: 280px;
}

.days__col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 100%;
  margin: 0;
}

.days__label {
  width: 100%;
  padding: 8px 0;
  background: #000;
  color: var(--background-base);
  font-weight: 500;
  font-size: 24px;
  line-height: 32px;
}

.days__value {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 15px;
  margin: 0;
}

.days__value--tight {
  gap: 0;
}

.days__num {
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 130.846px;
  line-height: normal;
}

.days__unit {
  display: flex;
  align-items: center;
  width: 97px;
  height: 104px;
  font-weight: 500;
  font-size: 48.487px;
  line-height: 2;
  text-align: left;
}

/* 区切り線：上から下へ伸びて出現 */
.days__divider {
  align-self: stretch;
  width: 1px;
  height: 191px;
  background: #000;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.6s var(--ease-out);
}

.is-inview .days__divider {
  transform: scaleY(1);
  transition-delay: var(--d, 0s);
}

.days__notes-mask {
  width: 100%;
  max-width: 634px;
}

.days__notes {
  font-weight: 400;
  font-size: 14px;
  line-height: 2;
  text-align: left;
}

/*
  フレーム（マスク）の下から出現・フレーム外は非表示（親に .is-inview が付くと出現。js/main.js の円の拡大で制御）
  .mask … フレーム ／ .mask__inner … 動く中身。--d で出現の順番をずらす
*/
.mask {
  display: block;
  overflow: hidden;
}

.mask__inner {
  display: block;
  transform: translate3d(0, 105%, 0);
  transition: transform 0.9s var(--ease-out);
}

.is-inview .mask__inner {
  transform: translate3d(0, 0, 0);
  transition-delay: var(--d, 0s);
}

/* --- Let’s make it happen! ---------------------------------------------- */
/* セクションの高さ分スクロールする間、ステージを画面に固定 */
.happen {
  position: relative;
  height: 500vh;
}

.happen__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  overflow: hidden;
}

/*
  黄色に開いた円の穴：要素自体は透明で、外側を大きな box-shadow で黄色に塗る。
  穴の中から下の固定背景（KV のグロー + グリッド）が見える。直径 --hole は js/main.js で更新
*/
.happen__hole {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--hole, 0px);
  height: var(--hole, 0px);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 300vmax var(--ring-yellow);
  /* 穴の中の最後の画面のボタンを押せるように */
  pointer-events: none;
}

/*
  文字はベクター（SVG）。1440px 幅で文字幅 658px（デザイン準拠）。
  拡大は transform ではなく実際の幅（--w × --scale）を変えて描き直すので、どの大きさでもくっきり表示される
*/
.happen__text {
  --w: 45.7vw;
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
  width: calc(var(--w) * var(--scale, 1));
  line-height: 0;
  color: var(--text-primary);
  transform: translate(-50%, -50%);
}

.happen__text.is-hidden {
  visibility: hidden;
}

.happen__svg {
  display: block;
  width: 100%;
  height: auto;
  /* viewBox の外（フレーム外）は非表示 */
  overflow: hidden;
}

/* 1 文字ずつフレームの下から出現。進捗 --p は js/main.js で更新 */
.happen__svg path {
  --w: 4;
  --t: clamp(0, (var(--p, 0) * (var(--n) + var(--w)) - var(--i)) / var(--w), 1);
  transform: translateY(calc((1 - var(--t)) * 54px));
}

/* --- 円の穴が広がりきった後の画面 ----------------------------------------- */
.finale {
  position: absolute;
  inset: 0;
  /* 穴が開ききるまでは黄色の下に隠れているので操作できないように */
  pointer-events: none;
}

.finale.is-open {
  pointer-events: auto;
}

/* 薄い 3D ロゴ（Spline・不透明度 20%）。読み込み完了でフェードイン */
.finale__logo {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s var(--ease-out);
}

.finale__logo.is-loaded {
  opacity: 0.2;
}

.finale__canvas {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.finale__canvas[hidden],
.finale__fallback[hidden] {
  display: none;
}

/* WebGL 非対応時の静止画（デザイン：幅 2100px・中心 47.27% / 42.05%・9.49° 回転） */
.finale__fallback {
  position: absolute;
  left: 47.27%;
  top: 42.05%;
  width: 145.8%;
  aspect-ratio: 2099.9 / 883.43;
  overflow: hidden;
  transform: translate(-50%, -50%) rotate(9.49deg);
}

.finale__fallback img {
  position: absolute;
  left: -42.74%;
  top: -56.55%;
  width: 175.4%;
  height: 253.67%;
  max-width: none;
}

/* 相談ボタンを押すと、バッジとボタンだけが上へ流れる（背景・3D・コピーライトは固定） */
.finale__move {
  position: absolute;
  inset: 0;
  transition: transform 0.9s var(--ease-out);
}

.finale.is-leaving .finale__move {
  transform: translate3d(0, -100vh, 0);
}

.finale__badges {
  position: absolute;
  inset: 0;
}

/* デザインの位置・大きさ（1440×935 基準）に、ゆっくり上下するゆらぎを加える */
.finale__badge {
  --scale: 1;
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: calc(var(--size) / 1440 * 100vw * var(--scale));
  height: auto;
  animation: finale-float 4s ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * -0.7s);
}

@keyframes finale-float {
  from { transform: translate3d(0, -8px, 0) rotate(calc(var(--dir) * -4deg)); }
  to   { transform: translate3d(0, 8px, 0) rotate(calc(var(--dir) * 4deg)); }
}

.finale__button {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 475px;
  height: 111px;
  padding: 8px;
  border-radius: 999px;
  background: #184ec2;
  color: #fff;
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 24px;
  line-height: 2;
  transform: translate(-50%, -50%);
  transition: transform 0.4s var(--ease-out);
}

/* hover：左から #C22C18 に塗り替わる */
.finale__button {
  overflow: hidden;
  isolation: isolate;
}

.finale__button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #c22c18;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}

.finale__button:hover::before,
.finale__button:focus-visible::before {
  transform: scaleX(1);
}

.finale__button:hover {
  transform: translate(-50%, -50%) scale(1.03);
}

/* 下向きの矢印 */
.finale__button img {
  transform: rotate(90deg);
}

.finale__copy {
  position: absolute;
  right: 48px;
  bottom: 42px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 20px;
  line-height: normal;
}

/* --- お問い合わせ（独立したページ） ---------------------------------------- */
/* 白い画面に固有のグロー。中身が短い時もフッターは画面の一番下 */
.contact {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100svh;
  overflow: clip;
  background: var(--background-base);
  font-family: var(--font-jp);
  color: var(--text-primary);
}

.contact__glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.contact__glow--cool {
  left: -593px;
  top: -479px;
  width: 1552px;
  height: 1552px;
  background: radial-gradient(closest-side,
    rgb(198 230 255 / 1) 0%, rgb(198 230 255 / 0.98) 22.7%, rgb(198 230 255 / 0.84) 42%,
    rgb(198 230 255 / 0.5) 61.3%, rgb(198 230 255 / 0.16) 80.7%, rgb(198 230 255 / 0) 100%);
}

.contact__glow--warm {
  left: 740px;
  top: -60px;
  width: 1400px;
  height: 1400px;
  background: radial-gradient(closest-side,
    rgb(255 245 198 / 1) 0%, rgb(255 245 198 / 0.98) 22.7%, rgb(255 245 198 / 0.84) 42%,
    rgb(255 245 198 / 0.5) 61.3%, rgb(255 245 198 / 0.16) 80.7%, rgb(255 245 198 / 0) 100%);
}

.contact__intro,
.contact__form,
.footer {
  flex: none;
}

.contact__intro {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
  /* 固定ヘッダー分の余白 + デザインの 64px */
  padding: 152px 64px 64px;
}

.contact__sub {
  font-weight: 500;
  font-size: 16px;
  line-height: 2;
}

.contact__title {
  margin: 0;
  font-weight: 700;
  font-size: 54px;
  line-height: normal;
}

.contact__form {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 960px;
  max-width: calc(100% - 64px);
  padding-bottom: 64px;
}

.contact__lead {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact__lead-title {
  font-weight: 700;
  font-size: 28px;
  line-height: 1.5;
}

.contact__lead-text {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 0;
}

.field__label {
  display: flex;
  align-items: center;
  gap: 16px;
  font-weight: 500;
  font-size: 16px;
  line-height: 2;
}

.field__required {
  padding: 2px 8px;
  background: #e64529;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  line-height: 20px;
}

.field__input {
  width: 100%;
  height: 56px;
  padding: 16px;
  border: 1px solid #fff;
  border-radius: 6px;
  background: #f2f2f2;
  font: inherit;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
}

.field__input::placeholder {
  color: #aaa;
}

/* hover：薄いドロップシャドー */
.field__input,
.select__toggle {
  transition: box-shadow 0.3s var(--ease-out);
}

.field__input:hover,
.select__toggle:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.field__input:focus,
.select__toggle:focus-visible {
  outline: 2px solid #184ec2;
  outline-offset: 1px;
}

.field__input--message {
  height: 192px;
  resize: vertical;
}

.field.is-error .field__input,
.field.is-error .select__toggle {
  border-color: #e64529;
}

/* 選択式（ボタンで開閉するラジオボタンの一覧。開閉は js/main.js で高さ・透明度を動かす） */
.select {
  display: flex;
  flex-direction: column;
}

.select__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 56px;
  padding: 16px;
  border: 1px solid #fff;
  border-radius: 6px;
  background: #f2f2f2;
  font: inherit;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-navigation);
  text-align: left;
  cursor: pointer;
}

.select__value {
  flex: 1;
}

.select__toggle img {
  transition: transform 0.3s;
}

.select__toggle[aria-expanded="false"] img {
  transform: rotate(180deg);
}

.select__menu {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid #d5d5d5;
  border-radius: 6px;
  background: #fff;
}

.select__menu[hidden] {
  display: none;
}

.select__option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

/* hover：薄いグレーの背景に青い文字 */
.select__option:hover {
  background: #f2f2f2;
  color: #184ec2;
}

.select__option input {
  appearance: none;
  flex: none;
  width: 14px;
  height: 14px;
  margin: 0;
  border: 1px solid #a9c1f0;
  border-radius: 50%;
  cursor: pointer;
  transition: border 0.2s;
}

.select__option input:checked {
  border: 4px solid #184ec2;
}

.select__option input:focus-visible {
  outline: 2px solid #184ec2;
  outline-offset: 2px;
}

.contact__action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-top: 48px;
}

.contact__submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 400px;
  max-width: 100%;
  height: 72px;
  padding: 8px;
  border: 0;
  border-radius: 999px;
  /* 押せない時のグレーの上に、押せる時は黒を左から塗る（TOP の相談ボタンと同じ動き） */
  overflow: hidden;
  isolation: isolate;
  background: #aaa;
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.5;
  cursor: pointer;
  transition: opacity 0.3s;
}

.contact__submit::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #000;
  transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}

.contact__submit:disabled::before {
  transform: scaleX(0);
}

.contact__submit:hover {
  opacity: 0.8;
}

.contact__note {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
  color: #666;
  text-align: center;
}

.contact__submit:disabled {
  background: #aaa;
  cursor: not-allowed;
}

.contact__submit:disabled:hover {
  opacity: 1;
}

/* プライバシーポリシーへの同意 */
.agree {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border: 1px solid #fff;
  border-radius: 6px;
  background: #f2f2f2;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
  cursor: pointer;
}

.agree__input {
  appearance: none;
  flex: none;
  width: 24px;
  height: 24px;
  margin: 0;
  border: 1px solid #aaa;
  border-radius: 4px;
  background: #fff center / 16px no-repeat;
  cursor: pointer;
}

.agree__input:checked {
  border-color: #000;
  background-color: #000;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.agree__input:focus-visible {
  outline: 2px solid #184ec2;
  outline-offset: 2px;
}

.field.is-error .agree__input {
  border-color: #e64529;
}

.agree__text a {
  color: #2475cc;
}

.agree__text a:hover {
  text-decoration: underline;
}

.contact__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* 確認画面 */
.confirm {
  margin: 24px 0 0;
  border-top: 1px solid #d5d5d5;
}

.confirm__item {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid #d5d5d5;
  font-weight: 500;
  font-size: 16px;
  line-height: 2;
}

.confirm__item dd {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.contact__back {
  padding: 8px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
  text-decoration: underline;
  cursor: pointer;
}

.contact__status {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
  color: #e64529;
  text-align: center;
}

.contact__status:empty {
  display: none;
}

.footer {
  position: relative;
  /* 中身が画面より短い時（送信完了など）も画面の一番下に置く */
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 32px;
  border-top: 1px solid #d5d5d5;
  white-space: nowrap;
}

.footer__brand {
  font-family: "Special Gothic Expanded One", sans-serif;
  font-size: 16.341px;
}

.footer__company {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
  color: #666;
}

/* --- 会社情報（独立したページ） -------------------------------------------- */
/* 背景（グロー + グリッド）の上に、会社情報を画面の上下中央に置く */
.info {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 100svh;
  padding: 120px 32px 80px;
  font-family: var(--font-jp);
  color: var(--text-primary);
}

.info__list {
  position: relative;
  width: 794px;
  max-width: 100%;
  margin: auto 0;
}

.info__item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 500;
  font-size: 16px;
}

/* 項目間の区切り線（上下 24px） */
.info__item + .info__item {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #7caecc;
}

.info__item dt {
  line-height: 2;
}

.info__item dd {
  margin: 0;
  line-height: 1.6;
}

.info__business {
  margin: 0;
  padding-left: 24px;
}

.info__address {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* --- SP メニュー ----------------------------------------------------------- */
/* 白い画面がフェードで現れる／消える。ヘッダー（ロゴ・閉じるボタン）はその上 */
.sp-menu {
  position: fixed;
  inset: 0;
  z-index: 11;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 88px;
  background: var(--background-base);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0s 0.5s;
}

.sp-menu.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0s;
}

.sp-menu__link {
  font-size: 24px;
  line-height: normal;
}

html.is-menu-open {
  overflow: hidden;
}

/* メニューボタン：開いている間は × アイコン */
.header__menu-close,
html.is-menu-open .header__menu-open {
  display: none;
}

html.is-menu-open .header__menu-close {
  display: block;
}

/* --- マウスカーソルの軌跡 ------------------------------------------------ */
/* お問い合わせページでは表示しない（入力の邪魔にならないように） */
.is-page-contact .cursor-trail {
  display: none;
}

.cursor-trail {
  position: fixed;
  inset: 0;
  z-index: 100;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ==========================================================================
   SP
   ========================================================================== */
/* --- プライバシーポリシー ------------------------------------------------ */
/* 背景のグリッドは出さず、グローだけ表示 */
.privacy-policy .grid--blue,
.privacy-policy .grid-mask {
  display: none;
}

/* トップページ以外は演出を待たずにヘッダーを出す */
.is-subpage {
  --header-start: 0.2s;
}

.policy {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 48px;
  width: 720px;
  max-width: calc(100% - 64px);
  margin: 0 auto;
  /* 固定ヘッダー分の 64px + デザインの 120px */
  padding: 184px 0 120px;
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.policy__title {
  margin: 0;
  font-weight: 700;
  font-size: 54px;
  line-height: normal;
  text-align: center;
}

.policy__section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.policy__heading {
  margin: 0;
  font-weight: 500;
  font-size: 16px;
  line-height: 2;
}

.policy__list {
  margin: 0;
  padding-left: 24px;
}

.policy__company {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ==========================================================================
   ページの切り替え
   ========================================================================== */
/*
  View Transitions（ページをまたぐ切り替え）
  - 画面（背景を含む）は、前のページがフェードアウトしながら次のページがフェードインする
  - ヘッダーはどのページも同じなので動かさない
  - お問い合わせ・会社情報の中身は、さらに下からフェードインで現れる（下の .page-rise）
*/
@view-transition {
  navigation: auto;
}

.header {
  view-transition-name: site-header;
}

::view-transition-group(site-header),
::view-transition-new(site-header) {
  animation: none;
}

::view-transition-old(site-header) {
  display: none;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.7s;
  animation-timing-function: ease;
}

@keyframes vt-fade-in { from { opacity: 0; } }

/* お問い合わせ・会社情報：中身を下からフェードインで表示（背景のフェードに少し遅れて） */
@keyframes page-rise {
  from {
    opacity: 0;
    transform: translate3d(0, 48px, 0);
  }
}

.is-page-contact .contact__intro,
.is-page-contact .contact__form,
.is-page-info .info__list {
  animation: page-rise 1s var(--ease-out) 0.25s both;
}

.is-page-contact .contact__form {
  animation-delay: 0.4s;
}

/* 2 ページ目以降はヘッダーの出現演出を省く（切り替えの最中にヘッダーが消えないように） */
.is-revisit .header .reveal__inner {
  animation: none;
  transform: none;
}

/* View Transitions 非対応のブラウザ：中身をフェードで切り替える（js/main.js） */
.is-vt-fallback .main {
  animation: vt-fade-in 0.5s ease both;
}

.is-vt-fallback.is-page-leaving .main {
  opacity: 0;
  transition: opacity 0.3s ease;
}

@media (max-width: 767px) {
  /* お問い合わせ SP デザイン準拠：ヘッダー高さ 88 / 余白 24 / ロゴ幅 120 */
  .header {
    top: 24px;
    left: 24px;
    right: 24px;
  }

  .header__logo {
    margin-top: 10px;
  }

  .header__logo img {
    width: 120px;
  }

  .header__nav {
    display: none;
  }

  .header__menu.reveal {
    display: inline-block;
  }

  /* SP デザイン準拠（390px 基準） */
  .kv__role {
    top: 65px;
    left: 24px;
    font-size: 14px;
  }

  .about {
    padding: 160px 24px 30vh;
  }

  .about__lead {
    font-size: min(20px, 5vw);
  }

  .kv__copy {
    top: 210px;
    left: 24px;
    font-size: min(41.614px, 10.67vw);
  }

  /* SP は「その構想、／ここから一緒に／動かしましょう。」の 3 行 */
  .kv__copy-line {
    display: block;
    width: fit-content;
  }

  /* グロー：SP デザインの円サイズ（620 / 450）に合わせて縮小 */
  .glow--cool,
  .grid-mask--cool {
    --x: -415px;
    --y: -374px;
    width: 1010px;
    height: 1010px;
  }

  .glow--warm,
  .grid-mask--warm {
    --x: 54px;
    --y: 114px;
    width: 742px;
    height: 742px;
  }

  .badge {
    --scale: 0.55;
  }

  .kv__visual {
    /* デザイン（390×844）：ロゴ中心は高さの約 63%、キャッチコピーの約 50px 下から始まる */
    --logo-y: 0.633;
  }

  .days {
    padding: 88px 24px;
  }

  .days__inner {
    gap: 28px;
  }

  .days__title {
    font-size: 20px;
  }

  .days__title .mask {
    min-height: 40px;
  }

  .days__title-lead {
    font-size: 24px;
  }

  .days__title-num {
    font-size: 34px;
  }

  .days__cols {
    width: 100%;
    max-width: 342px;
  }

  .days__col-mask {
    width: calc(50% - 16px);
  }

  .days__label {
    padding: 6px 0;
    font-size: 16px;
    line-height: 24px;
  }

  .days__value {
    gap: 6px;
  }

  .days__num {
    font-size: 72px;
  }

  .days__unit {
    width: auto;
    height: 60px;
    font-size: 24px;
  }

  .days__divider {
    height: 120px;
  }

  .days__notes {
    font-size: 12px;
  }

  /* SP は画面幅いっぱい近くまで */
  .happen__text {
    --w: 87vw;
  }

  /* SP デザイン準拠（390×844 基準の位置・大きさ。inline の --sp-* を使用） */
  .finale__badge {
    left: var(--sp-x);
    top: var(--sp-y);
    width: calc(var(--sp-size) / 390 * 100vw);
  }

  .finale__badge--pc {
    display: none;
  }

  .finale__button {
    width: calc(306 / 390 * 100vw);
    height: calc(71.5 / 390 * 100vw);
    gap: 5px;
    font-size: calc(15.46 / 390 * 100vw);
  }

  .finale__button img {
    width: calc(20.6 / 390 * 100vw);
    height: auto;
  }

  .finale__copy {
    right: 24px;
    bottom: 24px;
    font-size: 14px;
  }

  .info {
    padding: 104px 24px 64px;
  }

  .info__item {
    font-size: 14px;
  }

  .info__br {
    display: none;
  }

  /* お問い合わせ：SP デザイン準拠（余白 24px） */
  .contact__intro {
    gap: 0;
    padding: 96px 24px 0;
  }

  .contact__title {
    font-size: 32px;
  }

  .contact__form {
    max-width: calc(100% - 48px);
    padding-top: 48px;
  }

  .contact__lead-title {
    font-size: 24px;
    line-height: 1.75;
  }

  .contact__lead-text {
    font-size: 14px;
    line-height: 1.85;
  }

  .field {
    gap: 12px;
    padding: 16px 0;
  }

  .contact__submit {
    width: 100%;
  }

  .contact__note {
    font-size: 14px;
  }

  .policy {
    gap: 40px;
    max-width: calc(100% - 48px);
    padding: 120px 0 80px;
    font-size: 14px;
    line-height: 1.85;
  }

  .policy__title {
    font-size: 32px;
  }

  .policy__heading {
    font-size: 16px;
  }

  .agree {
    font-size: 14px;
  }

  .confirm__item {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 16px 0;
  }

  .contact__back,
  .contact__status {
    font-size: 14px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 32px 24px;
  }
}

/* ==========================================================================
   動きを減らす設定のユーザー
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }

  .is-vt-fallback .main {
    animation: none;
  }

  .is-page-contact .contact__intro,
  .is-page-contact .contact__form,
  .is-page-info .info__list {
    animation: none;
  }

  .glow,
  .grid-mask,
  .grid-mask .grid {
    animation: none;
  }

  .nav-link__text,
  .nav-link__line {
    transition: none !important;
  }

  .reveal__inner,
  .kv__copy-line > span {
    animation: none;
    transform: none;
  }

  .split-line {
    opacity: 1;
    transform: none;
  }

  .mask__inner,
  .days__divider {
    transform: none;
    transition: none;
  }

  .kv__badges {
    display: none;
  }

  .kv__visual-inner {
    transition: none;
  }

  .kv__visual.is-loaded .kv__visual-inner {
    animation: none;
  }
}

/* 黄色の画面で制作期間が出現しきるまで、スマホの慣性スクロールを止める（js/main.js） */
.is-scroll-held,
.is-scroll-held body {
  overflow: hidden;
}
