/* =========================================================================
   Askseed LP — style.css
   構成: Reset / Tokens / Base / Utilities / Reveal System / S0-S12 / Responsive
   ========================================================================= */

/* ===== 1. RESET ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { padding: 0; margin: 0; }
body {
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, blockquote, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { display: block; }

/* ===== 2. TOKENS ===== */
:root {
  /* core palette */
  --teal: #14B8A6;
  --teal-deep: #0E8377;
  --cyan: #06B6D4;
  --cyan-deep: #0E7490;
  --sky: #BFEDFF;
  --lime: #D8F34F;
  --pink: #FF6B9D;
  --ink: #10201D;
  --paper: #FAFDFC;
  --mist: #EDF5F3;
  --white: #FFFFFF;

  /* semantic (ES diff) */
  --diff-add: #10B981;
  --diff-del: #EF4444;
  --diff-rep: #F59E0B;

  /* gradient / shadow / glass */
  --gradient-brand: linear-gradient(135deg, var(--teal), var(--cyan));
  --shadow-soft: 0 24px 60px -24px rgb(16 32 29 / .18);
  --glass-bg: rgb(255 255 255 / .65);
  --glass-blur: 14px;

  /* radius */
  --radius-card: 28px;
  --radius-pill: 999px;

  /* type */
  --font-display: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-body: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-en: "Inter", "Hiragino Sans", "Yu Gothic", sans-serif;

  /* motion */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --dur-base: .8s;
  --dur-fast: .4s;
  --stagger-step: 80ms;

  /* layout */
  --container-max: 1200px;
  --section-pad-y: clamp(64px, 10vw, 140px);
  --gutter: clamp(20px, 5vw, 64px);
}

/* ===== 3. BASE TYPOGRAPHY ===== */
h1, h2, h3 { font-family: var(--font-display); font-weight: 900; line-height: 1.25; letter-spacing: .01em; }

.eyebrow {
  font-family: var(--font-en);
  font-weight: 800;
  font-size: clamp(.7rem, 1.2vw, .82rem);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin: 0 0 clamp(12px, 2vw, 20px);
}
.eyebrow--center { text-align: center; }
.eyebrow--onvoice { color: var(--white); opacity: 1; }

/* 見出し中の特定の語だけ行内で分断されないようにする(自然な折返し用) */
.nobreak { white-space: nowrap; }

/* 蛍光マーカー */
.marker {
  background: linear-gradient(transparent 62%, var(--lime) 62%);
  padding: 0 .05em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* 巨大アウトライン文字 */
.hero__outline,
.feature__number,
.final-cta__glow-text {
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
}
.feature__number { -webkit-text-stroke-color: var(--pink); }

/* skip link */
.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--ink);
  color: var(--white);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  z-index: 999;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: 12px; }

/* generic */
.glass-card {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid rgb(255 255 255 / .5);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}

.section-inner { max-width: var(--container-max); margin-inline: auto; padding-inline: var(--gutter); }

/* writing-mode 縦組み */
.hero__vertical-label,
.manifesto__vertical {
  writing-mode: vertical-rl;
  font-family: var(--font-en);
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

/* ===== 4. REVEAL SYSTEM (no-js fallback) ===== */
.no-js [data-reveal],
.no-js [data-stagger],
.no-js .manifesto__line {
  opacity: 1 !important;
  transform: none !important;
  clip-path: none !important;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
  transition-delay: calc(var(--i, 0) * var(--stagger-step));
}
.js [data-reveal="scale"] { transform: translateY(20px) scale(.94); }

/* clip 系だけは「監視対象(outer)」と「clip-pathを適用する要素(inner)」を分離する。
   clip-path で視覚的に隠れた要素はブラウザの IntersectionObserver 実装上
   intersectionRatio が 0 に固定され、outer 自身に clip-path をかけると
   永久に in-view 判定されない実バグがあるため。 */
.js [data-reveal="clip"] { opacity: 1; transform: none; }
.js [data-reveal="clip"] .hero__title-clip {
  display: block;
  clip-path: inset(0 0 100% 0);
  transition: clip-path var(--dur-base) var(--ease-out);
  transition-delay: calc(var(--i, 0) * var(--stagger-step));
}
.js [data-reveal="clip"].is-in .hero__title-clip {
  clip-path: inset(0 0 0% 0);
}

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

.js [data-stagger] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
  transition-delay: calc(var(--i, 0) * var(--stagger-step) + 120ms);
}
.js [data-stagger].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal],
  .js [data-stagger],
  .js [data-reveal="clip"] .hero__title-clip {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    transition: none !important;
  }
  .marquee__track,
  .eq__bar { animation: none !important; }
  .loader__seed,
  .loader__stem,
  .loader__leaf,
  .loader__wordmark,
  .hero__scroll-line {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
  }
  .growth__stem,
  .growth__leaf,
  .qtree__line,
  .score-bar__fill,
  .diff__del,
  .diff__ins,
  .diff--replace,
  .es-demo__badge,
  .es-steps__btn,
  .bento-card,
  .btn-magnetic,
  .manifesto__line,
  .site-nav__inner {
    transition: none !important;
  }
  /* 多層パララックス(data-depth)は JS 側で listener を張らないが、
     念のため常に静止させる */
  [data-depth] { transform: none !important; }
}

/* ===== 5. S0 LOADER ===== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--white);
  color: var(--teal-deep);
  transition: opacity .5s var(--ease-out), visibility .5s var(--ease-out);
}
.loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__seed { fill: var(--teal-deep); }
.loader__leaf { fill: var(--lime); }
.loader__wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--ink);
  opacity: 0;
  animation: loader-fade .6s var(--ease-out) .3s forwards;
}
.loader__stem {
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  animation: loader-draw .7s var(--ease-out) forwards;
}
.loader__leaf { opacity: 0; transform-origin: 60px 60px; animation: loader-pop .4s var(--ease-out) .5s forwards; }
.loader__leaf--r { animation-delay: .65s; }
@keyframes loader-draw { to { stroke-dashoffset: 0; } }
@keyframes loader-pop { to { opacity: 1; transform: scale(1); } from { opacity: 0; transform: scale(.4); } }
@keyframes loader-fade { to { opacity: 1; } }

/* ===== 6. S1 NAV ===== */
.site-nav {
  position: fixed;
  top: clamp(10px, 2vw, 20px);
  left: 0;
  right: 0;
  z-index: 500;
  display: flex;
  justify-content: center;
  padding-inline: 16px;
}
.site-nav__inner {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
  width: 100%;
  max-width: 760px;
  padding: 8px 10px 8px 18px;
  border-radius: var(--radius-pill);
  background: rgb(255 255 255 / .5);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px -12px rgb(16 32 29 / .12);
  transition: background var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.site-nav.is-scrolled .site-nav__inner {
  background: rgb(255 255 255 / .82);
  box-shadow: var(--shadow-soft);
}
.site-nav__logo { display: flex; align-items: center; gap: 8px; margin-right: auto; min-height: 44px; }
.site-nav__logo-icon { width: 28px; height: 28px; border-radius: 9px; }
.site-nav__logo-text { font-family: var(--font-display); font-weight: 900; font-size: 1rem; }
.site-nav__links { display: none; align-items: center; gap: clamp(16px, 2vw, 28px); font-size: .92rem; font-weight: 500; }
.site-nav__link { position: relative; padding: 10px 14px; min-height: 44px; display: inline-flex; align-items: center; }
.site-nav__link:hover { color: var(--teal-deep); }
.site-nav__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  background: var(--gradient-brand);
  color: var(--white);
  font-weight: 700;
  font-size: .88rem;
  white-space: nowrap;
}

/* ===== 7. S2 HERO — 6層パララックス ===== */
.hero {
  --hero-nav-space: clamp(90px, 14vh, 140px);
  position: relative;
  min-height: 100svh;
  overflow: clip;
  background: linear-gradient(180deg, var(--sky) 0%, var(--paper) 78%);
  padding-top: var(--hero-nav-space);
  display: flex;
  flex-direction: column;
}

/* --- ステージ: レイヤー(L0-L4)+コピー(L5)を内包し、マーキー/スクロールキューの
   手前で高さを打ち切ることで人物・アプリ画面レイヤーがマーキー帯に沈み込むのを防ぐ --- */
.hero__stage { position: relative; flex: 1; display: flex; flex-direction: column; }

/* --- レイヤーコンテナ(L0-L4)。JS の data-depth が個別 translate3d を駆動 --- */
.hero__layers { position: absolute; inset: 0; z-index: 0; }
.hero__layer,
.hero__bg-type,
.hero__deco,
.hero__person,
.hero__appscreen {
  position: absolute;
  will-change: transform;
}

/* L0: 空(最背面) depth 0.10
   ナビの背後〜ページ最上部まで空写真で埋めるため、レイヤー自体の上端を
   hero__stage の外(= .hero の実際の最上部/y=0)まで引き上げる。
   さらに写真本体は上下 12% ずつオーバーサイズ(top:-12%; height:124%)にして
   おき、data-depth のスクロール連動 translateY で多少動いても上端・下端に
   隙間(=無地の --sky 帯)が出ないようにする。 */
.hero__layer--sky { top: calc(-1 * var(--hero-nav-space)); right: 0; bottom: 0; left: 0; z-index: 0; }
.hero__sky {
  position: absolute;
  top: -12%;
  left: 0;
  width: 100%;
  height: 124%;
  object-fit: cover;
  display: block;
}
.hero__sky-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(191 237 255 / .3) 0%, var(--paper) 92%);
}

/* L1: 巨大アウトライン文字 depth 0.18(画面外へ見切れる) */
.hero__bg-type {
  inset: clamp(56px, 11vh, 130px) 0 auto 0;
  width: 100%;
  margin: 0;
  text-align: center;
  font-family: var(--font-en);
  font-weight: 800;
  font-size: clamp(6rem, 32vw, 22rem);
  letter-spacing: -.02em;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1.5px rgb(16 32 29 / .13);
  white-space: nowrap;
  line-height: 1;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

/* L2: 装飾色面 depth 0.30 */
.hero__deco { inset: 0; z-index: 2; pointer-events: none; }
.hero__shape { position: absolute; border-radius: 50%; }
.hero__shape--lime { width: 30vw; max-width: 300px; aspect-ratio: 1; background: var(--lime); top: 6%; right: 2%; }
.hero__shape--pink { width: 42vw; max-width: 420px; aspect-ratio: 1; background: transparent; border: 22px solid var(--pink); opacity: .5; bottom: 4%; left: -8%; }

/* L3: 人物切り抜き(背景透過) depth 0.22 — L1 の手前・L4 の奥 */
.hero__person {
  inset: auto 0 0 0;
  display: flex;
  justify-content: center;
  padding-right: 0;
  z-index: 3;
  pointer-events: none;
}
.hero__person-img { width: min(58vw, 340px); height: auto; display: block; }

/* L4: アプリ画面(実機フレーム) depth 0.38 — 最も速く浮く */
.hero__appscreen {
  right: 6%;
  top: auto;
  bottom: 2%;
  width: min(30vw, 132px);
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(0 20px 40px rgb(16 32 29 / .28));
}
.hero__appscreen-img { width: 100%; height: auto; display: block; border-radius: 16px; }

/* L5(最前面): コピー。通常フロー、JS 変形なし */
.hero__inner { position: relative; z-index: 5; width: 100%; max-width: var(--container-max); margin-inline: auto; padding-inline: var(--gutter); }
.hero__grid {
  position: relative;
  padding-top: clamp(8px, 2vw, 24px);
}
.hero__copy { position: relative; max-width: min(560px, 100%); }
/* タイトルは1行=全角8文字+字間(letter-spacing .01em)で必要幅 ≈ 8.08em。
   コピー列からはみ出すと .hero__title-line の overflow:clip に水平方向へ
   切られるため、フォールバック(cqw非対応)の上限は 560/8.08 ≈ 69px 以下
   (4.3rem=68.8px)に抑える。 */
.hero__title {
  font-size: clamp(2.1rem, 8vw, 4.3rem);
  line-height: 1.12;
  white-space: nowrap;
}
.hero__fill, .hero__outline { white-space: nowrap; }

@media (min-width: 1440px) {
  /* ワイド画面ではコピー列自体を広げ、巨大タイポの迫力を確保する */
  .hero__copy { max-width: min(46vw, 760px); }
  .hero__title { font-size: min(4.6vw, 4.3rem); }
}

/* コンテナクエリ対応ブラウザ: タイトルをコピー列の実幅に連動させる。
   必要幅 8.08em × 11.8cqw ≈ 95.3cqw < 100cqw なので、320〜2560px の
   どの幅でも欠けずにコピー列いっぱいまで文字が育つ。 */
@supports (width: 1cqw) {
  .hero__copy { container-type: inline-size; }
  .hero__title { font-size: min(6.4rem, 11.8cqw); }
}
.hero__title-line { display: block; overflow: clip; }
.hero__fill { color: var(--ink); }
.hero__sub {
  margin-top: clamp(20px, 3vw, 32px);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 500;
  max-width: 34em;
  /* モバイルはコラージュ(人物・アプリ画面)と文字が重なるため、
     すりガラスのチップ背景を敷いて可読性を確保する。900px 以上では解除。 */
  display: inline-block;
  width: fit-content;
  background: rgb(255 255 255 / .72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  padding: 12px 16px;
}
.hero__cta-row { margin-top: clamp(28px, 4vw, 40px); display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.hero__weblink { font-weight: 700; text-underline-offset: 4px; text-decoration: underline; min-height: 44px; display: inline-flex; align-items: center; }
.hero__vertical-label {
  position: absolute;
  right: 0;
  top: 0;
  font-size: .78rem;
  color: var(--pink);
  opacity: .8;
  display: none;
}

.hero__scroll-cue {
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 0 28px;
  color: var(--ink);
  opacity: .6;
}
.hero__scroll-line { width: 1px; height: 32px; background: currentColor; animation: scroll-line 1.8s var(--ease-out) infinite; transform-origin: top; }
.hero__scroll-text { writing-mode: vertical-rl; font-family: var(--font-en); font-size: .7rem; letter-spacing: .25em; }
@keyframes scroll-line { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(0); } }

/* ===== 8. MARQUEE (reusable) ===== */
.marquee { position: relative; z-index: 1; overflow: clip; width: 100%; }
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 26s linear infinite;
  will-change: transform;
}
.marquee__track:hover { animation-play-state: paused; }
.marquee__item {
  font-family: var(--font-en);
  font-weight: 800;
  white-space: nowrap;
  padding-right: 0;
  display: inline-flex;
  align-items: center;
}
/* 区切りの種型 SVG ドット(絵文字禁止ポリシー) */
.marquee__dot {
  display: inline-block;
  width: .55em;
  height: .55em;
  margin: 0 1.1em;
  flex-shrink: 0;
  color: currentColor;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.marquee--lime { background: var(--lime); padding: 14px 0; }
.marquee--lime .marquee__item { color: var(--ink); font-size: clamp(.85rem, 1.6vw, 1.1rem); }

.marquee--ghost {
  position: absolute;
  inset: auto 0 8% 0;
  z-index: 0;
  pointer-events: none;
}
.marquee--ghost .marquee__item {
  font-size: clamp(4rem, 14vw, 10rem);
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px rgb(255 255 255 / .12);
}
.marquee--ghost .marquee__track { animation-duration: 50s; }

/* ===== 9. S3 MANIFESTO ===== */
.manifesto {
  position: relative;
  background: var(--mist);
  padding-block: var(--section-pad-y);
  padding-inline: var(--gutter);
  text-align: center;
}
.manifesto__vertical {
  position: absolute;
  left: clamp(8px, 3vw, 40px);
  top: 50%;
  transform: translateY(-50%);
  font-size: .72rem;
  color: var(--teal-deep);
  opacity: .7;
  display: none;
}
.manifesto__lines { max-width: 760px; margin-inline: auto; display: flex; flex-direction: column; gap: .35em; }
.manifesto__line {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.3rem, 4vw, 2.4rem);
  line-height: 1.5;
  color: var(--ink);
  opacity: .15;
  transition: opacity .4s linear;
}
.manifesto__line--gap { margin-top: .6em; }
.manifesto__line.is-read { opacity: 1; }

/* ===== 10. FEATURE (generic system) ===== */
.feature { position: relative; padding-block: var(--section-pad-y); overflow: clip; }
.feature__grid {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  flex-direction: column;
  gap: clamp(36px, 6vw, 64px);
}
.feature__content { position: relative; z-index: 2; }
.feature__title { font-size: clamp(2rem, 5.2vw, 3.6rem); margin-bottom: clamp(16px, 2vw, 24px); }
.feature__body { font-size: clamp(1rem, 1.6vw, 1.15rem); max-width: 32em; }
.feature__addendum { margin-top: 18px; font-weight: 700; color: var(--teal-deep); }
.feature__visual { position: relative; z-index: 1; }
.feature__number {
  position: absolute;
  top: clamp(-40px, -6vw, -10px);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-en);
  font-size: clamp(6rem, 22vw, 13rem);
  line-height: 1;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  will-change: transform;
}

.feature__chips { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }

/* アプリ画面の独立浮遊レイヤー(各 FEATURE セクション共通)。
   data-depth を持ち、人物・数字・本文と別速度で動く。 */
.feature__float {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  filter: drop-shadow(0 20px 40px rgb(16 32 29 / .2));
  will-change: transform;
}
.feature__float-img { width: 100%; height: auto; display: block; border-radius: 20px; }

.feature--questions .feature__float--questions { width: min(38vw, 190px); top: -6%; right: -2%; }
/* 01/03/04 と違い、02 は浮遊アプリ画面とツリーデモの両方に上部を覆われ
   ほぼ視認できなくなっていたため、number だけ手前に出す */
.feature--questions .feature__number { z-index: 2; }
.feature--voice .feature__float--test { width: min(34vw, 170px); bottom: -4%; left: -4%; }
.feature--tree .feature__float--home { width: min(36vw, 190px); top: -8%; left: -6%; }

/* S4 装飾色面レイヤー(depth 独立) */
.feature__deco {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  background: var(--lime);
  opacity: .32;
  width: 50%;
  aspect-ratio: 1;
  top: -12%;
  right: -10%;
  pointer-events: none;
  will-change: transform;
}

@media (min-width: 900px) {
  .feature--questions .feature__float--questions { width: min(24vw, 200px); top: -10%; right: -8%; }
  .feature--voice .feature__float--test { width: min(20vw, 180px); bottom: -6%; left: -8%; }
  .feature--tree .feature__float--home { width: min(22vw, 200px); top: -12%; left: -10%; }
}

/* ES demo (S4) */
.es-demo { position: relative; z-index: 1; padding: clamp(24px, 4vw, 36px); }
.es-demo__label { font-family: var(--font-en); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--teal-deep); margin-bottom: 14px; }
.es-demo__text { font-size: clamp(.95rem, 1.4vw, 1.05rem); line-height: 1.9; }

/* base = 最終状態(no-js/JS未実行でも正しい文言が読める)。
   .js が付いた場合のみ「まだ発火前」を隠し、is-active で本来の姿へ戻す。 */
.diff__del, .diff__ins { transition: opacity var(--dur-fast) var(--ease-out); }
.diff--swap .diff__del { color: var(--diff-del); text-decoration: line-through; opacity: 1; }
.diff--swap .diff__ins { color: var(--diff-add); text-decoration: underline; opacity: 1; margin-left: .25em; }
.js .diff--swap .diff__del:not(.is-active),
.js .diff--swap .diff__ins:not(.is-active) { opacity: 0; }

.diff--replace .diff__del { color: var(--diff-rep); text-decoration: line-through; opacity: .55; }
.diff--replace .diff__ins { color: var(--diff-rep); text-decoration: underline; opacity: 1; margin-left: .25em; }
.js .diff--replace:not(.is-active) .diff__del { opacity: .35; }
.js .diff--replace:not(.is-active) .diff__ins { opacity: 0; }

/* 発火前(opacity:0)の del/ins は、opacity だけでは幅が残ったままになり
   文中に不自然な空白ができるため、JS有効時のみ幅(max-width)も畳んで
   発火時に伸びながら現れるようにする。no-js は影響を受けず最終状態を表示。 */
.js .diff--swap .diff__del,
.js .diff--swap .diff__ins,
.js .diff--replace .diff__ins {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: bottom;
  max-width: 240px;
  transition: opacity var(--dur-fast) var(--ease-out), max-width var(--dur-fast) var(--ease-out), margin-left var(--dur-fast) var(--ease-out);
}
.js .diff--swap .diff__del:not(.is-active),
.js .diff--swap .diff__ins:not(.is-active),
.js .diff--replace .diff__ins:not(.is-active) {
  max-width: 0;
  margin-left: 0;
}

.es-demo__badge {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: rgb(20 184 166 / .12);
  color: var(--teal-deep);
  font-weight: 700;
  font-size: .88rem;
  opacity: 1;
  transform: none;
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.js .es-demo__badge:not(.is-active) { opacity: 0; transform: translateY(8px) scale(.96); }
.es-demo__badge-icon { width: 16px; height: 16px; flex-shrink: 0; }

/* 原文 / 赤入れ / 仕上がり ステップ切替(S4) */
.es-steps { margin-bottom: 20px; display: flex; flex-wrap: wrap; gap: 10px; }
.es-steps__btn {
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  border: 1.5px solid rgb(16 32 29 / .18);
  font-weight: 700;
  font-size: .88rem;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.es-steps__btn.is-active,
.es-steps__btn[aria-pressed="true"] {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}
.es-steps__btn:focus-visible { outline: 2px solid var(--teal-deep); outline-offset: 2px; }

.score-bars { margin-top: 26px; display: flex; flex-direction: column; gap: 12px; }
.score-bar { display: grid; grid-template-columns: 7em 1fr 2.4em; align-items: center; gap: 12px; font-size: .8rem; }
.score-bar__label { font-weight: 700; }
.score-bar__track { height: 8px; border-radius: var(--radius-pill); background: rgb(16 32 29 / .08); overflow: hidden; }
.score-bar__fill {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(var(--target, 0));
  transform-origin: left;
  border-radius: var(--radius-pill);
  background: var(--gradient-brand);
  transition: transform 1.1s var(--ease-out);
  will-change: transform;
}
.js .score-bar__fill:not(.is-filled) { transform: scaleX(0); }
.score-bar__value { text-align: right; font-family: var(--font-en); font-weight: 800; }

/* ===== 11. S5 Q-TREE ===== */
.feature--reverse .feature__grid { flex-direction: column; }
.qtree { position: relative; padding: clamp(30px, 5vw, 48px) clamp(10px, 3vw, 20px); display: flex; flex-direction: column; gap: 18px; }
.qtree__svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.qtree__line {
  fill: none;
  stroke: var(--teal);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  transition: stroke-dashoffset 1s var(--ease-out);
}
.qtree__line.is-drawn { stroke-dashoffset: 0; }
.qtree__node {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  padding: 14px 22px;
  border-radius: var(--radius-card);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  font-weight: 700;
  font-size: clamp(.92rem, 1.4vw, 1.05rem);
}
.qtree__node--root { background: var(--ink); color: var(--white); }
.qtree__node:nth-child(3) { margin-left: clamp(20px, 8vw, 90px); }
.qtree__node:nth-child(4) { margin-left: clamp(40px, 14vw, 160px); }
.qtree__node:nth-child(5) { margin-left: clamp(60px, 20vw, 230px); }

/* ===== 12. S6 VOICE (color block) ===== */
.feature--voice {
  /* teal/cyan の通常トーンだと白文字コントラストが 4.5:1 を割るため、
     専用の深色(--teal-deep → --cyan-deep)に沈めてAA基準を確保する */
  background: linear-gradient(135deg, var(--teal-deep), var(--cyan-deep));
  color: var(--white);
}
.feature__title--onvoice, .feature__body--onvoice { color: var(--white); }
.feature__number--onvoice { -webkit-text-stroke-color: rgb(255 255 255 / .35); }

.feature__addendum--onvoice { color: var(--white); opacity: 1; }

/* 練習テスト3方式チップ。
   白半透明オーバーレイだと背景が明るくなり白文字コントラストが落ちるため、
   黒系の半透明オーバーレイ(縁だけ白)にして白文字の可読性を確保する。 */
.voice__methods { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.voice__method-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: rgb(0 0 0 / .16);
  border: 1px solid rgb(255 255 255 / .3);
  font-size: .84rem;
  font-weight: 700;
}
.voice__method-icon { width: 18px; height: 18px; flex-shrink: 0; }

.voice__chips { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 14px; }
.voice__chips-title { flex-basis: 100%; font-size: .78rem; font-weight: 800; letter-spacing: .04em; opacity: 1; }
.voice__chips-title small { font-weight: 500; opacity: .9; margin-left: 4px; }
.voice__chip {
  background: rgb(0 0 0 / .18);
  border: 1px solid rgb(255 255 255 / .24);
  border-radius: 20px;
  padding: 14px 18px;
  min-width: 120px;
}
.voice__chip--wide { flex: 1 1 220px; }
.voice__chip-label { display: block; font-size: .72rem; letter-spacing: .1em; opacity: 1; margin-bottom: 6px; }
.voice__chip-value { font-family: var(--font-en); font-size: 1.6rem; font-weight: 800; }
.voice__chip-value small { font-size: .9rem; font-weight: 500; opacity: .9; margin-left: 2px; }
.voice__chip-value--small { font-family: var(--font-body); font-size: .92rem; font-weight: 700; line-height: 1.5; }

.voice__photo-frame {
  width: min(70vw, 300px);
  aspect-ratio: 1;
  margin-inline: auto;
  border-radius: 50%;
  overflow: clip;
  border: 6px solid rgb(255 255 255 / .5);
  box-shadow: var(--shadow-soft);
  position: relative;
  z-index: 1;
}
.voice__photo { width: 100%; height: 100%; object-fit: cover; background: rgb(255 255 255 / .25); }

.eq { margin-top: 28px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 64px; }
.eq__bar {
  width: 4px;
  min-height: 6px;
  height: var(--h, 40%);
  background: rgb(255 255 255 / .75);
  border-radius: 2px;
  transform-origin: bottom;
  animation: eq-bounce var(--dur, 1s) ease-in-out var(--delay, 0s) infinite alternate;
  animation-play-state: paused;
}
.eq.is-playing .eq__bar { animation-play-state: running; }
@keyframes eq-bounce { from { transform: scaleY(.35); } to { transform: scaleY(1); } }

/* ===== 13. S7 GROWTH TREE ===== */
.growth__chips { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--mist);
  font-size: .82rem;
  font-weight: 700;
}
.company-dots { display: inline-flex; gap: 4px; margin-left: 4px; }
.company-dots i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: hsl(calc(var(--n, 0) * 30), 70%, 55%); }
.company-dots i:nth-child(1) { --n: 0; } .company-dots i:nth-child(2) { --n: 1; }
.company-dots i:nth-child(3) { --n: 2; } .company-dots i:nth-child(4) { --n: 3; }
.company-dots i:nth-child(5) { --n: 4; } .company-dots i:nth-child(6) { --n: 5; }
.company-dots i:nth-child(7) { --n: 6; } .company-dots i:nth-child(8) { --n: 7; }
.company-dots i:nth-child(9) { --n: 8; } .company-dots i:nth-child(10) { --n: 9; }
.company-dots i:nth-child(11) { --n: 10; } .company-dots i:nth-child(12) { --n: 11; }

.growth { position: relative; width: min(80vw, 260px); margin-inline: auto; }
.growth__svg { width: 100%; height: auto; }
.growth__seed { fill: var(--teal-deep); }
.growth__stem { stroke: var(--teal-deep); stroke-width: 5; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease-out); }
.growth__stem.is-drawn { stroke-dashoffset: 0; }
/* no-js は JS の getTotalLength() ベースの dasharray 上書きが走らないため、
   CSS 側の draw 演出用ダミー値(dasharray:1)がそのまま点線として残ってしまう。
   no-js では線画演出をやめて実線に戻す。 */
.no-js .growth__stem { stroke-dasharray: none; stroke-dashoffset: 0; }
.growth__leaf { fill: var(--lime); opacity: 0; transform: scale(.3); transform-box: fill-box; transform-origin: center; transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.growth__leaf.is-popped { opacity: 1; transform: scale(1); }
.growth__cards { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.growth__card {
  background: var(--white);
  box-shadow: var(--shadow-soft);
  border-radius: 18px;
  padding: 10px 16px;
  font-size: .8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 90%;
}

/* ===== 14. S8 BENTO ===== */
.bento { padding-block: var(--section-pad-y); background: var(--mist); }
.bento__title { text-align: center; font-size: clamp(2rem, 5vw, 3.2rem); max-width: 760px; margin: 0 auto clamp(40px, 6vw, 64px); }
.bento__grid {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.bento-card {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: clamp(24px, 3vw, 32px);
  box-shadow: var(--shadow-soft);
  transition: transform var(--dur-fast) var(--ease-out);
  transform-style: preserve-3d;
  will-change: transform;
}
.bento-card__icon { width: 36px; height: 36px; color: var(--teal-deep); display: inline-block; transition: transform var(--dur-fast) var(--ease-out); }
.bento-card:hover .bento-card__icon { transform: translateY(-6px); }
.bento-card__title { font-size: 1.1rem; margin: 14px 0 8px; }
.bento-card__desc { font-size: .92rem; opacity: .85; }
.bento-card--wide { grid-column: 1 / -1; }
.bento-card__link { display: inline-block; margin-left: .4em; color: var(--teal-deep); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.bento-card__count { color: var(--pink); font-family: var(--font-en); font-weight: 800; }

/* ===== 15. S9 PRICING ===== */
.pricing { padding-block: var(--section-pad-y); }
.pricing__title { text-align: center; font-size: clamp(2rem, 5vw, 3.2rem); max-width: 760px; margin: 0 auto clamp(40px, 6vw, 56px); }
.pricing__grid {
  max-width: 900px;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.pricing-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-card);
  border: 1.5px solid rgb(16 32 29 / .1);
  padding: clamp(28px, 4vw, 40px);
}
.pricing-card--pro {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--white), var(--white)) padding-box,
    var(--gradient-brand) border-box;
  box-shadow: var(--shadow-soft);
}
.pricing-card__ribbon {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--lime);
  color: var(--ink);
  font-size: .74rem;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.pricing-card__name { font-size: 1.3rem; margin-bottom: 6px; }
.pricing-card__price { font-family: var(--font-en); font-size: 2.4rem; font-weight: 800; margin-bottom: 18px; }
.pricing-card__list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.pricing-card__list li { display: flex; align-items: flex-start; gap: 10px; font-size: .95rem; }
.pricing-check { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; color: var(--teal); }
.pricing__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 22px;
  padding: 0 26px;
  border-radius: var(--radius-pill);
  background: var(--gradient-brand);
  color: var(--white);
  font-weight: 700;
  width: 100%;
}
.pricing__note { text-align: center; margin-top: clamp(28px, 4vw, 40px); font-size: .82rem; opacity: .65; padding-inline: var(--gutter); }

/* ===== 16. STORE BADGES (公式バッジ画像) ===== */
.store-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.store-badge-link {
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.store-badge-link img { height: clamp(48px, 5vw, 56px); width: auto; display: block; }

@media (hover: hover) and (pointer: fine) {
  .store-badge-link:hover { transform: translateY(-2px); opacity: .85; }
}

/* ===== 17. S10 STORY ===== */
.story { padding-block: var(--section-pad-y); }
.story__grid {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 6vw, 56px);
}
.story__visual { position: relative; }
.story__shape { position: absolute; width: 60%; aspect-ratio: 1; border-radius: 50%; background: var(--lime); opacity: .5; top: -10%; left: -12%; z-index: 0; }
.story__photo {
  position: relative;
  z-index: 1;
  width: min(80vw, 380px);
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  margin-inline: auto;
  background: linear-gradient(160deg, var(--sky), var(--teal) 140%);
}
.story__title { font-size: clamp(1.8rem, 4.6vw, 3rem); margin-bottom: clamp(20px, 3vw, 32px); }
.story__quote {
  position: relative;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 500;
  line-height: 1.9;
  padding: 0 clamp(8px, 2vw, 16px);
}
.story__quote-mark {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 2px var(--pink);
  line-height: 0;
  vertical-align: -0.2em;
}
.story__credit { margin-top: 20px; font-weight: 800; }
.story__episode { margin-top: 12px; font-size: .92rem; opacity: .75; max-width: 34em; }

/* ===== 18. S11 FINAL CTA ===== */
.final-cta {
  position: relative;
  overflow: clip;
  background: var(--ink);
  color: var(--white);
  padding-block: var(--section-pad-y);
  text-align: center;
}
.final-cta__glow {
  position: absolute;
  inset: -20% -20% auto -20%;
  height: 140%;
  background: radial-gradient(circle at 50% 30%, rgb(20 184 166 / .55), transparent 60%),
              radial-gradient(circle at 60% 60%, rgb(6 182 212 / .35), transparent 55%);
  z-index: 0;
  pointer-events: none;
}
.final-cta__bgphoto {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .12;
  z-index: 0;
  background: var(--ink);
}
.final-cta__inner { position: relative; z-index: 2; max-width: var(--container-max); margin-inline: auto; padding-inline: var(--gutter); }
.final-cta__title { font-size: clamp(2.4rem, 8vw, 5.5rem); line-height: 1.15; }
.final-cta__line { display: block; }
.final-cta__line--accent { color: var(--lime); }
.final-cta__badges { margin-top: clamp(32px, 5vw, 48px); display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.final-cta__weblink { display: inline-block; margin-top: 20px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; min-height: 44px; line-height: 44px; }

/* ===== 19. S12 FOOTER ===== */
.site-footer { background: var(--white); padding-block: clamp(32px, 5vw, 48px); border-top: 1px solid rgb(16 32 29 / .08); }
.site-footer__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.site-footer__logo { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.site-footer__logo-icon { width: 24px; height: 24px; border-radius: 7px; }
.site-footer__logo-text { font-family: var(--font-display); font-weight: 900; }
.site-footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; font-size: .9rem; font-weight: 500; }
.site-footer__links a { min-height: 44px; display: inline-flex; align-items: center; }
.site-footer__copy { font-size: .78rem; opacity: .6; }

/* ===== 20. image placeholder ===== */
.ph-img {
  background-color: var(--sky);
  background-image: linear-gradient(160deg, var(--sky), var(--teal) 140%);
}
.ph-img.is-broken { opacity: 0; }

/* =========================================================================
   RESPONSIVE — 600 / 900 / 1200
   ========================================================================= */

@media (min-width: 600px) {
  .hero__cta-row { gap: 18px 28px; }
  .bento__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .site-nav__links { display: flex; }

  .hero__person { justify-content: flex-end; padding-right: 6%; }
  .hero__person-img { width: min(34vw, 400px); }
  .hero__appscreen { right: 24%; top: 26%; bottom: auto; width: min(15vw, 180px); }
  .hero__vertical-label { display: block; }
  /* デスクトップはコラージュとの重なりが解消するためガラスチップ背景を解除 */
  .hero__sub {
    display: block;
    width: auto;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-radius: 0;
    padding: 0;
  }
  .manifesto__vertical { display: block; }

  .feature__grid { flex-direction: row; align-items: center; gap: clamp(48px, 6vw, 90px); }
  .feature__content { flex: 0 0 42%; max-width: 42%; }
  .feature__visual { flex: 0 0 52%; max-width: 52%; }
  .feature--reverse .feature__grid { flex-direction: row-reverse; }

  .story__grid { flex-direction: row; align-items: center; }
  .story__visual { flex: 0 0 42%; max-width: 42%; }
  .story__content { flex: 0 0 52%; max-width: 52%; }

  .bento__grid { grid-template-columns: repeat(3, 1fr); }
  .pricing__grid { grid-template-columns: repeat(2, 1fr); align-items: stretch; }
}

@media (min-width: 1200px) {
  .hero__person-img { width: min(30vw, 460px); }
  .es-demo { padding: 40px; }
}

/* magnetic buttons: neutralize transition while JS drives transform, spring back on leave */
.btn-magnetic { transition: transform .5s var(--ease-out); }

/* focus states */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--teal-deep);
  outline-offset: 3px;
}
