/* =========================================
   SEQUENCE Inc. 共通スタイル
   配色はモノクロームが基本。挿し色は線と光だけに使う
   ========================================= */

:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --gray-100: #f4f4f4;
  --gray-300: #d0d0d0;
  --gray-500: #8a8a8a;
  --gray-700: #4a4a4a;
  --muted: #666666; /* 補足の文字色（白背景用） */

  /* 挿し色：A=ブルー / B=マゼンタ / C=イエロー / D=グリーン */
  --blue: #2f7bff;
  --magenta: #ff2e93;
  --yellow: #ffd400;
  --green: #1fd69a;
  --gradient: linear-gradient(90deg, var(--blue), var(--magenta), var(--yellow));

  --font-en: "Jost", sans-serif;
  --font-ja: "Noto Sans JP", sans-serif;

  --gutter: clamp(20px, 5vw, 80px);
  --header-h: 80px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-ja);
  font-weight: 300;
  font-size: 15px;
  line-height: 2;
  letter-spacing: 0.05em;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, p {
  margin: 0;
}

/* 黒背景のエリアでは補足の文字を明るくする */
.hero,
.page-hero,
.section--dark,
.contact-cta,
.footer {
  --muted: #a3a3a3;
}

/* ---------- ヘッダー ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--white);
  mix-blend-mode: difference; /* 背景が白でも黒でも見えるように反転させる */
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 56px;
  fill: none;
  stroke: currentColor;
  stroke-width: 0.8;
}

.logo-mark path {
  vector-effect: non-scaling-stroke; /* 小さく表示しても線の太さを保つ */
}

.logo-text {
  display: block;
  width: 124px;
  fill: currentColor;
}

.nav ul {
  display: flex;
  gap: 36px;
  align-items: center;
}

.nav a {
  font-family: var(--font-en);
  font-size: 14px;
  letter-spacing: 0.1em;
  transition: opacity 0.3s;
}

.nav a:hover {
  opacity: 0.6;
}

.nav__num {
  font-size: 10px;
  margin-right: 6px;
  vertical-align: top;
  opacity: 0.6;
}

.nav__contact {
  padding: 6px 20px;
  border: 1px solid currentColor;
}

.menu-btn {
  display: none;
}

/* スクロール後は背景を付けて、本文と重なっても読めるようにする */
.header {
  transition: background-color 0.3s;
}

.header.is-scrolled {
  mix-blend-mode: normal;
  background-color: var(--black);
}

/* ---------- ファーストビュー ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--black);
  color: var(--white);
}

.hero__visual {
  position: absolute;
  top: 50%;
  right: var(--gutter);
  width: min(34vw, 520px);
  transform: translateY(-50%);
}

.hero__visual svg {
  display: block;
  width: 100%;
  overflow: visible;
}

.loop {
  fill: none;
  stroke: #8a8a8a;
  stroke-width: 0.14;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: draw 3.2s cubic-bezier(0.6, 0, 0.2, 1) forwards;
}

.loop:nth-of-type(2n) { animation-delay: 0.3s; }
.loop:nth-of-type(3n) { animation-delay: 0.6s; }

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

/* 線の上をゆっくり流れる色の光 */
.glow-a { stop-color: var(--blue); }
.glow-b { stop-color: var(--magenta); }
.glow-c { stop-color: var(--yellow); }

.loop-light {
  fill: none;
  stroke: url(#glow);
  stroke-width: 0.45;
  stroke-linecap: round;
  stroke-dasharray: 18 82;
  opacity: 0;
  filter: drop-shadow(0 0 1px var(--blue)) drop-shadow(0 0 2.5px var(--magenta));
  animation: run 9s linear 2.6s infinite, appear 1s 2.6s forwards;
}

@keyframes run {
  to { stroke-dashoffset: -100; }
}

@keyframes appear {
  to { opacity: 1; }
}

.hero__inner {
  position: relative;
}

.hero__label {
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--muted);
  margin-bottom: 24px;
}

.hero__title {
  font-weight: 400;
  font-size: clamp(min(26px, 7.2vw), 4.6vw, 64px);
  line-height: 1.55;
  letter-spacing: 0.04em;
}

.hero__title > span {
  display: block;
  opacity: 0;
  transform: translateY(30px);
  animation: rise 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: 0.8s;
}

.hero__title > span + span {
  animation-delay: 1s;
}

.hero__lead {
  max-width: 34em;
  margin-top: 32px;
  font-size: clamp(13px, 1.4vw, 16px);
  color: var(--gray-300);
  opacity: 0;
  animation: rise 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 1.4s forwards;
}

@keyframes rise {
  to { opacity: 1; transform: none; }
}

/* Motion で演出するとき（js/hero-motion.js が is-motion を付ける）は、CSS の演出を止める */
.hero.is-motion .hero__title > span {
  opacity: 1;
  transform: none;
  animation: none;
}

.hero.is-motion .hero__lead {
  animation: none;
}

.hero__char {
  display: inline-block;
}

.hero.is-motion .hero__char {
  opacity: 0;
}

/* トップページのみ（header--intro）：読み込み時にメニューを1つずつ表示する（PC）
   スマホでは、メニューを開いたときに js/hero-motion.js で表示する */
@media (min-width: 769px) {
  .header--intro .nav li {
    opacity: 0;
    transform: translateY(-10px);
    filter: blur(4px);
    animation: nav-in 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  }

  .header--intro .nav li:nth-child(1) { animation-delay: 0.3s; }
  .header--intro .nav li:nth-child(2) { animation-delay: 0.4s; }
  .header--intro .nav li:nth-child(3) { animation-delay: 0.5s; }
  .header--intro .nav li:nth-child(4) { animation-delay: 0.6s; }
  .header--intro .nav li:nth-child(5) { animation-delay: 0.7s; }
  .header--intro .nav li:nth-child(6) { animation-delay: 0.8s; }
}

@keyframes nav-in {
  to { opacity: 1; transform: none; filter: none; }
}

/* 画面には出さず、読み上げソフトにだけ伝える文字 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hero__scroll {
  position: absolute;
  left: var(--gutter);
  bottom: 40px;
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.3em;
  padding-left: 56px;
}

.hero__scroll::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 40px;
  height: 1px;
  background: var(--white);
  transform-origin: left;
  animation: line 2.4s ease-in-out infinite;
}

@keyframes line {
  0%   { transform: scaleX(0); }
  50%  { transform: scaleX(1); }
  100% { transform: scaleX(0); transform-origin: right; }
}

/* ---------- セクション共通 ---------- */
.section {
  padding: clamp(96px, 14vw, 180px) var(--gutter);
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 2.2fr;
  gap: 40px;
}

.section--dark {
  background: var(--black);
  color: var(--white);
}

.section--gray {
  background: var(--gray-100);
}

.section__num {
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 12px;
}

.section__title {
  font-family: var(--font-en);
  font-weight: 300;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.2;
}

.section__title span {
  display: block;
  margin-top: 12px;
  font-family: var(--font-ja);
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.section__body > p + p {
  margin-top: 1.2em;
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 56px;
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.2em;
}

.link-more::after {
  content: "";
  width: 48px;
  height: 2px;
  background: var(--gradient);
  transition: width 0.4s;
}

.note {
  margin-top: 24px;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Philosophy ---------- */
.philosophy__catch {
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 40px;
}

/* ---------- Services ---------- */
.service-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--gray-700);
}

.service {
  padding: 40px 32px;
}

.service + .service {
  border-left: 1px solid var(--gray-700);
}

.service__num {
  font-family: var(--font-en);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 32px;
}

.service__title {
  font-family: var(--font-en);
  font-weight: 300;
  font-size: 24px;
  line-height: 1.3;
}

.service__ja {
  font-size: 14px;
  font-weight: 500;
  color: var(--white);
  margin: 8px 0 24px;
}

.service__text {
  font-size: 14px;
  color: var(--gray-300);
}

.service__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.15em;
}

.service__tags li {
  padding: 0 12px;
  border: 1px solid var(--gray-700);
}

@media (min-width: 961px) {
  .service:nth-child(odd) {
    border-left: none;
  }

  .service:nth-child(n + 3) {
    border-top: 1px solid var(--gray-700);
  }
}

/* ---------- Flow ---------- */
.flow-list {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.flow-list::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient);
  transform-origin: left top;
}

.flow-list li {
  position: relative;
  padding: 32px 16px 0 0;
}

/* 各ステップの上に点を置き、線でつながって見せる */
.flow-list li::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--black);
}

.flow__step {
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.flow-list h3 {
  font-family: var(--font-en);
  font-weight: 300;
  font-size: clamp(17px, 1.6vw, 22px);
  margin: 8px 0 4px;
}

.flow-list p {
  font-size: 13px;
  color: var(--gray-700);
}

/* ---------- Price ---------- */
.price-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.price {
  background: var(--white);
  padding: 40px 32px;
}

.price__name {
  font-family: var(--font-en);
  font-weight: 300;
  font-size: 22px;
}

.price__ja {
  font-size: 12px;
  color: var(--muted);
}

.price__value {
  margin-top: 40px;
  font-family: var(--font-en);
  font-weight: 300;
  font-size: 32px;
  letter-spacing: 0.02em;
}

.price__value span {
  font-size: 14px;
  margin-left: 4px;
}

/* ---------- Contact ---------- */
.contact-cta {
  padding: clamp(120px, 16vw, 200px) var(--gutter);
  text-align: center;
  background: var(--black);
  color: var(--white);
}

.contact-cta__title {
  font-family: var(--font-en);
  font-weight: 200;
  font-size: clamp(40px, 6vw, 88px);
  line-height: 1.15;
}

.contact-cta__lead {
  margin: 32px 0 56px;
  color: var(--gray-300);
}

.btn {
  display: inline-block;
  padding: 18px 64px;
  border: 1px solid var(--white);
  font-family: var(--font-en);
  font-size: 14px;
  letter-spacing: 0.25em;
  transition: background 0.4s, color 0.4s;
}

.btn:hover {
  background: var(--white);
  color: var(--black);
}

/* ---------- フッター ---------- */
.footer {
  padding: 80px var(--gutter) 40px;
  background: var(--black);
  color: var(--white);
  border-top: 1px solid var(--gray-700);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.footer__address {
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
}

.footer__nav {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 8px 48px;
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.1em;
}

.footer__nav a:hover {
  opacity: 0.6;
}

.footer__copy {
  margin-top: 64px;
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--muted);
}

/* ---------- 挿し色とホバー演出 ---------- */
.service:nth-child(1), .price:nth-child(1), .plan:nth-child(1), #consulting { --accent: var(--blue); }
.service:nth-child(2), .price:nth-child(2), .plan:nth-child(2), #production { --accent: var(--magenta); }
.service:nth-child(3), .price:nth-child(3), .plan:nth-child(3), #education  { --accent: var(--yellow); }
.service:nth-child(4), .plan:nth-child(4), #app { --accent: var(--green); }

.service,
.price,
.plan {
  position: relative;
  overflow: hidden;
  transition: transform 0.4s, box-shadow 0.4s;
}

/* 上辺の色の線：ホバーで伸びる */
.service::before,
.price::before,
.plan::before,
#consulting .section__num::after,
#production .section__num::after,
#education .section__num::after,
#app .section__num::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
  transition: width 0.5s;
}

#consulting .section__num,
#production .section__num,
#education .section__num,
#app .section__num {
  position: relative;
  padding-top: 14px;
}

/* マウスの位置がほんのり光る */
.service::after,
.price::after,
.plan::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(260px circle at var(--x, 50%) var(--y, 50%), var(--accent), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

@media (hover: hover) {
  .service:hover,
  .price:hover,
  .plan:hover {
    transform: translateY(-6px);
    box-shadow: 0 0 32px -10px var(--accent);
  }

  .service:hover::before,
  .price:hover::before,
  .plan:hover::before {
    width: 100%;
  }

  .service:hover::after,
  .price:hover::after,
  .plan:hover::after {
    opacity: 0.14;
  }

  .link-more:hover::after {
    width: 96px;
  }

  .btn:hover,
  .form .btn:hover {
    box-shadow: -10px 0 30px -6px var(--blue), 0 8px 30px -6px var(--magenta), 10px 0 30px -6px var(--yellow);
  }
}

/* ---------- スクロールで表示する演出 ----------
   .rv は JavaScript が付け、表示が終わると外す
   （外すことでホバーの動きと干渉しなくなる） */
.rv.rv {
  opacity: 0;
  translate: 0 48px;
  transition:
    opacity 1.4s ease var(--d, 0s),
    translate 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) var(--d, 0s);
}

.rv.rv.is-in {
  opacity: 1;
  translate: 0 0;
}

/* 大きな見出し：下からせり上がる */
.rv-head > * {
  opacity: 0;
  translate: 0 60%;
  clip-path: inset(0 0 100% 0);
  transition:
    opacity 1.2s ease,
    translate 1.4s cubic-bezier(0.2, 0.8, 0.2, 1),
    clip-path 1.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rv-head > :nth-child(2) { transition-delay: 0.2s; }

.rv-head.is-in > * {
  opacity: 1;
  translate: 0 0;
  clip-path: inset(-20% -5% -20% -5%);
}

/* キャッチコピー：一文字ずつ浮かび上がる */
.rv-text .char {
  opacity: 0;
  filter: blur(8px);
  transition: opacity 0.9s ease var(--d), filter 0.9s ease var(--d);
}

.rv-text.is-in .char {
  opacity: 1;
  filter: blur(0);
}

/* カード：現れるときに色の線が端まで走る */
.service.rv.is-in::before,
.plan.rv.is-in::before {
  width: 100%;
  transition: width 1.6s ease calc(var(--d, 0s) + 0.3s);
}

/* トップの流れ：線が左から右へ描かれる */
.flow-list.rv-line::before {
  transform: scaleX(0);
  transition: transform 2.2s cubic-bezier(0.5, 0, 0.3, 1);
}

.flow-list.rv-line.is-in::before {
  transform: none;
}

/* 社名の由来のロゴ：線が描かれる */
.rv-draw path {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 2.8s cubic-bezier(0.6, 0, 0.2, 1);
}

.rv-draw.is-in path {
  stroke-dashoffset: 0;
}

/* ---------- タブレット・スマホ ---------- */
@media (max-width: 960px) {
  .flow-list.rv-line::before {
    transform: scaleY(0);
  }

  .flow-list.rv-line.is-in::before {
    transform: none;
  }

  .section {
    grid-template-columns: 1fr;
  }

  .service-list,
  .price-list {
    grid-template-columns: 1fr;
  }

  .service,
  .service + .service {
    padding: 32px 20px;
    border-left: none;
  }

  .service + .service {
    border-top: 1px solid var(--gray-700);
  }

  /* 制作の流れは縦並びにし、左の線でつなぐ */
  .flow-list {
    grid-template-columns: 1fr;
  }

  .flow-list::before {
    top: 0;
    left: -1px;
    width: 2px;
    height: 100%;
  }

  .flow-list li {
    padding: 0 0 32px 28px;
  }

  .flow-list li::before {
    top: 10px;
    left: -4px;
  }
}

/* 中くらいの画面幅：メニューがロゴに重ならないように詰める */
@media (min-width: 769px) and (max-width: 1100px) {
  .nav ul {
    gap: 20px;
  }

  .nav__num {
    display: none;
  }

  .nav__contact {
    padding: 4px 14px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 64px;
  }

  .hero__label {
    font-size: 12px;
    letter-spacing: 0.08em;
  }

  .menu-btn {
    display: block;
    position: relative;
    z-index: 2;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
  }

  .menu-btn span {
    position: absolute;
    left: 4px;
    width: 24px;
    height: 1px;
    background: var(--white);
    transition: transform 0.3s, top 0.3s;
  }

  .menu-btn span:first-child { top: 12px; }
  .menu-btn span:last-child  { top: 20px; }

  .menu-btn[aria-expanded="true"] span:first-child {
    top: 16px;
    transform: rotate(45deg);
  }

  .menu-btn[aria-expanded="true"] span:last-child {
    top: 16px;
    transform: rotate(-45deg);
  }

  .nav {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--black);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
  }

  /* メニューを開いている間は色の反転を止める（止めないと黒背景が透ける） */
  .header.is-menu-open {
    mix-blend-mode: normal;
  }

  .nav ul {
    flex-direction: column;
    gap: 28px;
  }

  .nav a {
    font-size: 22px;
  }

  /* スマホではロゴを見出しの上側に置き、文字と重ねない */
  .hero__visual {
    top: 22%;
    right: 50%;
    width: 72vw;
    transform: translate(50%, -50%);
  }

  .hero__inner {
    margin-top: 24vh;
  }

  .footer__nav {
    grid-template-columns: 1fr 1fr;
  }
}

/* =========================================
   下層ページ
   ========================================= */

/* ---------- ページ見出し ---------- */
.page-hero {
  padding: calc(var(--header-h) + clamp(80px, 12vw, 160px)) var(--gutter) clamp(64px, 8vw, 100px);
  background: var(--black);
  color: var(--white);
}

.page-hero__num {
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 16px;
}

.page-hero__title {
  font-family: var(--font-en);
  font-weight: 200;
  font-size: clamp(48px, 9vw, 128px);
  line-height: 1;
  opacity: 0;
  transform: translateY(30px);
  animation: rise 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s forwards;
}

.page-hero__ja {
  margin-top: 24px;
  font-size: 14px;
  letter-spacing: 0.15em;
  color: var(--gray-300);
}

.breadcrumb {
  display: flex;
  gap: 12px;
  margin-top: 64px;
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 12px;
}

.breadcrumb a:hover {
  color: var(--white);
}

/* 現在のページのメニューに線を引く */
.nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* ---------- 本文まわり ---------- */
.lead-text {
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 400;
  line-height: 1.7;
  margin-bottom: 40px;
}

.sub-title {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin: 48px 0 16px;
}

.check-list li {
  position: relative;
  padding: 14px 0 14px 28px;
  border-bottom: 1px solid var(--gray-300);
}

.section--dark .check-list li {
  border-color: var(--gray-700);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 12px;
  height: 1px;
  background: currentColor;
}

/* ---------- Philosophy ---------- */
.value-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--gray-300);
}

.value {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 40px 0;
  border-bottom: 1px solid var(--gray-300);
}

.value__title {
  font-family: var(--font-en);
  font-weight: 300;
  font-size: 26px;
  line-height: 1.3;
}

.value__title span {
  display: block;
  font-family: var(--font-ja);
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

.name-origin {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 48px;
  align-items: center;
}

.name-origin svg {
  width: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 0.3;
}

/* ---------- Flow ---------- */
.flow-detail {
  position: relative;
  border-left: 1px solid var(--gray-300);
}

/* スクロールに合わせて伸びる色の線 */
.flow-detail::after {
  content: "";
  position: absolute;
  top: 0;
  left: -1.5px;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, var(--blue), var(--magenta), var(--yellow));
  transform: scaleY(var(--progress, 1));
  transform-origin: top;
}

.flow-detail > li {
  position: relative;
  padding: 0 0 64px 48px;
}

.flow-detail > li:last-child {
  padding-bottom: 0;
}

.flow-detail > li::before {
  content: "";
  z-index: 1;
  transition: background 0.6s, box-shadow 0.6s;
  position: absolute;
  top: 12px;
  left: -5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--black);
}

/* まだ到達していないステップの点は白抜き */
.flow-detail.is-tracking > li:not(.is-reached)::before {
  background: var(--white);
  box-shadow: 0 0 0 1px var(--gray-300);
}

.flow-detail.is-tracking > li.is-reached::before {
  box-shadow: 0 0 0 5px rgba(47, 123, 255, 0.16);
}

.flow-detail h3 {
  font-family: var(--font-en);
  font-weight: 300;
  font-size: 28px;
  line-height: 1.3;
}

.flow-detail h3 span {
  margin-left: 16px;
  font-family: var(--font-ja);
  font-size: 14px;
  color: var(--muted);
}

.flow-detail p {
  margin-top: 12px;
}

.flow-detail .flow__term {
  display: inline-block;
  margin-top: 16px;
  padding: 2px 12px;
  border: 1px solid var(--gray-300);
  font-size: 12px;
  color: var(--gray-700);
}

/* ---------- Price ---------- */
.plan-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 40px 32px;
  background: var(--white);
  border: 1px solid var(--gray-300);
}

.plan--featured {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.plan .price__value + .price__value {
  margin-top: 8px;
}

.price__value small {
  display: block;
  font-family: var(--font-ja);
  font-size: 12px;
  color: var(--muted);
}

.plan .check-list {
  margin-top: 32px;
  font-size: 14px;
}

.plan--featured .check-list li {
  border-color: var(--gray-700);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 20px 16px 20px 0;
  border-bottom: 1px solid var(--gray-300);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  width: 30%;
  font-weight: 500;
}

.data-table td.num {
  font-family: var(--font-en);
  font-size: 16px;
  text-align: right;
  white-space: nowrap;
}

/* ---------- Contact ---------- */
.form {
  display: grid;
  gap: 32px;
}

.form__label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
}

.form__req {
  margin-left: 8px;
  padding: 1px 8px;
  font-size: 10px;
  background: var(--black);
  color: var(--white);
}

.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form select,
.form textarea {
  width: 100%;
  padding: 14px 16px;
  font: inherit;
  font-size: 16px; /* 16px未満だとiPhoneで入力時に拡大されてしまう */
  color: var(--black);
  background: var(--gray-100);
  border: 1px solid transparent;
  border-radius: 0;
  outline: none;
  transition: border-color 0.3s, background 0.3s;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  border-color: var(--black);
  background: var(--white);
}

.form textarea {
  min-height: 200px;
  resize: vertical;
}

.form__agree {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 14px;
}

.form__agree input {
  width: 18px;
  height: 18px;
  accent-color: var(--black);
}

.form__agree a {
  text-decoration: underline;
}

.form .btn {
  justify-self: start;
  border-color: var(--black);
  background: var(--black);
  color: var(--white);
  cursor: pointer;
  font-family: var(--font-en);
}

.form .btn:hover {
  background: var(--white);
  color: var(--black);
}

.form__message {
  padding: 24px;
  border: 1px solid var(--black);
  font-size: 14px;
}

/* ---------- Privacy ---------- */
.policy h2 {
  font-size: 17px;
  font-weight: 500;
  margin: 56px 0 16px;
}

.policy h2:first-child {
  margin-top: 0;
}

.policy ol {
  list-style: decimal;
  padding-left: 1.5em;
}

/* ---------- 下層ページのスマホ対応 ---------- */
@media (max-width: 960px) {
  .plan-list {
    grid-template-columns: 1fr;
  }

  .value,
  .name-origin {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .name-origin svg {
    width: 120px;
  }
}

@media (max-width: 600px) {
  .data-table th,
  .data-table td {
    display: block;
    width: 100%;
    padding-right: 0;
  }

  .data-table th {
    padding-bottom: 4px;
    border-bottom: none;
  }

  .data-table td {
    padding-top: 0;
  }

  .data-table td.num {
    text-align: left;
  }

  .flow-detail > li {
    padding-left: 28px;
  }

  .flow-detail h3 span {
    display: block;
    margin: 4px 0 0;
  }
}

/* =========================================
   トップページの演出
   ========================================= */

/* ---------- 導入演出 ---------- */
.intro {
  display: none;
}

.is-intro .intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--black);
  pointer-events: none;
  animation: intro-out 0.5s ease 1.3s forwards;
}

.intro svg {
  width: min(42vw, 240px);
  overflow: visible;
  animation: intro-zoom 1.8s cubic-bezier(0.6, 0, 0.2, 1) forwards;
}

.intro path {
  fill: none;
  stroke: var(--white);
  stroke-width: 0.3;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: draw 1.2s cubic-bezier(0.6, 0, 0.2, 1) forwards;
}

@keyframes intro-out {
  to { opacity: 0; visibility: hidden; }
}

@keyframes intro-zoom {
  from { scale: 0.94; }
  to { scale: 1.12; }
}

.is-intro .loop { animation-delay: 1.3s; }
.is-intro .loop:nth-of-type(2n) { animation-delay: 1.6s; }
.is-intro .loop:nth-of-type(3n) { animation-delay: 1.9s; }
.is-intro .loop-light { animation-delay: 3.9s, 3.9s; }
.is-intro .hero__title > span { animation-delay: 2.1s; }
.is-intro .hero__title > span + span { animation-delay: 2.3s; }
.is-intro .hero__lead { animation-delay: 2.7s; }

@media (min-width: 769px) {
  .is-intro .header--intro .nav li { animation-delay: 1.6s; }
}

/* ---------- ファーストビューの背景の線 ---------- */
.hero__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* 広い画面では、文字がある左側の線を控えめにする */
@media (min-width: 769px) {
  .hero__lines {
    -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.4) 40%, #000 66%);
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.4) 40%, #000 66%);
  }
}

/* スマホでは、流れの線と「1本の線」が並ばないように、流れの線は灰色にする */
@media (max-width: 768px) {
  .flow-list::before {
    background: var(--gray-300);
  }
}

/* ---------- 1本の線 ---------- */
main {
  position: relative;
}

.thread {
  position: absolute;
  left: 0;
  z-index: 1;
  overflow: visible;
  pointer-events: none;
}

.thread__base,
.thread__path {
  fill: none;
}

.thread__base {
  stroke: var(--gray-500);
  stroke-width: 1;
  opacity: 0.3;
}

.thread__path {
  stroke: url(#threadColor);
  stroke-width: 2;
}

.thread__nodes circle {
  fill: var(--gray-500);
  transition: fill 0.6s, r 0.6s;
}

.thread__nodes circle.is-reached {
  fill: var(--magenta);
  r: 6px;
}

.thread__nodes circle:first-child.is-reached { fill: var(--blue); }
.thread__nodes circle:nth-child(3).is-reached { fill: var(--yellow); }

.thread__head {
  fill: var(--white);
  stroke: var(--magenta);
  stroke-width: 2;
  filter: drop-shadow(0 0 6px var(--magenta));
}

/* ---------- サービスの進行表示と重なるカード（広い画面のみ） ---------- */
.stack-progress {
  display: none;
}

@media (min-width: 961px) and (min-height: 640px) {
  .section--stack > .section__head {
    position: sticky;
    top: calc(var(--header-h) + 32px);
    align-self: start;
  }

  .section--stack .stack-progress {
    display: block;
    position: relative;
    max-width: 180px;
    margin-top: 48px;
    padding-bottom: 14px;
    font-family: var(--font-en);
    font-size: 13px;
    letter-spacing: 0.2em;
    color: var(--muted);
  }

  .stack-progress__now {
    font-size: 40px;
    font-weight: 200;
    color: var(--white);
  }

  .stack-progress::before,
  .stack-progress::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--gray-700);
  }

  .stack-progress::after {
    background: var(--now-color, var(--blue));
    transform: scaleX(var(--ratio, 0.25));
    transform-origin: left;
    transition: transform 0.6s, background-color 0.6s;
  }

  .service-list--stack {
    display: block;
    border-top: none;
  }

  .service-list--stack::after {
    content: "";
    display: block;
    height: 24vh; /* 最後のカードを読む時間 */
  }

  /* 見出しの行（56px）を残して、次のカードが重なる */
  .service-list--stack > .service {
    position: sticky;
    top: calc(var(--header-h) + 32px + var(--i) * 56px);
    display: grid;
    grid-template-columns: 40px auto 1fr;
    grid-template-rows: auto 1fr auto;
    column-gap: 16px;
    align-items: baseline;
    min-height: min(380px, 50vh);
    margin-bottom: calc((3 - var(--i)) * 56px);
    padding: 12px 40px 40px;
    background: #111111;
    border: 1px solid var(--gray-700);
  }

  .service-list--stack > .service + .service {
    margin-top: 26vh;
  }

  .service-list--stack > .service:nth-child(1) { --i: 0; }
  .service-list--stack > .service:nth-child(2) { --i: 1; }
  .service-list--stack > .service:nth-child(3) { --i: 2; }
  .service-list--stack > .service:nth-child(4) { --i: 3; }

  .service-list--stack > .service::before {
    width: 100%;
  }

  .service-list--stack .service__num {
    margin: 0;
    font-size: 14px;
    color: var(--accent);
  }

  .service-list--stack .service__title {
    font-size: 26px;
    white-space: nowrap;
  }

  .service-list--stack .service__ja {
    justify-self: end;
    margin: 0;
  }

  .service-list--stack .service__text {
    grid-column: 2 / -1;
    align-self: center;
    max-width: 22em;
    font-size: clamp(18px, 1.8vw, 24px);
    line-height: 2;
  }

  .service-list--stack .service__tags {
    grid-column: 2 / -1;
    margin: 0;
  }

  @media (hover: hover) {
    .service-list--stack > .service:hover {
      transform: none; /* 重なりがずれないように、持ち上げない */
    }
  }
}

/* ---------- サービスのイメージ画像 ---------- */
/* 縦に並ぶ表示では、カードの上部に置いて下側をなじませる */
.service-list--stack .service__image {
  display: block;
  width: calc(100% + 64px);
  height: auto;
  max-width: none;
  margin: -40px -32px 24px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: 80% center;
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent);
  mask-image: linear-gradient(180deg, #000 60%, transparent);
}

.service-list--stack > .service {
  background: #080808; /* 画像の黒に合わせる */
}

@media (max-width: 960px) {
  .service-list--stack .service__image {
    width: calc(100% + 40px);
    margin: -32px -20px 16px;
    aspect-ratio: 4 / 3;
  }
}

/* 重なるカードでは背景に敷き、文字がある左側をなじませる */
@media (min-width: 961px) and (min-height: 640px) {
  .service-list--stack > .service {
    isolation: isolate;
  }

  .service-list--stack .service__image {
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    margin: 0;
    aspect-ratio: auto;
    object-position: right center;
    -webkit-mask-image: linear-gradient(90deg, transparent 12%, rgba(0, 0, 0, 0.55) 48%, #000 72%);
    mask-image: linear-gradient(90deg, transparent 12%, rgba(0, 0, 0, 0.55) 48%, #000 72%);
  }

  .service-list--stack .service__text {
    max-width: 15.5em; /* 画像の被写体に文字が重ならない幅 */
    text-shadow: 0 0 12px #080808, 0 0 4px #080808;
  }

  .service-list--stack .service__title,
  .service-list--stack .service__ja {
    text-shadow: 0 0 8px #080808;
  }
}

.footer__company {
  margin-top: 20px;
  font-size: 13px;
}

.footer__company + .footer__address {
  margin-top: 4px;
}

/* ---------- 得意領域 ---------- */
.strength-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.strength {
  position: relative;
  padding: 32px 24px;
  border: 1px solid var(--gray-700);
}

.strength::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 40px;
  height: 2px;
  background: var(--accent, var(--blue));
}

.strength:nth-child(1) { --accent: var(--magenta); }
.strength:nth-child(2) { --accent: var(--blue); }
.strength:nth-child(3) { --accent: var(--green); }

.strength__num {
  font-family: var(--font-en);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 16px;
}

.strength__title {
  word-break: keep-all; /* <wbr> の位置で改行する */
  overflow-wrap: anywhere;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.7;
  margin-bottom: 16px;
}

.strength p:last-child {
  font-size: 14px;
  color: var(--gray-300);
}

/* ---------- 支援実績 ---------- */
.works-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.works-table th,
.works-table td {
  padding: 18px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--gray-300);
}

.works-table th {
  background: var(--black);
  color: var(--white);
  font-weight: 500;
  white-space: nowrap;
}

.works-table td:nth-child(1) {
  width: 32%;
}

.works-table td:nth-child(2) {
  width: 18%;
}

.case-list {
  display: grid;
  gap: 24px;
}

.case {
  padding: 40px 32px;
  background: var(--white);
  border-top: 2px solid var(--accent, var(--blue));
}

.case:nth-child(2) { --accent: var(--magenta); }
.case:nth-child(3) { --accent: var(--yellow); }
.case:nth-child(4) { --accent: var(--green); }

.case__num {
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.case__title {
  font-size: 20px;
  font-weight: 500;
  margin-top: 8px;
}

.case__meta {
  font-size: 12px;
  color: var(--muted);
}

.case dl {
  margin: 24px 0 0;
}

.case dl > div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 24px;
  padding: 14px 0;
  border-top: 1px solid var(--gray-300);
}

.case dt {
  font-weight: 500;
  font-size: 13px;
}

.case dd {
  margin: 0;
}

/* ---------- お問い合わせフォームの埋め込み ---------- */
.form-embed {
  margin: 32px 0 0;
}

.form-embed iframe {
  display: block;
  width: 100%;
  height: 1620px; /* 質問を増やしたら高さも見直す */
  border: 1px solid var(--gray-300);
}

/* トップの4番目の点（Flow） */
.thread__nodes circle:nth-child(4).is-reached { fill: var(--green); }

@media (max-width: 1199px) {
  .strength-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .works-table thead {
    display: none;
  }

  .works-table tr {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-300);
  }

  .works-table td,
  .works-table td:nth-child(1),
  .works-table td:nth-child(2) {
    display: flex;
    gap: 16px;
    width: 100%;
    padding: 4px 0;
    border: none;
  }

  .works-table td::before {
    content: attr(data-label);
    flex: 0 0 5em;
    font-weight: 500;
  }

  .case {
    padding: 28px 20px;
  }

  .case dl > div {
    grid-template-columns: 1fr;
  }

  .form-embed iframe {
    height: 1700px;
  }
}

@media (max-width: 380px) {
  .form-embed iframe {
    height: 1880px;
  }
}

/* ---------- トップの Flow：縦1列のときだけ説明を表示 ---------- */
.flow-list .flow__desc {
  display: none;
}

@media (max-width: 960px) {
  .flow-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 12px;
    padding-bottom: 28px;
  }

  .flow-list .flow__step {
    width: 100%;
  }

  .flow-list h3 {
    font-size: 22px;
    margin: 4px 0 0;
  }

  .flow-list .flow__desc {
    display: block;
    width: 100%;
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.9;
  }
}

/* 動きを減らす設定の人には演出を止める */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  html {
    scroll-behavior: auto;
  }

  .loop-light {
    display: none;
  }
}
