/* experience.css — 没入型デモ（/web/ の抜粋）
   並び：変数 → ベース → ヘッダー → 舞台 → 各場面 → キャラクター → 舞台のあと → 静止版 → 768px以下 → 480px以下
   場面の出し入れ：JS が各要素に --t（0＝見えない〜1＝見える）を入れ、CSS はそれを透明度・位置・ぼかしに変えるだけ */

:root {
  --c-bg: #0D0D0F;
  --c-text: #F2F2F2;
  --c-mute: #8A8A92;
  --c-accent: #FFE000;
  --c-on-accent: #0D0D0F;
  --font-en: 'Space Grotesk', 'Noto Sans JP', sans-serif;
  --font-ja: 'Noto Sans JP', sans-serif;
  --m: clamp(20px, 4.4vw, 64px);
  --ink: var(--c-text);          /* 舞台の文字色。黄色の世界では JS が黒にする */
  --panel: rgba(13, 13, 15, .72);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--c-bg); color: var(--c-text); font-family: var(--font-ja); overflow-x: clip; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.label { font: 500 12px/1 var(--font-en); letter-spacing: .24em; margin: 0 0 18px; display: flex; align-items: center; gap: 12px; }
.label::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.head { margin: 0 0 24px; }
.head .en { display: block; font: 700 clamp(40px, 6.4vw, 104px)/.95 var(--font-en); letter-spacing: -.035em; }
.head .ja { display: block; font-size: 14px; font-weight: 500; margin-top: 12px; letter-spacing: .08em; }
.lead { font-size: clamp(14px, 1.3vw, 16px); line-height: 1.9; margin: 0; max-width: 34em; }

/* ===== ヘッダー（ロゴとSKIPだけ） ===== */
.bar { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; justify-content: space-between; align-items: center; padding: 20px var(--m); pointer-events: none; color: var(--ink); mix-blend-mode: difference; }
.bar a { pointer-events: auto; text-decoration: none; color: #fff; }
.bar__logo { display: flex; align-items: center; gap: 10px; font: 700 14px/1 var(--font-en); letter-spacing: .14em; }
.bar__logo svg { width: 32px; height: 32px; }
.bar__skip { font: 500 12px/1 var(--font-en); letter-spacing: .2em; padding: 10px 0; }
.bar a:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 4px; }

/* ===== 舞台：高さ1800vhの箱の中で、画面サイズの板が貼り付いたまま（sticky）中身だけ変わる ===== */
.stage { height: 2600vh; position: relative; }
.stage__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; color: var(--ink); }
.stage__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.scene, .scene [data-in] {
  --t: 0;
  opacity: var(--t);
  transform: translateY(calc((1 - var(--t)) * 36px));
  filter: blur(calc((1 - var(--t)) * 8px));
}
.scene { position: absolute; pointer-events: none; transform: translateY(calc((1 - var(--t)) * 36px)) scale(var(--fit, 1)); }   /* --fit：画面に収まらないときだけ JS が縮める */
.scene--left { left: var(--m); top: 50%; translate: 0 -50%; max-width: min(620px, 48vw); }
.scene--wide { left: var(--m); right: var(--m); top: 50%; translate: 0 -50%; }

/* 0. FV */
.scene--intro { left: var(--m); right: var(--m); bottom: 9vh; }
.hero { margin: 0; }
.hero__en { display: block; font: 700 clamp(64px, 13vw, 220px)/.88 var(--font-en); letter-spacing: -.045em; }
.outline { color: transparent; -webkit-text-stroke: 2px var(--c-accent); }
.hero__ja { display: block; font-size: clamp(15px, 1.6vw, 20px); font-weight: 700; margin-top: 18px; letter-spacing: .1em; }
.facts { display: flex; gap: clamp(20px, 4vw, 64px); margin: 32px 0 0; }
.facts div { border-top: 1px solid rgba(242, 242, 242, .3); padding-top: 12px; }
.facts dt { font-size: 12px; color: var(--c-mute); }
.facts dd { margin: 6px 0 0; font: 700 clamp(22px, 2.6vw, 36px)/1 var(--font-en); }
.facts small { font-size: .45em; margin-left: 2px; }
.scroll-hint { position: absolute; right: 0; bottom: 0; font: 500 12px/1 var(--font-en); letter-spacing: .2em; margin: 0; display: flex; align-items: center; gap: 12px; }
.scroll-hint span { width: 60px; height: 1px; background: currentColor; transform-origin: left; animation: hint 1.8s ease-in-out infinite; }
@keyframes hint { 0% { transform: scaleX(0); } 50% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }

/* 1. 輪をくぐる */
.scene--phrase { left: 0; right: 0; bottom: 14vh; text-align: center; }
.phrase { font: 700 clamp(28px, 4.6vw, 64px)/1.35 var(--font-ja); margin: 0; letter-spacing: .06em; text-shadow: 0 2px 24px rgba(0, 0, 0, .5); }

/* 2. PROMISE */
.promise { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.promise li { display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; padding: 14px 0; border-top: 1px solid currentColor; }
.promise .num { font: 500 13px/1.6 var(--font-en); grid-row: span 2; }
.promise strong { font-size: clamp(17px, 1.8vw, 22px); }
.promise li > span:last-child { font-size: 13px; line-height: 1.8; margin-top: 4px; }

/* 3. TEMPLATES：説明カード（画面の左右に交互） */
.tpl { bottom: 10vh; width: min(340px, 80vw); padding: 20px 22px; background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-left: 3px solid var(--c-accent); }
.tpl--r { right: calc(var(--m) + 24px); top: 16vh; bottom: auto; }
.tpl--l { left: var(--m); }
.tpl img { display: none; }
.tpl p { margin: 0; }
.tpl__no { font: 700 40px/1 var(--font-en); color: var(--c-accent); }
.tpl__tag { font-weight: 700; margin-top: 8px !important; }
.tpl__txt { font-size: 13px; line-height: 1.8; margin-top: 6px !important; color: #D8D8DC; }
.tpl__price { font: 700 22px/1 var(--font-en); margin-top: 14px !important; }
.tpl__price small { font: 500 11px var(--font-ja); margin-left: 4px; }

/* 4. PLANS */
.plans { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 1100px; }
.plans li { padding: 22px; background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(242, 242, 242, .18); display: grid; gap: 8px; align-content: start; }
.plans strong { font-size: 17px; }
.plans span { font-size: 13px; line-height: 1.8; color: #D8D8DC; }
.plans em { font-style: normal; font-weight: 700; margin-top: 6px; }
.plans .is-pick { border-color: var(--c-accent); }
.plans .is-pick em { color: var(--c-accent); }

/* 5. SUPPORT */
.price { font: 700 clamp(56px, 8vw, 120px)/1 var(--font-en); color: var(--c-accent); margin: 0 0 20px; letter-spacing: -.03em; }
.price small { font: 500 14px var(--font-ja); color: var(--ink); margin-left: 8px; letter-spacing: 0; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.checks li { padding-left: 24px; position: relative; }
.checks li::before { content: ''; position: absolute; left: 0; top: .55em; width: 12px; height: 6px; border: solid var(--c-accent); border-width: 0 0 2px 2px; rotate: -45deg; }

/* 6. FLOW */
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.flow li { font-size: clamp(15px, 1.6vw, 19px); font-weight: 700; padding: 9px 0; border-bottom: 1px solid rgba(242, 242, 242, .2); display: flex; gap: 16px; align-items: baseline; }
.flow li span { font: 500 12px/1 var(--font-en); color: var(--c-accent); }

/* 7. COMPLETE */
.scene--complete { left: var(--m); top: 50%; translate: 0 -50%; }
.complete { margin: 0; font: 500 14px/1 var(--font-en); letter-spacing: .4em; color: var(--c-accent); }
.complete span { display: block; font: 700 clamp(56px, 9vw, 140px)/1 var(--font-en); letter-spacing: -.02em; color: var(--c-text); margin-bottom: 8px; }

/* 8. CONTACT */
.scene--contact { left: var(--m); top: 50%; translate: 0 -50%; max-width: min(640px, 56vw); }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 30px; border-radius: 999px; font-weight: 700; text-decoration: none; transition: transform .3s, background-color .3s; }
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 4px; }
.btn--line { background: var(--c-accent); color: var(--c-on-accent); }
.btn--ghost { border: 1px solid rgba(242, 242, 242, .5); background: var(--c-bg); }   /* 透明にすると後ろの3Dと重なって読めないため、背景色で塗る */

/* ===== キャラクター ===== */
/* ベリーくん（右下）＋吹き出し＋集めた数 */
.chara { position: absolute; right: calc(var(--m) - 4px); bottom: 24px; width: 64px; height: 80px; transition: opacity .4s, transform .4s; }
.chara.is-gone { opacity: 0; transform: translateY(40px); }
.chara__body { width: 100%; height: 100%; animation: sway 3s ease-in-out infinite; transform-origin: 50% 100%; }
.chara__body svg { width: 100%; height: 100%; overflow: visible; }
.chara .berry__happy, .chara .berry__mouth--happy { display: none; }
.chara.is-happy .berry__happy, .chara.is-happy .berry__mouth--happy { display: inline; }
.chara.is-happy .berry__eyes, .chara.is-happy .berry__mouth--normal { display: none; }
.chara.is-happy .chara__body { animation: hop .5s ease-out 2; }
.chara__badge { position: absolute; right: -8px; top: -6px; min-width: 34px; padding: 4px 6px; border-radius: 999px; background: var(--c-text); color: var(--c-bg); font: 700 11px/1 var(--font-en); text-align: center; }
.chara__badge.is-bump { animation: bump .5s ease-out; }
.chara__say, .honmono__say {
  position: absolute; margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--c-text); color: var(--c-bg);
  font-size: 13px; line-height: 1.6; font-weight: 500; width: max-content; max-width: 230px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
.chara__say { right: 8px; bottom: calc(100% + 14px); }
.chara__say::after, .honmono__say::after { content: ''; position: absolute; bottom: -6px; width: 12px; height: 12px; background: inherit; rotate: 45deg; }
.chara__say::after { right: 24px; }
.chara__say.is-new, .honmono__say.is-new { animation: pop .35s ease-out; }
.chara__say:empty { display: none; }
@keyframes sway { 0%, 100% { rotate: -4deg; } 50% { rotate: 4deg; } }
@keyframes hop { 0%, 100% { translate: 0 0; } 40% { translate: 0 -16px; } }
@keyframes bump { 40% { scale: 1.35; } }
@keyframes pop { 0% { scale: .85; opacity: 0; } 100% { scale: 1; opacity: 1; } }

/* ベリー本体：5つそろうと中央に飛び出し、CONTACTでは右へ */
.honmono { position: absolute; left: 50%; bottom: 6vh; width: min(240px, 44vw); aspect-ratio: 160 / 230; translate: -50% 0; opacity: 0; scale: .3; transition: opacity .4s, scale .6s cubic-bezier(.3, 1.6, .5, 1), left .8s cubic-bezier(.2, .8, .2, 1), width .8s cubic-bezier(.2, .8, .2, 1); }
.honmono.is-on { opacity: 1; scale: 1; }
.honmono.is-side { left: calc(100% - var(--m) - min(120px, 18vw)); width: min(200px, 28vw); }
.honmono__body, .honmono__body svg { width: 100%; height: 100%; display: block; }
.honmono__say { left: 50%; bottom: calc(100% + 8px); translate: -50% 0; }
.honmono__say::after { left: calc(50% - 6px); }
.honmono__say:empty { display: none; }
.honmono.is-side .honmono__say { left: auto; right: 0; translate: none; }
.honmono.is-side .honmono__say::after { left: auto; right: 30%; }

/* 3Dのベリー本体の吹き出し：JS が transform で頭の上へ動かす */
.hm-say {
  position: absolute; left: 0; top: 0; margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--c-text); color: var(--c-bg);
  font-size: 13px; line-height: 1.6; font-weight: 500; width: max-content; max-width: 230px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); pointer-events: none;
}
.hm-say::after { content: ''; position: absolute; bottom: -6px; left: calc(50% - 6px); width: 12px; height: 12px; background: inherit; rotate: 45deg; }
.hm-say:empty { display: none; }
.hm-say.is-new { animation: fadein .35s ease-out; }
@keyframes fadein { from { opacity: 0; } }
.is-3d .honmono, .is-static .hm-say { display: none; }

/* 進み具合のバー（右端） */
.progress { position: absolute; right: 18px; top: 50%; translate: 0 -50%; width: 2px; height: 120px; background: color-mix(in srgb, var(--ink) 25%, transparent); }
.progress span { display: block; width: 100%; height: 100%; background: var(--ink); transform: scaleY(var(--p, 0)); transform-origin: top; }

/* ===== 舞台のあと ===== */
.after { padding: 18vh var(--m) 40px; text-align: center; display: grid; justify-items: center; }
.after__text { font-size: clamp(16px, 2vw, 22px); font-weight: 700; line-height: 1.7; margin: 0; }
.after__note { font-size: 13px; color: var(--c-mute); margin: 24px 0 0; }
.after__copy { margin: 14vh 0 0; color: var(--c-mute); font-family: var(--font-en); }
/* コラムへのリンク（この見本の解説）。ホバー：枠が黄色 → 矢印が入れ替わる（トップの入り口カードと同じ動き） */
.after__column { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; width: min(560px, 100%); margin-top: 48px; padding: 22px 22px 22px 28px; border: 1px solid #3A3A40; text-align: left; text-decoration: none; transition: border-color .4s, background-color .4s; }
.after__column-label { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font: 500 11px/1 var(--font-en); letter-spacing: .24em; color: var(--c-accent); }
.after__column-label::before { content: ''; width: 20px; height: 1px; background: currentColor; }
.after__column-title { display: block; font-size: 16px; font-weight: 700; line-height: 1.6; }
.after__column-sub { display: block; margin-top: 4px; font-size: 13px; color: var(--c-mute); }
.after__column-go { position: relative; width: 44px; height: 44px; overflow: hidden; border-radius: 50%; background: var(--c-accent); color: var(--c-on-accent); }
.after__column-arrow { position: absolute; inset: 0; display: grid; place-items: center; font-size: 16px; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.after__column-arrow--next { transform: translateX(-100%); }
@media (hover: hover) {
  .after__column:hover { border-color: var(--c-accent); background: rgba(255, 224, 0, .04); }
  .after__column:hover .after__column-arrow { transform: translateX(100%); }
  .after__column:hover .after__column-arrow--next { transform: none; }
}
.after__column:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 4px; }

/* 骨組みモード */
.is-wire .stage__sticky::before { content: 'WIREFRAME MODE'; position: absolute; left: var(--m); top: 84px; font: 500 11px/1 var(--font-en); letter-spacing: .2em; color: var(--c-accent); z-index: 1; }

/* ===== 静止版（動きを減らす設定・WebGL非対応）：普通の縦並びのページにする ===== */
.is-static .bar { mix-blend-mode: normal; }
.is-static .bar__skip { display: none; }
.is-static .stage { height: auto; }
.is-static .stage__sticky { position: static; height: auto; overflow: visible; padding: 18vh var(--m) 0; display: grid; gap: 14vh; }
.is-static .stage__canvas, .is-static .progress, .is-static .scroll-hint, .is-static .chara, .is-static .scene--phrase, .is-static .scene--complete { display: none; }
.is-static .scene, .is-static .scene [data-in] { --t: 1; position: static; translate: none; filter: none; max-width: none; width: auto; pointer-events: auto; }
.is-static .tpl img { display: block; margin-bottom: 16px; max-width: 720px; }
.is-static .honmono { position: static; opacity: 1; scale: 1; translate: none; margin: -8vh auto 0; width: 160px; }

/* ===== 768px以下：文字は上、3Dは下半分で見せる ===== */
@media (max-width: 768px) {
  .scene--left, .scene--contact { top: 92px; translate: none; max-width: none; right: var(--m); }
  .scene--wide { top: 92px; translate: none; }
  .scene--intro { bottom: 172px; }
  .scene--phrase { top: 26vh; bottom: auto; }
  .scene--complete { top: 96px; translate: none; }
  .facts { gap: 16px; }
  .scroll-hint { display: none; }
  .head { margin-bottom: 16px; }
  .head .ja { font-size: 13px; margin-top: 8px; }
  .promise li { padding: 10px 0; grid-template-columns: 32px 1fr; }
  .promise li > span:last-child { display: none; }
  .tpl { left: var(--m); right: auto; bottom: 185px; width: auto; max-width: calc(100% - var(--m) * 2 - 70px); padding: 14px 16px; }
  .tpl--r { top: auto; }   /* PC用の「上から16vh」を外す（下の指定と両方あると、カードが縦に伸びる） */
  .tpl__no { font-size: 28px; }
  .tpl__txt { display: none; }
  .tpl__price { font-size: 18px; margin-top: 8px !important; }
  .plans { grid-template-columns: 1fr; gap: 8px; }
  .plans li { padding: 12px 14px; gap: 2px; }
  .plans span { display: none; }
  .plans em { margin-top: 0; font-size: 13px; }
  .price { margin-bottom: 14px; }
  .checks { font-size: 13px; gap: 6px; }
  .flow li { padding: 7px 0; }
  .chara { width: 50px; height: 62px; bottom: 18px; }
  .chara__say { max-width: min(220px, 60vw); font-size: 12px; padding: 10px 12px; }
  .honmono { bottom: 4vh; }
  .honmono.is-side { left: calc(100% - var(--m) - 56px); width: 112px; }
  .progress { right: 8px; height: 80px; }
  .after__note { display: none; }
  .after__column { margin-top: 36px; padding: 18px 16px 18px 20px; gap: 16px; }
  .after__column-title { font-size: 15px; }
  .is-static .stage__sticky { padding-top: 120px; gap: 10vh; }
}

/* ===== 480px以下 ===== */
@media (max-width: 480px) {
  .outline { -webkit-text-stroke-width: 1.5px; }
  .facts dt { font-size: 11px; }
  .bar__logo span { display: none; }
  .cta .btn { flex: 1 1 100%; }
}
